rsync is a tool which is used top synch two directory structures on local or remote filesystems.

Generally used like:

rsync <source> <destination>

Generic Args + Dry Runs

I often create an rsync command like

rsync -nvrculzOFF source_directory/* [email protected]:path/to/files 

The first flag -n forces a try run (alt: --dry-run) so you quickly have to follow it up with:

rsync -vrculzOFF source_directory/* [email protected]:path/to/files 

to run the command and actually do the sync.

The remaining flags are as follows

This is just a handy one I have memorized over the years. Be sure to man rsync for more options.


Files that match a patter can be excluded as follows