Skip to content

Commit

Permalink
Merge pull request #2664 from pcahyna/tmpdir-var-tmp
Browse files Browse the repository at this point in the history
ReaR's default TMPDIR is now /var/tmp (it was /tmp before)
i.e. ReaR's default working area is now /var/tmp/rear.XXXXX
ReaR needs lots of space (from 300MB up to more than 1GB)
to build the ReaR rescue/recovery system e.g. as ISO image
and even much more space to also store the backup archive
e.g. when the backup should be included in the ISO image.
The system's default temporary directory /tmp is no longer suited
as default temporary directory for ReaR because nowadays /tmp
is often a "tmpfs" that is in RAM so /tmp has RAM/swap limitations.
file-hierarchy(7) recommends to use /var/tmp for such cases.
If the user sets TMPDIR explicitly, it still takes precedence.
  • Loading branch information
jsmeix committed Aug 6, 2021
2 parents 69d7cf3 + 2721c27 commit 6589c8d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
10 changes: 8 additions & 2 deletions usr/share/rear/conf/default.conf
Expand Up @@ -54,10 +54,16 @@
# export TMPDIR="/prefix/for/rear/working/directory"
# before calling 'rear' (/prefix/for/rear/working/directory must already exist).
# This is useful for example when there is not sufficient free space
# in /tmp or $TMPDIR for the ISO image or even the backup archive.
# TMPDIR cannot be set to a default value here, otherwise /usr/sbin/rear
# in /var/tmp or $TMPDIR for the ISO image or even the backup archive.
# TMPDIR cannot be set to a default value here unconditionally but only
# if it is not set before calling the program, otherwise /usr/sbin/rear
# would not work in compliance with the Linux/Unix standards regarding TMPDIR
# see https://github.com/rear/rear/issues/968
# The default is /var/tmp instead of the more usual /tmp (the system default),
# because /tmp is not intended for such large amounts of data that ReaR usually
# produces when creating the image (see file-hierarchy(7)). In particular,
# /tmp can be a tmpfs, and thus restricted by the available RAM/swap.
export TMPDIR="${TMPDIR-/var/tmp}"

##
# ROOT_HOME_DIR
Expand Down

This file was deleted.

0 comments on commit 6589c8d

Please sign in to comment.