| Option |
implication |
| -a |
(archive mode): copies any subdirectories, most attributes (symlinks, permissions, filedate, group,
devices) and (if you're root) the owner of the files. |
| -v --progress |
(verbose): -v prints a list of files during transfer. If you additionally set
--progress, it will continuously show you the number of bytes transferred and the progress in percent. |
| -n |
(dry-run): Don't write, just simulate the procedure. |
| -z -e program |
If there is a colon in the source or target, rsync interprets the part before it as hostname and
communicates over the program specified by -e, to which it passes the following parameters:
- as source: hostname rsync --server --sender . Sourcedir
- as target: hostname rsync --server . Targetdir
ssh works great as a program for -e. If you want to insert your own parameters at the beginning
of the parameter list, you need to put them in double quotes with the program.
The parameter -z makes rsync compress any data it transfers. |
| --delete --force --delete-excluded |
deletes any entries from the target directory, which have been deleted from the source meanwhile. |
| --partial |
Don't delete the partial files if the connection is lost. This way rsync can resume the transfer next
time. |
| --exclude=pattern |
Ignore any files which match the given pattern, e.g. --exclude *~ . Read more on rsync's
extensive exluding capabilities in the rsync(1)
manpage. |
| -x |
excludes any files on filesystems, that are mounted into the source directory. |