The rsync command
a fast, versatile, local/remote file-copying tool 4 examples from the lessons of the IVski Linux Playground — try them in the terminal next to them.
Options in the examples
--archive, -a- archive mode is -rlptgoD (no -A,-X,-U,-N,-H)
--verbose, -v- increase verbosity
--delete- delete extraneous files from dest directories
--dry-run, -n- perform a trial run with no changes made
Examples
rsync -av ~/site/ ~/site-copy/
rsync -avn --delete ~/site/ ~/site-copy/
rsync -av --delete ~/site/ backup@backup01:/srv/backups/site/
rsync -av backup@backup01:/srv/backups/site/ ~/restore/