[Samba] Problem with backup of the Samba 4

Marc Muehlfeld mmuehlfeld at samba.org
Wed Aug 19 05:16:27 UTC 2015


Hellor Marcio,

Am 19.08.2015 um 06:33 schrieb Marcio Demetrio Bacci:
> I followed the tutorial below to do backup of the Samba4:
> 
> https://wiki.samba.org/index.php/Backup_and_Recovery
> 
> When I execute the backup script manually, it is executed perfectly, but
> when I execute in the crontab, it isn't work.
> 
> It is my crontab on Debian 7:
> 0 1 * * 1-5       /usr/sbin/samba_backup
> 
> Does somebody have an idea ?



I think $PATH differs in your situation from when you run it manually
and when cron does. You can add a
   export $PATH=$PATH:...
to the top of the script, where you add all directories, used
executables are in.


For debugging, you can run the script via cron:

0 1 * * 1-5     /bin/bash -x /usr/sbin/samba_backup > /tmp/bck.log 2>&1

and have a look in the log afterwards.


Regards,
Marc



More information about the samba mailing list