Rsync (synchronize) is a remote data synchronization tool that synchronizes files between local and remote hosts using the rsync algorithm.The benefit of rsync is to sync only two different parts of the file, and the same part is not delivered. Similar to incremental backups,This makes it much more time-consuming to deliver backup files or sync files to the serve
Master server: 192.168.5.13 _ ubuntu
Slave server: 192.168.5.11 _ centos
=======================1> install rsync on both hosts ========
Install ubuntu as follows:
Compile and install: download this Free Software
Rsync.samba.org/or samba.anu.edu. au/rsync
Download the latest version from the official website.
Decompress
Primary server: 192.168.5.13_ubuntuFrom server: 192.168.5.11_centos================== 1> is installed on both hosts separately rsync===================Ubuntu installation is as follows:
# Apt-get Install rsync
Compile and install: Download this free softwarersync.samba.org/or Samba.anu.edu.au/rsyncGo to the official website to download the latest ve
Primary server: 192.168.5.13_ubuntuFrom server: 192.168.5.11_centos================== 1> is installed on both hosts separately rsync===================Ubuntu installation is as follows:
# Apt-get Install rsync
Compile and install: Download this free softwarersync.samba.org/or Samba.anu.edu.au/rsyncGo to the official website to download the latest ve
Description1. Rsync Service EndSystem: Ubuntu Server 11.10IP Address: 192.168.21.168Data storage directory:/home/mysql_data2, Cwrsync clientSystem: Windows Server 2003IP Address: 192.168.21.130Synchronized Directories: D:\mysql_data to achieve the purpose: Cwrsync Client automatically synchronizes data from/home/mysql_data directory in rsync server to D:\mysql_da
By default, rsync is installed in ubuntu. You can run the rsync-h command to check whether the tool is installed. If not, run the following command:
$ Aptitude install rsync
Install.Rsyncremote synchronize) is a remote data synchronization tool that can be used to synchronize files between local and remote hosts using
Now there is a need, a server under a path to the file, want to back up to the B server below. Suppose a IP is 192.168.1.75,b IP is 192.168.1.85. Under Ubuntu you can use the Rsync software to work with the INotify tool to implement this feature.
1 rsync host-side configuration
The ubuntu16.03 system already has the Rsync
By default, rsync is installed in Ubuntu, but no configuration file is available in/etc. You can copy the sample file to/etc.
# Cp/usr/share/doc/rsync/examples/rsyncd. conf/etc
# Vi/etc/rsyncd. conf
# Sample rsyncd. conf configuration file
# GLOBAL OPTIONS
Motd file =/etc/motd # login welcome information
Log file =/var/log/rsyncd # log file
# For pid file, do not
Ubuntu installs the Rsync service by default, but does not have a profile under/etc, you can usually copy the sample files to/etc
#cp/usr/share/doc/rsync/examples/rsyncd.conf/etc
#vi/etc/rsyncd.conf
# Sample RSYNCD.CONF configuration file
# GLOBAL OPTIONS
MOTD FILE=/ETC/MOTD #登录欢迎信息
Log FILE=/VAR/LOG/RSYNCD #日志文件
# for PID file, does not use/var/run/rsync.pid if
Background:
0. server data is very important. If the disk is damaged, it will be troublesome. As a manager, it is necessary to synchronize and back up data in real time.
1. rsync is a good backup tool. The following uses Ubuntu as an example to describe its preparation.
2. If the ip address of my server A is 10.141.247.12, the ip address of my backup client B is 10.141.247.13
Server preparation:
1. Enable
Installing rsyncPerform the following command installation:Apt-get install-y rsyncYou can then use the following command to see which files are installed:Dpkg-l rsyncConfiguring RsyncModify the corresponding content in the configuration file/etc/default/rsync as:Rsync_enable=trueAdd the configuration file/etc/rsyncd.conf, as follows:Port = 873UID = rootGID = rootUse chroot = yesRead Only = yesHosts allow=204.74.0.0/255.255.0.0Hosts deny=*Max connectio
background:
0. Server data is very important and will be in trouble once disk corruption occurs. As a manager, it is necessary to synchronize the data in real time.
1. Rsync is a good and backup tool, let's take Ubuntu as an example to talk about its compounding.
2. If my server a IP is 10.141.247.12, the IP of my backup client B is 10.141.247.13
server-side compounding:
1. Open
In the previous article, I talked about how to use rsync and Inotify-tools in Ubuntu to sync files between two Ubuntu servers. Now more into
One step, false with A1,a2,a3,a4 four servers, their sync folder set to/data, when any one of the machines on the changes in the file, can automatically
Sync up to the other machines. This is the subject to be discussed in t
Rsync, rsyncRsync: 1. About rsync
Rsync is short for remote synchronize. It is a remote synchronization software that is useful in projects. Its rsync algorithm (the core algorithm of rsync introduced in rsync's Core Algorithm in cool shell) provides a fast method for client
up an rsync server
Setting up an rsync server is relatively simple. Write a configuration file rsyncd. conf. There are also rules for writing files. We can refer to the documents on rsync.samba.org. Of course, we need to install the rsync software first;
A. Install rsync;
Obtain r
refer to the documents on rsync.samba.org. Of course, we need to install the rsync software first;
A. Install rsync;
Obtain rsync
Rysnc Official Website: http://rsync.samba.org/you can get to the latest region from here. The latest version is 3.05. Of course, because rsync is such a useful software, many Linux release
(append id_rsa.pub content to Authorized_keys)Back to a machine:# SSH root@192.168.4.193 (no password required, login successful)
A simpler approach
Open terminal execution Ssh-keygen, which creates Id_rsa, id_rsa.pub two files in the ~/.ssh/directory, respectively, for your public and private keys.
Copy the public key to the server's ~/.ssh/authorized_keys file. There are several ways to copy a public key through the SCP to the server and then append it to the ~/.ssh/authorized_keys file, wh
file rsyncd.conf. The writing of the file is also a rule, we can refer to the document on rsync.samba.org. Of course, we must first install rsync This software is only OK;
A, the installation of rsync;
Get rsync
RYSNC's official website: http://rsync.samba.org/can get the latest version from above. The current version is 3.05. Of course, because
rsyncd.conf. The writing of the file is also a rule, we can refer to the document on rsync.samba.org. Of course, we must first install rsync This software is only OK;
A, the installation of rsync;
Get rsync
RYSNC's official website: http://rsync.samba.org/can get the latest version from above. The current version is 3.05. Of course, because
1. Using Ssh+rsyncYou only need to open the SSH service on the server side and start the rsync service in xinetd to useA. Incremental synchronizationrsync-av/src-dir/. [email protected]:/dest-dir/.B. Mirroring synchronizationRsync-av--delete/src-dir/. [email protected]:/dest-dir/.Features: Simple configuration, no need to configure rsyncd.conf profile, but requires user authentication during synchronizationNote: You can create an auto-sync encryption
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.