[rear-devel] BACKUP_PROG_OPTIONS Question regarding extended attributes possible issue

Juan Badia Payno jbadiapa at redhat.com
Thu Aug 22 16:59:02 CEST 2019


I'm trying to do a full backup with all the extended attributes.

To do such a thing I added the following line on the /etc/rear/local.conf
BACKUP_PROG_OPTIONS+=( --anchored --xattrs-include='*.*' --xattrs )

I could see that the backup was done perfectly

However the extended attributes werent restored.

I checked that the command used to restore the data was
#####
RESCUE undercloud-0:~ # head -n 10
/var/lib/rear/restore/recover.backup.tar.gz.3870.restore.log
==> /var/lib/rear/restore/recover.backup.tar.gz.3870.restore.log <==
2019-08-22 09:11:41.943917333 dd
if=/tmp/rear.ZL02Oidw6EKjSES/outputfs/undercloud-00/backup.tar.gz | cat |
tar --block-number --totals --verbose --anchored --anchored --xattrs
--xattrs --xattrs-include=security.capability
--xattrs-include=security.selinux --acls --gzip -C /mnt/local/ -x -f -
#####

Checked the /etc/rear/rescue.conf
#######
RESCUE undercloud-0:~ # head -n 10 /etc/rear/rescue.conf
# initialize our /etc/rear/rescue.conf file sourced by the rear command in
recover mode
# also the configuration is sourced by system-setup script during booting
our recovery image

SHARE_DIR="/usr/share/rear"
CONFIG_DIR="/etc/rear"
VAR_DIR="/var/lib/rear"
LOG_DIR="/var/log/rear"

BACKUP_PROG_OPTIONS=( --anchored --anchored --xattrs-include=*.* --xattrs
--xattrs --xattrs-include=security.capability
--xattrs-include=security.selinux --acls )
# The following 3 lines were added through 210_include_dhclient.sh
#######

It seems to me that the problem was on the restore side so I changed the
/etc/rear/rescue.conf. I only added the " at the --xattrs-include="*.*"
####
RESCUE undercloud-0:~ # head -n 10 /etc/rear/rescue.conf
# initialize our /etc/rear/rescue.conf file sourced by the rear command in
recover mode
# also the configuration is sourced by system-setup script during booting
our recovery image

SHARE_DIR="/usr/share/rear"
CONFIG_DIR="/etc/rear"
VAR_DIR="/var/lib/rear"
LOG_DIR="/var/log/rear"

BACKUP_PROG_OPTIONS=( --anchored --anchored --xattrs-include="*.*" --xattrs
--xattrs --xattrs-include=security.capability
--xattrs-include=security.selinux --acls )
# The following 3 lines were added through 210_include_dhclient.sh
####

And now the untar arguments were correct
####
RESCUE undercloud-0:~ # head -n 10
/var/lib/rear/restore/recover.backup.tar.gz.3516.restore.log
2019-08-22 09:35:36.511164808 dd
if=/tmp/rear.IKrsxVh0bKwHniJ/outputfs/undercloud-00/backup.tar.gz | cat |
tar --block-number --totals --verbose --anchored --anchored
--xattrs-include=*.* --xattrs --xattrs --xattrs-include=security.capability
--xattrs-include=security.selinux --acls --gzip -C /mnt/local/ -x -f -
####

Not sure if that is an issue or I should do something else on the
configuration side.

Thanks in advance for the help.

More Info:
=========
[root at undercloud-0 ~]# rear  -V
Relax-and-Recover 2.4 / Git

[root at undercloud-0 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)

[root at undercloud-0 ~]# ls /etc/rear/*
/etc/rear/local.conf  /etc/rear/os.conf

/etc/rear/cert:


[root at undercloud-0 ~]# cat /etc/rear/os.conf
OS_VENDOR=RedHatEnterpriseServer
OS_VERSION=7


[root at undercloud-0 ~]# cat /etc/rear/local.conf
# Default is to create Relax-and-Recover rescue media as ISO image
# set OUTPUT to change that
# set BACKUP to activate an automated (backup and) restore of your data
# Possible configuration values can be found in
/usr/share/rear/conf/default.conf
#
# This file (local.conf) is intended for manual configuration. For
configuration
# through packages and other automated means we recommend creating a new
# file named site.conf next to this file and to leave the local.conf as it
is.
# Our packages will never ship with a site.conf.
NETFS_PREFIX=undercloud-00
OUTPUT_PREFIX=undercloud-00
BACKUP_PROG_OPTIONS+=( --anchored --xattrs-include='*.*' --xattrs )
ISO_PREFIX=undercloud-0
OUTPUT=ISO
OUTPUT_URL=nfs://192.168.24.254/system_backups
BACKUP=NETFS
BACKUP_URL=nfs://192.168.24.254/system_backups
BACKUP_PROG_EXCLUDE=("${BACKUP_PROG_EXCLUDE[@]}" '/media' '/var/tmp'
'/var/crash')
NETFS_KEEP_OLD_BACKUP_COPY=
BOOTLOADER=
GRUB_RESCUE=1



-- 

Juan Badia Payno

Senior Software Engineer

Red Hat EMEA ENG Openstack Infrastructure
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.relax-and-recover.org/pipermail/rear-devel/attachments/20190822/63fdab5b/attachment.html>


More information about the rear-devel mailing list