I've written it before. Timed backups via rsync: Windows2008 and Centos7.0 via rsync for Updates (backup), and now the need for real-time synchronous backups via rsync and INotify. The first step: Getting Ready for work 1. INotify Introduction
Inotify is a Linux feature that monitors file system operations such as read, write, and create. The Inotify is responsiv
Recent unit live more, so very little update, at night the internet happened to see an introduction about Sersync, personal feeling more standard than rsync+inotify configuration, just recently preface, summed up under, share to everyone.
The current industry more reliable synchronization solutions are:
Rsync+inotify-tools,openduckbill+inotify-tools and Rsync+s
I. Introduction of RSYNCrsync (remote Synchronize) is a long-distance data synchronization tool that can synchronize multiple hosts with Lan/wan quickly, and Rsync uses the "Rsync algorithm" for synchronization between the local host and the remote host, which is not the whole transfer of the algorithm every time. It transmits only the different parts of the data that are backed up between two computers, so
password in the/etc/rsyncd/rsyncd.secrets and give 600 permissions with the command
The code is as follows
Copy Code
chmod 600/etc/rsyncd/rsyncd.secrets
5. Open the server side
The code is as follows
Copy Code
/wp-content/bin/rsync--daemon--config=/etc/rsyncd/rsyncd.conf
Second, configure backup clients, such as ip:222.222.222.22
/backuphening@192.168.0.217: backup
This command backs up all files in the local/home/backup Directory and subdirectories to the backup directory set by the backup module of RSYNCSERVER172.20.0.6.Note that if the path ends with "/", it indicates backing up the stuff in the directory, but it does not create this directory. If it does not contain "/", it is created.RSYNC usage:Rsync [OPTION]... [USER @] HOST: SRC [DEST] # Back Up Files from RSYNCSERVER
/rsyncd.secretschmod 600/etc/rsyncd/rsyncd.secretsTo start the Rsync service:1. Running the Rsync service with XINETDCentOS runs the Rsync service by default in xinetd mode. Rsync's xinetd configuration fileIn/etc/xinetd.d/rsync. To configure the Rsync service to run with xi
Rsync + inotify enables real-time server backup, rsyncinotify
Inotify:
Inotify is integrated into the kernel. inotify is used as a third-party software to monitor directory changes through the interfaces provided by the kernel.
The inotifywait command can monitor fine-grained real-time changes to files in the directory. The monitored command is
Inotifywait-mrq -
RsyncRsync is a data backup tool under Linux that supports remote synchronization and local replication.This is a simple use of rsync article, many of Rsync's lack of understanding, more rsync knowledge pleaseTo the Rsync website: https://rsync.samba.org/how-rsync-works.htmlRsyrsync is the system that comes with it (at
] ~]# Yum install-y rsyncAlso install: Openssh-clients not be able to execute2. rsync command formatrsync [OPTION] ... SRC DESTRsync-av 123.txt/tmp/Synchronizing the 123.txt to the/tmp directoryrsync [OPTION] ... SRC [[Email protected]]host:destRsync-av 123.txt 192.168.0.101:/data/Synchronize 123.txt files to the/data/directory of the 192.168.0.101 machinersync [OPTION] ... [[email protected]] HOST:SRC DEST
-file = rsync. passHere, rsync. pass only has the password 123456, the user name has been specified in the command line, and the rsync. pass File Permission is changed to 600.
3. export environment variable, password-free rsync
export RSYNC_PASSWORD=${pass}After setting th
are two network segments that need to synchronize the contents of the folder, no additional IP segments are added after the hosts allowHosts allow = 192.168.1.0/24SwitchHosts allow = 192.168.1.0/24 192.168.2.0/24Restart Rsync service, problem solving5.rsync:failed to connect to 172.21.50.8:no route to host (113)Rsync error:error in Socket IO (code ten) at CLIENTSERVER.C (104) [receiver=2.6.9]The other side
example of Access via Rsync Daemon (which lets clients connect to it via a listening port) #rsync-av 192.168. 11.190::aminglinux/123/1.txt/tmp/(pull from server to on-premises) #rsync-av/tmp/1.txt 192.168.11.190::aminglinux/123/(from local to server) AmiNglinux is the module name. This syntax shows that Rsync has thre
About Rsync:Rsync is a remote data synchronization tool that uses the so-called "Rsync algorithm" to synchronize files between local and remote two hosts, which transmits only the different portions of two files, rather than the entire transfer every time, so it is quite fast. The machine running Rsync server is also called Backup server, a rsync server can back
am:/etc/rsyncd. Pas
# Vi/etc/rsyncd. PasFormat: Username: PasswordRsync_user: rsyncofpass
For security reasons, modify the attributes of the authentication File# Chmod 0600/etc/rsyncd. Pas
OK. Start now and try again.
#/Usr/local/rsync/bin/rsync-daemonYou can also specify the port on which rsync runs.#/Usr/local/rsync
in the following five steps:
1. Beta splits file B into a group of data blocks with a fixed size of S bytes that do not overlap. The last part may be smaller than S.
2. Beta performs two types of verification on each split data block: one is a 32-bit rolling weak verification, and the other is a 128-bit md4 strong verification.
3. Beta sends the verification results to α.
4. α searches all data blocks of file a with the size of S (the offset can be optional, not necessarily a multiple o
1. rsyncMan to sync, you'll find: Sync-flush file system buffers, which is a command to synchronize the data in the buffer to the filesystem, and Rsync is the remote rsync, which is a long-distance synchronization tool, With the CP and SCP functions, the rsync command is alm
Tags: Linux sync tool rsync?Linux Sync Tool rsyncFirst, rsync CommandThe rsync command is a remote data synchronization tool that enables fast synchronization of files between multiple hosts via Lan/wan. rsync uses the so-called "rsync
The following is my installation processFirst, the server-side installation1. System environmentServer: centos6.5 factory Environment (default setting when system is installed), ip:192.168.10.185Client: Telnet terminal xshell5 or SECURECRT (for specific installation and use, please consult yourself),ip:192.168.10.1862. Install RsyncLog in to the system via terminal (here is Xshell) 192.168.10.185Rpm-qa|grep rsync*//Check to see if this service is curr
As a system administrator or Linux Power User, your may has probably come across or even on several occasions, used the VE Rsatile Linux Rsync tool, which enables users to expeditiously copy or synchronize files locally and remotely. It is as well a great tool popularly used for backup operations and mirroring.Some of its eminent features and advantages include; It's exceptionally versatile in, it can copy locally, to/from a remote shell or remote
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.