01 Sep 2008, 16:15

rsync for replication


If you want to replicate the contents of a computer to another one over unsecure networks you can use rsync in combination with ssh to acomplish this.

rsync –delete -avze ssh user@hostname.domain.tld:/home/user/ /home/user/backup
This command will replicate the content of the remote machine to the local host. In case you want to use the other directon you can use the following command.
rsync –delete -avze ssh /home/user user@hostname.domain.tld:/home/user/backup
In case you need root privileges for replication take a look at pam_access.

Also take a look at the Ubuntu Wiki.