Rsync command details

Source: Internet
Author: User

Rsync command details

Rsync Parameters
-A archive mode, equivalent to-rlptgoD
-D is equivalent to -- devices -- specials
-G: Keep the group before and after file transfer consistent
-L reserved Symbolic Links
-O ensure the owner consistency before and after File Transfer
-P: ensure the same permissions before and after file transfer.
-R recursive Transmission
-T keep the modification time before and after file transmission consistent
-U if the modification time of the target file is later than the modification time of the source file, the target file will not be overwritten.
-V shows the File Transfer Process
-W: transfer all files
-Z transfers files in Compressed Mode
-- Delete: delete files in the target directory but not in the source directory.
-- Existing only synchronizes the files in the source and target files
-- Password-file = FILE: get the password from the FILE.
-- Progress shows the transmission progress of each file
-- Max-size = SIZE: do not transmit files larger than SIZE
-- Min-size = SIZE: do not transmit files smaller than SIZE

Common parameter combinations:-avz

Example
Copy all the files in the/wwwroot directory of the current host to the/wwwroot directory of 192.168.1.1:

Rsync-avz/wwwroot root@192.168.1.1:/wwwroot
Copy all the files in the/wwwroot directory of the current host to the/wwwroot directory of 192.168.1.1, but exclude the log directory:

Rsync-avzP -- exclude = "log"/wwwroot root@192.168.1.1:/wwwroot
Suppose we need to copy the/root/file of the remote host (192.168.1.1, SSH port number is 222) to the/tmp directory of the current host, then we can do this:

Rsync-avz-e 'ssh-p 222 'root@192.168.1.1:/root/file/tmp/

RSync for file backup Synchronization

Monitor host files and directories using inotifywait

Using inotify + rsync for Linux File batch update

Inotify-tools + rsync real-time file synchronization installation and configuration

Complete rsync synchronization Configuration

Remote synchronization of Rsync in CentOS 6.5

Differential file comparison and extraction in Linux folders-the use of rsync

Rsync details: click here
Rsync: click here

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.