-   Linux - Software (
-   -   Crontab rsync does not backup to NAS device (

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.


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:

chmod 0644 /etc/crontab

crontab /etc/crontab
yet this has not helped.

i mapped the nas drive using this:

mount -t cifs // -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


instead of just

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

All times are GMT -5. The time now is 08:38 AM.