Linuxrsync synchronization settings

Source: Internet
Author: User
Linuxrsync synchronization settings detailed guide configure rsync synchronization data rpm Package installation rsync and configuration [root @ Hammerhome] # rpm-qa | greprsync # check if the system has installed rsync package rsync-2.6.8-3.1 [root @ HammerCe. .. linux rsync synchronization settings detailed guide configure rsync synchronization data rpm Package to install rsync and configure [root @ Hammer home] # rpm-qa | grep rsync # check if the system has installed rsync package rsync-2.6.8-3.1 [root @ Hammer CentOS] # rpm-ivh rsync-2.6.8-3.1.i386.rpm # manually install [root @ test rsync-3.0.4] # vim/etc/xinetd if not installed. d/rsync 1 configure rsync servervi/etc/xinetd. d/ Rsync changes disable = yes to no service rsync {disable = no socket_type = stream wait = no user = root server =/usr/bin/rsync server_args = -- daemon log_on_failure + = USERID} 2 configure rsync to automatically start [root @ test etc] # chkconfig rsync on [root @ test etc] # chkconfig rsync -- listrsync on 3 configure rsyncd. conf [root @ test etc] # vim rsyncd. conf uid = rootgid = rootuse chroot = nomax connections = 4 strict modes = yesport = 873pid fil E =/var/run/rsyncd. pidlock file =/var/run/rsync. locklog file =/var/log/rsyncd. log [backup] path =/srvcomment = This is testauth users = scihoouid = rootgid = rootsecrets file =/home/rsync. psread only = nolist = no 4 make sure that the rsync port number in etc/services is correct [root @ test etc] # vim/etc/servicesrsync 873/tcp # rsyncrsync 873/udp # rsync 5 configure rsync password (the path has been written in the configuration file above) /home/rsync. ps (name can be written at will, as long as it is consistent with the above configuration file), format (one row per user) [r Oot @ test etc] # vi/home/rsync. ps scihoo: scihoo 6 configure the rsync password file permission [root @ test home] # chown root. root rsync. ps [root @ test home] # chmod 400 rsync. [root @ test home] #/etc/init. d/xinetd restartStopping xinetd: [OK] Starting xinetd: [OK] 8 if xinetd does not exist, install [root @ test home] # yum-y install xinetd, start rsync server RSYNC server, and start rsync server (independently) [root @ test home] #/usr/bin/rsync -- daemon 10. start rsyn C server (started with xinetd Superprocess) [root @ test home] #/etc/init. add d/xinetd reload 11 to rc. in various operating systems, rc files are stored in different locations. you can modify the local file so that rsync-daemon can be loaded during system startup. [Root @ test home] # vi/etc/rc. local/usr/local/rsync-daemon # Add a row 12 and check whether rsync starts [root @ test home] # lsof-I: 873 command pid user fd type device size node NAMExinetd 4396 root 5u IPv4 633387 TCP *: rsync (LISTEN) client Configuration 1 configuration three procedures can be set password file 1.1 test rsync execution command 1.2 put rsync command into work schedule (crontab) [root @ aj1 home] # vi/etc/xinetd. d/rsync # default: off # description: The rsync server is a good addition to an ftp server, As it \ # allows crc checksumming etc. service rsync {disable = yes socket_type = stream wait = no user = root server =/usr/bin/rsync server_args = -- daemon log_on_failure + = USERID} 1.1 Configure the password file (note: for security, set the password file attribute to 600. Rsync. the ps password must be the same as the password in the Rsync Server password setting case.) [root @ aj1 home] # vi rsync. ps sciooo [root @ aj1 home] # chown root. root. rsync. ps # note that you must grant the permission [root @ aj1 home] # chmod 600. rsync. ps # must modify permission 1.2 Download the file from the server [root @ aj1 rsync-3.0.4] # rsync-avz -- password-file =/home/rsync. ps scihoo@192.168.0.206: backup/home/upload locally to the server [root @ aj1 rsync-3.0.4] # rsync-avz -- password-file =/home/rsync. ps/home scihoo@192.168.0.206: backup
 
Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.