#2836 Issue closed
: WARNING: tar ended with return code 1¶
Labels: support / question
, fixed / solved / done
ZENAdmin-Ops opened issue at 2022-07-06 07:38:¶
Relax-and-Recover (ReaR) Issue Template¶
Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):
-
ReaR version ("/usr/sbin/rear -V"): 2.6
-
OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"): Ubuntu 22.04
-
ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"): N/A
-
Hardware vendor/product (PC or PowerNV BareMetal or ARM) or VM (KVM guest or PowerVM LPAR): N/A
-
System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
-
Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot):
-
Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):
-
Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,LABEL,SIZE,MOUNTPOINT"):
-
Description of the issue (ideally so that others can reproduce it):
Hello,
Sometimes when the backup completes I have observed the following entries in the log
WARNING: tar ended with return code 1 and below output:
---snip---
tar: 16292: Warning: Cannot flistxattr: Operation not supported
tar: 10: Warning: Cannot flistxattr: Operation not supported
tar: 14: Warning: Cannot flistxattr: Operation not supported
----------
This means that files have been modified during the archiving
process. As a result the backup may not be completely consistent
or may not be a perfect copy of the system. Relax-and-Recover
will continue, however it is highly advisable to verify the
backup in order to be sure to safely recover this system.
I've written a "wrapper" script to call Rear, because I wanted to be notified when this occurred.
An extract of the script logic is below
rear -C basic_system mkbackup
# Check return value
if [ $? -ne 0 ]; then
Update_EventLog "*** Backup completed with error ***"
else
Update_EventLog "Backup completed successfully"
fi
I have two questions
-
When the above Rear warning occurred. The return code from rear to: $? was still 0
I would have expected a warning to result in a non-zero return code? -
The warning text mentions .."however it is highly advisable to verify the
backup in order to be sure to safely recover this system".
I've had a look at the user guide and I don't see any mention of verify options.
Are there verify options that are not described in the user guide?
Thanks
Vaughan
jsmeix commented at 2022-07-06 08:56:¶
@ZENAdmin-Ops
in general cf. what I wrote at
https://github.com/rear/rear/issues/2835#issuecomment-1175001352
(relevant excerpt):
In general ReaR does not include things to manage ReaR
or things to manage backups and so on, cf. the section
"Relax-and-Recover versus backup and restore" in
https://en.opensuse.org/SDB:Disaster_Recovery
where that
"Relax-and-Recover versus backup and restore" section reads
(only some excerpts - better read the whole section)
Relax-and-Recover (ReaR) complements backup
and restore of files but ReaR is
neither a backup software
nor a backup management software
and it is not meant to be one.
In general backup and restore of the files
is external functionality for ReaR.
...
It is your task to verify your backup
is sufficiently complete to restore
your system as you need it.
It is your task to verify your backup
can be read completely to restore all your files.
In particular regarding
tar: ... Warning: Cannot flistxattr: Operation not supported
see
https://github.com/rear/rear/issues/2770
therein in particular
https://github.com/rear/rear/issues/2770#issuecomment-1072659786
and
https://github.com/rear/rear/issues/2770#issuecomment-1073744082
and the subsequent comments from there
in particular
https://github.com/rear/rear/issues/2770#issuecomment-1073809204
(excerpt)
I think
"tar: ...: Warning: Cannot flistxattr: Operation not supported"
is normally harmless and
it also cannot be avoided because
we need to call 'tar' with "--xattrs"
to have extended attributes support
but then files where extended attributes
are not supported (e.g. files on filesystems
that do not support extended attributes)
will cause such 'tar' warnings
and - as far as I see - there is no
matching --warning=no-... option
to suppress that in general.
jsmeix commented at 2022-07-06 08:59:¶
In general warnings are just warnings and no errors
so in general it would be wrong to abort ReaR
with non zero exit code because of a warning,
see the rather sophisticated exit code handling
when the backup program is 'tar' in
usr/share/rear/backup/NETFS/default/500_make_backup.sh
In general regarding "Warning" messages see also
https://schlomo.schapiro.org/2015/04/warning-is-waste-of-my-time.html
ZENAdmin-Ops commented at 2022-07-06 10:39:¶
Thanks for the prompt response
Regards,
Vaughan
[Export of Github issue for rear/rear.]