rsync (Remote sync) is a file sync and Transfer tool under the Unix/linux system. Rsync provides a quick way to synchronize files between a client and a remote file server via the rsync algorithm.
Working mechanism: In a remote synchronization task, the client responsible for initiating the rsync synchronization operation is called the initiator, and the server that responds to the Rsync synchronization operation from the airliner is called the backup source. In the downstream synchronization (download), the backup source is responsible for providing the original location of the document, the initiator should have read access to the location, in the upstream synchronization (upload), the backup source is responsible for providing the document's target location, the initiator should have write permission to the location.
synchronization method for Rsync server: the backup source can be either an SSH server , or it can be a Server mode to run the rsync program, The following sections explain how to configure the SSH backup source,thersync backup source.
How to synchronize the SSH backup source:
(Server-side configuration)
1. Prepare two servers that can communicate with each other
650) this.width=650; "style=" Float:none; "title=" 1.png "src=" http://s3.51cto.com/wyfs02/M02/70/0E/ Wkiol1wwmleaflngaadod6uuksm925.jpg "alt=" Wkiol1wwmleaflngaadod6uuksm925.jpg "/>
2. And the Rsync software is installed (if you use SSH synchronization, you also have to install the SSH package)
650) this.width=650; "style=" Float:none; "title=" 2.png "src=" http://s3.51cto.com/wyfs02/M02/70/11/ Wkiom1wwmhkjoe-faaa_u-pg2lk057.jpg "alt=" Wkiom1wwmhkjoe-faaa_u-pg2lk057.jpg "/>
3. Create two users, can be responsible for uploading and downloading separately
650) this.width=650; "style=" Float:none; "title=" 3.png "src=" http://s3.51cto.com/wyfs02/M00/70/0E/ Wkiol1wwmliis1nbaafsuxkbqkm465.jpg "alt=" Wkiol1wwmliis1nbaafsuxkbqkm465.jpg "/>
4. Modify the SSH configuration file, only allow rget and rput SSH remote access
650) this.width=650; "style=" Float:none; "title=" 4.png "src=" http://s3.51cto.com/wyfs02/M00/70/11/ Wkiom1wwmhksrodkaaa7tadt4_c032.jpg "alt=" Wkiom1wwmhksrodkaaa7tadt4_c032.jpg "/>
650) this.width=650; "style=" Float:none; "title=" 5.png "src=" http://s3.51cto.com/wyfs02/M01/70/0E/ Wkiol1wwmljqioklaabjsq_r8x4493.jpg "alt=" Wkiol1wwmljqioklaabjsq_r8x4493.jpg "/>
650) this.width=650; "style=" Float:none; "title=" 6.png "src=" http://s3.51cto.com/wyfs02/M01/70/11/ Wkiom1wwmhkq4cbraabionm7eay628.jpg "alt=" Wkiom1wwmhkq4cbraabionm7eay628.jpg "/>
(Client Configuration)
5. Create a directory in the host that needs to be synchronized and synchronize with the Rsync tool
650) this.width=650; "style=" Float:none; "title=" 7.png "src=" http://s3.51cto.com/wyfs02/M01/70/0F/wKioL1WwowWAVn7_ Aaauyunmnqs895.jpg "alt=" Wkiol1wwowwavn7_aaauyunmnqs895.jpg "/>
6. Use the Rget user to perform the download operation, this result appears to be correct
650) this.width=650; "style=" Float:none; "title=" 8.png "src=" http://s3.51cto.com/wyfs02/M01/70/12/ Wkiom1wwosdxknhraadwvos_3ug722.jpg "alt=" Wkiom1wwosdxknhraadwvos_3ug722.jpg "/>
7. Using Rget is not possible to upload, because there is no permission to the directory, so will be error
650) this.width=650; "style=" Float:none; "title=" 9.png "src=" http://s3.51cto.com/wyfs02/M00/70/12/ Wkiom1wwouvykdxmaagoiezfvu8577.jpg "alt=" Wkiom1wwouvykdxmaagoiezfvu8577.jpg "/>
8. Upload operation is possible with rput users
650) this.width=650; "style=" Float:none; "title=" 10.png "src=" http://s3.51cto.com/wyfs02/M01/70/0F/ Wkiol1wwozhqunqlaaetkhugw3y173.jpg "alt=" Wkiol1wwozhqunqlaaetkhugw3y173.jpg "/>
Linux rsync remote Synchronization