rsync mirroring with SSH
All,
I have the command to do the sync: rsync -avz --bwlimit=20 -e ssh --stats --progress /var/mail/virtual root@myhiddenhost.mydomain.net:/var/mail/ I would like to rsync automatically. I read about running a daemon, but it seems that running a daemon makes a new server and listens on a port. I would like the sync to happen automatically. Am I best using a crontab? What's the best way to make sure that program doesn't run at the same time as itself? Thanks, David |
I am doing an automatic rsync each night between two Linux servers. The script runs from the crontab and connects using ssh. To be sure that you don't step on the running script, have it create a lockfile (usually I write the PID of the script to this file). At the beginning of the script, test for the existance of the lockfile and abort if it exists (meaning the script is already running).
|
Quote:
Turns out "rsync daemon" is for serving files on a network. David |
All times are GMT -5. The time now is 06:18 PM. |