SecureCube.com

14Jul/110

Replicate using rsync

To replicate local directories

The following will replicate all files and folders in the '/home' folder to '/mnt/backup/' folder recursively.

rsync -avh --delete /home/ /mnt/backup/
To replicate to remote directories

The following will replicate all files and folders in the '/home' folder to the remote server myhost under the username bob to directory '/backup/'. The use of the progress argument will show you the status of the transfer.

rsync --progress -avhe ssh --delete /home/ [email protected]:/backup/

You can of course automate the running of these through crontab.

Tagged as: No Comments