rsync
Topic: Archives
Program: rsync
Syncs directories on this machine.
Package: archive-werkzeuge
Usage
rsync [OPTION]... SOURCE... DEST
Description
Copy files so that DEST matches SOURCE, only what is missing or changed. SOURCE/ copies the content, SOURCE the directory itself. Only paths on this machine.
Options in the simulator
-
-a, --archive copy directories whole and keep mode, time and links -
-r, --recursive go through directories -
-v, --verbose name what is copied and show totals -
-n, --dry-run only show what would happen -
--delete remove what the source does not have from the destination -
--exclude=PATTERN leave out names matching PATTERN -
--help show this help and exit
144 more options of the real program, not in the simulator yet
-
--infoneeds a value not in the simulator yetExplanation to come
-
--debugneeds a value not in the simulator yetExplanation to come
-
--stderrneeds a value not in the simulator yetExplanation to come
-
-q, --quietnot in the simulator yetExplanation to come
-
--no-motdnot in the simulator yetExplanation to come
-
-c, --checksumnot in the simulator yetExplanation to come
-
--no-OPTIONnot in the simulator yetExplanation to come
-
--inc-recursive, --i-rnot in the simulator yetExplanation to come
-
--no-inc-recursive, --no-i-rnot in the simulator yetExplanation to come
-
-R, --relativenot in the simulator yetExplanation to come
-
--no-implied-dirsnot in the simulator yetExplanation to come
-
-b, --backupnot in the simulator yetExplanation to come
-
--backup-dirneeds a value not in the simulator yetExplanation to come
-
--suffixneeds a value not in the simulator yetExplanation to come
-
-u, --updatenot in the simulator yetExplanation to come
-
--inplacenot in the simulator yetExplanation to come
-
--appendnot in the simulator yetExplanation to come
-
--append-verifynot in the simulator yetExplanation to come
-
-d, --dirsnot in the simulator yetExplanation to come
-
--old-dirs, --old-dnot in the simulator yetExplanation to come
-
--mkpathnot in the simulator yetExplanation to come
-
-l, --linksnot in the simulator yetExplanation to come
-
-L, --copy-linksnot in the simulator yetExplanation to come
-
--copy-unsafe-linksnot in the simulator yetExplanation to come
-
--safe-linksnot in the simulator yetExplanation to come
-
--insecure-linksnot in the simulator yetExplanation to come
-
--confine-rootneeds a value not in the simulator yetExplanation to come
-
--munge-linksnot in the simulator yetExplanation to come
-
-k, --copy-dirlinksnot in the simulator yetExplanation to come
-
-K, --keep-dirlinksnot in the simulator yetExplanation to come
-
-H, --hard-linksnot in the simulator yetExplanation to come
-
-p, --permsnot in the simulator yetExplanation to come
-
-E, --executabilitynot in the simulator yetExplanation to come
-
--chmodneeds a value not in the simulator yetExplanation to come
-
-A, --aclsnot in the simulator yetExplanation to come
-
-X, --xattrsnot in the simulator yetExplanation to come
-
-o, --ownernot in the simulator yetExplanation to come
-
-g, --groupnot in the simulator yetExplanation to come
-
--devicesnot in the simulator yetExplanation to come
-
--copy-devicesnot in the simulator yetExplanation to come
-
--write-devicesnot in the simulator yetExplanation to come
-
--specialsnot in the simulator yetExplanation to come
-
--drop-Dnot in the simulator yetExplanation to come
-
-Dnot in the simulator yetExplanation to come
-
-t, --timesnot in the simulator yetExplanation to come
-
-U, --atimesnot in the simulator yetExplanation to come
-
--open-noatimenot in the simulator yetExplanation to come
-
-N, --crtimesnot in the simulator yetExplanation to come
-
-O, --omit-dir-timesnot in the simulator yetExplanation to come
-
-J, --omit-link-timesnot in the simulator yetExplanation to come
-
--supernot in the simulator yetExplanation to come
-
--fake-supernot in the simulator yetExplanation to come
-
-S, --sparsenot in the simulator yetExplanation to come
-
--preallocatenot in the simulator yetExplanation to come
-
-W, --whole-filenot in the simulator yetExplanation to come
-
--no-whole-file, --no-Wnot in the simulator yetExplanation to come
-
--checksum-choiceneeds a value not in the simulator yetExplanation to come
-
-x, --one-file-systemnot in the simulator yetExplanation to come
-
-B, --block-sizeneeds a value not in the simulator yetExplanation to come
-
-e, --rshneeds a value not in the simulator yetExplanation to come
-
--rsync-pathneeds a value not in the simulator yetExplanation to come
-
--existing, --ignore-non-existingnot in the simulator yetExplanation to come
-
--ignore-existingnot in the simulator yetExplanation to come
-
--remove-source-filesnot in the simulator yetExplanation to come
-
--delnot in the simulator yetExplanation to come
-
--delete-beforenot in the simulator yetExplanation to come
-
--delete-duringnot in the simulator yetExplanation to come
-
--delete-delaynot in the simulator yetExplanation to come
-
--delete-afternot in the simulator yetExplanation to come
-
--delete-excludednot in the simulator yetExplanation to come
-
--ignore-missing-argsnot in the simulator yetExplanation to come
-
--delete-missing-argsnot in the simulator yetExplanation to come
-
--ignore-errorsnot in the simulator yetExplanation to come
-
--forcenot in the simulator yetExplanation to come
-
--max-deleteneeds a value not in the simulator yetExplanation to come
-
--max-sizeneeds a value not in the simulator yetExplanation to come
-
--min-sizeneeds a value not in the simulator yetExplanation to come
-
--max-allocneeds a value not in the simulator yetExplanation to come
-
--partialnot in the simulator yetExplanation to come
-
--partial-dirneeds a value not in the simulator yetExplanation to come
-
--delay-updatesnot in the simulator yetExplanation to come
-
-m, --prune-empty-dirsnot in the simulator yetExplanation to come
-
--numeric-idsnot in the simulator yetExplanation to come
-
--usermapneeds a value not in the simulator yetExplanation to come
-
--groupmapneeds a value not in the simulator yetExplanation to come
-
--chownneeds a value not in the simulator yetExplanation to come
-
--timeoutneeds a value not in the simulator yetExplanation to come
-
--contimeoutneeds a value not in the simulator yetExplanation to come
-
-I, --ignore-timesnot in the simulator yetExplanation to come
-
--size-onlynot in the simulator yetExplanation to come
-
-@, --modify-windowneeds a value not in the simulator yetExplanation to come
-
-T, --temp-dirneeds a value not in the simulator yetExplanation to come
-
-y, --fuzzynot in the simulator yetExplanation to come
-
--compare-destneeds a value not in the simulator yetExplanation to come
-
--copy-destneeds a value not in the simulator yetExplanation to come
-
--link-destneeds a value not in the simulator yetExplanation to come
-
-z, --compressnot in the simulator yetExplanation to come
-
--compress-choiceneeds a value not in the simulator yetExplanation to come
-
--compress-levelneeds a value not in the simulator yetExplanation to come
-
--compress-threadsneeds a value not in the simulator yetExplanation to come
-
--skip-compressneeds a value not in the simulator yetExplanation to come
-
-C, --cvs-excludenot in the simulator yetExplanation to come
-
-f, --filterneeds a value not in the simulator yetExplanation to come
-
-Fnot in the simulator yetExplanation to come
-
--exclude-fromneeds a value not in the simulator yetExplanation to come
-
--includeneeds a value not in the simulator yetExplanation to come
-
--include-fromneeds a value not in the simulator yetExplanation to come
-
--files-fromneeds a value not in the simulator yetExplanation to come
-
-0, --from0not in the simulator yetExplanation to come
-
--old-argsnot in the simulator yetExplanation to come
-
-s, --secluded-argsnot in the simulator yetExplanation to come
-
--trust-sendernot in the simulator yetExplanation to come
-
--copy-asneeds a value not in the simulator yetExplanation to come
-
--addressneeds a value not in the simulator yetExplanation to come
-
--portneeds a value not in the simulator yetExplanation to come
-
--sockoptsneeds a value not in the simulator yetExplanation to come
-
--blocking-ionot in the simulator yetExplanation to come
-
--outbufneeds a value not in the simulator yetExplanation to come
-
--statsnot in the simulator yetExplanation to come
-
-8, --8-bit-outputnot in the simulator yetExplanation to come
-
-h, --human-readablenot in the simulator yetExplanation to come
-
--progressnot in the simulator yetExplanation to come
-
-Pnot in the simulator yetExplanation to come
-
-i, --itemize-changesnot in the simulator yetExplanation to come
-
-M, --remote-optionneeds a value not in the simulator yetExplanation to come
-
--out-formatneeds a value not in the simulator yetExplanation to come
-
--log-fileneeds a value not in the simulator yetExplanation to come
-
--log-file-formatneeds a value not in the simulator yetExplanation to come
-
--password-fileneeds a value not in the simulator yetExplanation to come
-
--early-inputneeds a value not in the simulator yetExplanation to come
-
--list-onlynot in the simulator yetExplanation to come
-
--bwlimitneeds a value not in the simulator yetExplanation to come
-
--stop-afterneeds a value not in the simulator yetExplanation to come
-
--stop-atneeds a value not in the simulator yetExplanation to come
-
--fsyncnot in the simulator yetExplanation to come
-
--write-batchneeds a value not in the simulator yetExplanation to come
-
--only-write-batchneeds a value not in the simulator yetExplanation to come
-
--read-batchneeds a value not in the simulator yetExplanation to come
-
--protocolneeds a value not in the simulator yetExplanation to come
-
--iconvneeds a value not in the simulator yetExplanation to come
-
--checksum-seedneeds a value not in the simulator yetExplanation to come
-
-4, --ipv4not in the simulator yetExplanation to come
-
-6, --ipv6not in the simulator yetExplanation to come
-
-V, --versionnot in the simulator yetExplanation to come
Examples
$ rsync -av projects/shop/ mirror/
sending incremental file list
created directory mirror
./
README.md
app.conf
build.log
test.log
releases/
releases/v2.4.0/
releases/v2.4.0/VERSION
releases/v2.4.1/
releases/v2.4.1/VERSION
sent 550 bytes received 253 bytes 1606.00 bytes/sec
total size is 90 speedup is 0.11 Where you learn it
Lessons
- Packing and mirroring Linux Basics, Module 8: Disks and storage