dslreports logo
 
    All Forums Hot Topics Gallery
spc
uniqs
20

Steve
I know your IP address

join:2001-03-10
Tustin, CA

Steve to Inssomniak

to Inssomniak

Re: rsync works ok at prompt but not in crontab.

First: don't run rsync directly from cron; these command lines are too long and hard to document.

Instead, put it in a shell script (say, /usr/local/bin/cron-rsync-to-some-other-machine) and then run this out of cron.
52 9 * * * /usr/local/bin/cron-rsync-to-some-other-machine
 
The --exclude stuff for sure has to be in single quotes.

Are you seeing anything in the logs?

Inssomniak
The Glitch
Premium Member
join:2005-04-06
Cayuga, ON

Inssomniak

Premium Member

Yea in the logs I can see it try to sync the /proc directory and fails with some error about file disappearing. And when I run ps aux I can see the command rsync received and it is trying to sync all the excluded directories.
Inssomniak

Inssomniak to Steve

Premium Member

to Steve
It worked ok running it from its own script called by cron but it still didnt like the single quotes, the excludes still had to be in the {} brackets.

Thanks for the help!