Basic rsync notes

Here are some basic rsync notes.

Always remember…

rsync interprets a directory with no trailing slash as copy this directory, and a directory with a trailing slash as copy

This will put the contents of “foo” inside of “bar”:

rsync -av ~/foo/ user@remote.com:/var/www/bar/

This command will put the directory “foo” inside of “bar”

rsync -av ~/foo user@remote.com:/var/www/bar/

Remember…rsync interprets a directory with no trailing slash as copy this directory, and a directory with a trailing slash as copy the contents of this directory.

Some things to remember


–update, -u skip files that are newer on the receiver
–archive, -a archive mode is -rlptgoD (no -A,-X,-U,-N,-H)
–dry-run, -n perform a trial run with no changes made
–progress show progress during transfer
-P same as –partial –progress
–compress, -z compress file data during the transfer

Here is a good one to remember…

sudo rsync -avuPz "/chroot/home/ae482095/restore_13000078/mail/" "/chroot/home/ae482095/var/9ae3b27f31.nxcli.io/mail/"

Leave a Comment