the file size, attributes, permissions, MD5 values, and other information as required. If the file information on both ends is inconsistent, synchronize the different file blocks as required.
The following uses the/usr/local/tomcat6/web directory of the backup rsync server as an example for deployment.
Rsync is easy to set up. Rsync is installed in most versions
-modified time of the file
#%n the filename (short form; trailing "/" on Dir)
#%o the operation, which is "send", "recv", or "Del." (the latter includes the trailing period)
#%p the process ID of this rsync session
#%p the module path
#%t the current date time
#%u the authenticated username or an empty string
#%u the UID of the file (decimal)
#For a list of what the characters mean is output by "%i" and see the--itemize-changes option in the
For the configuration of rsync, please refer to the blog:http://www.cnblogs.com/snsdzjlz320/p/5630695.htmlExperimental environment(1) rsync server: 10.0.10.158(2) rsync client: 10.0.10.173
I notify are configured on the client side1. Check if the system supports inotify# ls/proc/sys/fs/inotify/ max_queued_events max_user_instances max_user_watches # Th
Rsync timing synchronization configuration and rsync synchronization ConfigurationAttach script
For the three configuration files, see rsync installation and configuration.
#!/bin/sh#linuxsir.org home backup #/usr/bin/rsync -avzP --password-file=/etc/rsyncd.secrets root@192.168.145.129::test /home/test/$(date +'%s-%m-%
files during file synchronization. It only synchronizes files with differences or not, however, the initial synchronization speed is still slow.
Rsync has many options:-n: when you are not sure whether the command can be executed as needed, you must test it in advance;-n can complete this function;-v: -- verbose, detailed output mode-q: -- quiet, silent mode-c: -- checksum, enable the verification function
images.
Rysnc official website: http://rsync.samba.org/, you can get to the latest region. Here is an introduction to The rsync algorithm.Rsync usage
The command format of Rsync can be as follows:
Rsync [OPTION]... SRC DEST
Rsync [OPTION]... SRC [USER @] HOST: DEST
/etc/rsyncd. scrtMsyn: xxxxxxxxxIn addition, this file can only be read and written by the root user. Note that for security purposes, the attribute of this file must only be readable by the owner; otherwise, rsync will refuse to run. We can set its property to 600:[Root @ www/etc] # chmod 600/etc/rsyncd. scrt[Root @ www/etc] # mkdir/var/log/rsyncAfter these files are configured, you need to start the rsyncd service on the master server:[Root @ www/et
/rsync.pasUploading files to the server side/USR/BIN/RSYNC-VZRTOPG--progress--password-file=/root/rsync.pas/home/backup Hening@192.168.0.217::backupThis command backs up all files (including subdirectories) in the local machine/home/backup directory to the set backup directory of the backup module of the rsync SERVER (172.20.0.6).Note that if the path ends with a
Inotifywatch Command Instance 9.1 Chapters We explain the parameters of the Inotifywatch command, and let's actually use the next Inotifywatch command. Required to count the file system events in the/home directory within 60 seconds, using the following command: Inotifywatch-v-E modify,delete,create,attrib,move,open,c
/iptables Restart #最后重启防火墙使配置生效
System Yun-wei Www.111cn.net warm reminder: qihang01 original content copyright, reproduced please indicate the source and the original link
3. Install rsync client side software
Whereis rsync #查看系统是否已安装rsync, the following prompts show that you have installed
Rsync:/usr/bin/
errorsRead Only = yes # Read-OnlyList = No # column Files Not AllowedAuth users = inburst # The authenticated user name. If this row is not used, it indicates that it is anonymous.Secrets file =/etc/inburst. Pas # authentication file name
[Web]Path =/usr/local/Apache/htdocs/Comment = inburst.org Web Server
3. Generate a password file on the server/etc/inburst. Pas
Bash-2.03 # Cat/etc/inburst. PasInburst: hack
For security purposes, the attributes of a file must be readable only by the owner.
4.
://rsync.samba.org/(This article configures the use of Rsync 2.6.5 released)
Step two: Upload the rsync package to the machine that is the server (for example: 128.128.6.168)
Step three: Go to root login, unzip the rsync-2.6.5pre2.tar.gz package, go to the specified directory (for example:/home/zuohao/rsync/), and as
Server Configuration: premise: xinetd and rsync1. modify the/etc/xinetd. d/rsync file and change disableyes to noservicersync {disableyessocket_typestreamwaitnouserrootserver/u .. server configuration:
Prerequisites: xinetd and rsync are installed.
1. modify the/etc/xinetd. d/rsync file
Change disable = yes to no in the following content
Service
What is rsync?Rsync is a fast incremental file transfer tool. It can be used for internal backup of the same host. We can also use it as a network backup tool for different hosts. This article mainly describes how to use an rsync server to implement file transmission, backup, and mirroring. Compared with tar and wget, rsync
ACCEPT: wq! #保存, exit/etc/init.d/iptables Restart #最后重启防火墙使配置生效System operation and maintenance www.osyunwei.com warm reminder: qihang01 original content copyright, reproduced please indicate the source and the original link3. Installing the Rsync client softwareWhereis rsync #查看系统是否已安装rsync, the following prompt appears stating that you have installedRsync:/usr
, it indicates that it is anonymous.Secrets file =/etc/inburst. Pas # authentication file name
[Web]Path =/usr/local/Apache/htdocs/Comment = inburst.org Web Server
3. Generate a password file on the server/etc/inburst. Pas
Bash-2.03 # Cat/etc/inburst. PasInburst: hack
For security purposes, the attributes of a file must be readable only by the owner.
4. Start rsync on the server as a daemon
Bash-2.03 # rsync
indicates that it is anonymous.Secrets file =/etc/inburst. Pas # authentication file name
[Web]Path =/usr/local/Apache/htdocs/Comment = inburst.org Web Server
3. Generate a password file on the server/etc/inburst. Pas
Bash-2.03 # Cat/etc/inburst. PasInburst: hack
For security purposes, the attributes of a file must be readable only by the owner.
4. Start rsync on the server as a daemon
Bash-2.03 # rsync --
maintenance www.osyunwei.com warm reminder: qihang01 original content copyright, reproduced please indicate the source and the original link3. Installing the Rsync client softwareWhereis rsync #查看系统是否已安装rsync, the following prompt appears stating that you have installedRsync:/usr/bin/rsync/usr/share/man/man1/
(before the [module] header) is a global parameter, rsync also allows the [global] module name to represent the beginning of one or more global parameter parts (the name must be lowercase).Rsync also supports the inclusion of parameters for any module in the global section of the configuration file, in which case the supplied value overrides the default value of the parameter. 、
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.