#2121 Issue closed: ReaR not deleting folders from /tmp

Labels: documentation, support / question, fixed / solved / done

dcz01 opened issue at 2019-04-17 07:33:

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"):
    Relax-and-Recover 2.4

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

OS_VENDOR=RedHatEnterpriseServer
OS_VERSION=6.10
  • 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=<Verschluesselungskennwort>
#BACKUP_PROG_CRYPT_OPTIONS="/usr/bin/openssl aes256 -salt -k"
#BACKUP_PROG_DECRYPT_OPTIONS="/usr/bin/openssl aes256 -d -k"
#BACKUP_URL=nfs://<IP-Adresse oder DNS-Name>/<Freigabepfad>
#BACKUP_URL=cifs://<Server>/<Freigabe>
#BACKUP_OPTIONS="cred=/etc/rear/cifs,sec=ntlmsspi"
#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='$1$HGjk3XUV$lid3Nd3k01Kht1mpMscLw1'
NON_FATAL_BINARIES_WITH_MISSING_LIBRARY='/opt/tivoli/tsm/client/ba/bin/libvixMntapi.so.1.1.0'
  • Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR):
    VM on VMware ESXi

  • 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):
    BIOS

  • Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):
    Local Disk

  • Description of the issue (ideally so that others can reproduce it):
    No folder of the created ones in /tmp are deleted after ReaR has finished.

  • Workaround, if any:
    Manually delete the folders from /tmp always.

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

