0% found this document useful (0 votes)
62 views2 pages

Rsync Cheat Sheet: by Via

This document provides a cheat sheet for the rsync command line utility for synchronizing files and directories. It lists over 40 rsync options organized into sections for basic usage, options, and options continued. The options allow fine-grained control over how files are transferred including recursion level, file filtering, checksums, compression, permissions and more.

Uploaded by

Uramaya Uramaya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views2 pages

Rsync Cheat Sheet: by Via

This document provides a cheat sheet for the rsync command line utility for synchronizing files and directories. It lists over 40 rsync options organized into sections for basic usage, options, and options continued. The options allow fine-grained control over how files are transferred including recursion level, file filtering, checksums, compression, permissions and more.

Uploaded by

Uramaya Uramaya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

rsync Cheat Sheet

by Richard Holloway (richardjh) via cheatography.com/478/cs/329/

rsync Usage rsync Options contd. rsync Options cont'd.

rsync [OPTION]... SRC [SRC]... DEST --sparse, -S handle sparse files efficiently --compress-leve explicitly set compression level
l=NUM
rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST --dry-run, -n perform a trial run with no changes
made --skip-compress skip compressing files with a
rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST
--whole-file, -W copy files whole (without delta-xfer =LIST suffix in LIST
rsync [OPTION]... SRC [SRC]... rsync://[USER@]HOST[:
PORT]/DEST algorithm) --cvs-exclude, -C auto-ignore files the same way
CVS does
rsync [OPTION]... [USER@]HOST:SRC [DEST] --one-file-system, don't cross filesystem boundaries
-x --filter=RULE, -f add a file-filtering RULE
rsync [OPTION]... [USER@]HOST::SRC [DEST]
--block-size force a fixed checksum block-size -F same as --filter='dir-merge /.rsyn
rsync [OPTION]... rsync://[USER@]HOST[:PORT]/SRC
=SIZE c-filter'
[DEST]
--rsh=COM specify the remote shell to use repeated: --filter='- .rsync-filter'
The ':' usages connect via remote shell, while '::' & MAND, -e --exclude=PA exclude files matching PATTERN
'rsync://' usages connect to an rsync daemon, and
--rsync-path=PR specify the rsync to run on the TTERN
require SRC or DEST to start with a module name.
OGRAM remote machine
--exclude-fr read exclude patterns from FILE
--existing skip creating new files on receiver om=FILE
rsync Options
--ignore-existing skip updating files that already --include=PA don't exclude files matching
--verbose, -v increase verbosity
exist on receiver TTERN PATTERN
--quiet, -q suppress non-error messages
--remove-source- sender removes synchronized --include-fr read include patterns from FILE
--no-motd suppress daemon-mode MOTD (see files files (non-dirs) om=FILE
manpage caveat)
--del an alias for --delete-during --files-from=FILE read list of source-file names
--checksum, skip based on checksum, not mod- from FILE
--delete delete extraneous files from destin
-c time & size
ation dirs --from0, -0 all *-from/filter files are delimited
--archive, -a archive mode; equals -rlptgoD (no -H,- by 0s
--delete-before receiver deletes before transfer,
A,-X)
not during --protect-args, -s no space-splitting; only wildcard
--no-OPTION turn off an implied OPTION (e.g. --no- special-chars
--delete-during receiver deletes during transfer
D)
(default) --address=AD bind address for outgoing socket
--recursive, - recurse into directories DRESS to daemon
--delete-delay find deletions during, delete after
r
--port=PORT specify double-colon alternate
--delete-after receiver deletes after transfer, not
--relative, -R use relative path names port number
during
--no-implied- don't send implied dirs with --relative --sockopts=O specify custom TCP options
--delete-exc also delete excluded files from
dirs PTIONS
luded destination dirs
--backup, -b make backups (see --suffix & --back --blocking-io use blocking I/O for the remote
--ignore-errors delete even if there are I/O errors
up-dir) shell
--force force deletion of directories even
--backup- make backups into hierarchy based in --stats give some file-transfer stats
if not empty
dir=DIR DIR
--max-del don't delete more than NUM files --8-bit-output, -8 leave high-bit chars unescaped
--suffix= set backup suffix (default ~ w/o --back in output
ete=NUM
SUFFIX up-dir)
--human-readble, output numbers in a human-rea
--max-size=SIZE don't transfer any file larger than
--update, -u skip files that are newer on the -h dable format
SIZE
receiver
--min-size=SIZE don't transfer any file smaller than --progress show progress during transfer
--inplace update destination files in-place (SEE
SIZE -P same as --partial --progress
MAN PAGE
--partial keep partially transferred files --itemize-ch output a change-summary for all
--append append data onto shorter files
--partial-dir=DIR put a partially transferred file into anges, -i updates
--append- like --append, but with old data in file
DIR --out-format output a change-summary for all
verify checksum
--delay-updates put all updated files into place at =FORMAT updates
--dirs, -d transfer directories without recursing
transfer's end --log-file=FILE log what we're doing to the
--links, -l copy symlinks as symlinks specified FILE
--prune-empty- prune empty directory chains from
--copy-links, transform symlink into referent file/dir dirs, -m the file-list --log-file-form log updates using the specified
-L at=FMT FMT
--numeric-ids don't map uid/gid values by
--copy-unsaf only "unsafe" symlinks are transformed user/group name --password-file read daemon-access password
e-links =FILE from FILE
--timeout=SE set I/O timeout in seconds
--safe-links ignore symlinks that point outside the CONDS --list-only list the files instead of copying
source tree them
--contimeout set daemon connection timeout in
--copy-di transform symlink to a dir into referent seconds --bwlimit=KBPS limit I/O bandwidth; KBytes per
rlinks, -k dir second
--ignore-times, -I don't skip files that match in size
--keep-di treat symlinked dir on receiver as dir and mod-time --write-batc write a batched update to FILE
rlinks, -K h=FILE
--size-only skip files that match in size
--hard-links, preserve hard links --only-write-batch like --write-batch but w/o
--modify-win compare mod-times with reduced
-H
--modify-win compare mod-times with reduced
-H =FILE updating destination
dow=NUM accuracy
--perms, -p preserve permissions --read-batch=FILE read a batched update from FILE
--temp-dir, -T create temporary files in directory
--executa preserve the file's executability DIR --protocol=NUM force an older protocol version to
bility, -E be used
--fuzzy, -y find similar file for basis if no dest
--chmo affect file and/or directory permissions file --iconv=CONV request charset conversion of
d=CHMOD ERT_SPEC filenames
--compare-de also compare destination files
--acls, -A preserve ACLs (implies --perms) st=DIR relative to DIR --ipv4, -4 prefer IPv4
--xattrs, -X preserve extended attributes --copy-dest=DIR ... and include copies of --ipv6, -6 prefer IPv6
--owner, -o preserve owner (super-user only) unchanged files --version print version number
--group, -g preserve group --link-dest=DIR hardlink to files in DIR when --help, -h show this help ( -h works with no
unchanged other options )
--devices preserve device files (super-user only)
--compress, -z compress file data during the
--specials preserve special files Please see the rsync(1) and rsyncd.conf(5) man pages
transfer
-D same as --devices --special for full documentation.
See http://rsync.samba.org/ for updates, bug reports,
--times, -t preserve modification times
and answers
--omit-dir-t omit directories from --times
imes, -O

--super receiver attempts super-user activities

--fake-super store/recover privileged attrs using


xattrs

Cheatographer Cheat Sheet Sponsor

Richard Holloway (richardjh) This cheat sheet was published on 27th March, 2012 FeedbackFair, increase your conversion rate today!
cheatography.com/richardjh/ and was last updated on 27th March, 2012. Try it free!
richardjh.org http://www.FeedbackFair.com

You might also like