errors # Ignores some irrelevant IO errorsRead Only = False # is set to not read-only, that is, it can be passed to the appropriate directory on the server.List = False # does not allow column files#exclude = test/test.php #设置不同步的目录或文件用空格隔开Hosts allow = All #允许连接服务器的主机IP地址, if more than one IP is separated by a spaceHosts deny = 172.25.0.0/24 #禁止连接服务器的主机IP地址 or *, which means all.Auth users = backup # authenticated username, if this line is not found, it is anonymousSecrets file =/etc/rsyncd.pa
,--compress compress the backed-up files during transmission--exclude=pattern Specify to exclude file modes that do not need to be transferred--include=pattern specifies file modes that need to be transferred without exclusion--exclude-from=file exclude files in the specified schema in file--include-from=file does not exclude files that specify pattern matching--version Print version Information--address binding to a specific address--config=file specify a different configuration file, do not us
=PATTERN Specifies the file mode that is not excluded and needs to be transferred
--exclude-from=file exclude files in the specified mode in file
--include-from=file does not exclude files that match the file-specified pattern
--version Print version Information
--address bound to a specific address
--CONFIG=FILE specifies a different profile and does not use the default rsyncd.conf file
--PORT=PORT Specifies the other rsync service ports
--blocking-i
/rsyncd.pidLock file =/var/run/rsync.lockLog file =/var/log/rsyncd.log[WEB3]Path =/web3/webdataComment = Ixdba fileIgnore errorsRead Only = noWrite only = noHosts allow = *List = FalseUID = rootGID = rootAuth users = Web3userSecrets file =/etc/server.passAfter you configure the rsyncd.conf of the three node servers, create the password files separately. Start the rsync daemon in turn and add the service to the self-boot fileecho "/usr/local/bin/
parameter to establish an encrypted connection. You can use –password-file=/password/path/file to specify the cipher textSo that you can make it in the script Instead of having to enter the authentication password interactively, it should be noted that this password file permission attribute must be set to only the owner-readable. Running CMD on the client Rsync-av 10.0.0.16::401/cygdrive/h/401
Copy Code code as follows:
@echo off
//tmp/123/#同步的时候排除掉以. txt end file.When filtering multiple files, add--exclude= "file type or name" directly after-av.--progress in the process of synchronization can see the process state of synchronization, such as statistics to synchronize the number of files, synchronized file transfer speed, etc.Can be written like this: RSYNC-AVP usr//tmp/123/--BWLIMIT=100: Control the synchronization bandwidth, 100 r
Copy files from the remote rsync server to the local machine. This mode is started when the SRC path information contains the "::" delimiter.Copy files from the local machine to the remote rsync server. This mode is started when the DST path information contains the "::" delimiter.The main contents of the configuration file are as follows:UID = Rootgid = Rootport = 873max Connections = 200timeout = 600pid F
****** xinetd based services: chargen-dgram: off chargen-stream: off cvs: off daytime-dgram: off daytime-stream: off discard-dgram: off discard-stream: off echo-dgram: off echo-stream: off rsync: on swat: off tcpmux-server: off time-dgram: off time-stream: off ***** The rsync service has been installed, and my result list is I have enabled it. this is to control the random startup of the
update--skip-broken
Install Rsync Server Software, just install, do not start, do not need to configure[[email protected] ~]# yum-y install rsync[[email protected] ~]# echo ' 123456 ' >/etc/rsync.pass[Email protected] ~]# Cat/etc/rsync.pass123456Set file permissions, only set the file owner to have read, write permission can[Email protected] ~]# chmod 600/etc/rsync.pass[Email protected] ~]# Ll/etc/rs
]
Path =/home
Comment = home directory
Use Chroot = True
UID = 0
GID = 0
Host Allow 192.168.11.2
There are password settings file/etc/rsync.pass, 2 machines should have this file. The contents are as follows:
Username:password
This, the setup is complete. Run rsync services in 192.168.11.24.
/etc/init.d/rsync start
You can then run the following script file in 192.168.11.2 to synchronize. You can put
control the random startup of the rsync service. If this item is off in your list, you can modify it as follows. vi/etc/xinetd. d/rsync modify disable = yes to disable = no start service xinetd restart so far, the configuration is basically complete, you can use the client to test: in windows, I used cwrsync to switch to the bin directory of cwrsync, and then run the following command to download the file/
transmitted for any reason, to accelerate the subsequent re-transmission -- force the deletion of directories, even if it is not blank -- numeric-ids does not match the number user and group ID as the user name and group name -- timeout = time ip timeout TIME, in seconds-I, -- ignore-times does not skip files with the same time and length -- size-only. when determining whether to back up a file, only check the file size, regardless of the file Time -- modify-window = NUM determines whether the
Problem:
Rsync error: pinned ed SIGINT, sigterm, or sighup (Code 20) at rsync. C (503) [Cycler = 3.0.0pre7]-----------------------------Solution:Try adding the following line into "/etc/make. conf"
Code:
Portage_rsync_initial_timeout = 500
For details, see this post:Http://forums.gentoo.org/viewtopic-t-622757-start-0-postdays-0-postorder-asc-highlight-emerge+syn
casually, as long as it is consistent with the above configuration file), format (one user on a line)Account: Password#vi/etc/rsync.pasWJ:1111Permissions: Because Rsync.pas stores the user name and password for the rsync service, it is important. To set Rsync.pas to root, with a permission of 600.#cd/etc#Chown root:root Rsync.pas#chmod Rsync.pas4. Let the configuration take effect#service xinetd Restart5. Synchronizing files① fetching files from serv
instatnces that can be created by each real user ID-Rw-r -- 1 root 0 Jun 11 max_user_watches # indicates the maximum number of directories that each inotify instatnces can monitorConfigure the server content publishing script# Vim/data/sh/inotifyrsync. sh#! /Bin/bashClient1 = 172.16.32.205Client2 = 172.16.32.206Src =/data/lixuan/Dst = lixuanUser = root/Usr/local/bin/inotifywait-mrq -- timefmt '% d/% m/% y % H: % m' -- format' % T % w % f % e'-e close_write, modify, delete, create, attrib $ src
without exclusion--exclude-from=file exclude files in the specified schema in file--include-from=file does not exclude files that specify pattern matching--version Print version Information--address binding to a specific address--config=file specify a different configuration file, do not use the default rsyncd.conf file--port=port Specify a different rsync service port--blocking-io using blocking IO for remote shells-stats gives the transfer status o
bound to a specific address
--CONFIG=FILE specifies a different profile and does not use the default rsyncd.conf file
--PORT=PORT Specifies the other rsync service ports
--blocking-io blocking IO for a remote shell
-stats gives the transfer status of some files
--progress transmission process in real time
--log-format=format Specify log file format
--password-file=file gets the password from file
-
format is as follows:
Rsync [-parameter] source address path Destination Address path
For example, synchronize files in the/www/downloads/new directory on 101 to the/www/downloads directory of 192.168.0.100.
The execution script is created:
Vi/root/rsync. sh
Rsync-vrtL -- progress \
/Www/downloads/new /*\
This article will introduce you to the detailed guide on rsync synchronization settings for linux servers. I hope some methods will be helpful to you.
I. Introduction (skip this step if you don't want to see it)After the EMOS server is migrated, the new server is set up and tested. Next, it is very important to migrate the mail data in the old mail system completely. You can choose to copy the data, but it is inevitable that some emails will be lost (
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.