Add compact auto run in intervals like check archive
Same settings like check archive in days. Auto set to 1 to run after each prune. Can be controlled per module.
This commit is contained in:
@@ -3,15 +3,16 @@
|
||||
# Backup gitea database, all git folders and gitea settings
|
||||
|
||||
MODULE="gitea"
|
||||
MODULE_VERSION="1.1.3";
|
||||
MODULE_VERSION="1.1.4";
|
||||
|
||||
DIR="${BASH_SOURCE%/*}"
|
||||
if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
|
||||
# init system
|
||||
. "${DIR}/borg.backup.functions.init.sh";
|
||||
|
||||
# init verify and check file
|
||||
# init verify, compact and check file
|
||||
BACKUP_INIT_FILE="borg.backup.${MODULE}.init";
|
||||
BACKUP_COMPACT_FILE="borg.backup.${MODULE}.compact";
|
||||
BACKUP_CHECK_FILE="borg.backup.${MODULE}.check";
|
||||
# lock file
|
||||
BACKUP_LOCK_FILE="borg.backup.${MODULE}.lock";
|
||||
@@ -83,7 +84,7 @@ if [ -z "${ONE_TIME_TAG}" ]; then
|
||||
echo "Prune repository with keep${KEEP_INFO:1}";
|
||||
${BORG_PRUNE};
|
||||
# if this is borg version >1.2 we need to run compact after prune
|
||||
. "${DIR}/borg.backup.functions.compact.sh";
|
||||
. "${DIR}/borg.backup.functions.compact.sh" "auto";
|
||||
# check in auto mode
|
||||
. "${DIR}/borg.backup.functions.check.sh" "auto";
|
||||
fi;
|
||||
|
||||
Reference in New Issue
Block a user