The advantages and disadvantages of rsync relative to other synchronization tools _ server Other

Source: Internet
Author: User
Tags rsync


Rsync It was originally a file synchronization protocol under Linux, and as technology developed, it had other versions, such as Windows and AIX, and HPUX with versions to support. The advantage of this synchronization tool for Rsync is that the operation is done under the full command line, there is a detailed log file, but also can support a variety of different circumstances of the update, such as backup-type updates, and so on, there is a very good place, it and the server can be synchronized with each other, that is, you can update the file from the server down, You can also submit local files to the server. As long as you configure the parameters are correct, you can complete this work.



And this tool occupies a relatively small amount of system resources. In addition, we have tried to use this tool compared with the xcopy,secondcopy, the advantages are too much, especially in the number and size of the file is very large, more obvious advantages, more than 200G of data, a hundred thousand of files, Xcopy as long as there is an error, the trouble, or interrupted, Or you're going to have to start over. copy,secondcopy This tool in the copy 200G such a large amount of data files, it can not go down, anyway stop there always error, and RSYCN is completely no such trouble. Over 200G of data, a hundred thousand of files, we use rsync to successfully copy the past.



One of the slower parts of rsync is that when it's synchronized, the files in the local directory are compared to the files on the server, so that when compared, it updates only the different files there, the same files will skip directly, and if the number of files to sync is very large, this comparison process is very slow, It takes a long time to wait.



The parameters of rsync this is not said here, we Google rsycn Chinese manual this keyword, the internet has a lot of instructions, here only to talk about the installation and use of Windows under the process.



Under Windows, this tool also has installation files, http://rsync.samba.org/download.html, downloaded on the Internet, and under Windows suggest you install this, under AIX and HPUX systems, if you need to use it, You need to download the source code to install. After installing under Windows, it adds a manual boot background service Rsyncserver, by default, the service is not started after installation, so after the first installation, you have to manually start the service, and set up to start with the operating system automatically.



After installation, the second step is to configure its sync directory, under the installation directory has a rsyncd.conf file, opened with a text editor, you can see the following content:





 code as follows:

Use Chroot = False
Strict modes = False
Hosts allow = *
Log file = Rsyncd.log
PID file = Rsyncd.pid


#Module definitions
#Remember Cygwin naming conventions:c:\work becomes/cygwin/c/work
#

[Test]
Path =/cygdrive/c/work
Read Only = False
Transfer logging = yes





In the # before those lines can be no matter, the bottom of those lines is our most concerned about, it should be noted that rsync this tool is developed from under Linux, so its path and Windows below the path is somewhat different, need to convert, such as c:\work this directory, The directory path in rsync should be written/cygdrive/c/work so that there is no colon in this format, all are backslashes, and/cygdrive/in front of the drive letter. Other paths refer to this format for a change.



The [test] line is the module name for a sync directory you set up, and you can interpret it as an alias in Rsync, which may be easier to understand, and note that this name is case-sensitive and cannot be duplicated.



Path =/cygdrive/c/work This line is the physical file path that represents the sync directory you set up, and this format requires attention, don't write wrong



Read Only = False indicates that this synchronization module is set to be read only and cannot be written to here by the client of Rsync
Transfer logging = yes means that the output log is formatted in a predetermined format when synchronized, and the specific format and log you can view the Rsyncd.log file under the installation directory. This file also needs to be noted that after a long time synchronization operation, this log file may be very large, so you'd better to manually delete every time. When someone wants to sync with the Rsync client, the log file is not deleted and can only be deleted when no one is using it.



This service side of the installation is successful, and then you can use the RSYCN client to connect to the server for synchronization operation. Linux platform does not need you to install, the system is installed by default, Windows below you have to install the client, the client's installation package once installed, you can put those have been installed files all copy to other machines to use, the client can directly copy the past use. Copy to any directory, then start a cmd window, switch to the directory where Rsync.exe resides, and then output the following command:
RSYCN-AVRDZTOPG--force--delete 192.168.100.10::test/abc//cygdrive/c/abc



This command means to sync all the contents of the C:\WORK\ABC directory on the 192.168.100.10 machine to the local C:\ABC directory if it finds files that exist in the local c:\abc and not on the server. Forced to delete the local redundant files, other parameters you can look at the Chinese Help Manual, which has a detailed description.


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.