Bug 1930654

Summary: Use of --fake-user does'nt recreate links
Product: Red Hat Enterprise Linux 8 Reporter: Welterlen Benoit <bwelterl>
Component: rsyncAssignee: Michal Ruprich <mruprich>
Status: CLOSED NOTABUG QA Contact: rhel-cs-infra-services-qe <rhel-cs-infra-services-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.3Flags: pm-rhel: mirror+
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-25 17:20:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Welterlen Benoit 2021-02-19 11:29:04 UTC
Description of problem:
The root issue was discovered in the rear recover process when backup uses rsync with user different than root. Thus it adds the option --fake-user.

Version-Release number of selected component (if applicable):
rsync-3.1.3-9

How reproducible:
always

Steps to Reproduce:
1. $ ll
total 4
-rw-rw-r--. 1 user1 user1 5 Feb 19 06:23 file
lrwxrwxrwx. 1 user1 user1 4 Feb 19 06:23 link -> file

2.
rsync  -v --fake-super -az -H --numeric-ids --delete --rsync-path=rsync  user1.122.8:/home/user1/test_link /home/user1/res
The authenticity of host '192.168.122.8 (192.168.122.8)' can't be established.
ECDSA key fingerprint is SHA256:vOvan0gNmerHvowb17NjnPKS9Y4Zx7ehVkekm4m886U.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.122.8' (ECDSA) to the list of known hosts.
user1.122.8's password: 
receiving incremental file list
test_link/
test_link/file
test_link/link -> file

sent 50 bytes  received 167 bytes  48.22 bytes/sec
total size is 9  speedup is 0.04
[user1@localhost res]$ ll
total 0
drwxrwxr-x. 2 user1 user1 30 Feb 19 06:23 test_link
[user1@localhost res]$ ll test_link/
total 8
-rw-rw-r--. 1 user1 user1 5 Feb 19 06:23 file
-rwxrwxrwx. 1 user1 user1 4 Feb 19 06:23 link

3.


Actual results:
Links are not recreated

Expected results:
Links with correct permissions and owner are recreated

Additional info:
I understand that a file with xattr is created to store the permissions details, but how to use them to restore the links ?

Comment 1 Welterlen Benoit 2021-02-25 17:20:33 UTC
Hello,

In fact, I was disturbed by the use of rsync in rear.
The arg must be:

--- 
--rsync-path="rsync --fake-super" or  -M--fake-super to use the option fake-user on remote server ...
---

Thanks !

Comment 2 Michal Ruprich 2021-03-03 13:06:59 UTC
Hi Welterlen,

sorry I did not get to this sooner, but I am glad that you were able to solve it.

Thanks and regards,

Michal