create borg tmp dir
This commit is contained in:
parent
2b66d9e118
commit
87bfeb8464
@ -495,6 +495,27 @@ exclusions=1
|
||||
fi
|
||||
|
||||
|
||||
### create borg temp dir:
|
||||
## python requires a writable temporary directory when unpacking borg and
|
||||
## executing commands. This defaults to /tmp but many systems mount /tmp with
|
||||
## the 'noexec' option for security. Thus, we will use/create a 'tmp' folder
|
||||
## within the BORG_BASE_DIR and instruct python to use that instead of /tmp
|
||||
|
||||
# check if BORG_BASE_DIR/tmp exists, if not, create it
|
||||
if [ ! -d "${borgBaseDir}/tmp" ]; then
|
||||
if ! mkdir "${borgBaseDir}/tmp"; then
|
||||
exitError 132 "Unable to create borg ${borgBaseDir}/tmp directory"
|
||||
else
|
||||
printf "${cyan}[%s] -- [INFO] Created ${yellow}%s/tmp " \
|
||||
"$(stamp)" "${borgBaseDir}" >> "$logFile"
|
||||
printf "${cyan}--${norm}\n" >> "$logFile"
|
||||
fi
|
||||
fi
|
||||
export TMPDIR="${borgBaseDir}/tmp"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user