Using rsync + inotify for Data Synchronization I. What is rsync? It is a tool for file synchronization and data transmission in Linux. It uses the rsync algorithm to enable client and server, master server andBackup server data synchronization. Rsync can also resume transmission after interruption.
After configuring the Rsync server, you need to issue an rsync command on the client to back up the files on the server to the client. Rsync is a very powerful tool, and its commands have many special options. The following describes the options one by one. The Command Format of www.2cto.com Rsync can be as follows:
Rsync is a very convenient remote data backup tool, and its advantages will not be described in detail. You can refer to Baidu. Given the powerful features of Rsync, we need to learn about it, next we will build a simple rsync service to illustrate how rsync synchronizes data.
1. Check whether the software is installed
Rsync OverviewRsync is an open source fast backup tool that can mirror and synchronize the entire directory tree across different hosts, support incremental backups, maintain links and permissions, and use optimized synchronization algorithms to compress money in transit, making it ideal for applications such as offsite backups, mirror servers, and more. The official website of Rsync is http://rsync.samba.o
Reference: http://www.thegeekstuff.com/2010/09/rsync-command-examples/
Note: In all the examples below, there is actually no space between-and-. please delete the space when using it.
Rsync is a remote data synchronization tool that allows you to quickly synchronize files between multiple hosts over a LAN or the Internet. Rsync is a tool used to replace rcp, whic
rsync->>> Remote Synchronize
Oh, do not have to explain it, or explain it, the meaning of the document synchronization said ...
The first step is to download the free software first.
rsync.samba.org/or Samba.anu.edu.au/rsync.
The latest version of this site download the address
Http://www.jb51.net/softs/2149.html
PS: Must go to the official website to download the latest version,
Because the previous vers
Backup is an essential part of writing code, traditional backup, usually copy all the data to a place, and then labeled to indicate when the backup, this backup is called "Overall backup."
If you make a general backup, the disk space requirements are very large, especially when you back up large volumes of data, sometimes, for example, one weeks, only a small part of the content has been modified, but still need to back up all the time, it is clear that a waste of disk space, this time the incre
function Introduction1, one-click Configuration rsync2, does not support multi-module or multi-user3,-a All random4, do not add-a need to manually enter the account password5, the progress bar is only good-looking, does not represent the real progress#!/bin/bashUsersuiji= ' Uuidgen | Cut-c 1-10 'Passwdsuiji= ' Uuidgen | Cut-c 1-10 'Jindutiao () {Counter=0_r=0_c= ' tput cols '_procec= ' tput cols 'Tput Cup $_c $_rprintf "["While [$COUNTER-LT 100]DoCounter= ' expr $COUNTER + 1 'Sleep 0.1printf "="
Backup must be a very boring thing, because everyone is reluctant to do it. Often listen to friends say lost mobile phone, bad hard drive, more distressing is-a large number of documents also no longer exist. It may be possible to avoid these disasters by regularly backing up files on a regular basis.
The Mac's own time machine can automatically back up everything including system files, applications, music, photos, movies, and documents. However, if you and I want to choose which content to ba
1. IntroductionRsync is a remote data synchronization tool that enables one rsync server to back up multiple client data at the same time, requiring Scp,ssh,daemon support with a default port of 873.Rsync + Crond can achieve data timing synchronization, Rsync + inotify can achieve real-time data synchronization.The Rsync
Rsync file synchronization tool,
Some time ago, due to the needs of the company, we needed to synchronize and save the backup files. Later we thought of the file synchronization work Rsync which we are all most familiar with, so we had a great afternoon, then, the general process and Parameter Details are summarized.
First, I understand the general principle of rsync
Rsync Remote Data Synchronization tools
Rysnc (Remote synchronize) is installed in/usr/bin by default in centos. In addition, rysnc has a corresponding version on Windows. Home address: http://rsync.samba.org/
Rysnc command usage:( Option-parameter, user-user, HOST-IP address, Src-copy source location, DEST-copy target location)Shell pull: rsync [Option] [user @] HOST: SRC [DEST]
Installation
Rsync-3.1.0.tar.gz#tar ZXVF rsync-3.1.0.tar.gz#cd rsync-3.1.0#./configure--prefix=/home/work/rsync#make#make Install
The configuration of Rsync server;
Environment: 192.168.11.11 for production machine; 192.168.11.12 for backup machine;Then need to 192.168.11
Linux rsync incremental Sync method
You can first use Rpm-qa |grep rsync to see if rsync is installedLet's talk about the Rsyns configuration processI. Configuring server-sideFirst edit the/etc/rsyncd.conf content as follows:UID = Nobody #进行备份的用户 nobody for any userGID = Nobody #进行备份的组 nobody for any groupUse chroot = no #不使用chrootMax connections = #最大连接数Log file
After the rsync server configuration is over, the next step is to issue an rsync command on the client to enable the server-side files to be backed up to the client. Rsync is a very powerful tool, and its commands have many feature options, and we'll analyze all of its options below.
The command format for rsync can be
During our daily O M, we often encounter the need to set up the rsync service, such as website file synchronization (image or backup), patch update, disaster Tolerance and backup for various different machine backups. If you write the rsync service as a script, you can have a basic service framework after the script is executed. You only need to further improve the details and security requirements, this i
Rsync is very simple and convenient to use. If used properly, the operation security can be enhanced. In addition, it can also be used as a security detection tool, without the support of any other software, you can complete the Integrity audit of the file system.
Rsync Step 1: Create an rsync directory in d:, decompress all the stuff in the two compressed files
Application Scenarios:The company backend has two Nginx server, because still in the testing phase. So development often needs to update the Web program, and each update will need to upload two times. Now the two Web servers are OK. If in the future with the volume of business growth, 4, 5 sets of time also need to upload a bit bitter force. Therefore, I intend to use the rsync+inotify combination to synchronize the data of the server.Rsync Introducti
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.