rsync
rsync is a command-line utility to synchronise files locally or across a network (typically over
ssh).
Here's a command I like to use:
$ rsync -PCavzh --stats <source> <destination>
Be mindful of the trailing slash!
Older versions of rsync use rsh as a remote transport, but you can
use ssh with the -e parameter. This allows you to use any of the options available to ssh.
To keep all attributes (archive), use the --archive (or -a) parameter.
You can tell rsync to delete files in the destination that are not in the source with the --delete flag.
To omit files from version control systems (SVN, CVS, etc.) use the --cvs-exclude (or -C) flag.
Compressed files
gzip can create
rsync-friendly compressed files, with the --rsyncable flag:
$ gzip --rsyncable filename
Resources