Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sychnosizing web servers

Status
Not open for further replies.

richclever

IS-IT--Management
Oct 5, 2000
127
FR
Does anyone know an easy way to synchronize/mirror a web server with a local server. I have Plesk on both the remote server and local machine, and desperately need to have a live version of my portal on our local server. Also, when things are changed on either server I need them both to bring themselves up to date.

Any help much appreciated

Richard
 
Yes, I thought about Rsync too. Had problems getting it working though. Do you know of a good source of documentation?
 
I think their website is probably the best resource for documentation available.

 
We use rsync for syncing a master web server to two slave servers. It is run from cron every 10 minutes. Something like this:
rsync -az -e ssh --delete /var/ server2.my.domain:/var/
will sync the entire html tree. To just do a subset, specify the starting point, e.g.:
rsync -az -e ssh --delete /var/ server2.my.domain:/var/
The -a flag means use archive mode (i.e. copy symbolic links as links), the z flag means use compression when transferring files, the --delete flag means delete any files on the remote server that are no longer present on the master server, and the -e ssh flag means use ssh to contact the remote rsync slave, rather than the default remote command executor (which I believe is rsh).

Note that you have to have ssh (or rsh) configured so that the remote system does not prompt for a password. Generally this means an entry in a .rhosts or .shosts file.
 
Will Rsync sychronize both ways. I need it to keep both my local server and my remote server up to date. Data will change on both, and I don't want to lose data on either machine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top