A. Introduction to rsync's commonly used backup tool, which is currently maintained by rsync.samba.org.
rsync uses the so-called "rsync algorithm" to provide a very fast file transfer method, The file between the local and the remote two hosts is synchronized. It mainly transmits the transaction part of the two files instead of transmitting it all at once, so the speed is quite fast.
rsync it can With rsh or ssh, you can also use direct socket connection as daemon mode, so rsync can be used as an excellent backup tool.
I will briefly introduce the basic method of using rsync to back up remote network host files. Here, we are running rsync as a daemon mode of linux. First, let's give a simple definition: Of course, if a host runs the rsync daemon mode, we call this machine an rsync server, or this. The host is a backup server (Backup Server). The backup host will open a port of 873, waiting for the other party to rsync the connection. So the server remembers to open the port connection, rsync Server will check if the password matches, if passed After the password check, the file transfer starts. When the first connection is completed, the entire file will be transferred once.
The next time, only the changed part between the two files will be transmitted.
The above is how the rsync client (the remote network host to be backed up) and the rsync server operate.
Implementation: I want to synchronize the file under the server/webapps/wwwroot to /webapps/wwwroot on the backup machine
Second, install the download address: http://rsync.samba. Org/ftp/rsync/src/rsync-3.0.4.tar.gztar zxvf http://rsync.samba.org/ftp/rsync/src/rsync-3.0.4.tar.gzcd rsync-3.0.4./Configure --prefix=/usr/local/rsyncmake make install
Three: Configuration: Rsync server: No configuration files installed by default: mkdir /usr/local/rsync/logs mkdir /usr/local/rsync/Etc mkdir /usr/local/rsync/run add the main configuration file: vim /usr/local/rsync/etc/rsyncd.conf
uid = rootgid = rootport = 873use chroot = nohosts allow = 192.168.9.3# Hosts deny = 192.168.10.0/24pid file = /usr/local/rsync/run/rsyncd.pidlock file = /usr/local/rsync/run/rsync.locklog file = /usr/local/rsync/logs/rsyncd.logignore Errors
[9aiyx]path = /webapps/wwwrootauth users = 9aiyxsecrets file = /usr/local/rsync/rsyncd.passread only = no
Add password file: vim /usr/local/The format rsync/rsyncd.pass is as follows: Username: Password 9aiyx :9aiyx then gives 600 permissions: chmod 600 /usr/local/rsync/rsyncd.pass
Start rsync service: rsync --daemon --config=/usr/local/rsync/etc/rsyncd.conf & ; (and added to the rc.local file)
Rsync client:
Add password file: vim /root/rsyncd.pass (only password can be written inside) 9aiyxchmod 600 /root The /rsyncd.pass installation procedure is the same as above: Then execute the following command: rsync -arP --password-file=/root/rsyncd.pass [email protected]::9aiyx /webapps/wwwroot & or specify the task plan synchronization.
Security Settings: iptables -A INPUT -p tcp -s ! 192.168.9.3 --dport 873 -j DROP Only allows hosts with 192.168.9.3 to connect to rsync server
STM32 The storage medium corresponding to the three boot modes is the three boot modes corresponding
The process is simply a process of executing a program, it is a dynamic concept. No matter what sys
In order to ensure the normal operation of the Linux system and accurately solve various system prob
That day, my colleague showed me an operation step on my computer, using an env command, well, I adm
Alibaba Cloud CentOS how to add IPV6 support
Simple file exchange method for virtual machine and host under Linux
Linux using NTP service management /synchronization server time
WindowsXP shutdown failure full contact, Window XP operating system tutorial
Check whether the wireless network card supports creating hotspots under Linux
How to fix "fatal error: security/pam
How to modify the root super user password of RHEL6
The whole process of automatically generating Makefile is detailed.
Liunx deletes multiple files at the same time
The reason why the driver of the single-chip microcomputer should be set to low level is
Vista built-in game for no reason to lose the solution
Network Security for Configuring SNMP Services in Win 2003
Open a green channel for Windows 7 specific users
Win8.1 traditional start menu retrieval method
How does Win7 display the file suffix name
Windows 8 Pro PC upgrade costs only $15
Windows Blue is on the market this summer.
Win10 official version of my computer where? How to display this computer on the desktop?