| output statistics on the file transfer, describing the effectiveness of the deltatransfer algorithm.
- Number of files : count of all items which includes directories, symlinks, etc.
- Number of files transferred: count of normal files that were updated via rsync's delta-transfer algorithm,
which does not include created dirs, symlinks, etc.
- Total file size : total sum of all file sizes in the transfer. This does not count any size for directories
or special files, but does include the size of symlinks.
- Total transferred file size : total sum of all files sizes for just the transferred files.
- Literal data : amount of unmatched file-update data sent to the receiver for it to recreate the updated files.
- Matched data : amount of data the receiver got locally when recreating the updated files.
- File list size : the file-list data was when the sender sent it to the receiver. This is smaller than the
in-memory size for the file list due to some compressing of duplicated data when rsync sends the list.
- File list generation time : seconds that the sender spent creating the file list.
- File list transfer time : seconds that the sender spent sending the file list to the receiver.
- Total bytes sent : count of all the bytes that rsync sent from the client side to the server side.
- Total bytes received : count of all non-message bytes that rsync received by the client side from the server side.
Number of files: 88417
Number of files transferred: 0
Total file size: 5008416760 bytes
Total transferred file size: 0 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 2710302
File list generation time: 1.156 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 20
Total bytes received: 2710322
sent 20 bytes received 2710322 bytes 285299.16 bytes/sec
total size is 5008416760 speedup is 1847.89
| Display information showing the
progress of the transfer. This gives a bored user something to
watch. Implies |
While rsync is transferring a regular file, it updates a
progress line that looks like :
782448 63% 110.64kB/s 0:00:04
In this example, the receiver has reconstructed 782448 bytes or
63% of the sender's file, which is being reconstructed at a rate
of 110.64 kilobytes per second, and the transfer will finish in
4 seconds if the current rate is maintained until the end.
These statistics can be misleading if rsync's delta-transfer
algorithm is in use. For example, if the sender's file consists
of the basis file followed by additional data, the reported rate
will probably drop dramatically when the receiver gets to the
literal data, and the transfer will probably take much longer to
finish than the receiver estimated as it was finishing the
matched part of the file.
When the file transfer finishes, rsync replaces the progress
line with a summary line that looks like :
1238099 100% 146.38kB/s 0:00:08 (xfer#5, to-check=169/396)
In this example, the file was 1238099 bytes long in total, the
average rate of transfer for the whole file was 146.38 kilobytes
per second over the 8 seconds that it took to complete, it was
the 5th transfer of a regular file during the current rsync session, and there are 169 more files for the receiver to check (to
see if they are up-to-date or not) remaining out of the 396
total files in the file-list.
| decreases the amount of information
during the transfer, notably suppressing information messages from the remote server. |
Useful when invoking from cron.
--itemize-changes to see what an rsync command is going to do.
The output is expected to be the same on a dry run and a subsequent real run excepting changes in the files that may be transfered.
a dry run does not send the actual data for
file transfers, so
--progress has no effect, the "bytes sent",
"bytes received", "literal data", and "matched data" statistics
are too small, and the "speedup" value is equivalent to a run where no file transfers were needed.
| perform a trial run that doesn't make any changes (and produces mostly the same output as a real run). |
| suppresses the message-of-the-day (MOTD) text, and supresseds the list of modules
that the daemon sends in response to the "rsync host::"
| Options that effect how files are determined to be the same|
Default: skip files with the same size and modification timestamp.
| turns off this "quick check" behavior, causing all files to be transfered
| modifies "quick check" algorithm |
Useful when using rsync after using another mirroring system which may not preserve timestamps exactly.
| timestamps considered equal if they differ by no more than the |
Default 0 (exact match).
MS Windows FAT filesystem represents times with a 2-second resolution
--modify-window=1 allows times to differ by up to 1 second.
| If a destination file has a newer modified time it is skipped. |
If a destination file has a modification time equal to the source file's, it will be updated if the sizes are different.
This does not affect the copying of symlinks or other special files.
A difference of file format between the sender and receiver is always considered to be important enough
for an update, if the source has a directory where the destination has a
file, the transfer would always occur regardless of the timestamps.
| compare a MD5 128-bit checksums for files that have matching sizes.|
Sever degradation of performance affecting both sides of the transfer with a lot of disk I/O reading all the
data in the files in the transfer prior to and in addition to
reading/writing that will be done to if the file needs to be transfered.
The sending side generates checksums while doing the file-system scan that builds the list of the available files.
The receiver generates checksums when scanning for changed files, and will checksum any file that has the same size
as the corresponding sender's file: files with either a changed size or a changed checksum are selected for transfer.
This is unrelated to the verification that each file was correctly reconstructed on the receiving side by checking a
whole-file checksum that is generated as the file is transferred,
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.
Exclude files that shouldn't be transfered, similar to CVS|
These are marked perishable see filter rules
- The exclude list is initialized with :
RCS SCCS CVS CVS.adm RCSLOG cvslog.* tags TAGS
.make.state .nse_depinfo *~ #* .#* ,* _$* *$ *.old *.bak
*.BAK *.orig *.rej .del-* *.a *.olb *.o *.obj *.so *.exe
*.Z *.elc *.ln core .svn/ .git/ .bzr/
- Files in the
CVSIGNORE environment variable (delimited by whitespace).
- Files listed in
- Files in a directory containing a
- Files matching a pattern in
These patterns are split on whitespace. See CVS
--filter rules with
CVS excludes are appended regardless of where the -C was placed on the commandline.
This makes them a lower priority than any rules specified explicitly.
To control where these get inserted into filter rules,
-C as a command-line option and use a combination of
--filter=-C (either on the command-line or by
putting the ":C" and "-C" rules into a filter file with other rules).
:C turns on the per-directory scanning for the
-C does a one-time import of the CVS excludes.
| update files by appending data onto the
end of the file, which presumes that the data that already
exists on the receiving side is identical with the start of the file on the sending side. |
If a file needs to be transferred and its size on the receiver is the same or longer than the size on the sender, the file is skipped.
This does not interfere with updating a file's non-content attributes (e.g. permissions, ownership, etc.) when the file does not need to be transferred,
nor does it affect the updating of any non-regular files.
--inplace, does not conflict with
--sparse (since it is always extending a file's length).
--append but the existing data
on the receiving side is included in the full-file checksum verification step, which will cause a file to be resent if the
final verification step fails (rsync uses a normal, non-appending
--inplace transfer for the resend).
| copy directories recursively. See --dirs .
An incremental scan the first few directories have been completed. only affects
recursion algorithm, and does not change a non-recursive transfer.
--delete-before, --delete-after, --prune-empty-dirs, and
require rsync to know the full file list and disable the incremental recursion mode.
The default with
--del --delete-during to request this deletion mode explicitly).
--delete-delay is a better choice than using
Incremental recursion can be disabled using
| Use relative paths. |
The full path names specified on the command line are sent to the server rather than just the last parts of the filenames.
Useful when sending several different directories at the same time. For example:
rsync -av /foo/bar/baz.c remote:/tmp/
rsync -avR /foo/bar/baz.c remote:/tmp/
/tmp/foo/bar/baz.c preserving its full path.
These extra path elements are called "implied directories" (i.e. the "foo" and the "foo/bar" directories in the above example).
rsync sends these implied directories as real directories in the file list, even if a path
element is really a symlink on the sending side. This prevents
unexpected behaviors when copying the full path of a file that you didn't realize had a symlink in its path.
To duplicate a server-side symlink, include both the symlink via its path, and referent directory via its real path.
It is also possible to limit the amount of path information that is sent as implied directories for each path you specify.
Insert a dot and a slash into the source path
rsync -avR /foo/./bar/baz.c remote:/tmp/
That would create /tmp/bar/baz.c on the remote machine. (Note that the dot must be followed by a slash, so "/foo/." would not
be abbreviated.) For older rsync versions, you would need to use a chdir to limit the source path. For example, when pushing files:
(cd /foo; rsync -avR bar/baz.c remote:/tmp/)
parens put the two commands into a sub-shell, so that the "cd" command doesn't remain in effect for future commands.)
If pulling files from an older rsync, use this idiom (but only for a non-daemon transfer):
rsync -avR --rsync-path="cd /foo; rsync" remote:bar/baz.c /tmp/
| affects the default behavior of |
The attributes of the implied directories from the source names are not included in the transfer.
This means that the corresponding path elements on the destination system are left unchanged if they exist, and any
missing implied directories are created with default attributes.
This allows these implied path elements to have big differences, such as being a symlink to a directory on the receiving side.
For instance, if a command-line arg or a files-from entry told rsync to transfer the file "path/foo/file", the directories
"path" and "path/foo" are implied when
--relative is used. If "path/foo" is a symlink to "bar" on the destination system, the
receiving rsync would ordinarily delete "path/foo", recreate it as a directory, and receive the file into the new directory.
--no-implied-dirs, the receiving rsync updates "path/foo/file" using the existing path elements, which means
that the file ends up being created in "path/bar". Another way to accomplish this link preservation is to use the
--keep-dirlinks option (which will also affect symlinks to directories in the rest of the transfer).
| synonym for |
recursion , copy symlinks as symlinks, preserve permissions, modification times, group, owner and
( ACL and eXtended attributes may not be preserved(?) ed)
preserve all except to the above equivalence is when
--files-from is specified, in which case
-r is not implied.
Does not include preserving hardlinks. separately specify
| Preexisting destination files are renamed as
each file is transferred or deleted. Controls where the backup file goes and what (if any) suffix gets appended. Use
--suffix (watch free space on destination).
Prevents previously backed-up files from being deleted. If you
are supplying filter rules, insert own exclude/protect rule higher up in the
list so that it has a high enough priority to be effective (e.g., if your rules specify a trailing inclusion/exclusion of
'*', the auto-added rule would never be reached).
--omit-dir-times will be implied, and
--delete is also in effect (without
--delete-excluded), rsync will add a
"protect" filter-rule for the backup suffix to the end of all existing excludes (e.g.
-f "P *~").
| In combination with |
--backup , to
store all backups in the specified directory on the receiving
side. This can be used for incremental backups.
| override the default backup suffix
used with |
Default suffix is
~ if no
--backup-dir was specified, otherwise it is an empty string.
| When a files data needs to be updated: |
Writes the updated data directly to the destination file instead of the Normal creating a copy of the file and moved into place when it is complete.
- 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),
- file data will inconsistent during the transfer,
- file data may be left in an inconsistent state after the transfer if the transfer is interrupted or fails,
- a file that does not have write permissions can not be updated, and
- 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
--backup, since rsync will use the backup file as the basis file for the transfer to prevent this.
WARNING: Do not use this to update files being accessed by others.
Useful for transferring large files with block-based changes or appended data, and also on systems that are disk bound, not network bound.
--partial (since an interrupted transfer does not delete the file),
equivalent to |
--partial --progress. Make it much easier to specify these two options for a long transfer that may be interrupted.
Tell the sending side to include any directories that are encountered. Unlike |
--recursive, a directory's contents are not
copied unless the directory name specified is "." or ends with a trailing slash (e.g. ".", "dir/.", "dir/", etc.). Without this
--recursive , rsync will skip all directories it encounters (and output a message to that effect for each
one). If you specify both
--recursive takes precedence.
The --dirs option is implied by the --files-from option or the --list-only option (including an implied --list-only usage) if
--recursive wasn't specified (so that directories are seen in the listing). Specify --no-dirs (or --no-d) if you want to turn this off.
Link handling skip to attribute handling
| recreate symlinks on the destination.
| symlinks cause the item that they point to (the referent) is copied.
| copy the referent of symbolic links that point outside the copied tree. |
Absolute symlinks are also treated like ordinary files, and as are symlinks in the source path itself when
--relative is used.
Has no additional effect if
--copy-links was also specified.
| ignore any symbolic links which point outside the copied tree and absolute symlinks |
--relative may give unexpected results.
| sending side treats a symlink to a
directory as though it were a real directory. |
Useful if you don't want symlinks to non-directories to be affected, as they would be using
Without this , if the sending side has replaced a directory with a symlink to a directory, the receiving side will
delete anything that is in the way of the new symlink, including a directory hierarchy (as long as
--delete is in effect).
--keep-dirlinks for an analogous option for the receiving side.
| receiving side treats a symlink to a
directory as though it were a real directory, only if it matches a real directory from the sender. |
Without this the receiver's symlink would be deleted and replaced with a real directory.
For example, transfer a directory "foo" that contains a file "file", but "foo" is a symlink to directory "bar" on the receiver.
--keep-dirlinks, the receiver deletes symlink "foo", recreates it as a directory, and receives the file into the new directory.
--keep-dirlinks, the receiver keeps the symlink and "file" ends up in "bar".
caution: when using
--keep-dirlinks, you must trust all the symlinks in the copy!
If it is possible for an untrusted user to create their own symlink to any directory, the user could then (on a subsequent copy)
replace the symlink with a real directory and affect the content of whatever directory the symlink references.
For backup copies, use a bind mount instead of a symlink to modify your receiving hierarchy.
See also --copy-dirlinks for an analogous option for the sending side.
| hard-linked files in the transfer are linked to the corresponding files on the receiving side.|
Without this option, hard-linked files in the transfer are treated as though they were separate files.
When updating a non-empty destination, ensures that files that are hard-linked together on the source
are hard-linked together on the destination.
Does NOT break existing hard links on the destination that do not exist between the source files.
If one or more extra-linked files have content changes, they will become unlinked when updated (if not using
Rsync can only detect hard links between files that are inside the transfer set. If rsync updates a file that has
extra hard-link connections to files outside the transfer, that linkage will be broken.
--inplace to avoid this breakage, there may be
unintended changes due to lingering hard links (and see the --inplace option for more caveats).
If incremental recursion is active (see
--recursive), rsync may
transfer a missing hard-linked file before it finds that another link for that contents exists elsewhere in the hierarchy.
This does not affect the accuracy of the transfer, just its efficiency.
To avoid this disable incremental recursion using
Attributes, Meta-data, i.e. file permissions, Access Control Lists, owner, group …
| set the destination permissions to be the same as the source permissions. |
--chmod to modify what rsync considers to be the source permissions.
When this option is Existing files (including updated files) retain their existing permissions, though the
OFF, permissions are set as follows:
might change just the execute permission for the file.
New files get their "normal" permission bits set to the source file's permissions masked with the receiving
directory's default permissions (either the receiving process's umask, or the permissions specified via the
destination directory's default ACL), and their special permission bits disabled except in the case where a new
directory inherits a setgid bit from its parent directory.
--executability are both disabled, rsync's behavior is the same as that of other file-copy utilities, such as cp and tar.
In summary: to give destination files (both old and new) the
source permissions, use
--perms. To give new files the destination-default permissions (while leaving existing files
unchanged), make sure that the
--perms option is off and use --chmod=ugo=rwX (which ensures that all non-masked bits get
enabled). If you'd care to make this latter behavior easier to
type, you could define a popt alias for it, such as putting this line in the file ~/.popt (the following defines the -Z option,
and includes --no-g to use the default group of the destination dir):
rsync alias --compress --no-p --no-g --chmod=ugo=rwX
You could then use this new option in a command such as this one:
rsync -avZ src/ dest/
(Caveat: make sure that
-archive does not follow
--compress, or it will reenable the two "--no-*" options mentioned above.)
The preservation of the destination's setgid bit on newly-created directories when
--perms is off was added in rsync 2.6.7.
Older rsync versions erroneously preserved the three special permission bits for newly-created files when
--perms was off,
while overriding the destination's setgid bit setting on a newly-created directory. Default ACL observance was added to
the ACL patch for rsync 2.6.7, so older (or non-ACL-enabled) rsyncs use the umask even if default ACLs are present. (Keep in
mind that it is the version of the receiving rsync that affects these behaviors.)
| preserve the executability (or nonexecutability) of regular files when |
--perms is not enabled.
A regular file is considered to be executable if at least one 'x' is turned on in its permissions. When an existing destination
file's executability differs from that of the corresponding source file, rsync modifies the destination file's permissions as follows:
To make a file non-executable, rsync turns off all its 'x' permissions.
To make a file executable, rsync turns on each 'x' permission that has a corresponding 'r' permission enabled.
| update the destination ACLs to be the same as the source ACLs. The option also implies |
The source and destination systems must have compatible ACL entries for this to work properly. See the --fake-super
option for a way to backup and restore ACLs that are not compatible.
| update the remote extended attributes to be the same as the local ones.
For systems that support extended-attribute namespaces, a copy being done by a super-user copies all namespaces except system.*. |
A normal user only copies the user.* namespace. To be able to backup and restore non-user namespaces as a normal user,
| apply one or more comma-separated "chmod" strings to the permission of the files in the transfer.|
The resulting value is treated as though it were the permissions that the sending side supplied for the file, which means that
this option can seem to have no effect on existing files if
--perms is not enabled.
Specify an item that should only apply to a directory by prefixing it with a 'D', or to a file by prefixing it with a 'F'.
--chmods are permitted.
--executability for how the resulting permission value can be applied to the files in the transfer.
| preserve owner
only if the receiving rsync is being run as the super-user (see |
Without this option, the owner of new and/or transferred files are set to the invoking user on the receiving side.
The preservation of ownership will associate matching names
but may fall back to using the ID number (see
|preserve group |
If the receiving program is not running as the super-user (or if --no-super was specified).
Only groups that the invoking user on the receiving side is a member of will be preserved.
Without this option, the group is set to the default group of the invoking user on the receiving side.
The preservation of group information will associate matching
names by default, but may fall back to using the ID number
| preserve modification times (implied with |
If times are not preserved (in addition to corrupting the modification time on the destination) the next time a transfer is performed,
the evaluation which excludes files that have not been modified will be incorrect. The deltatransfer algorithm will minimize the update.
| omit directories when preserving modification times (see |
Suggested if NFS is sharing the directories on the receiving side.
| receiving side attempts to execute super-user activities even if it wasn't run by the super-user. |
Include: preserving users via the
preserving all groups (not just the current user's groups) via
--groups , and
copying devices via
Useful for systems that allow such activities without being the super-user and
ensuring errors if the receiving side isn't being run as the super-user.
To turn off super-user activities, the super-user can use
| simulate super-user activities by saving/restoring the privileged attributes via special extended attributes.|
Includes the file's owner and group (if it is not the default), the file's device info (device & special files are
created as empty text files), and any permission bits that won't be allowed to be set on the real file (e.g. the real file gets
u-s,g-s,o-t for safety) or that would limit the owner's access
(since the real super-user can always access/change a file, the
files we create can always be accessed/changed by the creating user).
Handles ACLs (if
--acls was specified) and non-user extended attributes (if
--xattrs was specified).
backup data without using a super-user, and to store ACLs from incompatible systems.
Only affects the side where the option is used. To affect the remote side of a remote-shell connection, specify an rsync path:
rsync -av --rsync-path="rsync --fake-super" /src/ host:/dest/
Since there is only one "side" in a local copy, this option affects both the sending and receiving of files.
specify a copy using "localhost" to avoid this, possibly using the "lsh" shell script (from the support directory)
as a substitute for an actual remote shell (see --rsh).
overridden by both
See "fake super" in
| sparse files efficiently so they take up less space on the destination. |
--inplace as it is not possible to overwrite data in a sparse fashion.
NOTE: Don't use if destination is Solaris
tmpfs . There are problems seeking over null regions, and corrupts the files.
| delta-transfer algorithm is not used.|
The transfer may be faster if this option is used when the bandwidth between the
source and destination machines is higher than the bandwidth to
disk (example: when the "disk" is actually a networked filesystem).
Default when source and destination are local paths, if no batch writing option is in effect.
| avoid crossing a filesystem boundary when recursing. |
This does not limit the ability to specify items to copy from multiple filesystems, just rsync's recursion
through the hierarchy of each directory that the user specified,
and also the analogous recursion on the receiving side during deletion.
A "bind" mount to the same device is considered being on the same filesystem.
If repeated, rsync omits all mount-point directories.
Otherwise, it includes an empty directory at each mount-point it encounters (using the attributes of the
mounted directory because those of the underlying mount-point directory are inaccessible).
If collapse symlinks (via
--copy-unsafe-links), a symlink to a directory on another device
is treated like a mount-point. Symlinks to non-directories are unaffected by this option.
| skip creating files and directories
that do not exist on the destination. |
If combined with the
--ignore-existing , no files will be updated (useful to delete extraneous files).
This is a transfer rule, not an exclude, 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.
| skip updating files that already exist on
the destination (this does NOT ignore existing directories, or nothing would get done). See also --existing.
This is a transfer rule, not an exclude, so it doesn't affect the data that goes into the file-lists, and doesn't affect deletions. |
It limits the files that the receiver requests to be transferred.
Useful for doing backups using
--link-dest when continung a n interrupted backup.
Since a --link-dest run is copied into a new directory hierarchy (when it is used properly),
using --ignore existing will ensure that the already-handled files don't get
tweaked (which avoids a change in permissions on the hard-linked files).
This does mean that this option is only looking at the existing files in the destination hierarchy itself.
| Removing Files
| Attempts to delete more than |
N files or directories
results in a warning being output and exit with an error code of 25 .
--max-delete=0 to be warned about files in the destination without removing any of them.
--delete deletes files even when there are I/O errors.
remove from the sending side files successfully duplicated . (non-directories)
| files from the receiving side that aren't on the sending side for directories being synchronized. |
It is expected that rsync previously sent the whole directory ( using
using a wildcard for the directory's contents (e.g.
(A wildcard is expanded by the shell and rsync gets a list of files, not the files' parent directory. )
Files excluded from the transfer are also excluded from being deleted unless
or mark the rules as only matching on the sending side
(see the include/exclude modifiers in the FILTER RULES section).
Deletions will also occur when
-d) is enabled, for directories whose contents are being copied.
--dry-run option to see what files are going to be deleted.
If the sending side detects I/O errors, deletion of any files will be disabled,
preventing temporary filesystem failures (such as NFS errors on the sending side) from causing a massive deletion of files on the destination.
--delete may be combined with one of the
--delete-WHEN options as well as
--delete-WHEN is not specified, default is
. See also --delete-delay and --delete-after.
| File deletions on the receiving side are done before the transfer starts. |
Helpful when the destination filesystem is low on space.
Introduces a delay before the start of the transfer which might cause the
transfer to timeout (if
--timeout was specified).
Forces non-incremental recursion algorithm that requires rsync to scan all the files in the transfer into
memory at once (see
| File deletions on the receiving
side are done incrementally as the transfer occurs.|
The per-directory delete scan is done before each directory is checked for updates,
a more efficient
--delete-before, including doing the deletions prior to any per-directory filter files being updated.
| file deletions on the receiving side are computed during the transfer and
removed after the transfer completes. |
Useful when combined with
--fuzzy, and is more efficient
--delete-after (can behave differently, since
--delete-after computes the deletions in a separate pass after all updates are done).
If the number of removed files is very large a temporary file is created with the list. If it cannot be created rsync will use
--recursive is doing an incremental scan).
| file deletions on the receiving side be done after the transfer has completed. |
Useful when sending new per-directory merge files as a part of the transfer and you want their exclusions to take effect for the delete
phase of the current transfer.
Forces rsync to use non-incremental recursion algorithm that requires rsync to scan all the files in the transfer into memory at once.
In addition to deleting the files on the receiving side not present on the sending side, |
delete files on the receiving side that are excluded (see --exclude).
See the FILTER RULES section for a way to make individual exclusions behave this way on the receiver, and for a way to protect
files from --delete-excluded.
| Delete a directory when it is to be replaced by a file, `even if the directory contains files.
This is only relevant if deletions are not active (see --delete for details).
| options to restrict activities
| Supress transferring files larger than |
may be a fractional (e.g.
A transfer rule limits the files that the receiver requests to be transferred
not an exclude, doesn't affect the file-lists or deletions.
Suffixes (case insensitive)
- KB (1,000) : K KiB kilibyte (1024):
- MB ( 1,000,000) :M MiB megibyte (1024*1024)
- GB (1,000 MB) :G GiB gibibyte (1024*1024*1024)
-1 to offset by one byte.
--max-size=1.5mb-1 is 1,499,999 bytes, and
--max-size=2g+1 is 2,147,483,649 bytes.
| avoid transferring any file that is smaller
mb, which can help in not transferring
small, junk files. See the --max-size option for a description of SIZE and other information.
| forces the block size in delta-transfer algorithm to a fixed value.|
Selected based on the size of each file being updated. See technical report.
| Remote shell for communication. default: |
prefer to use rsh on a local network.
[user@]host::module/path, the remote shell will be used to run an rsync daemon on the
remote host, and all data will be transmitted through that
remote shell connection, not a socket
connection to a running rsync daemon on the remote host.
See using rsync-daemon features via a remote-shell connection
Command-line arguments are permitted in
rmsh provided that
is presented to rsync as a single argument.
Use spaces (not tabs or other whitespace) to separate
rmsh into the command and arguments.
Use apostrophe and/or quotes to preserve spaces in an argument (not backslashes).
Doubling an apostrophe inside a apostrophe'd string results in apostrophe ( likewise for quotes )
(attention to which quotes the shell is parsing and which quotes rsync is parsing).
-e 'ssh -p 2234'
-e 'ssh -o "ProxyCommand nohup ssh firewall nc -w1 %h %p"'
.ssh/config for site specific options.
RSYNC_RSH environment variable specifies remote shell program,
which accepts the same range of values as
See --blocking-io which is affected by this option.
|character and block device files are created on remote system.|
receiving rsync must be super-user (see also the --super and --fake-super options).
| transfer special files such as named sockets and fifos.
| equivalent to |
| When rsync is not in the remote path |
fullName is run with a shell and can be any program, script, or
command sequence , so long as it does not corrupt the standard-in &
standard-out that rsync is using to communicate.
To set a different default directory on the remote for use with
rsync -avR --rsync-path="cd /a/b && rsync" host:c/d /e/
| options controling files to be transfered
add rules to selectively exclude files from the list to be transferred. |
Useful in combination with a recursive transfer.
--filter options are permitted.
rule contains whitespace, quote it so that the shell supplies it as a single argument.
An underscore can be used to replace the space that separates a rule from its arg.
See the FILTER RULES
Exclude for per-directory
.rsync-filter files sprinkled through the hierarchy
use their rules to filter the files in the transfer.
Filters out the
.rsync-filter files themselves from the transfer.
See the FILTER RULES
simplified form of |
--filter, defaults to an exclude rule and does not allow the full ruleparsing syntax of normal filter rules.
See the FILTER RULES
| contains exclude patterns (one per line). |
Blank lines in the file and lines starting with
# are ignored.
-, the list will be read from standard input.
| simplified form of the --filter option that
defaults to an include rule and does not allow the full rule-parsing syntax of normal filter rules. See the FILTER RULES
related to the --include option, but it specifies a FILE that contains include patterns (one per line). Blank
lines in the file and lines starting with ';' or '#' are ignored. |
FILE is -, the list will be read from standard input.
specify the exact list of files to transfer (as read from the specified |
- for standard input).
Adjusts the default behavior of rsync to make transferring just the specified files and directories easier:
--relative (-R) is implied, which preserves the path information that is specified for each item in
the file (use --no-relative or --no-R to turn that off).
--dirs (-d) is implied, which will create directories specified in the list on the destination
rather than noisily skipping them (use --no-dirs or --no-d to turn that off).
--archive (-a) behavior does not imply --recursive (-r), so specify it explicitly.
These side-effects change the default state of rsync, so
the position of the --files-from option on the command line has no bearing on how other options are parsed (e.g.
-a works the same before or after --files-from, as does --no-R and all other options).
The filenames that are read from the FILE are all relative to the source dir -- any leading slashes are removed and no ".."
references are allowed to go higher than the source dir. For example,
rsync -a --files-from=/tmp/foo /usr remote:/backup
If /tmp/foo contains the string "bin" (or even "/bin"), the /usr/bin directory will be created as /backup/bin on the remote
host. If it contains "bin/" (note the trailing slash), the immediate contents of the directory would also be sent (without
needing to be explicitly mentioned in the file -- this began in version 2.6.4). In both cases, if the -r option was enabled,
that dir's entire hierarchy would also be transferred (keep in mind that -r needs to be specified explicitly with --files-from,
since it is not implied by -a). Also note that the effect of the (enabled by default) --relative option is to duplicate only
the path info that is read from the file -- it does not force the duplication of the source-spec path (/usr in this case).
In addition, the --files-from file can be read from the remote host instead of the local host if you specify a "host:" in front
of the file (the host must match one end of the transfer). As a short-cut, you can specify just a prefix of ":" to mean "use the
remote end of the transfer". For example:
rsync -a --files-from=:/path/file-list src:/ /tmp/copy
Copy all the files specified in the /path/file-list file that was located on the remote "src" host.
--protect-args are specified and the
--files-from filenames are being sent from one host to another,
the filenames will be translated from the sending host's charset to the receiving host's charset.
| the rules/filenames are terminated by a null ('\0') character, not a NL, CR, or CR+LF. |
--exclude-from, --include-from, --files-from, and any merged files specified in a --filter rule.
It does not affect
--cvs-exclude (since all names read from a
.cvsignore file are split on whitespace).