rsync command Usage

Source: Internet
Author: User
Tags ssh rsync

After the rsync server is configured, the Rsync commands can be issued from the client to implement a variety of synchronized

For Rsync has a very

Multi-functional options, here are some common options:

The command format for 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::D EST

6. rsync [OPTION] ... rsync://[user@]host[:P ort]/src [DEST]

Rsync has six different modes of operation:

1. Copy local files and start this mode of work when both SRC and des path information do not contain a single colon ":" delimiter.

2. Use a remote shell program (such as rsh, SSH) to copy the contents of the local machine to the remote machine. This mode is started when the DST path address contains a single colon ":" Separator.

3. Use a remote shell program (such as rsh, SSH) to copy the contents of the remote machine to the local machine. This mode is started when the SRC address path contains a single colon ":" Separator.

4. Copy files from remote rsync server to local machine. This mode is started when the SRC path information contains the "::" delimiter.

5. Copy files from local machine to remote rsync server. This mode is started when the DST path information contains the "::" separator.

6. List of files for remote machines. This is similar to rsync transmission, but simply omitting the local machine information in the command.

Example:

RSYNC-RAVUQZ--delete 10.10.144.112::transcode/org.

The meaning of each parameter:

-V,--verbose complex output information

-Q,--quiet quiet mode, almost no message generated, commonly used in cron to execute rsync

-A,--archive archive mode, equivalent to-rlptgod parameters. Very quickly save almost all permission settings, except for hard connections (through-h setting).

-R,--recursive copy all the following information (through)

--delete deletion of the delivery break is no longer present, and the destination exists for the file

-U only updates to prevent local new files from being rewritten, pay attention to both machine clocks while

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.