Use the rsync command to synchronize data

Source: Internet
Author: User
Use the rsync command to synchronize data-Linux Enterprise Application-Linux server application information. The following is a detailed description. Considering server data security, I want to add a backup server to achieve better redundancy through data synchronization.
In linux, there is a very good command rsync to implement differential backup. The following describes its usage:

▲Suitable system: Hongqi DC 4.1 or 5.0, or other linux and FreeBSD systems
▲Test environment: Hongqi DC 5.0

1. Use rsh or ssh commands

In the absence of an rsync server, we can use the rsync command to directly perform fast differential backup:
CODE: Command Format:
# Rsync [option] Destination path of the Source Path
Where:
[Option]:
A: Use the archive mode, which is equal to-rlptgoD, that is, keep the original file permission.
Z: Indicates compressed data during transmission.
V: display to the screen
E: Use a remote shell program (rsh or ssh can be used)
-- Delete: Precisely saves copies. files deleted from the source host are also deleted from the target host.
-- Include = PATTERN: do not exclude files or directories that conform to PATTERN.
-- Exclude = PATTERN: exclude all files or directories that conform to the PATTERN.
-- Password-file: Specifies the password used for rsync server user authentication.

The Source Path and target path can be in the following format:
Rsync: // [USER @] Host [: Port]/Path <-- rsync server Path
[USER @] Host: Path <-- another representation of rsync server
[USER @] Host: Path <-- remote Path
LocalPath <-- local path
Related Article

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.