rsync Sync Issues

Source: Internet
Author: User

Suppose there is a A, a, two computers, host a IP is: 192.168.1.12 Host B IP is: 192.168.1.13, host A has a user tt2 tail/etc/passwd as follows:

Tt2:x:500:500::/home/tt2:/bin/bash

Host B has a user: Soar tail/etc/passwd as follows:

Soar:x:500:500::/home/soar:/bin/bash

In general, the account name of the synchronization should be the same, if not the same, as follows:

To synchronize the content of B to a, first look at what you want to sync:

[[email protected] local]# LL 2

Total Dosage 4

-rw-r--r--1 soar Soar 12 November 06:40 1.txt

lrwxrwxrwx 1 soar soar 25 November 06:40 2.link/usr/local/source/2/2.txt

-rw-r--r--1 soar soar 0 November 08:12 3.txt

The synchronization commands are as follows:

Rsync-av 2/[Email protected]:/usr/local/source/1/

Switch to the/usr/local/source/1/directory of host A to view:

[[email protected] source]# LL 1/

Total Dosage 4

-rw-r--r--1 tt2 tt2 12 November 06:40 1.txt

lrwxrwxrwx 1 tt2 tt2 25 November 06:40 2.link/usr/local/source/2/2.txt

-rw-r--r--1 tt2 tt2 0 November 08:12 3.txt

You can see the files synced over them, their owners, and the owning group has changed because the UID of the source file, and the GID is 500,500

After synchronizing to the target directory, the UID and GID are 500:500 corresponding accounts become TT2

Similarly: If the owner of the source file being synchronized is root, synchronizing the target file with the SOAR account, the target file owner becomes soar after synchronization

Rsync-av--progress 1/[Email protected]:/usr/local/source/1/

In general, it should be better to synchronize with the same account

If you synchronize

rsync Sync Issues

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.