#3286 Issue closed
: deleting tmp files?¶
Labels: support / question
, fixed / solved / done
oelkie opened issue at 2024-07-19 13:00:¶
-
ReaR version ("/usr/sbin/rear -V"):
Relax-and-Recover 2.7-git.5460.2b102fba.master / 2024-06-28 -
If your ReaR version is not the current version, explain why you can't upgrade:
-
OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"):
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
- ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
/etc/rear/site.conf
TIMESYNC=NTP
/etc/rear/local.conf
BACKUP=NETFS
OUTPUT=ISO
BACKUP_URL="nfs://<IP>/volume1/rear-bkp/"
OUTPUT_URL="nfs://<IP>/volume1/rear-bkp/"
BACKUP_PROG_EXCLUDE=( ${BACKUP_PROG_EXCLUDE[@]} '/tmp' '/var/tmp' )
USING_UEFI_BOOTLOADER=1
ISO_PREFIX="${HOSTNAME}-$(date '+%Y-%m-%d-%H%M%S')"
USE_DHCLIENT=n
-
Hardware vendor/product (PC or PowerNV BareMetal or ARM) or VM (KVM guest or PowerVM LPAR):
Intel Server BareMetal and proxmox VM -
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 and grub2 -
Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):
SSD -
Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,LABEL,SIZE,MOUNTPOINT"):
NAME KNAME PKNAME TRAN TYPE FSTYPE LABEL SIZE MOUNTPOINT
/dev/sda /dev/sda sata disk 223,6G
/dev/sdb /dev/sdb sata disk 223,6G
|-/dev/sdb1 /dev/sdb1 /dev/sdb part vfat 512M /boot/efi
|-/dev/sdb2 /dev/sdb2 /dev/sdb part ext4 SYSTEM 46,6G /
|-/dev/sdb3 /dev/sdb3 /dev/sdb part swap 63,7G [SWAP]
|-/dev/sdb4 /dev/sdb4 /dev/sdb part ext4 46,6G
`-/dev/sdb5 /dev/sdb5 /dev/sdb part ext4 66,2G /data
- Description of the issue (ideally so that others can reproduce it):
sometimes after 'rear -v mkbackup'
temporary files in /var/tmp are left and i got this mesage:
To remove the build area you may use (with caution): rm -Rf --one-file-system /var/tmp/rear.uJ62KIIXrJKfD12
Why?
-
Workaround, if any:
-
Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):
rear-debian119rear3.log
jsmeix commented at 2024-07-19 13:33:¶
@oelkie
in your
https://github.com/user-attachments/files/16312244/rear-debian119rear3.log
there is at the beginning
2024-07-19 14:51:57.289801146 Relax-and-Recover 2.7-git.5460.2b102fba.master / 2024-06-28
2024-07-19 14:51:57.293824529 Running rear mkbackup (PID 112666 date 2024-07-19 14:51:57)
2024-07-19 14:51:57.297673719 Command line options: /usr/sbin/rear -D mkbackup
and near its end there is
+ for exit_task in "${EXIT_TASKS[@]}"
+ Debug 'Exit task '\''cleanup_build_area_and_end_program'\'''
2024-07-19 14:54:21.090327000 Exit task 'cleanup_build_area_and_end_program'
+ eval cleanup_build_area_and_end_program
++ cleanup_build_area_and_end_program
++ local mounted_in_BUILD_DIR
+++ date +%s
++ Log 'Finished rear mkbackup in 144 seconds'
2024-07-19 14:54:21.097715332 Finished rear mkbackup in 144 seconds
++ has_binary is_true
++ for bin in "$@"
++ type is_true
++ return 0
++ is_true 1
++ case "$1" in
++ return 0
+++ mount
+++ grep /var/tmp/rear.uJ62KIIXrJKfD12
+++ sed -e 's/^/ /'
++ mounted_in_BUILD_DIR=
++ test ''
++ LogPrint 'To remove the build area you may use (with caution): rm -Rf --one-file-system /var/tmp/rear.uJ62KIIXrJKfD12'
It is normal in ReaR that in debug and debugscript mode
(i.e. when called with '-d' or '-D')
the build area is not automatically removed because the
build area contents are kept for debugging purposes,
see in usr/share/rear/conf/default.conf
the part about KEEP_BUILD_DIR that reads (excerpt)
# KEEP_BUILD_DIR is automatically set to true in debug mode (-d) and in debugscript mode (-D).
e.g. for our ReaR GitHub master code online
currently starting at
https://github.com/rear/rear/blob/master/usr/share/rear/conf/default.conf#L223
For your particular ReaR version
Relax-and-Recover 2.7-git.5460.2b102fba.master / 2024-06-28
see your usr/share/rear/conf/default.conf file
which should be same - as far as I remember
we did not change things there recently.
jsmeix commented at 2024-07-19 13:44:¶
@oelkie
in your initial description you wrote
sometimes after 'rear -v mkbackup'
temporary files in /var/tmp are left
Inspect your ReaR log file for this case
(i.e. when not in debugscript mode but only in verbose mode)
to see why temporary files are left even in verbose mode.
According to the KEEP_BUILD_DIR description in
usr/share/rear/conf/default.conf
# - empty (KEEP_BUILD_DIR="") which means that the build area will be kept on errors
# if running interactively (in a terminal) but not otherwise to avoid cluttering
# TMPDIR (see above) by cron or other automated jobs in case of errors.
the build area is kept in verbose mode "in case of errors"
so you need to inspect your ReaR log file to see
what errors there are.
oelkie commented at 2024-07-20 05:02:¶
Thank you for your information. Indeed, if i use only -v the tmp-files
are deleted, and only with -D the tmp-files are not deleted.
This issue can be closed.
[Export of Github issue for rear/rear.]