#2465 Issue closed
: rear shows misleading "socket ignored" information when tar end with exit code 1¶
Labels: enhancement
, fixed / solved / done
casantos opened issue at 2020-08-03 21:54:¶
-
ReaR version ("/usr/sbin/rear -V"): Relax-and-Recover 2.4 / Git
-
OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"): Red Hat Enterprise Linux Server release 7.8 (Maipo)
-
ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
BACKUP=NETFS
BACKUP_URL=file:///backup/
# remove /usr to speed-up the backup
BACKUP_PROG_EXCLUDE=("${BACKUP_PROG_EXCLUDE[@]}" '/usr' '/var/crash' '/var/tmp' '/dev' '/dev/shm' '/run' '/sys/fs/cgroup')
-
Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR): KVM guest.
-
System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device): x86_64
-
Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot): UEFI
-
Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe): VirtIO disks
-
Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,SIZE,MOUNTPOINT" or "lsblk" as makeshift):
NAME KNAME PKNAME TRAN TYPE FSTYPE SIZE MOUNTPOINT
/dev/sr0 /dev/sr0 sata rom iso9660 4.2G
/dev/vda /dev/vda disk 20G
|-/dev/vda1 /dev/vda1 /dev/vda part vfat 200M /boot/efi
|-/dev/vda2 /dev/vda2 /dev/vda part xfs 1G /boot
`-/dev/vda3 /dev/vda3 /dev/vda part LVM2_member 18.8G
|-/dev/mapper/rhel_rhel--7--1-root /dev/dm-0 /dev/vda3 lvm xfs 16.8G /
`-/dev/mapper/rhel_rhel--7--1-swap /dev/dm-1 /dev/vda3 lvm swap 2G [SWAP]
/dev/vdb /dev/vdb disk 20G
`-/dev/vdb1 /dev/vdb1 /dev/vdb part xfs 20G /backup
- Description of the issue (ideally so that others can reproduce it):
When tar exits with status greater than zero, rear copies the last 3 messages from the backup.log to its own log. They may also be shown to the user if rear is invoked with the "-v" option. If the last 3 or more messages from tar are "socket ignored" (informational) the actual error message (e.g. "file changed as we read it").
-
Workaround, if any: none
-
Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files): N.A.
-
Steps to reproduce
-
Set-up /etc/rear/local.conf to save backups in a local filesystem, e.g.
BACKUP=NETFS
BACKUP_URL=file:///backup/
# remove /usr to speed-up the backup
BACKUP_PROG_EXCLUDE=("${BACKUP_PROG_EXCLUDE[@]}" '/usr' '/var/crash' '/var/tmp' '/dev' '/dev/shm' '/run' '/sys/fs/cgroup')
- Ensure that a daemon that creates sockets is running (e.g. postfix)
# yum install -y postfix
# systemctl enable --now postfix
- Make a backup of /etc/grub.d/README
# mv /etc/grub.d/README /etc/grub.d/README~
# cp -p /etc/grub.d/README~ /etc/grub.d/README
- Run
rear -v mkbackup
while executing a command in parallel to append data to /etc/grub.d/README
# ( while :; do echo .; done ) >> /etc/grub.d/README
-
Stop appending data to /etc/grub.d/README
-
Actual results
# rear -v mkbackup
Relax-and-Recover 2.4 / Git
Using log file: /var/log/rear/rear-rhel-7-1.log
Using backup archive '/backup//rhel-7-1/backup.tar.gz'
Using UEFI Boot Loader for Linux (USING_UEFI_BOOTLOADER=1)
Creating disk layout
Excluding component fs:/backup
Using guessed bootloader 'EFI' (found in first bytes on /dev/vda)
Creating root filesystem layout
Trying to find what to use as UEFI bootloader...
Trying to find a 'well known file' to be used as UEFI bootloader...
Using '/boot/efi/EFI/redhat/grubx64.efi' as UEFI bootloader file
Copying logfile /var/log/rear/rear-rhel-7-1.log into initramfs as '/tmp/rear-rhel-7-1-partial-2020-08-03T15:28:45-0300.log'
Copying files and directories
Copying binaries and libraries
Copying kernel modules
Copying all files in /lib*/firmware/
Creating recovery/rescue system initramfs/initrd initrd.cgz with gzip default compression
Created initrd.cgz with gzip default compression (258832181 bytes) in 32 seconds
Making ISO image
Wrote ISO image: /var/lib/rear/output/rear-rhel-7-1.iso (291M)
Copying resulting files to file location
Saving /var/log/rear/rear-rhel-7-1.log as rear-rhel-7-1.log to file location
Creating tar archive '/backup//rhel-7-1/backup.tar.gz'
Archived 568 MiB [avg 10402 KiB/sec] OK
WARNING: tar ended with return code 1 and below output:
---snip---
tar: /var/spool/postfix/public/qmgr: socket ignored
tar: /var/spool/postfix/public/flush: socket ignored
tar: /var/spool/postfix/public/showq: socket ignored
----------
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.
Archived 568 MiB in 57 seconds [avg 10220 KiB/sec]
Exiting rear mkbackup (PID 23976) and its descendant processes
Running exit tasks
(reverse-i-search)`.con': vim -O /etc/rear/local^Conf /usr/share/rear/backup/NETFS/default/500_make_backup.sh
- Expected results:
---snip---
tar: /etc/grub.d/README: file changed as we read it
----------
- Additional info
The output is generated in line 235 of
/usr/share/rear/backup/NETFS/default/500_make_backup.sh
:
$(grep '^tar: ' "${TMP_DIR}/${BACKUP_PROG_ARCHIVE}.log" | sed -e 's/^/ /' | tail -n3)
Rear not only hides the real problem but also shows misleading information, since ignored sockets are not a problem.
jsmeix commented at 2020-08-07 10:55:¶
With https://github.com/rear/rear/pull/2466 merged this issue is done.
@casantos
thank you for your contribution to ReaR!
robertdahlem commented at 2021-12-08 15:25:¶
While at it: please filter out "Broken symlink" too.
[Export of Github issue for rear/rear.]