LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Crontab rsync does not backup to NAS device (http://www.linuxquestions.org/questions/linux-software-2/crontab-rsync-does-not-backup-to-nas-device-671949/)

Astol 09-24-2008 12:51 AM

Crontab rsync does not backup to NAS device
 
hey guys

I have a WD MyWorldBook Edition II NAS drive that I am attempting to back up a folder (and its contents) with rsync using crontab every hour.

crontab:
Code:

00 8 * * 1,2,3,4,5 rsync -rth --log-file=/mnt/nas/backups/sync0800/changes.log /folder/ /mnt/nas/backups/sync08000/
00 9 * * 1,2,3,4,5 rsync -rth --log-file=/mnt/nas/backups/sync0900/changes.log /folder/ /mnt/nas/backups/sync0900/
00 10 * * 1,2,3,4,5 rsync -rth --log-file=/mnt/nas/backups/sync1000/changes.log /folder/ /mnt/nas/backups/sync1000/

and continues to 1800...

when I run the line in a terminal window, it runs perfectly fine, but will not do so in crontab

i have looked around on the net, and found i should do this:
Code:

chmod 0644 /etc/crontab
and:
Code:

crontab /etc/crontab
yet this has not helped.

i mapped the nas drive using this:
Code:

mount -t cifs //192.168.1.99/Private -o username=****,password=**** /mnt/nas
thanks in advance

chrism01 09-24-2008 01:04 AM

'but will not do so in crontab' ?? What are the symptoms/error msgs?
The usual issue is that cron has a minimal env, so you need to refix all progs and files with complete paths eg

/usr/bin/rsync

instead of just
rsync

Usually cron will email the crontab owner or root with error msgs if it fails.


All times are GMT -5. The time now is 09:38 PM.