I want to run a rsync
in a cron job.
The rsync
task is :
rsync -avz -e "ssh -i /home/mypc/.ssh/bkpRsync" --delete /home/mypc/backup/ root@vpsxxxxx.ovh.net:backup/
It works, when done manually.
But the cron line:
0 */2 * * * rsync -avz -e "ssh -i /home/mypc/.ssh/bkpRsync" --delete home/mypc/backup/ root@vpsxxxxx.ovh.net:backup/
doesn't perform any transfer to the vps.
I do have a log that tells that the rsync has been performed though.
I have tried creating the crontab with sudo, thinking that it was a right issue. It didn't help.
I don't understand why the cron task doesn't work.