This article System Centos6.0
Server: (Centos) 192.168.182.130
Client: (LV2) 192.168.182.129
Rsync is a data mirroring Backup tool under Unix-like systems, and--remote sync can be seen from the name of the software.
Its characteristics are as follows:
Can be mirrored to save the entire directory tree and file system.
It is easy to maintain the original file permissions, time, soft and hard links and so on.
can be installed without special permissions.
Fast: Rsync replicates all content on the first synchronization, but only the modified files are transferred the next time. Rsync can compress and decompress in the process of transmitting data, so it can use less bandwidth.
Security: You can use the SCP, SSH and other means to transfer files, of course, can also be connected through a direct socket.
Support for anonymous transmission, to facilitate the use of Web site mirror image.
Server-side Startup
Usr/bin/rsync--daemon--config=/etc/rsyncd/rsyncd.conf
Root permissions may be required to run.
/etc/rsyncd/rsyncd.conf is the location of the rsyncd.conf you just edited.
can also be added to the/etc/rc.d/rc.local to allow the system to automatically start and so on.
Client synchronization
rsync-Parameter user name the contents of the square brackets (module name) in the ip::rsyncd.conf of the @ synchronization server are stored locally as:
Rsync–vzrtopg–delete--progress--exclude "*.log" Lansgg@192.168.182.130::lansggtest/root/backup--password-file=/ Etc/rsyncd.pass
The interpretation of the order is as follows:
-V---verbose display details of transmission
-Z to compress files when--compress transfer
-R--recursive recursively processing of subdirectories
-T is-times keep file time information
-O--owner is used to maintain the owner information of the file
-P---perms Keep file permissions
-G-–group keep file group information
-A is the--archive archive mode, which represents the transfer of files recursively and maintains all file attributes equal to the-rlptgod
--delete keeps data synchronized with the Rsync server, and if the server deletes a file, the client will delete it.
The--progress shows detailed progress.
--exclude is used to exclude unwanted file types.
LANSGG@192.168.182.130::LANSGGTEST specifies the server to be backed up and the associated module, LANSGG the rsync synchronization account that is set up on the servers server;
/BACKUP specifies where the backed up files are stored on the client.
--PASSWORD-FILE=/ETC/RSYNCD.PASS Specifies the location where the client holds the password file.
rsync simple Application;
This column more highlights: http://www.bianceng.cn/OS/Linux/