rsync

rsync can be a useful tool for keeping certain directories synchronized across networks, especially if only one machine will be doing any file modifications. However, you have to .

To get it to appropriately copy a directory from the local machine to a remote machine, do something like this:

rsync -raiv path/to/local/ remote:path/to/

If the source path has a trailing slash, the contents are synced into the destination directory. If the source path does not have a trailing slash, a subdir is made in the destination directory.

Other options that might be useful, such as -z for compression, might be good to use.

rsync daemon

Debian makes it easy to run your own rsync daemon.

Change RSYNC_ENABLE to true in /etc/default/rsync and then drop a config into /etc/rsyncd.conf. Look at man rsyncd.conf, but here is an example:

[upload]
        path = /home/richard/upload/
        comment = upload site
        uid = richard
        gid = richard
        list = false      # Don't show in the modules listing when you do  rsync <hostname>::
        read only = false
        write only = true

You can use hostname::upload/ as an rsync path to this folder.

The rsync protocol is unencrypted. It has an authentication mechanism but is not very strong.

DebianNotes/Rsync (last edited 2010-12-23 03:19:27 by RichardDarst)