Background
Our company is using Inotify+rsync to do real-time synchronization to solve the problem of distributed cluster file consistency. But when the Web files more and more (millions number of small files, such as html,jpg), synchronization is more and more slow, simply do not real-time, according to the online tuning methods have tried, the problem is not resolved. After my careful research, and finally the slow core of the study to understand,
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
Contents
Introduction
How does it work?
Setting up a server
Using rsync itself
Rsync on the net
Introduction
Rsync is a wonderful little utility that's amazingly easy to set up on your machines. rather than have a scripted FTP session, or some other form of File Transfer script -- rsync copies only the diffs o
Centos7.x Rsync + sersync for real-time incremental data synchronization backup tutorial, rsyncsersync
I. Overview
1. sersync is developed based on Inotify and is similar to Inotify-tools.
2. sersync can record changes (including adding, deleting, and modifying) in the monitored directory to the name of a specific file or directory. When rsync is used, only th
First, server-side configuration:
# yum-y Install xinetd
# Vi/etc/xinetd.d/rsync
The following code
Service rsync
{
Disable = yes
Socket_type = Stream
wait = no
user = root
Server =/usr/bin/rsync
Server_args =–daemon
Log_on_failure + + USERID
}
Disable = yes change to disable = no
and start xinetd.
#/etc/init.d/xinetd Start or service xinetd resta
Rsync is a data mirroring Backup tool under Unix-like systems--remote sync. is a fast incremental backup tool remote Sync, which supports local replication or synchronizes with other SSH and rsync hosts.
By building rsync server and client, it is easy to solve the problem of file synchronization in the test environment and production environment, and the synchro
Get rsync-3.1.0 I put one in my net. Address:
Http://yunpan.cn/cKAHidI4yCu3L Extraction Code C59C
Start installing rsync[Root@localhost ~]# tar zxvf rsync-3.1.0.tar.gz[Root@localhost ~]# CD rsync-3.1.0[Root@localhost ~]#./configure--prefix=/home/work/rsync[Root@localhost ~
1.RSYNC: Remote sync, support local replication, or synchronize with other SSH and RSYNC hosts.Rsync remote synchronization and CP, SCP function basically consistent, the other two is to copy the source files, if there is new data added, using CP, SCP to the source file all the content is copied, and Rsync is on the basis of the source files only update the newly
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
Rsync architecture and rsync Architecture
1.1 rsync server configuration
1.1.1 view the server rsync version
1.1.2 after the rsync program is installed by default, the main configuration file of rsync is not automatically creat
Rsync configuration, rsync configuration file
I. Introduction to rsync
Remote synchronize (Rsync) is a remote data synchronization tool that allows you to quickly synchronize files between multiple hosts through the LAN/WAN, or use Rsync to synchronize different directories
Tags: res rsync specifies create List start service technology RTP UIDI. Introduction of RSYNC ToolsRsync 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
I found that this problem has been thought to be a server problem twice, because of a machine appeared this problem, originally for security special cancellation file write and Modify permissions. Through McAfee's modify permissions, the problem is resolved, so there is a problem, first check directory permissions issues.
Rsync Error:some Files/attrs were not transferred (* previous errors)
Cwrsync rsync E
Rsync is a data image backup tool in Linux. It can be seen from the software name-remotesync. Rsync supports most Unix-like systems, including Linux, Solaris, and BSD.
I. rsync
CommandIntroduction
Rsync is a command for Synchronizing files to a Linux system. It can synchronize two computers to files and directories, an
Set up rsync Data Synchronization backup and rsync Data Synchronization for Small and Medium-sized Clusters
Important NFS Problems
1. NFS client users write NFS.
1) Why do ordinary users need to write NFS.
2) Add all_squash to exports.What is Rsync?
Rsync is an open-source, fast, and versatile tool that supports full o
Set up rsync Data Synchronization backup and rsync Data Synchronization for Small and Medium-sized Clusters
Important NFS Problems
1. NFS client users write NFS.
1) Why do ordinary users need to write NFS.
2) Add all_squash to exports.What is Rsync?
Rsync is an open-source, fast, and versatile tool that supports full o
finished Un waiting on 14318 sent-bytes received bytes 104.00 bytes/sec total size are speedup is 0.21 _exit_cleanup (code=0 , FILE=MAIN.C, line=1031): Entered _exit_cleanup (Code=0, FILE=MAIN.C, line=1031): About to call exit (0)
[-Z option]
This is a compression option, and as long as this option is used, rsync compresses and transmits the outgoing data first. Recommended for scenarios with poor network environments.
In general, the compressio
Rsync working mechanism (translation), rsync working mechanism Translation
This article is an official rsync recommendation article on How Rsync Works translation. The main content is Rsync terminology and a simple version of rsync
Rsync random start script and rsync script
Server
1 #!/bin/sh 2 # chkconfig: 2345 21 60 3 # description: Saves and restores system entropy pool for \ 4 #create by xiaohu 5 #2014.06.02 6 #This script is the Rsync service script 7 . /etc/init.d/functions 8 case "$1" in 9 start)10 echo "rsync is starting"11
This article by show according to Lin Feng to provide friendship sponsorship, starting in the mud row world. Just have a few days to start learning Linux file synchronization software rsync, when learning rsync, we can be divided into the following several steps: 1. What is rsync? 2. How rsync Works 3.
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.