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
-auzv -- Progress -- password-file =/etc/rsync. Pas root@192.168.133.128: backup/home/Rsync: cocould 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) [runner ER = 3.0.7]This problem occurs: the file/etc/
rsync command ParametersAfter the rsync server configuration is complete, the next step is to issue the rsync command on the client side to back up the server's files to the client.Rsync is a very powerful tool, and its commands have a lot of feature options, and we have an
command to a script file for scheduled tasks)/Usr/bin/rsync -- zvrtopg -- password-file =/etc/rsyncd. secretes -- progressRsync@112.106.114.200: 100 qslogbak/home/rsync/userlog/#: Wq3. Set firewallRsync uses the default port 873. After installation and configuration, both the client and the server need to set a firewall.# Iptables-I INPUT-p tCp-- Dport 873-j ACC
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 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 @
. [Email protected] home]# vi/etc/rc.local/usr/local/rsync–daemon # Join a rowClient Configuration:echo "Test" >/etc/rsyncd.passwordThis is just a password, no user required, so you need to manually interact when syncingchmod 600/etc/rsync.passwordTest : The following delete represents a command to delete a file where the destination exists and the source directory does not existRsync-vzrtop--delete/home/c
to do this is to save the important data in a top-level directory, and then copy it to the external hard disk to back up the directory with the following command:rsync-avh/home/usr/dir//media/disk/backup/If you want to ensure that locally deleted files are also deleted on the external drive, you need to use the--deleted switch as follows:RSYNC-AVH--delete/home/user/dir//media/disk/backupUse this switch with care; This switch may allow you to delete a batch of innocent files in an unconscious si
Chapter 2 rsync overview 1st basic rsync Overview
Rsync is an open-source backup tool that can be synchronized between different hosts to achieve full backup and Incremental backup.
Full: Transfer and overwrite all data
Incremental: Only data in the differential part is transmitted.1.2 How incremental replication works
Rsync
Author: He Zubin [Robinhe] mail:zubin.he@gmail.com
Beginning on the morning of August 4, 2008
Version number: debian-rsync-v1.0-20080804, August 4, 2008 first edition
Reprint please indicate the source, this article is also the use of two users of most of the content, so reproduced, please also the following "reference article" of the source also joined. Thank you.
This article is bound to have deficiencies, omissions, typos and sentences are not in
Science Document: Https://wiki.archlinux.org/index.php/RsyncUsed before changing the file system. However, the use of the less right, resulting in some of the file permissions out of the question.[Troubleshoot] [ArchLinux] [Bcache] Modify Linux file system/partition scheme/DO hybrid HDD/system Rebirth Big! Hand! Postoperative (Adjust the underlying schema, no!) Heavy! Mount )Tutorial for full-system backup with rsync: Https://wiki.archlinux.org/index.
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
1.rsync and SSH differential remote sync command
Copy Code code as follows:
Command format:
#rsync [option] Source path target path
which
[option]:
A: Use archive mode, equal to-rlptgod, that is, maintain the original file permissions
Z: Compress data on transfer
V: Display to the screen
E:
host name of the source or destination path contains a colon separator, rsync uses a remote shell transport, and when the source or destination path's host name contains two colons, or uses Rsync://url, Rsync uses TCP to directly connect to the Rsync daemon.In particular, if you specify only the source path and do not
的多个模式列表, and add it to the exclude list. This is equivalent to using--exclude in the client command to specify the pattern, but the exlude pattern specified in the configuration file is not passed to the client and is applied only to the server. A module can specify only one exlude option, but you can use "-" and "+" in front of the pattern to specify whether it is a exclude or an include #这个我的理解是排除目录中不需同步的文件# Exclude From = #可以指定一个包含exclude模式定义的文件名#
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. Rsy
/rsyncd.pas
Format is: Username:password
Rsync_user:rsyncofpass
For security purposes, change the authentication file properties
#chmod 0600/etc/rsyncd.pas
OK, now start the next try it.
#/usr/local/rsync/bin/rsync–daemon
You can also specify the ports that Rsync runs
#/usr/local/rsync/bin/
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.