#2725 Issue closed: WARNING: tar ended with return code 1 and below output

Labels: support / question, fixed / solved / done, external tool

dcz01 opened issue at 2021-12-09 11:32:

WARNING: tar ended with return code 1 and below output

Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):

  • ReaR version ("/usr/sbin/rear -V"):
    Relax-and-Recover 2.6 / Git

  • OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"):

NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
OUTPUT=ISO
OUTPUT_URL=file:///tmp/rear
BACKUP=NETFS
#BACKUP=TSM
BACKUP_PROG=tar
BACKUP_PROG_CRYPT_ENABLED=1
BACKUP_PROG_CRYPT_KEY=XXXXXXXXXXXXXXXX
BACKUP_PROG_CRYPT_OPTIONS="/usr/bin/openssl aes-256-cbc -salt -k"
BACKUP_PROG_DECRYPT_OPTIONS="/usr/bin/openssl aes-256-cbc -d -k"
BACKUP_URL=nfs://XXXXXXXX/XXXXXXX
#BACKUP_URL=cifs://<Server>/<Freigabe>
#BACKUP_OPTIONS="cred=/etc/rear/cifs,sec=ntlmsspi"
BACKUP_OPTIONS="nfsvers=4,nolock"
BACKUP_TYPE=incremental
FULLBACKUPDAY="Sat"
BACKUP_PROG_EXCLUDE=( '/tmp/*' '/dev/shm/*' $VAR_DIR/output/\* '/opt/tivoli/tsm/rear/*' '/mnt/*' '/media/*' '/var/lib/pgsql/*/data/base/*' '/var/lib/pgsql/*/data/global/*' '/var/lib/pgsql/*/data/pg*/*' )
SSH_ROOT_PASSWORD='$6$CFQoHxuu57fA8oWc$RCLWE/ZiSlKFAjNADp6ob.feRYxy/zk1Hch/QK9awCMhtTwPmEdddza/w5WlpnK85pcCVhh/MJ4evHTg73sl//'
BOOTLOADER="GRUB2-EFI"
  • Hardware vendor/product (PC or PowerNV BareMetal or ARM) or VM (KVM guest or PowerVM LPAR):
    PC BareMetal

  • 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 with GRUB2

  • Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):
    Local Storage on HDD with RAID

  • Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,SIZE,MOUNTPOINT"):

