rsync

rsync

Rsync is a file synchronization tool that can be used to copy files and directories between hosts, or between local directories. It is a very versatile tool that can be used for a variety of purposes, including:

  • Backing up files

  • Copying files to remote hosts

  • Mirroring directories

  • Updating files

Rsync is known for its speed and efficiency. It uses a delta-transfer algorithm to only copy the parts of files that have changed, which can save a lot of time and bandwidth.

Rsync is a powerful tool that can be used for a variety of tasks. Here are some of the most common uses for rsync:

  • Backing up files: Rsync can be used to create a backup of your files. This can be done by copying your files to a remote host, or by creating a backup archive on your local system.

  • Copying files to remote hosts: Rsync can be used to copy files to remote hosts. This can be useful for transferring files to a server or to a colleague's computer.

  • Mirroring directories: Rsync can be used to mirror directories. This means that it can be used to create an exact copy of a directory on another host. This can be useful for keeping two directories synchronized.

  • Updating files: Rsync can be used to update files. This means that it can be used to copy the latest version of a file to a remote host or to a local directory. This can be useful for keeping files up-to-date.

help

rsync [options] source destination

Options:

-a, --archive     archive mode; preserve modification times, ownership, and permissions.
-r, --recursive    recurse into directories.
-l, --links        copy symbolic links as links.
-v, --verbose      increase verbosity.
-z, --compress     compress files during transfer.
-c, --checksum     calculate checksums (used to detect data corruption).
-i, --itemize-changes  list only changed files.
-n, --dry-run      do a trial run with no changes made.
-q, --quiet        suppress non-error messages.
-e, --rsh=command  specify the rsync remote shell command.
--stats          print a summary of the transfer.
-h, --help         show this help message.
-V, --version      print version information.

For more information, see the rsync man page.

my help

-a: This option tells rsync to copy all files, including directories, subdirectories, and files with symbolic links.
-r: This option tells rsync to recursively copy directories.
-l: This option tells rsync to copy symbolic links as links.
-v: This option tells rsync to be verbose and print out more information about the transfer.
-z: This option tells rsync to compress the data during the transfer.
-c: This option tells rsync to calculate checksums (used to detect data corruption).
-i: This option tells rsync to list only changed files.
-n: This option tells rsync to do a trial run with no changes made.
-q: This option tells rsync to suppress non-error messages.
-e: This option tells rsync to use the specified rsync remote shell command.
--stats: This option tells rsync to print a summary of the transfer.
-h: This option tells rsync to show this help message.
-V: This option tells rsync to print version information.

Last updated