Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 09-28-2006, 10:29 AM   #1
Registered: May 2006
Location: Tennessee et. al
Distribution: Debian Sid, Etch
Posts: 138

Rep: Reputation: 15
Cron conundrum

I'm currently trying to make a cron script to do an hourly backup of the files on my Ubuntu 6.06 file server using rsync. I've included below the code for /etc/cron.hourly/rsync

rsync -ae ssh --delete-after backup@ /mnt/backup > /home/admin/rsync.hourly.log
Also, thinking that the problem could be with file ownership stuff, I double checked that out, and it has an owner and group of root, and the permissions are -rwxrwxr-x. When I run the command manually in bash, it works just fine. So I went into /var/log/syslog, and found the following:
Sep 28 08:17:01 localhost /USR/SBIN/CRON[31613]: (root) CMD ( run-parts --report /etc/cron.hourly)
Sep 28 08:17:01 localhost /USR/SBIN/CRON[31612]: (root) MAIL (mailed 152 bytes of output but got status 0x0001 )
My rsync script is the only script in /etc/cron.hourly, so I'm assuming that this entry from syslog is referring to my script. If anyone has an idea of why my cron script is not working, your help would be appreciated.


I have configured passwordless logins for ssh, so that can't be the problem.

Last edited by crashsystems; 09-28-2006 at 11:44 AM.
Old 09-29-2006, 03:11 AM   #2
Senior Member
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
try to append '2>/dev/null' to your rsync command.
Old 09-29-2006, 09:53 AM   #3
Registered: May 2006
Location: Tennessee et. al
Distribution: Debian Sid, Etch
Posts: 138

Original Poster
Rep: Reputation: 15
Well, I figured it out, though I'm not quite sure how. I decided to go look at some of the pre-configured cron.daily scripts to see if I could learn some from them. I decided to mimic their exact permissions for owner group and other. Once I did that, it worked perfectly, which is strange due to the fact that I had already made the script executable.



cron, resolved, rsync

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can any one plz explain why/what for cron.d, cron.daily, cron.weekly etc are there. mavinashbabu Linux - Newbie 4 09-21-2006 01:50 PM
sendmail conundrum! siepmann Linux - Networking 1 07-02-2005 09:17 AM
A sed conundrum! Bert Linux - Software 2 12-09-2003 08:38 AM
@Home Conundrum. bzzt-whir Linux - Networking 0 02-18-2002 01:08 PM
Quite the conundrum...... Randall Linux - Newbie 10 11-09-2001 05:38 PM > Forums > Linux Forums > Linux - General

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

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