[root@FBD01PSS ~]# ls -lah /tmp/
insgesamt 14M
drwxrwxrwt 54 root     root     4,0K 17. Apr 09:30 .
dr-xr-xr-x 23 root     root     4,0K 17. Apr 05:00 ..
-rw-r--r--  1 apache   apache    14M 17. Apr 09:30 debug.txt
-rw-rw-rw-  1 root     root        0 14. Apr 05:03 dsmopt.lock
drwxrwxrwt  2 root     root     4,0K  1. Mär 16:36 .ICE-unix
drwxr-xr-x  3 root     root     4,0K  6. Feb 15:07 rear
drwx------  3 root     root     4,0K 25. Mär 01:32 rear.0bdjeUdS31Cdjl4
drwx------  3 root     root     4,0K  5. Mär 01:33 rear.0Cg00PMxrRjQP02
drwx------  3 root     root     4,0K 28. Mär 01:33 rear.2DdSwqRbOrMLO5l
drwx------  3 root     root     4,0K  2. Apr 01:33 rear.2JKvM00SIV2qURq
drwx------  3 root     root     4,0K 16. Mär 01:34 rear.3MTHhEwZnGwmiyi
drwx------  3 root     root     4,0K  7. Apr 01:33 rear.3n2kj8vpR8EefUA
drwx------  3 root     root     4,0K 21. Mär 01:33 rear.3yxsFSmqyG7Cxme
drwx------  3 root     root     4,0K  7. Mär 01:35 rear.AKjzGO9roSO9Lsa
drwx------  3 root     root     4,0K 23. Mär 01:34 rear.aML2B8i0gPQeBto
drwx------  3 root     root     4,0K 19. Mär 01:35 rear.awo54VSMF7pxU6l
drwx------  3 root     root     4,0K 15. Mär 01:33 rear.B0TXOezcZx7l7IY
drwx------  3 root     root     4,0K 13. Mär 01:34 rear.BQqWmdQaFL3BomN
drwx------  3 root     root     4,0K 14. Mär 01:33 rear.cE6cRu2YLJZCysa
drwx------  3 root     root     4,0K  2. Mär 01:35 rear.clVGGhkw2Pxy84p
drwx------  3 root     root     4,0K 17. Mär 01:33 rear.eFjYPKztnGzmNcc
drwx------  3 root     root     4,0K 18. Mär 01:33 rear.F4xOwXqZzcZePlB
drwx------  3 root     root     4,0K  9. Mär 01:34 rear.FB46wlIkI0GX4HI
drwx------  3 root     root     4,0K  3. Apr 01:33 rear.H5lvI4X2z2SqgNA
drwx------  4 root     root     4,0K 16. Apr 01:36 rear.hbCdd9AYLAj4Tdc
drwx------  3 root     root     4,0K 29. Mär 01:33 rear.HHbpJsUfsSFPISI
drwx------  4 root     root     4,0K 15. Apr 01:33 rear.hnebXgfRelX8UCi
drwx------  3 root     root     4,0K 20. Mär 01:33 rear.hOzc4ULO0Fe36nn
drwx------  3 root     root     4,0K 26. Feb 01:33 rear.I0yriaTk8tUT13B
drwx------  3 root     root     4,0K  4. Mär 01:33 rear.i8azALc2qOQmXG3
drwx------  3 root     root     4,0K 27. Feb 01:34 rear.jg37XDOi1ClNCCf
drwx------  3 root     root     4,0K 27. Mär 01:33 rear.JWww3mNwq8PEE6s
drwx------  3 root     root     4,0K 12. Mär 01:33 rear.K42xlKr3IzXDWkf
drwx------  4 root     root     4,0K  8. Apr 01:33 rear.lmdsMWn9EE1cV8o
drwx------  3 root     root     4,0K  3. Mär 01:33 rear.OANIBLwIwJ6DCtP
drwx------  3 root     root     4,0K  6. Apr 01:34 rear.OchRlDQvwCLdwAM
drwx------  4 root     root     4,0K 14. Apr 01:34 rear.oHp7WpaZb7bocVP
drwx------  3 root     root     4,0K  6. Mär 01:35 rear.oNfusvNPSMcquod
drwx------  3 root     root     4,0K 31. Mär 01:33 rear.OwXLmjydFZsU9E0
drwx------  3 root     root     4,0K 22. Mär 01:33 rear.OZfcWNe76BVvzvE
drwx------  4 root     root     4,0K 12. Apr 01:35 rear.p0TGRMne71biTmJ
drwx------  3 root     root     4,0K 26. Mär 01:33 rear.QOgYWSC7zw8hk3l
drwx------  3 root     root     4,0K 30. Mär 01:34 rear.rjt7pvjn2fOxF6l
drwx------  3 root     root     4,0K 10. Mär 01:38 rear.RuNNQseDB2TWZ3M
drwx------  4 root     root     4,0K 11. Apr 01:34 rear.S8JhEtRBWHRLqob
drwx------  3 root     root     4,0K  8. Mär 01:34 rear.sihYrI2SnqK9qzD
drwx------  3 root     root     4,0K  5. Apr 01:33 rear.sT8425eVxGMyv4Q
drwx------  4 root     root     4,0K 13. Apr 01:36 rear.SuHgRbW8KktbYbT
drwx------  4 root     root     4,0K 17. Apr 01:34 rear.UGQLmIqwYgQC6Iw
drwx------  4 root     root     4,0K 10. Apr 01:36 rear.VgL5AiiCGYUha12
drwx------  3 root     root     4,0K  4. Apr 01:33 rear.Y7Ee41OqbRTjgsM
drwx------  3 root     root     4,0K 28. Feb 01:33 rear.YGMrmB32DBRpX6a
drwx------  3 root     root     4,0K 11. Mär 01:34 rear.YjcQPI4NDyQHc4Y
drwx------  3 root     root     4,0K  1. Apr 01:33 rear.yQFXzdWEqkOUCGF
drwx------  4 root     root     4,0K  9. Apr 01:37 rear.zCNYte2y98lYsVT
drwx------  3 root     root     4,0K 24. Mär 01:33 rear.ziPvu7YqsA4V2um
srwxrwxrwx  1 postgres postgres    0 17. Apr 09:21 .s.PGSQL.5432
-rw-------  1 postgres postgres   50 17. Apr 09:21 .s.PGSQL.5432.lock
-rw-------  1 apache   apache    752 17. Apr 09:16 wsdl-root-756b6c1b2b3c12ac6c057a964d813e90

jsmeix commented at 2019-04-17 10:58:

KEEP_BUILD_DIR=1 is set in debug mode
and in build/default/990_verify_rootfs.sh where it detects errors
in the ReaR recovery system.

jsmeix commented at 2019-04-17 11:05:

Via
https://github.com/rear/rear/commit/f86895b15b74120e4a37bf912a3ce9d3096d6be5
I added a comment to default.conf that tells when
KEEP_BUILD_DIR is automatically set to true.

pcahyna commented at 2019-08-22 10:10:

Hello, I think this fix is not sufficient. One would have to search for the description of KEEP_BUILD_DIR to learn about the problem. Note that when rear is not executed with -v, one is not informed about the temporary directory and rear keeps filling up /tmp silently. One should not need to study default.conf in depth to be informed about it. Also the fact that KEEP_BUILD_DIR is automatically and unconditionally set to true in case of errors is unfortunate, because one can not override the behaviour. I have created PR #2218 to remove the build directory by default when run noninteractively and to inform the user in a more verbose way about it when used interactively without -v.


[Export of Github issue for rear/rear.]