The Linux rsync remote synchronization

Source: Internet
Author: User
Tags inotify rsync

the Linux rsync remote synchronization

1. Case

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M01/9B/77/wKioL1ljZHGy8RY-AAAnhkiYgGM266.png "style=" float : none; "title=" Image 1.png "alt=" Wkiol1ljzhgy8ry-aaanhkiyggm266.png "/>

1. Start Deployment

(1) on the 1.10 server configured as the service side, modify the rsync configuration file /etc/rsyncd.conf, and start the rsync service program.

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/9B/77/wKiom1ljZHKymg0PAABIhkBxFec390.png "style=" float : none; "title=" Image 2.png "alt=" Wkiom1ljzhkymg0paabihkbxfec390.png "/>

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/9B/77/wKiom1ljZHLAd1kIAACcganstqA026.png "style=" float : none; "title=" Image 3.png "alt=" Wkiom1ljzhlad1kiaaccganstqa026.png "/>

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/9B/77/wKioL1ljZHPCk0utAAEPNvsxjLc357.png "style=" float : none; "title=" Image 4.png "alt=" Wkiol1ljzhpck0utaaepnvsxjlc357.png "/>

(2) in the 1.20 Use the rsync command to verify that you can download files from the server side (/var/www/html) to the client side (/var/www/html).

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M02/9B/77/wKioL1ljZHSDbEl6AADLwBxQPCg297.png "style=" float : none; "title=" Image 5.png "alt=" Wkiol1ljzhsdbel6aadlwbxqpcg297.png "/>

(3) Modify the rsync configuration file /etc/rsyncd.conf, enabling the client side (/var/www/html) to upload files to the server (/var/www/html) location . authentication on the client side .

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/9B/77/wKiom1ljZHSALoc0AAFdWl0xbW4283.png "style=" float : none; "title=" Image 6.png "alt=" Wkiom1ljzhsaloc0aafdwl0xbw4283.png "/>

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/9B/77/wKiom1ljZHWz0l1NAAFn49reVZs875.png "style=" float : none; "title=" Image 7.png "alt=" Wkiom1ljzhwz0l1naafn49revzs875.png "/>

(4) On the 1.20 implementation every night 22:00 to the server's Web site directory (/var/www/html) to do a synchronization.

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/9B/77/wKioL1ljZHaipBrJAAB0akeWirQ871.png "style=" float : none; "title=" Image 8.png "alt=" Wkiol1ljzhaipbrjaab0akewirq871.png "/>

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/9B/77/wKiom1ljZHbAb2wIAADXISo3fK8704.png "style=" float : none; "title=" Image 9.png "alt=" Wkiom1ljzhbab2wiaadxiso3fk8704.png "/>

(5) Configure rsync+inotify real-time synchronization on 1.20. By scripting, the client can upload files to the server in real time. Note: The inotify software needs to be installed.

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/9B/77/wKioL1ljZHeRWDzGAAFSMmM3ip8763.png "style=" float : none; "title=" Image 10.png "alt=" Wkiol1ljzherwdzgaafsmmm3ip8763.png "/>

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/9B/77/wKiom1ljZHjzWtnRAACutIhxGbI024.png "style=" float : none; "title=" Image 11.png "alt=" Wkiom1ljzhjzwtnraacutihxgbi024.png "/>

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/9B/77/wKioL1ljZHjRvxePAAFuS58Hz60393.png "style=" float : none; "title=" Image 12.png "alt=" Wkiol1ljzhjrvxepaafus58hz60393.png "/>


This article is from the "Duyuheng" blog, make sure to keep this source http://duyuheng.blog.51cto.com/12879147/1946075

The Linux rsync remote synchronization

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.