Problem running samba_backup from cron

David Rivera rivera.david87 at gmail.com
Fri Nov 8 17:02:41 MST 2013


*resending to list*

I don't believe cron will invoke .bash_profile. Try setting your $PATH
variable before any of your commands in your crontab.


On Fri, Nov 8, 2013 at 1:48 PM, Taylor, Jonn <jonnt at taylortelephone.com>wrote:

>  Already set path in root's bash_profile.
>
> PATH=$PATH:$HOME/bin:/usr/local/samba/bin:/usr/local/samba/sbin
>
> Jonn
>
>
> On 11/08/2013 03:43 PM, David Rivera wrote:
>
> You need to add /usr/local/samba/bin to your $PATH or modify line 54 in
> the script to point to tdbbackup's absolute path.
> (/usr/local/samba/bin/tdbbackup)
>
>
>  On Fri, Nov 8, 2013 at 1:31 PM, Taylor, Jonn <jonnt at taylortelephone.com>wrote:
>
>> I have a cron setup to run a backup every day at 2am. This is failing
>> with the following.
>>
>> /usr/sbin/samba_backup: line 69: tdbbackup: command not found
>> Error while backing up ./private/secrets.ldb - status 127
>>
>> If I run it manually it works fine. This is on CentOS 6 x86_64. Samba is
>> installed in /usr/local/samba.
>>
>> This is the wiki page I used to setup the backup.
>>
>> https://wiki.samba.org/index.php/Backup_and_Recovery
>>
>> Jonn
>>
>>
>
>


More information about the samba-technical mailing list