Rsync command usage

Source: Internet
Author: User
Tags rsync

After configuring the rsync server, you can issue the rsync command from the client to implement various synchronization operations. Rsync has many functional options. The following describes common options: the Command Format of rsync can be: 1. rsync [OPTION]... SRC [SRC]... [USER @] HOST: DEST 2. rsync [OPTION]... [USER @] HOST: src dest 3. rsync [OPTION]... SRC [SRC]... DEST 4. rsync [OPTION]... [USER @] HOST: SRC [DEST] 5. rsync [OPTION]... SRC [SRC]... [USER @] HOST: DEST 6. rsync [OPTION]... rsync: // [USER @] HOST [: PORT]/SRC [DEST] rsync has six different working modes: 1. copy the local file. This mode is enabled when the SRC and DES paths do not contain a single colon ":" separator. 2. Use a remote shell program (such as rsh and ssh) to copy the content of the local machine to the remote machine. This mode is enabled when the DST path address contains a single colon ":" separator. 3. Use a remote shell program (such as rsh and ssh) to copy the contents of the remote machine to the local machine. This mode is enabled when the SRC address path contains a single colon ":" separator. 4. Copy files from the remote rsync server to the local machine. This mode is enabled when the SRC path information contains the ":" separator. 5. Copy files from the local machine to the remote rsync server. This mode is enabled when the DST path information contains the ":" separator. 6. List of remote machine files. This is similar to rsync transmission, but you only need to omit the local machine information in the command. Example: rsync-ravuqz -- delete 10.10.144.112: transcode/org. meaning of each parameter:-v, -- verbose complex output information-q, -- quiet mode, almost no message is generated, often used to execute rsync-a in cron, -- archive mode: Permission saving mode, which is equivalent to the-rlptgoD parameter. Quickly save almost all permission settings, except for hard connections (via-H settings ). -R, -- recursive: Copy all the following data (VIA) -- delete: the transfer disconnection does not exist, and the target file-u is only updated to prevent local new files from being overwritten, note that the clock of both machines is the same

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.