Rsync is a good file free synchronization software, can be mirrored to save the entire directory tree and file system, while maintaining the original file permissions, time, soft and hard links. At the first synchronization, rsync copies the entire contents and transfers only the modified portion of the file the next time. In the process of transmitting data, compression and decompression can be implemented
original file permissions, time, soft and hard links;
3. Installation without special permission;
4. Optimized flow, high efficiency of file transfer;
5. You can use RCP, ssh and other means to transfer files, of course, can also be connected through the direct socket;
6. Support for anonymous transmission to facilitate site mirroring.
There are two ways to use rsync for remote synchronization: remote Shell mode (which is recommended for SSH, us
First, check whether there is rsync. If there is no rsync, an rsync will be installed.
1 configuration file
Then create rsyncd. CONF file, and add the following content (the file does not exist by default) [[email protected] backup] # Cat/etc/rsyncd. conf # rsync_config _____ start # Created by chensiqi 13:40 2017-3-6 # blog: http://www.cnblogs.com/chensiqiqi/##r
Description1. Rsync Service EndSystem: Ubuntu Server 11.10IP Address: 192.168.21.168Data storage directory:/home/mysql_data2, Cwrsync clientSystem: Windows Server 2003IP Address: 192.168.21.130Synchronized Directories: D:\mysql_data to achieve the purpose: Cwrsync Client automatically synchronizes data from/home/mysql_data directory in
Always use rsync over SSH
Since Rsync does not provide the No. Transferring data it is recommended that to use rsync over SSH. This allows a secure remote connection. Now let us-some examples of rsync.
rsync Command common options
--delete : Delete files that don '
BAT for rsync clients to perform synchronous operations
Copy Code code as follows:
@echo off
RSYNC-ZTRUVOGLP--progress--password-file=jb51.secrets/cygdrive/g/wwwroot/jb51/jb51@114.80.*.*::jb51
rsync server-side configuration
Rsyncd.conf
Copy Code code as follows:
Use Chroot =
Windows serves as a file server, uses Rsync's version of Windows Services, and then configures it well. You need a friend to refer to below.Windows serves as a file server, using Rsync's version of Windows services: cwrsyncserver:http://rsync.samba.orgThe installation process to set the account number and password for the system service, you can default.Note: This account is used to enable the Crsync
Rsync server deployment process
Rsync server deployment process:
1. rsync server configuration process
Configure the rsync configuration file/etc/rsyncd. conf
Create a local director
Master server: 192.168.5.13 _ ubuntu
Slave server: 192.168.5.11 _ centos
=======================1> install rsync on both hosts ========
Install ubuntu as follows:
Compile and install: download this Free Software
Rsync.samba.org/or samba.anu.edu. au/rsync
Download the latest version from the official website.
Decompress
CentOS 6.6 rsync Server and Client configurationBasic information
system version
hostname
ip address
role
centos 6.6
backup
10.0.0.10
rsync server
centos 6.6
lamp01
10.0.0.8
Primary server: 192.168.5.13_ubuntuFrom server: 192.168.5.11_centos================== 1> is installed on both hosts separately rsync===================Ubuntu installation is as follows:
# Apt-get Install rsync
Compile and install: Download this free softwarersync.samba.org/or Samba.anu.edu.au/rsyncGo to t
Rsync is so convenient for file backups that I feel I have to install it on my own server. The rsync server here is a simple and rough configuration (directly on the code), for details do not do in-depth discussion, but it is certain that the server must be able to run up, f
Primary server: 192.168.5.13_ubuntuFrom server: 192.168.5.11_centos================== 1> is installed on both hosts separately rsync===================Ubuntu installation is as follows:
# Apt-get Install rsync
Compile and install: Download this free softwarersync.samba.org/or Samba.anu.edu.au/rsyncGo to t
Tags: important inux Write customer PWD system Info Certified SambaI. Introduction of RSYNCrsync (remote sync) is the next magical data mirroring backup software for UNIX and Unix-like platforms, unlike FTP or other file transfer services that require full backup, and rsync can make differential (incremental) backups based on data changes. This reduces data traffic and increases productivity. You can use it for local data or remote data replication, a
I. INTRODUCTION
Rsync's common 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, so that the local and remote two of the host file synchronization between, it is mainly the transmission of the two files, rather than the entire transmission every time, so the speed is very fast.
Rsync OverviewRsync is an open source fast backup tool that can mirror and synchronize the entire directory tree across different hosts, support incremental backups, maintain links and permissions, and use optimized synchronization algorithms to compress money in transit, making it ideal for applications such as offsite backups, mirror servers, and more. The official website of Rsync is http://rsync.samba.o
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 -- timefmt '% d/% m/% y % H: % m' -- format' %
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: Use a remote shell program (you can use rsh or SSH)
--delete: Exact save copy, source h
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.