synchronization
The client defaults as if it had been installed in rsync, without the words installed:
# yum-y Install rsync
To perform an asynchronous synchronization operation:
/usr/bin/rsync-avz--progress rsync@192.168.3.191::backup/www
# crontab-e # (You can sync f
following 2-line command on the source serverRSYNC-AVH--port=873--progress--delete/home/www.osyunwei.com/[email protected]::home_www.osyunwei.com-- Password-file=/etc/passwd.txtRSYNC-AVH--port=873--progress--delete/home/www.osyunwei.com/[email protected]::home_www.osyunwei.com-- Password-file=/etc/passwd.txtAfter the completion of the operation, respectively on the two target server 192.168.21.127,192.168.
is a parameter that maintains the original file attributes, such as the owner and time. -- Progress indicates display
For detailed progress, -- delete indicates that if the server deletes the file, the client also deletes the file accordingly to ensure true consistency. In inburst @ IP,
Inburst is the user name in the specified password file, followed by: inburst this inburst is the module name, that is, t
files during file synchronization. It only synchronizes files with differences or not, however, the initial synchronization speed is still slow.
Rsync has many options:-n: when you are not sure whether the command can be executed as needed, you must test it in advance;-n can complete this function;-v: -- verbose, detailed output mode-q: -- quiet, silent mode-c: -- checksum, enable the verification function, force the file transfer verification-r: --
Tags: term verify user name tar test system start progress device connections firewallfirst, server-side configuration1. rsyncd.conf File DescriptionUID = rsync #用户 to control read and write access to the module directory by the userGID = rsync #组, used to control read and write permissions for the group Access module directoryUse chroot = no #安全相关Max connections
root 4096 April 00:04 test1 Six. Turn off firewall and communication restrictions SELinux [[emailprotected] home]# vi/etc/selinux/config selinux=disabled Change to Disabled is not changed [[emailprotected] home]# setenforce 0 changed selinux does not restart, file effective [[emailprotected] home] # service Iptables stop have the option to permanently turn off Seven. Configure rsync client 1. Set Password [[emailprotected] ~]# Vi/etc/rsync.p
, it indicates that it is anonymous.Secrets file =/etc/inburst. Pas # authentication file name
[Web]Path =/usr/local/Apache/htdocs/Comment = inburst.org Web Server
3. Generate a password file on the server/etc/inburst. Pas
Bash-2.03 # Cat/etc/inburst. PasInburst: hack
For security purposes, the attributes of a file must be readable only by the owner.
4. Start rsync on the server as a daemon
Bash-2.03 # rsync
indicates that it is anonymous.Secrets file =/etc/inburst. Pas # authentication file name
[Web]Path =/usr/local/Apache/htdocs/Comment = inburst.org Web Server
3. Generate a password file on the server/etc/inburst. Pas
Bash-2.03 # Cat/etc/inburst. PasInburst: hack
For security purposes, the attributes of a file must be readable only by the owner.
4. Start rsync on the server as a daemon
Bash-2.03 # rsync --
,TOPG is to maintain the original attributes of the file, such as the owner, time
The parameters. --progress refers to the display
Detailed progress,--delete means that if the server side deleted the file, then the client also deleted the file, to maintain a true consensus.
In the back of the Inburst@ip,
Inburst is the username in the specified password file, followed by:: Inburst This inburst is the modu
Brief introduction
For the choice of Linux as an application platform for small and medium-sized enterprises or Web sites, often face how to achieve remote Data backup or Web site mirror image of the problem, although there are commercial backup and mirror products to choose from, but these products are often too expensive prices. So how to use free software to efficiently implement remote backup and Web site mirror image is a topic worthy of discussion.
The easiest way to make remote data backu
content should be displayed:
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
Xinetd 4396 root 5u IPv4 633387 TCP *: rsync (LISTEN)
Client configuration:
1. set the password file/home/rsync. ps: This file can be named at will and stored in any Directory. it does not matter with the server configuration, but the content has only one password and must be consistent with the server.
According to the above serv
not used, it indicates that it is anonymous.Secrets file =/etc/inburst. Pas # authentication file name
[Web]Path =/usr/local/Apache/htdocs/Comment = inburst.org Web Server
3) generate a password file on the server/etc/inburst. Pas
Bash-2.03 # Cat/etc/inburst. PasInburst: hack
For security purposes, the attributes of a file must be readable only by the owner. 4) Start rsync on the server as a daemon
Bash-2.03 #
used, it indicates that it is anonymous.Secrets file =/etc/inburst. Pas # authentication file name
[Web]Path =/usr/local/Apache/htdocs/Comment = inburst.org Web Server
3. Generate a password file on the server/etc/inburst. Pas
Bash-2.03 # Cat/etc/inburst. PasInburst: hack
For security purposes, the attributes of a file must be readable only by the owner.
4. Start rsync on the server as a daemon
Bash-2.03 # rsync
Rsync installation ConfigurationYum-y install rsyncConfigure rsyncThe rsync service requires three files.Rsyncd. conf rsync service configuration fileThe rsyncd. secrets rsync service user password file must be an existing user on the serverRsyncd. motd rsync service logon p
information in the command.Parameters in rsync-A operates in archive mode, copies directories, and symbols to connect-rlptgod-R is recursion-L indicates a linked file, which means copying a linked file;-P indicates retaining the original permissions of the file;-T indicates retaining the original time of the file;-G indicates retaining the original user group of the file; -O: the original owner of the file;-D is equivalent to a block device file;-Z c
# Certified file name
[web]
Path =/usr/local/apache/htdocs/
Comment = inburst.org Web server
3. Generate a password file on the server side/etc/inburst.pas
bash-2.03# Cat/etc/inburst.pas
Inburst:hack
For security purposes, the properties of a file must be only owner-readable.
4, on the server side will rsync in the form of daemon launch
bash-2.03# rsync--daemon
There are several different ways to start a s
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.