1. Prepare the Environment first sudo apt-get install SSH2. Create a voucher ssh-keygen//Note that both file and passphrase do not need to input generating public/private RSA key pair. Enter file in which to save the key (/HOME/USER1/.SSH/ID_RSA):/home/User1/.ssh/id_rsa already exists. Overwrite (y/n)? [emailprotected]:~$ ssh-keygengenerating public/private RSA key pair. Enter
characteristics of rsync
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 com
My configuration:A is the service sideB is clientFor A and B configuration please refer to Rsync+sshBecause Rsync uses SSH channels, the service side of rsync is not required to be configured or started, and Rsync uses the port where SSH is in transit.I wrote the script on the A end.#! /bin/bashhost1=192.168.2.81Src=/data/crashSt1=/data/crashUser=root/usr/local/bin/inotifywait-mrq--timefmt '%d/%m/%y%h:%m '--format '%T%w%f%e '-e modify,delete,create,attrib $src \| While read filesDo/USR/BIN/RSYNC
value of the profile every 30 to keep the profile up-to-date sh/tmp/sync_customip.sh sh/tmp/sync_customip.sh#!/bin/Bashconf_file_url="http://10.60.10.62:8060/test/ip_list"Cksum_url="Http://10.60.10.62:8060/test/cksvalue"Local_conf_file="/tmp/ip_list" Time=' Date ' log="/tmp/sync_customip.log"get_cksum () {remote_cksum= ' Curl-s"${cksum_url}"' Local_cksum= ' Cksum ${local_conf_file}|awk'{print\$1}''}sync_file () {Cat ${local_conf_file}>/tmp/. Tmp_ip.txt wget-Q ${conf_file_url}-O ${local_conf_f
the appropriate shortcut key action in the Keymap.B. You can add common icons on toolbar to facilitate operation, in order to prevent misoperation, it is advisable to have an isolated icon between the action icons, although misoperation can be retrieved using local history, but the productivity may be reduced.In addition to providing a local history in addition to version control, many times saved me from the brink of life and death:Right-click localhost history--Show historyPub label is a name
the appropriate shortcut key action in the Keymap.B. You can add common icons on toolbar to facilitate operation, in order to prevent misoperation, it is advisable to have an isolated icon between the action icons, although misoperation can be retrieved using local history, but the productivity may be reduced.In addition to providing a local history in addition to version control, many times saved me from the brink of life and death:Right-click localhost history--Show historyPub label is a name
This article examples for you to share the PHP file multi-server synchronization tool, specific content as follows
The above is the entire content of this article, I hope that you learn PHP program help.
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.