Auto RSYNC Over SSH via Cron?
Guys - I want to place the following cron job in my server so it can mirror the primary server which users constantly modify on a daily basis but I would like this to be done via CRON at night rather than me having to manually type these commands but when I issue the command as a test, it prompts me for a password which I can understand via SSH access to the machine but what happens if I place this in CRON, will it not run if nobody is there to enter the password? Is there a secure and trusted way to do this?
Code:
0 2 * * * rsync --delete -avz -e ssh root@10.1.1.24:/etc/passwd /etc |
look up ssh key authentication. there are plenty of tutorials out there on how to do just this.
|
All times are GMT -5. The time now is 08:28 PM. |