rear does not restore permissions and links if use of rsync to backup with a user other than root

Solution Verified - Updated -

Issue

  • With a configuration to backup with rsync, with a user other than root:

    BACKUP_URL=rsync://rearuser@192.168.122.220/home/rearuser/rear/
    
  • During the restore, all links are replaced by files: (/bin /lib ...):

    drwxr-xr-x 18 root root  4096 Feb 15 07:19 .
    drwxr-xr-x  4 root root    80 Jan 29 13:16 ..
    -rw-------  1 root root     0 Feb 15 07:48 .autorelabel
    -rwxrwxrwx  1 root root     7 Apr 23  2020 bin
    drwxr-xr-x  6 root root  1024 Jan 29 13:54 boot
    drwxr-xr-x 16 root root  4096 Feb 15 07:46 dev
    drwxr-xr-x 88 root root  4096 Feb 15 07:48 etc
    drwxr-xr-x  3 root root  4096 Apr 23  2020 home
    -rwxrwxrwx  1 root root     7 Apr 23  2020 lib
    -rwxrwxrwx  1 root root     9 Apr 23  2020 lib64
    drwx------  2 root root 16384 Jan 15 10:40 lost+found
    drwxr-xr-x  2 root root  4096 Apr 23  2020 media
    drwxr-xr-x  3 root root  4096 Feb  9 20:35 mnt
    drwxr-xr-x  2 root root  4096 Apr 23  2020 opt
    drwxr-xr-x  2 root root  4096 Feb  9 15:59 proc
    drwxr-x---  5 root root  4096 Feb 15 07:48 root
    drwxr-xr-x  2 root root  4096 Feb  9 16:05 run
    -rwxrwxrwx  1 root root     8 Apr 23  2020 sbin
    drwxr-xr-x  2 root root  4096 Apr 23  2020 srv
    drwxr-xr-x  2 root root  4096 Feb  9 15:59 sys
    drwxrwxrwx  2 root root  4096 Feb 15 07:19 tmp
    drwxr-xr-x 12 root root  4096 Jan 15 10:46 usr
    drwxr-xr-x 21 root root  4096 Jan 15 10:55 var
    
  • While it should restore the permissions and the links:

    lrwxrwxrwx.   1 root root    7 Apr 23  2020 bin -> usr/bin
    lrwxrwxrwx.   1 root root    7 Apr 23  2020 lib -> usr/lib
    lrwxrwxrwx.   1 root root    9 Apr 23  2020 lib64 -> usr/lib64
    lrwxrwxrwx.   1 root root    8 Apr 23  2020 sbin -> usr/sbin
    

Environment

  • Red Hat Enterprise Linux
  • Relax And Recover - REAR
  • rsync

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content