For syncing information between 2 Linux server you can easily use RSYNC for that task

I created 2 Apache webservers for hosting several websites with IBM Domino as the backend server. The 2 Apache servers have their own configuration, but the website configuration files are the same. So these files can be synced. One server will be leading in the config, and the other server gets the updates whenever needed.

Server a:192.168.0.10
Server b:192.168.0.20

From server a:
Test the connections and ability to sync the files, only from server a to server b with typing your password.

rsync -avz -e ssh /data/websites.d/ root@192.168.0.20:/data/websites.d/   

When all went well you can now create a SSH key in order to use rsync without typing in the password. Still on server a:

ssh-keygen   ( Press enter twice on the passphrase question: leave it empty )

Now copy the just created SSH key to the remote server from server a to server b:

ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.0.20

Now you can use rsync without password.

Visits: 183

By angioni

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.