rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST rsync [OPTION]... [USER@]HOST:SRC DEST rsync [OPTION]... SRC [SRC]... DEST rsync [OPTION]... [USER@]HOST::SRC [DEST] rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST rsync [OPTION]... rsync://[USER@]HOST[:PORT]/SRC [DEST] |
rsync is a program that behaves in much the same way that rcp does, but has many more options and uses the rsync remote-update protocol to greatly speedup file transfers when the destination file already exists.
The rsync remote-update protocol allows rsync to transfer just the differences between two sets of files across the network link, using an efficient checksum-search algorithm described in the technical report that accompanies this package.
print the rsync version number and exit
This option increases the amount of information you are given during the transfer. By default, rsync works silently. A single -v will give you information about what files are being transferred and a brief summary at the end. Two -v flags will give you information on what files are being skipped and slightly more information at the end.
This option decreases the amount of information you are given during the transfer, notably suppressing information messages from the remote server. This flag is useful when invoking rsync from cron.
Normally rsync will skip any files that are already the same length and have the same time-stamp. This option turns off this behavior.
This forces the sender to checksum all files using a 128-bit MD4 checksum before transfer. The checksum is then explicitly checked on the receiver and any files of the same name which already exist and have the same checksum and size on the receiver are skipped. This option can be quite slow.
A shortcut for specifying recursion and to preserve all attributes.
This tells rsync to copy directories recursively. If you donīt specify this then rsync wonīt copy directories at all.
Use relative paths. This means that the full path names specified on the command line are sent to the server rather than just the last parts of the filenames.
With this option preexisting destination files are renamed with a ~ extension as each file is transferred. You can control the backup suffix using the --suffix option.
In combination with the --backup option, this tells rsync to store all backups in the specified directory. This is very useful for incremental backups.
This option allows you to override the default backup suffix used with the -b option. The default is a ~.
This forces rsync to skip any files for which the destination file already exists and has a date later than the source file.
This tells rsync to recreate symbolic links on the remote system to be the same as the local system. Without this option, all symbolic links are skipped.
This tells rsync to transfer the file referenced by a symbolic link, rather than recreating the link.
This tells rsync to treat symbolic links that point outside the source tree like ordinary files. Absolute symlinks are also treated like ordinary files, and so are any symlinks in the source path itself when --relative is used.
This tells rsync to ignore any symbolic links which point outside the destination tree. All absolute symlinks are also ignored.
This tells rsync to recreate hard links on the remote system to be the same as the local system. Without this option hard links are treated like regular files.
With this option the incremental rsync algorithm is not used and the whole file is sent as-is instead. This may be useful when using rsync with a local machine.
This option causes rsync to update the remote permissions to be the same as the local permissions.
This option causes rsync to update the remote owner of the file to be the same as the local owner. This is only available to the super-user. Note that if the source system is a daemon using chroot, the --numeric-ids option is implied because the source system cannot get access to the usernames.
This option causes rsync to update the remote group of the file to be the same as the local group. If the receiving system is not running as the super-user, only groups that the receiver is a member of will be preserved (by group name, not group id number).
This option causes rsync to transfer character and block device information to the remote system to recreate these devices. This option is only available to the super-user.
This tells rsync to transfer modification times along with the files and update them on the remote system.
This tells rsync to not do any file transfers, instead it will just report the actions it would have taken.
This tells rsync not to cross filesystem boundaries when recursing.
This tells rsync not to create any new files - only update files that already exist on the destination.
This tells rsync not to delete more than NUM files or directories.
This tells rsync to delete any files on the receiving side that arenīt on the sending side. Files that are excluded from transfer are excluded from being deleted unless you use --delete-excluded.
This option has no effect if directory recursion is not selected.
In addition to deleting the files on the receiving side that are not on the sending side, this tells rsync to also delete any files on the receiving side that are excluded (see --exclude).
By default rsync does file deletions before transferring files to try to ensure that there is sufficient space on the receiving filesystem. If you want to delete after transferring then use the --delete-after switch.
This controls the block size used in the rsync algorithm. See the technical report for details.
This option allows you to specify the remote shell program to use for communication between the local and remote copies of rsync.
You can also choose the remote shell program using the RSYNC_RSH environment variable.
Use this to specify the path to the copy of rsync on the remote machine. Note that this is the full path to the binary, not just the directory that the binary is in.
This option allows you to selectively exclude certain files from the list of files to be transferred.
You may use as many --exclude options on the command line as you like to build up the list of files to exclude.
This option is similar to the --exclude option, but instead it adds all exclude patterns listed in the file FILE to the exclude list. Blank lines in FILE and lines starting with ī;ī or ī#ī are ignored.
This option tells rsync to not exclude the specified pattern of filenames. This is useful as it allows you to build up quite complex exclude/include rules.
This specifies a list of include patterns from a file.
This option instructs rsync to use DIR as a scratch directory when creating temporary copies of the files transferred on the receiving side. The default behavior is to create the temporary files in the receiving directory.
With this option, rsync compresses any data from the source file(s) which it sends to the destination machine.
With this option rsync will transfer numeric group and user ids rather than using user and group names and mapping them at both ends.
By default rsync will use the user name and group name to determine what ownership to give files. The special uid 0 and the special group 0 are never mapped via user/group names even if the --numeric-ids option is not specified.
This option allows you to set a maximum IO timeout in seconds. If no data is transferred for the specified time then rsync will exit. The default is 0, which means no timeout.
This specifies an alternate TCP port number to use rather than the default port 873. This only has effect when using rsync to connect to a remote rsync daemon.
This specifies whether rsync will use blocking IO when launching a remote shell transport. You may find this is needed for some remote shells that canīt handle the default non-blocking IO.
By default, rsync will delete any partially transferred file if the transfer is interrupted. In some circumstances it is more desirable to keep partially transferred files. Using the --partial option tells rsync to keep the partial file which should make a subsequent transfer of the rest of the file much faster.
This option tells rsync to print information showing the progress of the transfer.
Equivalent to --partial --progress
This option allows you to provide a password in a file for accessing a remote rsync server. Note that this option is only useful when accessing a rsync server using the built in transport, not when using a remote shell as the transport. The file must not be world readable. It should contain just the password as a single line.
This option allows you to specify a maximum transfer rate in kilobytes per second. A value of zero specifies no limit.