Data synchronization with Rsync+inotifyI. Rsync concept:Rsync is a tool for file synchronization and data transmission under Linux system, using the rsync algorithm to make the client and server, the master server andBackup server data Synchronization. Rsync can also resume transmission after an outage.
(1) Download the Rsync source code for installation(2) 1 ' CD rsync2 './configure--prefix=/usr/local/rsync3 ' Make4 ' Make install ( may require permissions, plus sudo resolution )(3) Rsync command Sync parameters option ( learn ) rsync [OPTION ...]Src... DEST The frequent use of the parameters option illustrates:- V,--verbose the specific mode output, the
decided to use thunder. I had nearly 4 K files and close to 15 GB of data. I used thunder to say that the speed was up to 8 ~ The speed of 10 MB can be regarded as fast. Previously, we used thunder for downloads, but yesterday we found that thunder was not working. When we downloaded less than 2 GB of data, the speed has actually become less than 10 KB. It is estimated that it is a ghost on the server side. No wonder, my speed here is too much bandwidth ...... Then I tried
server. Provide the correct module name or modify the server side to the module you want to solve the problem. Question 1:Encountering problems on the client:Rsync-auzv--progress--password-file=/etc/rsync.pas root@192.168.133.128::backup/home/Rsync:could not open password file "/etc/rsync.pas": No such file or directory (2)Password:@ERROR: Auth failed on module backupRsync Error:error starting Client-server Protocol (code 5) at MAIN.C (1506) [receiv
Question one:@ERROR: Chroot failedRsync Error:error starting Client-server Protocol (code 5) at MAIN.C (1522) [receiver=3.0.3]Reason:The server-side directory does not exist or does not have permissions, creating a directory and correcting permissions resolves the problem.Question two:@ERROR: Auth failed on module teeRsync Error:error starting Client-server Protocol (code 5) at MAIN.C (1522) [receiver=3.0.3]Reason:The server side of this module (TEE) needs to authenticate the username password,
file patterns that do not need to be transferred. --include=Pattern Specifies the file mode that is not excluded and that needs to be transferred. --exclude- from=file excludes files in the specified schema in file. --include- from=file does not exclude files that specify pattern matching. --version Prints the release information. --address is bound to a specific location. --config=File Specifies a different configuration file and does not use the default rsyncd.conf file. --port=Port Specifies
Tags: Linux rsyncRsync (synchronous data, support incremental backup)How to use:Rsync-av 192.168.31.182:/tmp/1.txt/tmp/(Copy the 1.txt file under the TMP folder in Server 192.168.31.182 to the TMP directory on this machine)Rsync-av/tmp/1.txt 192.168.31.182:/tmp/(Copy the 1.txt file from the local TMP directory to the TMP folder in the server 192.168.31.182)Rsync-av 192.168.31.182::longfei/123/1.txt/tmp/(Dem
started the service properly:Cd c: \ Program Files \ cwrsync \ binTelnet 192.168.0.201 22Telnet to 192.168.0.201 873If the test is successful, you can execute the synchronization plan:Rsync-vzrtopg -- Progress -- delete 192.168.0.201: rsync/cygdrive/D/testOr:Rsync-vzrtopg -- Progress -- delete 192.168.0.201:/cygdrive/D/rsync
,--compress The files that are backed up are compressed when they are transferred. --exclude=pattern Specifies to exclude file patterns that do not need to be transferred. --include=pattern Specifies the file mode that is not excluded and that needs to be transferred. --exclude-from=file excludes files in the specified schema in file. --include-from=file files that do not exclude file specified pattern matching are not excluded. --version print version information. --address bind to a specific a
The circular area progress bar and progress circular progress bar of the similar thunder download progress
Old rules: first:
Briefly describe the implementation principle:1. Custom view, inheriting View2. Draw a circle in onDraw and fill it3. If the total area of the circular area is known, the blue area can be cal
compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbzCreate a password file$sudo vi/etc/rsyncd.secretsRsync:123$sudo chmod 0600/etc/rsyncd.secretsStart rsyncSudo/etc/init.d/rsync startClientWe look at the operation of the client, the general client does not need special configuration, the direct synchronization canRSYNC-VZRTOPG--progress [email PROTECTED]::RSYNC_BK. #. For the current directory, to
= no
List = yesAuth users = chicken00Secrets file =/etc/. rsyncd. secrets
# Set the user name and password. The user name is the same as that specified in the configuration file (auth users)$ Echo "chicken00: chicken00">/etc/. rsyncd. secrets
# File permissions must be set to 600$ Chmod 600/etc/. rsyncd. secrets
3. Start
# Set to boot$ Chkconfig rsync on
# Viewing startup$ Chkconfig -- list rsyncRsync on
# Content in xinetd configuration of
Specifies the file mode that is not excluded and needs to be transferred--exclude-from=file exclude files in the specified mode in file--include-from=file does not exclude files that match the file-specified pattern--version Print version Information--address bound to a specific address--CONFIG=FILE specifies a different profile and does not use the default rsyncd.conf file--PORT=PORT Specifies the other rsync service ports--blocking-io blocking IO f
/.rsync-filter'repeated:--filter='-. Rsync-filter'--exclude=pattern exclude files matching pattern--exclude-from=file read exclude patterns from FILE--include=pattern Don't exclude files matching PATTERN--include-from=file read include patterns from FILE--files-from=file Read List of source-filenames from FILE-0,--from0 all *-from/filter files is delimited by 0s-S,--protect-args no space-splitting; Only wil
file,/ROOT/LIJQ for the client directory can be defined by itself, the port is my own definition, test1 is my service-side definition of the synchronization module name
If error @error:auth failed on module test1 Please check the key profile, if error: rsync:failed to connect to 192.168.2.222:no the route to host (113) Please check Firewalls and selinux, bloggers suffer
After the synchronization command executes, it is found that the/data/www/files on the server are synchronized to the clie
installed, run the following instructions to synchronize the backup:
Copy Code code as follows:
Rsync-vzrtopg–progress–delete–password-file=/home/admin/admin_backups/password.rsync rsync:// Lixiphp@203.171.237.245/test/home/admin/admin_backups/test
Address rsync://lixiphp@203.171.237.245/test,lix
through the system call interface program to use, this interface program is provided by Inotify-tools, so we have to install!!! Here we install on the HOST2# yum install-y inotify-tools# # RPM-QL inotify-tools/usr/bin/inotifywait/usr/bin/inotifywatch/usr/lib64/ libinotifytools.so.0/usr/lib64/libinotifytools.so.0.4.1The following are several inotify-related kernel parameters that may be adjusted according to actual needs# ls-l/proc/sys/fs/inotify/Total dosage 0-rw-r--r--1 root root 0 May 00:23 m
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.