Add borg check and rename options

Because we added borg check functionality, some of the Options have been
renamed:
-C -> -V
-E -> -e (as it is a sub)

-C: check
-y: --verify-data
-p: prefix or glob for check

Internal variables with CHECK have been renamed or changed to VERIFY

Borg -C without any extra parameters is equal to borg check.
-y adds the --verify-data and -p is a mix of the -P and -a options. If
there is a "*" in the option then -a will be used, else -P

Note that repair command has to be run manually. Run -C with -v
(verbose) to see the repair command structure.

borg check can take a long time on very large repositories.
This commit is contained in:
Clemens Schwaighofer
2022-04-18 15:30:03 +09:00
parent b5ead9a2e1
commit 2ae05f5302
9 changed files with 190 additions and 103 deletions

View File

@@ -5,12 +5,9 @@
# config override set in borg.backup.pgsql.settings
# if run as postgres user, be sure user is in the backup group
# Run -I first to initialize repository
# There are no automatic repository checks unless -C is given
# set last edit date + time
MODULE="pgsql"
MODULE_VERSION="1.2.0";
MODULE_VERSION="1.2.1";
DIR="${BASH_SOURCE%/*}"
@@ -23,11 +20,11 @@ INCLUDE_FILE="borg.backup.pgsql.include";
EXCLUDE_FILE="borg.backup.pgsql.exclude";
SCHEMA_ONLY_FILE="borg.backup.pgsql.schema-only";
DATA_ONLY_FILE="borg.backup.pgsql.data-only";
# init check file
BACKUP_INIT_CHECK="borg.backup.pgsql.init";
# init verify file
BACKUP_INIT_VERIFY="borg.backup.pgsql.init";
# check valid data
. "${DIR}/borg.backup.functions.check.sh";
# verify valid data
. "${DIR}/borg.backup.functions.verify.sh";
# if info print info and then abort run
. "${DIR}/borg.backup.functions.info.sh";