32nd-foundation of rsync advanced synchronization tool, 32nd-rsync

Source: Internet
Author: User
Tags server installation and configuration rsync scp command

32nd-foundation of rsync advanced synchronization tool, 32nd-rsync

Directory:

1. rsync Introduction
2. How rsync works
3. Use the rsync command. parameter description
4. install and configure the rsync server on the client
1. Server installation and configuration
2. Client installation and configuration
5. rsync troubleshooting

1. rsync Introduction

Rsync is an open-source, fast, and versatile tool that supports full and incremental local or remote data synchronization and backup. Rsync is applicable to unix, linux, windows, and other operating platforms.
Rsync, remote synchronize is a software that implements remote synchronization. It can keep the permissions, time, soft and hard links, and other additional information of the original file while Synchronizing files. Rsync uses the "rsync algorithm" to provide a fast way to synchronize files between clients and remote file servers. It can also transmit files through ssh, which ensures high confidentiality, in addition, it is free software.
Rsync includes the following features:

  • Supports copying special files, such as linked files and devices;
  • You can exclude the synchronization of specified files or directories, which is equivalent to the exclusion function of the tar command;
  • The permission of the original file or directory, time, soft and hard links, owner, group, and other attributes can be kept unchanged-p
  • Incremental synchronization can be implemented, that is, only synchronization of changed data, so data transmission efficiency is very high;
  • You can use rcp, rsh, ssh, and other methods to transfer files (rsync itself does not encrypt data );
  • You can transmit files and data through socket (process mode;
  • Supports anonymous or authenticated (without requiring system users) process mode transmission to facilitate and secure data backup and mirroring;

2. How rsync works

  • Local data transmission between a single main sentence (similar to the cp command)
  • Transmit data through rcp, ssh, and other channels (similar to the scp command)
  • Transmit data using a daemon (socket) (this is an important function of rsync itself)

3. Use the rsync command. parameter description
-V, -- verbose detailed mode output
-Z, -- compress compresses backup files during transmission
-A, -- archive mode, indicating that the file is transmitted recursively and all file attributes are kept, equal to-rlptgoD.
-R, -- recursive processes subdirectories in recursive Mode
-T, -- times preserve the file time information
-O, -- owner keeps file owner information
-G, -- group: Keep file group information
-P, -- perms to keep File Permissions
-R, -- relative uses relative path information
-B, -- backup creates a backup, that is, if the object already has the same file name, rename the old file ~ Filename. You can use the -- suffix option to specify different backup file prefixes.
-- Backup-dir: backs up files (for example ~ Filename) is stored in the directory.
-Suffix = SUFFIX defines the backup file prefix.
-U, -- update only performs updates, that is, skipping all files that already exist in DST and whose file time is later than the time to be backed up. (Do not overwrite the updated file)
-L, -- links retains soft links
-L, -- copy-links: process soft links like regular files
-- Copy-unsafe-links: only copies links other than the SRC path directory tree.
-- Safe-links ignores links other than the SRC path directory tree
-H, -- hard-links
-Q, -- quiet simplified output mode
-D, -- devices: Keep Device File Information
-S, -- sparse performs special processing on sparse files to save DST Space
-N, -- dry-run which files will be transmitted
-W, -- whole-file: Copy files without incremental Detection
-X, -- one-file-system do not span the boundaries of the file system
-B, -- block-size = SIZE indicates the block size used by the algorithm. The default value is 700 bytes.
-E, -- rsh = COMMAND specifies that rsh and ssh are used for data synchronization.
-- Rsync-path = PATH specifies the path of the rsync command on the remote server
-C, -- cvs-exclude automatically ignores files in the same way as CVS to exclude files that do not want to be transmitted
-- Existing only updates the files that already exist in DST, instead of backing up the new files.
-- Delete: delete the files that are not in the SRC file in DST.
-- Delete-excluded: delete Files specified by this option at the receiving end.
-- Delete-after: delete after transmission
-- Ignore-errors is deleted when an IO error occurs in a timely manner.
-- Max-delete = NUM: a maximum of NUM files can be deleted.
-- Partial retains the files that are not completely transferred for any reason, so as to speed up subsequent re-transmission.
-- Force directory deletion, even if not empty
-- Numeric-ids does not match the number user and group ID with the user name and group name.
-- Timeout = time ip timeout, in seconds
-I, -- ignore-times do not skip files with the same time and length
-- Size-only: when determining whether to back up a file, only check the file size, regardless of the file time
-- Modify-window = NUM determines whether the timestamp window of the file is used at the same time. The default value is 0.
-T -- temp-dir = DIR create a temporary file in DIR
-- Compare-dest = DIR: compare the files in DIR to determine whether to back up data.
-P is equivalent to -- partial
-- Progress displays the backup process
-- Exclude = PATTERN specifies to exclude file modes that do not need to be transmitted
-- Include = PATTERN specifies the file mode to be transmitted without exclusion
-- Exclude-from = FILE: exclude files in the specified mode in the FILE.
-- Include-from = FILE: files with the specified FILE pattern matching are not excluded.
-- Version: prints version information.
-- Address: bind to a specific address
-- Config = FILE: specify other configuration files. The default rsyncd. conf FILE is not used.
-- Port = PORT specify other rsync service ports
-- Blocking-io: block IO for remote shell
-Stats indicates the transmission status of some files.
-- SS actual transmission process during transmission
-- Log-format = formAT specifies the log file format
-- Password-file = FILE get password from FILE
-- Bwlimit = KBPS limits I/O bandwidth, KBytes per second
-H, -- help: displays help information

4. install and configure the rsync server on the client
1. Server installation and configuration
2. Client installation and configuration
5. rsync troubleshooting

 

To be continued ......

 

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.