Results 1 to 3 of 3
Dear all,
I am trying to set up a backup system for my Ubuntu linux (8.04) laptop with a desktop linux machine (openSuse 9.x) using a combination of rsync, cron ...
- 08-28-2008 #1Just Joined!
- Join Date
- Aug 2008
- Posts
- 2
rsync using cron and ssh
Dear all,
I am trying to set up a backup system for my Ubuntu linux (8.04) laptop with a desktop linux machine (openSuse 9.x) using a combination of rsync, cron and ssh.
The folowwing rsync command is working ok when I run it in a terminal (as normal user):
When I put this command in my crontab file (running crontab -e), the rsync command fails.Code:rsync -avz -e "ssh -i /home/userid/sync/PCxxxx-rsync-key" /home/userid/wanteddir/ userid@pcyyyy:/home/userid/backup/wanteddir/
However, the cron-log-file tells me that the job is excuted:Code:46 10 * * * rsync -avz -e "ssh -i /home/userid/sync/PCxxxx-rsync-key" /home/userid/wanteddir/ userid@pcyyyy:/home/userid/backup/wanteddir/
If there would be an error-message resulting from this cron-job, where can I find it? Apparently not in the file /var/log/cron.log? Also in /var/log/messages I cannot find any entry related with my cronjobCode:Aug 28 10:18:01 PCxxxx /USR/SBIN/CRON[19650]: (userid) CMD (rsync -avz -e "ssh -i /home/userid/sync/PCxxxx-rsync-key" /home/userid/wanteddir/ userid@pcyyyy:/home/userid/backup/wanteddir/)
Thanx in advance
P.
- 08-29-2008 #2
Debug Cron
cron can be run with a "-x" option
Code:-x debugflag[,...] Enable writing of debugging information to standard output. One or more of the following comma-separated debugflag identifiers must be specified: bit currently not used ext make the other debug flags more verbose load be verbose when loading crontab files misc be verbose about miscellaneous one-off events pars be verbose about parsing individual crontab lines proc be verbose about the state of the process, including all of its offspring sch be verbose when iterating through the scheduling algorithms test trace through the execution, but do not perform any actions
- 08-29-2008 #3Just Joined!
- Join Date
- Aug 2008
- Posts
- 2
Hi
Thanx for the suggestion.
However, what I did is put all my commands in a shell script and save the STDERR of this shell script. That pointed me to the solution. More info:
[ubuntu] Cron combined with ssh and rsync - Ubuntu Forums
HOWTO: SSH & Public Keys [Archive] - Ubuntu Forums
P.


Reply With Quote
