I have two servers, and I'm wanting to set up a cron job to backup contents from one server to the other. I'm writing my own thing because I only want to copy certain directories, instead of the whole account (the whole account is huge, and most of it doesn't need a continuous backup).
If I were doing it manually, I would use this while logged in to the backup server:
But in practice, this prompts for a password, which I don't think I can submit in a cron.
So how can I do the same thing as a cron?
If I were doing it manually, I would use this while logged in to the backup server:
Code:
rsync -aupog -e 'ssh -p 1234' [email protected]:/home/example/public_html/directory/ /backup/directory/
So how can I do the same thing as a cron?