NAME        KNAME     PKNAME   TRAN   TYPE FSTYPE   SIZE MOUNTPOINT
/dev/sda    /dev/sda                  disk        463,8G
|-/dev/sda1 /dev/sda1 /dev/sda        part            1M
|-/dev/sda2 /dev/sda2 /dev/sda        part xfs      500M /boot
|-/dev/sda3 /dev/sda3 /dev/sda        part xfs     97,7G /
|-/dev/sda4 /dev/sda4 /dev/sda        part swap     7,9G [SWAP]
|-/dev/sda5 /dev/sda5 /dev/sda        part vfat     200M /boot/efi
`-/dev/sda6 /dev/sda6 /dev/sda        part xfs    357,6G /var/lib/pgsql
/dev/sr0    /dev/sr0           sata   rom          1024M

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 463,8G  0 disk
├─sda1   8:1    0     1M  0 part
├─sda2   8:2    0   500M  0 part /boot
├─sda3   8:3    0  97,7G  0 part /
├─sda4   8:4    0   7,9G  0 part [SWAP]
├─sda5   8:5    0   200M  0 part /boot/efi
└─sda6   8:6    0 357,6G  0 part /var/lib/pgsql
sr0     11:0    1  1024M  0 rom
  • Description of the issue (ideally so that others can reproduce it):
2021-12-09 05:00:05.554634642 Running 'backup' stage
2021-12-09 05:00:05.555743083 ======================
2021-12-09 05:00:05.571122107 Including backup/default/010_pre_backup_script.sh
2021-12-09 05:00:05.588218165 Including backup/NETFS/default/100_mount_NETFS_path.sh
2021-12-09 05:00:05.596465107 Mounting with 'mount  -t nfs -o nfsvers=3,nolock FBD0MGYD:/Backups /tmp/rear.5ndFaeBX7rJNIRS/outputfs'
2021-12-09 05:00:05.685402585 Including backup/NETFS/default/150_save_copy_of_prefix_dir.sh
2021-12-09 05:00:05.697281952 Including backup/NETFS/default/200_check_rsync_relative_option.sh
2021-12-09 05:00:05.707352124 Added option '--relative' to the BACKUP_RSYNC_OPTIONS array during mkbackuponly workflow
2021-12-09 05:00:05.711444165 Including backup/NETFS/default/200_make_prefix_dir.sh
2021-12-09 05:00:05.723876912 Including backup/NETFS/default/250_create_lock.sh
2021-12-09 05:00:05.741804692 Including backup/NETFS/GNU/Linux/310_stop_selinux.sh
2021-12-09 05:00:05.750842927 Temporarily stopping SELinux enforce mode with BACKUP=NETFS and BACKUP_PROG=tar backup
2021-12-09 05:00:05.754998824 Including backup/NETFS/default/400_create_include_exclude_files.sh
2021-12-09 05:00:05.759642436 Including backup/NETFS/default/500_make_backup.sh
2021-12-09 05:00:05.767398505 Making backup (using backup method NETFS)
2021-12-09 05:00:05.769254150 Encrypting backup archive with key defined in BACKUP_PROG_CRYPT_KEY
2021-12-09 05:00:05.771016385 Backup include list (backup-include.txt contents):
2021-12-09 05:00:05.772737663   /boot
2021-12-09 05:00:05.774423120   /
2021-12-09 05:00:05.776209512   /boot/efi
2021-12-09 05:00:05.777891877   /var/lib/pgsql
2021-12-09 05:00:05.779571602   /var/lib/pgsql/backups.d/12
2021-12-09 05:00:05.781256319 Backup exclude list (backup-exclude.txt contents):
2021-12-09 05:00:05.783006875   /tmp/*
2021-12-09 05:00:05.784690671   /dev/shm/*
2021-12-09 05:00:05.786479299   /var/lib/rear/output/*
2021-12-09 05:00:05.788169808   /opt/tivoli/tsm/rear/*
2021-12-09 05:00:05.789882040   /mnt/*
2021-12-09 05:00:05.791535304   /media/*
2021-12-09 05:00:05.793239474   /var/lib/pgsql/*/data/base/*
2021-12-09 05:00:05.794942789   /var/lib/pgsql/*/data/global/*
2021-12-09 05:00:05.796630235   /var/lib/pgsql/*/data/pg*/*
2021-12-09 05:00:05.798348481   /tmp/rear.5ndFaeBX7rJNIRS
2021-12-09 05:00:05.800398453 Creating tar archive '/tmp/rear.5ndFaeBX7rJNIRS/outputfs/FBD0MG5G/2021-12-09-0500-I.tar.gz'
2021-12-09 05:00:05.811526047 tar --warning=no-xdev --sparse --block-number --totals --verbose --no-wildcards-match-slash --one-file-system --ignore-failed-read --anchored --xattrs --xattrs-include=security.capability --xattrs-include=security.selinux --acls --newer=2021-12-08 -V 2021-12-08-0500-I.tar.gz --gzip -X /tmp/rear.5ndFaeBX7rJNIRS/tmp/backup-exclude.txt -C / -c -f - /boot / /boot/efi /var/lib/pgsql /var/lib/pgsql/backups.d/12 /var/log/rear/rear-FBD0MG5G.1305676.log | /usr/bin/openssl aes-256-cbc -salt -k BACKUP_PROG_CRYPT_KEY | dd of=/tmp/rear.5ndFaeBX7rJNIRS/outputfs/FBD0MG5G/2021-12-09-0500-I.tar.gz bs=1M
2021-12-09 05:45:18.734932870 WARNING: tar ended with return code 1 and below output:
  ---snip---
  tar: /var/lib/pgsql/backups.d/12/pg_dump_2021-12-02/14855.dat.gz: file is unchanged; not dumped
  tar: /var/lib/pgsql/backups.d/12/pg_dump_2021-12-02/14342.dat.gz: file is unchanged; not dumped
  tar: /var/lib/pgsql/backups.d/12/pg_dump_2021-12-02/14572.dat.gz: file is unchanged; not dumped
  ----------
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.

2021-12-09 05:45:18.757017730 Archived 60729 MiB in 2712 seconds [avg 22930 KiB/sec]
2021-12-09 05:45:18.885265492 Including backup/NETFS/GNU/Linux/600_start_selinux.sh
2021-12-09 05:45:18.903817975 Restored original SELinux mode
2021-12-09 05:45:18.914227635 Trigger autorelabel (SELinux) file
2021-12-09 05:45:18.918450592 Including backup/NETFS/GNU/Linux/620_force_autorelabel.sh
2021-12-09 05:45:18.927609979 Including backup/NETFS/default/970_remove_lock.sh
2021-12-09 05:45:18.941357826 Including backup/NETFS/default/980_umount_NETFS_dir.sh
2021-12-09 05:45:18.945255509 Unmounting '/tmp/rear.5ndFaeBX7rJNIRS/outputfs'
2021-12-09 05:45:22.859294156 Including backup/default/990_post_backup_script.sh
2021-12-09 05:45:22.865749391 Finished running 'backup' stage in 2717 seconds
2021-12-09 05:45:22.866982095 Finished running mkbackuponly workflow
2021-12-09 05:45:22.874804744 Saving /var/log/rear/rear-FBD0MG5G.1305676.log as /var/log/rear/rear-FBD0MG5G.log
  • Workaround, if any:
    None

  • Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):

[root@FBD0MG5G~]# stat /var/lib/pgsql/backups.d/12/pg_dump_2021-12-02/14855.dat.gz
  Datei: /var/lib/pgsql/backups.d/12/pg_dump_2021-12-02/14855.dat.gz
  Größe: 15769552       Blöcke: 30800      EA Block: 4096   reguläre Datei
Gerät: 811h/2065d       Inode: 43647065    Verknüpfungen: 1
Zugriff: (0440/-r--r-----)  Uid: (   26/postgres)   Gid: ( 1001/postgres_backup)
Kontext: system_u:object_r:postgresql_db_t:s0
Zugriff    : 2021-12-04 08:49:17.421801082 +0100
Modifiziert: 2021-12-02 03:05:45.499099264 +0100
Geändert   : 2021-12-02 03:44:00.864182416 +0100
 Geburt    : -
[root@FBD0MG5G~]# stat /var/lib/pgsql/backups.d/12/pg_dump_2021-12-02/14342.dat.gz
  Datei: /var/lib/pgsql/backups.d/12/pg_dump_2021-12-02/14342.dat.gz
  Größe: 18995323       Blöcke: 37104      EA Block: 4096   reguläre Datei
Gerät: 811h/2065d       Inode: 43647080    Verknüpfungen: 1
Zugriff: (0440/-r--r-----)  Uid: (   26/postgres)   Gid: ( 1001/postgres_backup)
Kontext: system_u:object_r:postgresql_db_t:s0
Zugriff    : 2021-12-04 08:49:18.147804908 +0100
Modifiziert: 2021-12-02 03:05:55.959162745 +0100
Geändert   : 2021-12-02 03:44:00.863182411 +0100
 Geburt    : -
[root@FBD0MG5G~]# stat /var/lib/pgsql/backups.d/12/pg_dump_2021-12-02/14572.dat.gz
  Datei: /var/lib/pgsql/backups.d/12/pg_dump_2021-12-02/14572.dat.gz
  Größe: 25             Blöcke: 8          EA Block: 4096   reguläre Datei
Gerät: 811h/2065d       Inode: 43647562    Verknüpfungen: 1
Zugriff: (0440/-r--r-----)  Uid: (   26/postgres)   Gid: ( 1001/postgres_backup)
Kontext: system_u:object_r:postgresql_db_t:s0
Zugriff    : 2021-12-04 08:49:18.928809023 +0100
Modifiziert: 2021-12-02 03:06:25.415341510 +0100
Geändert   : 2021-12-02 03:44:00.864182416 +0100
 Geburt    : -
[root@FBD0MG5G~]# stat /var/lib/pgsql/backups.d/12/pg_dump_2021-12-02/
  Datei: /var/lib/pgsql/backups.d/12/pg_dump_2021-12-02/
  Größe: 20480          Blöcke: 40         EA Block: 4096   Verzeichnis
Gerät: 811h/2065d       Inode: 43646977    Verknüpfungen: 2
Zugriff: (0550/dr-xr-x---)  Uid: (   26/postgres)   Gid: ( 1001/postgres_backup)
Kontext: system_u:object_r:postgresql_db_t:s0
Zugriff    : 2021-12-09 05:45:16.416805193 +0100
Modifiziert: 2021-12-02 03:06:25.781343732 +0100
Geändert   : 2021-12-02 03:44:00.868182440 +0100
 Geburt    : -

Can anyone tell me why these files are tried to getting backuped?
Normally because of this --newer=2021-12-08 they shouldn't or?

gdha commented at 2021-12-23 08:51:

@dcz01 Is this not an issue coming from tar executable? Try to test this with a small case with tar.

jsmeix commented at 2022-01-31 11:08:

In general regarding time settings with BACKUP_TYPE=incremental
and the the 'tar' option '--newer=YYYY-MM-DD'
see what default.conf explains about "timing granularity"
which is currently online starting at
https://github.com/rear/rear/blob/master/usr/share/rear/conf/default.conf#L1333


[Export of Github issue for rear/rear.]