set Rsync.pas to root, with a permission of 600.chmod 600/usr/local/rsync/rsync.pass3. Start the rsync serverRsync--daemon--config=/usr/local/rsync/rsyncd.confClient:Rsync-avz--progress--delete--port=873--password-file=/home/leyewen/etc/rsync/
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
Powerful synchronization tool rsync detailed configuration and various gameplay, rsync detailed configuration gameplay
Terms:Sync: SynchronizationAsync: asynchronousRsync: Remote Synchronization
Rsync features:1. images can be used to save the entire directory tree and File System2. It is easy to retain the original permissions (permission, mode), owner, group, t
-D: Keep the device file.
-E ssh: specifies that the SSH protocol is used for encrypted transmission.
-Z: compressed data transmission during transmission
-- Progress: displays the transmission progress bar.
-- Stats: displays how data is compressed and transmitted.
-- Delete: Delete more than files
-Q: Stop the error message.
Rsync server configuration
some reason, to expedite subsequent transmissions–force forcibly deletes a directory, even if it is not empty–numeric-ids does not match the user and group IDs of numbers to user and group names–timeout=time IP timeout time in seconds-i,–ignore-times don't skip files that have the same time and length–size-only when deciding whether to back up a file, just look at the file size without considering the file time–modify-window=num the time stamp window that determines whether a file is in the sam
push the files that the Rsync client needs to be backed up to the rsync server in real time. For the configuration of rsync, you can refer to the "Slime: Linux file Synchronization rsync learning (i)" article, and the Environment of this experiment and this article is the same environment. The
The official site of Rsync is located in http://rsync.samba.orgRsync is a data mirroring Backup tool under Unix-like systems--remote sync. A fast incremental backup tool remote Sync, which supports local replication or synchronizes with other SSH and rsync hosts.
Rsync includes some of the following features:1. Ability to update entire directory tree and file sys
as follows:[Root @ www/etc] # Cat/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. scrtAfter these files are configured, you need to start the rsyncd service on the master server:[Root @ www/etc] #
vi/etc/sysctl. confFs. inotify. max_queued_events = 99999999Fs. inotify. max_user_watches = 99999999Fs. inotify. max_user_instances = 65535Parameter description:Max_queued_events:The maximum length of the inotify Queue. If the value is too small, the "** Event Queue Overflow **" error will occur, resulting in inaccurate monitoring files.Max_user_watches:Directory of the file to be synchronized. Avoid the failure caused by this value being too small, especially when there are many smal
follows:[Email protected]/etc]# CAT/ETC/RSYNCD.SCRTMsyn:xxxxxxxxxAnd the file can only be read and written by the root user, note that for security purposes, the properties of this file must be primary readable, otherwise rsync will refuse to run. We can set it to a property of 600:[Email protected]/etc]# chmod 600/ETC/RSYNCD.SCRTOnce these files are configured, you will need to start the RSYNCD service on the primary server:[Email protected]/etc]#/u
Directory1 application Scenarios for remote file synchronization 2. rsync+crontab3. Rsync+inotify1. Application Scenarios for remote file synchronizationIn a load-balanced cluster scenario, there is often a load Balance Server on the front end of multiple Web servers that provides1 The client accesses a unified domain name to this load Balance, for example: Www.test.com,Load Balance Server allocates the req
Mud: rsync configuration file details, mud rsync configuration file
This article was sponsored by Xiuyi linfeng and first launched in the dark world.
The most important and complex rsync server is its configuration. The configuration file of the rsync server is/etc/rsyncd. conf, which controls authentication, access,
@ www/etc] # cat/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. scrtAfter these files are configured, you need to start the rsyncd service on the master server:[Root @ www/etc] #/usr/local/bin/
. Encrypt transmission data, ensure the security of data;-V is "--verbose", that is verbose mode output,-Z means "--compress", that is, the data compression processing when transmitting;-R means "--recursive", that is, the subdirectory is processed in recursive mode, and-T is "--time", that is, keeping the file time information;-O means "owner", which is used to keep the file owner information;-P is "perms" to maintain file permissions;-G is a "group" that is used to maintain the group informati
client to test# mkdir-p/usr/local/pid # mkdir-p/usr/local/pwd # Vi/usr/local/rsync/pwd/rsyncd.pwdWeb1:[email protected] Web2:[email protected]Format: User name: PasswordSetting the password file can only be accessed by the root user#chmod 600/usr/local/rsync/pwd/rsyncd.pwd # Cp/usr/local/rsync/bin/rsync /usr/bin/Star
temporary file in Dir-- Compare-Dest = dir: Compare the files in Dir to determine whether to back up data.-P is equivalent to -- partial-- Progress displays the backup process-Z, -- compress compresses backup files during transmission-- Exclude = pattern specifies to exclude file modes that do not need to be transmitted-- Include = pattern specifies the file mode to be transmitted without exclusion-- Exclude-from = file: exclude files in the specifie
: 123456 exit save. Modify the permission of the password file:
1 [root @ office ~] # Chmod 600 rsyncd. secrets
C> Create and modify the rsync. motd File
Rsyncd. motd defines the rysnc server information, that is, the user login information. For example, let the user know who provided the server. For example, when logging on to an ftp server, we see linuxsir.org ftp ....... Of course, this is not necessary for global definition of variables. You can u
an empty configuration file vim/etc/rsyncd. conf and execute Step 1 again.
Iii. instance (Server IP: 192.168.10.185, Client IP: 192.168.10.186)
1. log on to the client and back up the content in the/bak folder on the server to the/imagefile on the client:
/App/bin/rsync-vzrtopg -- delete-- Progress rsync@192.168.10.185: bak/imagefile
2. log on to the client and
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.