View Full Version : cron and rsync

05-10-2009, 01:13 PM
I mirror a tor website, it has to be synced daily. Currently I login to sync it manually. I'd like to automate the task..

Ok... Currently I navigate to the "www" directory, which incidentally, I suspect is a symbolic link...
And I issue this command...
rsync -av --delete rsync://rsync.torproject.org/tor tor/
because there is a /tor directory inside the /www directory.
Now this works as long as I'm navigated to the directory... /www
If I cron the job, I don't think it will automatically navigate to the directory to execute the command.
So I need help to ensure the the command is cronned correctly so that it is executed in the correct directory so I'm not creating another 15GB tor directory.

Any assistance is appreciated.

Thank you,

05-10-2009, 08:24 PM
On WestHost accounts, www is a symbolic link to the directory /var/www/html.

You can use the complete path in your rsync command to ensure that it will work properly when executed from any directory (and thus from cron as well). Try rsync -av --delete rsync://rsync.torproject.org/tor /var/www/html/tor/