Synchronizing an external copy of folders and files

A simple way to maintain an updated backup of folders and files can be to synchronise them automatically at regular intervals using rsync.

rsync is a fast tool for copying files. It can copy locally and to other hosts. It reduces the amount of data, sent over networks, by sending only the differences between the source and destination files. It copies files, that has changed in size or time stamp. It can delete files on the destination, that has been deleted from the source.

In the following example, the name and the contents of a local directory is synchronised with a local directory, that can be a native directory, mount point for an external hard disk or mount point for another device. The directories will contain the same folders and files.

rsync -Cuavz --delete /usr/home/ann /mnt/backup/

In the following example, the contents, and not the name, of a local directory is synchronised with a remote directory. SSH is used.

rsync -Cuavz --delete /usr/home/ann/project/ ann@foobar.com:/usr/home/ann/project/

See examples of rsync commands at The Geek Stuff.

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>