LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-23-2008, 11:51 PM   #1
Astol
Member
 
Registered: Aug 2007
Location: Perth, Australia
Distribution: RHEL 5 + 4.5, Fedora
Posts: 88

Rep: Reputation: 15
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
 
Old 09-24-2008, 12:04 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
'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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using RSync to backup a secondary off-site backup server pezdspencer Linux - Software 4 06-29-2007 03:40 PM
LXer: Device Profile: Hammer MyShare NAS device LXer Syndicated Linux News 0 04-26-2007 01:01 PM
Backup with rsync and crontab gjblackford Linux - General 4 01-04-2007 08:53 AM
rsync in crontab loonykroons Linux - Software 3 11-28-2006 03:08 AM
rsync to an off-the-shelf NAS JacekZ Linux - Networking 3 08-21-2006 08:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration