CentOS7: Backup With Rsync Problem: “rsync: Rsync_xal_set: Lremovexattr(“”/tmp/test/etc/fstab””, “security.selinux”) Failed: Permission Denied (13)”

Home » CentOS » CentOS7: Backup With Rsync Problem: “rsync: Rsync_xal_set: Lremovexattr(“”/tmp/test/etc/fstab””, “security.selinux”) Failed: Permission Denied (13)”
CentOS No Comments

If I run this command in order to backup /etc from remote server to local dir I get a lot of this message:

[root@s-virt tmp]# rsync -a –delete –numeric-ids –relative –delete-excluded –compress –acls –xattrs rsync://server-dati/root/etc/ /tmp/test/ -v
receiving incremental file list
rsync: rsync_xal_set: lremovexattr(“”/tmp/test/etc/fstab””,”security.selinux”) failed: Permission denied (13)
rsync: rsync_xal_set: lremovexattr(“”/tmp/test/etc/resolv.conf””,”security.selinux”) failed: Permission denied (13)
rsync: rsync_xal_set: lremovexattr(“”/tmp/test/etc/rsyncd.conf””,”security.selinux”) failed: Permission denied (13)
rsync: rsync_xal_set: lremovexattr(“”/tmp/test/etc/rsyncd.secrets””,”security.selinux”) failed: Permission denied (13)
rsync: rsync_xal_set: lremovexattr(“”/tmp/test/etc/lvm/archive/dati_00001-728488062.vg””,”security.selinux”) failed: Permission denied (13)
rsync: rsync_xal_set: lremovexattr(“”/tmp/test/etc/lvm/backup/dati””,”security.selinux”) failed: Permission denied (13)
rsync: rsync_xal_set: lremovexattr(“”/tmp/test/etc/samba/.smb.conf.swp””,”security.selinux”) failed: Permission denied (13)
rsync: rsync_xal_set: lremovexattr(“”/tmp/test/etc/samba/smb.conf””,”security.selinux”) failed: Permission denied (13)
rsync: rsync_xal_set: lremovexattr(“”/tmp/test/etc/systemd/system/multi-user.target.wants/rsyncd.service””,”security.selinux”) failed: Permission denied (13)

sent 671 bytes received 49804 bytes 100950.00 bytes/sec
total size is 30375007 speedup is 601.78
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1518) [generator=3.0.9]

I have also try to “setenforce 0” but the result is the same

It’s possible to do a full backup of remote /etc with SElinux attrs to a local dir?

Many thanks