How Rsync works
Data transfer between a single host local (this is similar to the functionality of the CP command).
With the RCP,SSH equivalent to the arrival transfer data (this time resembles the function of the SCP command).
Transfer data as a daemon (socket) (This is an important function of rsync itself).
Cp-a/etc/hosts/tmp/rsync-avz/etc/hosts/tmp/rsync--delete/null/tmp/
Push scp/etc/hosts ***@********:/tmp/push rsync-avz-e ' ssh '/etc/hosts ***@********:/tmp/pull SCP ***@********:/etc/hosts/ tmp/pull rsync-avz-e ' ssh ' ***@********:/etc/hosts/tmp/
Daemon Mode backup topology
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/70/9C/wKioL1W6IwyR7f6QAAD_giILwBM784.jpg "title=" QQ picture 20150730210452.png "alt=" Wkiol1w6iwyr7f6qaad_giilwbm784.jpg "/>
Creating a configuration file/etc/rsyncd.conf
#rsyncd_config start
UID = rsync
GID = rsync
Use chroot = no
Max connections = 200
Timeout = 300
PID file =/var/run/rsyncd.pid
Lock file =/var/run/rsyncd.lock
Log file =/var/log/rsyncd.log
[Oldboy]
Path =/oldboy/
Ignore errors
Read Only = False
List = False
Hosts allow = 10.0.0.0/24
Hosts Deny = 0.0.0.0/32
Auth users = Rsync_backup
Secrets file =/etc/rsync.password
#rsync_config End
Rsync Common parameters-avz or-VZRTOPG
-v Verbose mode output, transfer progress information, etc.
-Z compression during transfer to improve transfer efficiency,--compress-level=num can be compressed by level
-a archive mode, which means that files are transferred recursively, and all file attributes are maintained, equal to-RTOPGDL.
-R Sub-directory in recursive mode
-T hold file time information
-O Keep File owner information
-P Maintain file permissions
-G hold File group information
-P Display the synchronization process and the progress of the transmission and other information
-D Keep Device file information
-L Keep Soft links
-E Specify Channel
--exclude=pattern Exclude Files Matching PATTERN
--exclude-from=file read exclude patterns from FILE
How Rsync Works and Sersync