After rsync mode service explained

Source: Internet
Author: User

Data Backup-rsync Remote connection

    1. Prepare two Linux hosts (Host1 and Host2)

      I use host1 as the server side, which is the remote machine.

      Host2 as a local machine

    2. On the remote machine Host1

1) #vi/etc/rsyncd.conf (config edit file)

In edit mode I

Uid=root (the UID to which the backed up file belongs)

Gid=root (the backup file belongs to the GID)

Log File=/var/log/rsyncd.log (the operation will be recorded in the log file)

PID file=/var/run/rsyncd.pid (Process PID service)

[TXT] (module)

path=/tmp/(The specified path, copied under the specified path)

Use Chroot=yes or no (when Yes, path specifies that the paths are limited to/tmp.) If there is no way to copy the link file to take effect, no means you can copy the linked files.

List=yes to see how many modules

SECRETS=/ETC/RSYNCD.PASSWD (the password for the specified txt)

Max Connections=4 (up to 4 links)

Read Only=no (readonly, no indicates readable and writable)

Auth users=txt (using txt)

: Wq

vi/etc/rsyncd.passwd

In edit mode I

Txt:txt123

: Wq

chmod 600/etc/rsyncd.passwd

The daemon is turned on (the key part, otherwise it will not be effective)

Rsync--daemon-config=/etc/rsyncd.conf (Specify daemon path)

Available via NETSTAT-LNP |grep 873

See if your rsync service is turned on

The default open port for Rsync is 873


3. Then I create the Liu directory under/tmp and create 1.txt 2.txt in the Liuu directory.

Mkdir/tmp/liu

Touch 1.txt 2.txt

4. Copy the remote machine host1 (copy to local/TMP/11) on Host2

Rsync-avzp 192.168.1.1::/LIU/TMP/11

Enter Password txt123

Copy succeeded

Cd/tmp/11

Ls


This post is for reference only, also need further study please move to Http://www.apelearn.com/bbs/forum.php?mod=viewthread&tid=9291&highlight=rsync




This article from the "Linux Learning Space" blog, reproduced please contact the author!

After rsync mode service explained

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.