Set vars with docker volume locations

This commit is contained in:
Asif Bacchus 2018-10-20 05:06:49 -06:00
parent 0c1bc0512c
commit 1e3ef9a302

View File

@ -231,6 +231,11 @@ unset BORG_REPO
unset BORG_PASSPHRASE
unset BORG_REMOTE_PATH
unset TMPDIR
unset dockerVolumeMail
unset dockerVolumeRspamd
unset dockerVolumePostfix
unset dockerVolumeRedis
unset dockerVolumeCrypt
exitError=()
errorExplain=()
exitWarn=()
@ -668,6 +673,14 @@ fi
export TMPDIR="${BORG_BASE_DIR}/tmp"
## Get docker volume paths on filesystem for inclusion in backup
dockerVolumeMail=$(docker volume inspect -f '{{ .Mountpoint }}' ${COMPOSE_PROJECT_NAME}_vmail-vol-1)
dockerVolumeRspamd=$(docker volume inspect -f '{{ .Mountpoint }}' ${COMPOSE_PROJECT_NAME}_rspamd-vol-1)
dockerVolumePostfix=$(docker volume inspect -f '{{ .Mountpoint }}' ${COMPOSE_PROJECT_NAME}_postfix-vol-1)
dockerVolumeRedis=$(docker volume inspect -f '{{ .Mountpoint }}' ${COMPOSE_PROJECT_NAME}_redis-vol-1)
dockerVolumeCrypt=$(docker volume inspect -f '{{ .Mountpoint }}' ${COMPOSE_PROJECT_NAME}_crypt-vol-1)
## Generate and execute borg
# commandline depends on whether borgExclude is empty or not
if [ -z "$borgExclude" ]; then