inotifywait, and initiate the synchronization process when the event is triggered:#!/bin/bash#desthost=172.16.100.6desthostdir=/www/htdocs/srcdir=/www/htdocs/INOTIFYWAIT-MR--timefmt '%d/%m/%y%h:%m '--format '%T%w%f '-E close_write,modify,delete,create,attrib $SRCDIR | While read DATE time DIR FILE; DoFilechange=${dir}${file}Rsync-avz--password-file=/etc/rsync.passwd $SRCDIR [email protected]${desthost}::htdocs >/dev/null \echo "at ${time} on ${date
First, the basic knowledgeRsync is divided into server-side, client-side, server-building than the client hard (and very simple).The rsync server is the server that runs the rsync service in Deamon mode and needs to open the Rsync deamon and start the xinetd service. Default Port 873.The rsync client is the server that
Install rsync in Linux
ObtainRsync-3.1.0 I put one in my online drive. Address:
Http://pan.baidu.com/s/1dDs4lSt
Install
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#
Rsync is a data mirroring backup tool for Linux systems. Using the Fast incremental Backup tool remote Sync can be synchronized remotely, support local replication, or synchronize with other SSH and rsync hosts.rsync格式rsync [OPTION] … SRC DESTrsync [OPTION] … SRC [[emailprotected]]host:DESTrsync [OPTION] … [[emailp
device to see if the file passed through.[Email protected] tmp]# Ls/tmp/rsyncAming-02.txthas been synchronized.In turn, we can also pull this file out of the machine.[Email protected] tmp]# RSYNC-AVP 192.168.1.106::test/aming-02.txt/tmp/123.txtReceiving incremental file listAming-02.txt1159 100% 1.11mb/s 0:00:00 (xfer#1, TO-CHECK=0/1)Sent bytes received 1266 bytes 2622.00 bytes/secTotal size was 1159 speedup is 0.88Also succeeded.Linux system logsThe
This article describes the problem of using rsync to synchronize two machine directories under Linux. After using Rsync synchronization, you can keep the directory consistent (with delete operations).
Data synchronization method
1, pull data from the host
The process that is started on the standby machine
Sync command:
to be encrypted transmissionWhat are the disadvantages of 3.Rsync?1) A large number of small files are synchronized, longer than the event, and sometimes the rsync process may stop2) Large file synchronization, 10G of large files may sometimes have the problem of interruption, incomplete synchronization before the hidden filesHope to share can help the needs of the pot friends. In the current market,
/etc/backserver.paschmod 600/etc/backserver.pas
/usr/bin/rsync--daemon echo" usr bin rsync--daemon ">> etc rc.local
First generate a password configuration file that needs to be consistent with the password on the source data server vim/etc/ Rsyncd.secretes (File not present, vi manually generated) chmod 600/etc/rsyncd.secretes
7Use Crontab to update daily 4 o'clock in the morni
Tags: Linux OPS linux linux basic Linux cloud computing Linux LearningRsync is an open source, fast and versatile tool that enables simultaneous, full-scale, incremental, local or remote data backup, and is one of the essential skills of operations personnel. So how does the
trouble , it is necessary to try again later.Shell can automatically perform backup, there is want to be able to regularly back up, do not always trigger, this time using the Linux Task Scheduler command crontab, its Common command format is: [Plain]View PlainCopy
* * * * * */command_path
The first 5 * are represented in turn
Minutes: 0-59
Hours: 1-23
Date: 1-31
Month: 1-12
Week: 0-6 (0 = Sunday)
You can also use
Rsync and find is the Linux system comes with the command, if not installed can find the system installation disk or ISO file, there is a RPM package, install it. The concrete idea is as follows: 1) can realize the timing of rsync. The System timer task can take care of this matter, see the following URL: for example: #crontab-E 0 * * 1-5
Tags: real-time CAL SQL Sage EFI level system word third-partyReal-time file synchronization via Rsync and INotify (asynchronous file system event monitoring mechanism) under LinuxOriginal: http://www.summerspacestation.com/linux%E4%B8%8B%E9%80%9A%E8%BF%87rsync%E4%B8%8Einotify%E5%BC%82%E6%AD%A5% E6%96%87%e4%bb%b6%e7%b3%bb%e7%bb%9f%e4%ba%8b%e4%bb%b6%e7%9b%91%e6%8e%a7%e6%9c%ba%e5%88%b6%e5%ae%9e%e7%8e%b0%e6 %9
the Linux rsync remote synchronization1. Case650) 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
Real-time file backup using Linux commands-incron, rsync, and inotify
I,Rsync, incronIntroduction
For details about the rsync tool and its use with the cron tool for Scheduled backup, refer to the blog: http://blog.csdn.net/wangjun2008/article/details/4268539;
Inotify is a file change notification mechanism, which is i
Tags: rsync synchronizes Linux system logs via service Screen tool36, rsync through the service synchronization, Linux system logs, screen toolsOne, rsync through the service synchronizationThis approach can be understood as: Establish an
1. Configure two node synchronizationThe previous post has shown how to synchronize a host. This time we'll add a host to synchronize. There is no duality in the method.1. First display our console:Last time the content of 192.168.2.103 synchronization 192.168.2.102. This lets 192.168.2.104 nodes synchronize the contents of 192.168.2.102.Install the rsync and xinetd services on 192.168.2.104 first: Start the Rsync
monitoring scripts#vi/srv/rsync.shRsync.sh contents are as follows:#!/bin/bashsrc=/srv/test/#监视改文件路径, folder content changes trigger server data synchronizationDes=backup #客服端配置的模块 (customer service side will introduce)Host= "192.168.10.6" #同步到的IP地址, if multiple spaces are separated. For example: host= "192.168.10.6 192.168.10.7"/usr/local/bin/inotifywait-mrq--timefmt '%d/%m/%y%h:%m '--format '%T%w%f '-e modify,delete,create,attrib $SRC | While read files #这边要主要下inotifywait, only the
we learned more about the structure of disk and the management of disk in the previous section, we know Linux the management of the disk is through fdisk command Plus parameters to implement, and then format is MKFS.EXT4 command. Finally , You can use the Mount command to mount it to the appropriate directory. Today we are explaining a more commonly used tool -rsync. Remember is more commonly used! Let me
Linux rsync Practical ApplicationI. Overview of RsyncRsync is a data-mirroring Backup tool under Unix-like systems, and--remote sync can be seen from the name of the software. Rsync is a file synchronization and data Transfer tool under the Linux system that uses the "rsync"
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.