I want to use rsync to synchronise my home folder with a "backup" copy on another drive on an Ubuntu 11.10 machine. And I want it to happen every 15 minutes.
If I manually run:
rsync -ar --delete /home/user/ /backupdrive/
in the CLI, it works just fine - everything in in sync.
But I've added:
*/15 * * * * rsync -ar --delete /home/user/ /backupdrive/
to sudo crontab -e
and whilst it adds new files, it doesn't delete the old ones.
Any ideas?
Edit
The first three lines of the cron out.txt are:
sending incremental file list
./
IO error encountered -- skipping file deletion
This doesn't happen with the CLI version.
-v
option and redirect the output to a file. Then, check the file.out.txt
. So> /tmp/out.txt
for example. Otherwise its going to putout.txt
in whatever directory cron is running from.