a fast, versatile, remote (and local) file-copying tool
|
-a, --archive
This is equivalent to -rlptgoD. It is a quick way of saying you want recursion and want to
preserve almost everything (with -H being a notable omission). The only exception to the above
equivalence is when --files-from is specified, in which case -r is not implied.
Note that -a does not preserve hardlinks, because finding multiply-linked files is expensive. You
must separately specify -H.
|
-P The -P option is equivalent to --partial --progress. Its purpose is to make it much easier to
specify these two options for a long transfer that may be interrupted.
|
--max-size=SIZE
This tells rsync to avoid transferring any file that is larger than the specified SIZE. The SIZE
value can be suffixed with a string to indicate a size multiplier, and may be a fractional value
(e.g. "--max-size=1.5m").
This option is a transfer rule, not an exclude, so it doesn’t affect the data that goes into the
file-lists, and thus it doesn’t affect deletions. It just limits the files that the receiver
requests to be transferred.
The suffixes are as follows: "K" (or "KiB") is a kibibyte (1024), "M" (or "MiB") is a mebibyte
(1024*1024), and "G" (or "GiB") is a gibibyte (1024*1024*1024). If you want the multiplier to be
1000 instead of 1024, use "KB", "MB", or "GB". (Note: lower-case is also accepted for all
values.) Finally, if the suffix ends in either "+1" or "-1", the value will be offset by one byte
in the indicated direction.
Examples: --max-size=1.5mb-1 is 1499999 bytes, and --max-size=2g+1 is 2147483649 bytes.
|
--inplace
This option changes how rsync transfers a file when its data needs to be updated: instead of the
default method of creating a new copy of the file and moving it into place when it is complete,
rsync instead writes the updated data directly to the destination file.
This has several effects:
o Hard links are not broken. This means the new data will be visible through other hard
links to the destination file. Moreover, attempts to copy differing source files onto a
multiply-linked destination file will result in a "tug of war" with the destination data
changing back and forth.
o In-use binaries cannot be updated (either the OS will prevent this from happening, or
binaries that attempt to swap-in their data will misbehave or crash).
o The file’s data will be in an inconsistent state during the transfer and will be left that
way if the transfer is interrupted or if an update fails.
o A file that rsync cannot write to cannot be updated. While a super user can update any
file, a normal user needs to be granted write permission for the open of the file for
writing to be successful.
o The efficiency of rsync’s delta-transfer algorithm may be reduced if some data in the
destination file is overwritten before it can be copied to a position later in the file.
This does not apply if you use --backup, since rsync is smart enough to use the backup file
as the basis file for the transfer.
WARNING: you should not use this option to update files that are being accessed by others, so be
careful when choosing to use this for a copy.
This option is useful for transferring large files with block-based changes or appended data, and
also on systems that are disk bound, not network bound. It can also help keep a copy-on-write
filesystem snapshot from diverging the entire contents of a file that only has minor changes.
The option implies --partial (since an interrupted transfer does not delete the file), but
conflicts with --partial-dir and --delay-updates. Prior to rsync 2.6.4 --inplace was also
incompatible with --compare-dest and --link-dest.
|
--bwlimit=KBPS
This option allows you to specify a maximum transfer rate in kilobytes per second. This option is
most effective when using rsync with large files (several megabytes and up). Due to the nature of
rsync transfers, blocks of data are sent, then if rsync determines the transfer was too fast, it
will wait before sending the next data block. The result is an average transfer rate equaling the
specified limit. A value of zero specifies no limit.
|