rsync remote host syntax

12 03 2013

In a nutshell:

rsync -v -r -u -e ssh ./localsource netid@server.domain.url:/remote/destination

-v = verbose
-r = recursive
-u = update changed files only
-e = specify remote shell (“ssh” in this example)

You can also get a “dry run” and see what will change (but not actually execute the change) by adding the -n flag:

rsync -v -r -u -n -e ssh ./localsource netid@server.domain.url:/remote/destination

Files that should regularly be excluded (such as .DS_Store) can have their names added to a text file, such as:

Temporary Items
.DS_Store
skip.txt

Then call the text file with the --exclude-from flag:

rsync -v -r -u -e ssh --exclude-from=/path/to/skip.txt ./localsource \ netid@server.domain.url:/remote/destination


Actions

Information

Leave a Reply

Your email address will not be published. Required fields are marked *




Skip to toolbar