Analysis of rsync synchronization speed using linux commands

Source: Internet
Author: User
Tags rsync

Analysis of rsync synchronization speed using linux commands

Rsync is a data image backup tool in unix-like systems-remote sync. A Fast Incremental Backup Tool, Remote Sync, supports local replication or synchronization with other SSH and rsync hosts.

Its features are as follows:
1) images can be used to save the entire directory tree and file system.
2) It is easy to maintain the permissions, time, and soft and hard links of the original file.
3) installation without special permissions.
4) fast: During the first synchronization, rsync copies all the content, but transfers only modified files the next time. Rsync can compress and decompress data during data transmission, so it can use less bandwidth.
5) Security: You can use scp, ssh, and other methods to transmit files. Of course, you can also use a direct socket connection.
6) anonymous transmission is supported to facilitate website images.

Here is my rsync script, which basically meets most of the requirements:

 

rsync --compress --recursive --times --perms --owner --group --links  --exclude=smarty/templates_c/  --timeout=30 [path] [user]@[ip]:[path]echo '----------------------------------------------------'echo "complete rsync [path] to [user]@[ip]:[path]"

Parameter Parsing:

 

-Z, -- compress compresses backup files during transmission

-R, -- recursive processes subdirectories in recursive Mode

-T, -- times preserve the file time information

-P, -- perms to keep File Permissions

-O, -- owner keeps file owner information

-G, -- group: Keep file group information

-L, -- links retains soft links

-- Exclude = PATTERN specifies to exclude file modes that do not need to be transmitted

-- Timeout = time ip timeout, in seconds

Rsync speed test

The synchronization directory size is 88 MB. Run the following command:

 

building file list ... donesent 637987 bytes  received 20 bytes  425338.00 bytes/sectotal size is 88738094  speedup is 139.09

 

We can see that only KB of data is transmitted, rather than the actual 88M data, because rsync does not synchronize all files.

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.