' is triggered when addition, deletion, and modification occur'' event $ events ">/var/log/rsync appears. log 2> 1 -- point to log Path done
# Nohup sh/tmp/1.sh -- use nohup to suspend the execution in the background. If the terminal is closed, the process will not be closed.-- If you want To Enable Automatic startup, you can add this command to/etc/rc. local or write it as a shell Service script to enab
System Centos6.0
Server :( Centos) 192.168.182.130
Client: lv2) 192.168.182.129
Rsync is a data image backup tool in unix-like systems. It can be seen from the software name-remote sync.Its features are as follows: images can be used to save the entire directory tree and file system. It is easy to maintain the permissions, time, and soft links of the original file. Installation without special permissions. Fast: During the first synchronization,
Rsync architecture and rsync Architecture
1.1 rsync server configuration
1.1.1 view the server rsync version
1.1.2 after the rsync program is installed by default, the main configuration file of rsync is not automatically creat
key in the previous chapter to achieve login-free authentication, without interactive verification data transmission. 3. The rsync software must be installed on both local and remote machines. Use the ssh key to implement data login-free verification encrypted transmission instructions. if you have set an ssh key for login-free verification in advance, you can use rsync to verify synchronous transmission o
# service xinetd restartAdministrators can modify the/etc/xinetd.d/rsync configuration file to suit your needs. For example, you can modify the configuration lineServer_args =--daemonAdd the service options for rsync later.4.3. Running the rsync service independentlyThe simplest way to run the Rsync service independent
can use rsync to verify synchronous transmission of data through ssh without logon, this is one of the common methods in production scenarios. Configure an ssh key for data login-free verification. Use the ssh channel for Batch Data Transmission script vi lianglab. sh #! /Bin/sh. /etc/init. d/functions if [$ #-ne 1]; then echo "Usage: $0 argv" exit fi for ip in 17 18 do # scp-P30000 $1 lianglab@192.168.1.
# service xinetd restartAdministrators can modify the/etc/xinetd.d/rsync configuration file to suit your needs. For example, you can modify the configuration lineServer_args =--daemonAdd the service options for rsync later.4.3. Running the rsync service independentlyThe simplest way to run the Rsync service independent
inotify, and through rsync real-time synchronization to the client's/TMP, the following is implemented through the shell script.
#!/bin/bash
host=192.168.10.221
src=/tmp/
des=web
user=webuser
/usr/local/inotify/bin/ Inotifywait-mrq--timefmt '%d/%m/%y%h:%m '--format '%T%w%f%e '-e modify,delete,create,attrib $src \
| while read fi Les
do
/usr/bin/rsyn
I found that this problem has been thought to be a server problem twice, because of a machine appeared this problem, originally for security special cancellation file write and Modify permissions. Through McAfee's modify permissions, the problem is resolved, so there is a problem, first check directory permissions issues.
Rsync Error:some Files/attrs were not transferred (* previous errors)
Cwrsync rsync E
Use reverse CT for rsync for server synchronous backup and rsync server configuration
Use reverse CT to remove the delivery process to Achieve Synchronous server backup
First, install keep CT
Check whether audit CT is installed
Rpm-qa | grep tcl
Tclx-8.4.0-5.fc6
Tcl-8.4.13-4.el5
Second, install keep CT
:
Http://dl.oschina.net/soft/expect
Check the installation location of tcl
Rpm-qa | grep tcl
Tcl-devel nee
string containing the format specifiers. The format specifiers can be used as follows:
% H remote host name
% A remote IP Address
% L file length characters
% P process id of the rsync session
% O operation type: "send" or "recv"
% F file name
% P module path
% M Module name
% T current time
% U authenticated user name (null when anonymous)
% B actual transmitted bytes
% C when a file is sent, this field records the file's verification co
us in rsyncd.secrets
defined in the file. If you want to write this command in a script and then execute it regularly, you can use the –password-file
Options, specific commands are as follows:
# Rsync-vazu-progress–password-file=/etc/rsync.secret
terry@192.168.100.21:/terry//home
To use the –password-file option, you must first create a file that holds the password, which is specified as/etc/rsync.secret.
inotify-slave deployment4.1.1 check whether rsync is installed4.1.2 create an rsync user and Module Directory and change its user group4.1.3 compile the rsync daemon configuration file/etc/rsyncd. conf4.1.4 configure the virtual User Password File4.1.5 start the rsync Service4.1.6 push through inotify-master Test5.1 i
directory on the rsync serverStep. This command will require you to enter the password for the Terry account before it is synchronized, this account is in front of us at rsyncd.secretsdefined in the file. If you want to write this command in a script and then execute it regularly, you can use the--password-fileOptions, specific commands are as follows:# rsync-va
Contents
Introduction
How does it work?
Setting up a server
Using rsync itself
Rsync on the net
Introduction
Rsync is a wonderful little utility that's amazingly easy to set up on your machines. rather than have a scripted FTP session, or some other form of File Transfer script --
that the user does not have access to. This is useful for situations where some files in a directory that need to be backed up should not be available to the backup person.Transfer loggingMake the Rsync server use FTP-formatted files to record download and upload operations in its own separate log.Log formatWith this option, users can customize the fields of the log file by using transfer logging. The format is a string that contains the format defin
/sersync/confMkdir/usr/local/sersync/binMkdir/usr/local/sersync/logTar zxvf sersync2.5_32bit_binary_stable_final.tar.gzCd GNU-Linux-x86/Cp confxml. xml/usr/local/sersync/confCp sersync2/usr/local/sersync/bin
4. Configure sersync
The Code is as follows:Edit vi confxml. xml and modify the following code.
The Code is as follows:
# Set the local IP address and port# Enable DUBUG Mode# Enable the xfs File System# Ignore the pushed files (regular expressions) during synchronization, Which is disabled
Set up rsync Data Synchronization backup and rsync Data Synchronization for Small and Medium-sized Clusters
Important NFS Problems
1. NFS client users write NFS.
1) Why do ordinary users need to write NFS.
2) Add all_squash to exports.What is Rsync?
Rsync is an open-source, fast, and versatile tool that supports full o
Set up rsync Data Synchronization backup and rsync Data Synchronization for Small and Medium-sized Clusters
Important NFS Problems
1. NFS client users write NFS.
1) Why do ordinary users need to write NFS.
2) Add all_squash to exports.What is Rsync?
Rsync is an open-source, fast, and versatile tool that supports full o
synchronization Directory192.168.21.127, 192.168.21.128: # target server IP addressName = "home_www.bitsCN.com": # name of The rsync directory module on the target serverUsers = "home_www.bitsCN.com_user": # target server rsync user namePasswordfile = "/etc/passwd.txt": # the target server rsync synchronizes the user's password to the storage path of the source
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.