Borg check -p (progress) is only set if -v (verbose) flag is set
Avoid any progress output if run from script
This commit is contained in:
@@ -350,22 +350,22 @@ if [ ${CHECK} -eq 1 ]; then
|
|||||||
fi;
|
fi;
|
||||||
# debug/dryrun
|
# debug/dryrun
|
||||||
if [ ${DEBUG} -eq 1 ] || [ ${DRYRUN} -eq 1 ]; then
|
if [ ${DEBUG} -eq 1 ] || [ ${DRYRUN} -eq 1 ]; then
|
||||||
echo "export BORG_BASE_DIR=\"${BASE_FOLDER}\";${BORG_COMMAND} check -p ${OPT_CHECK_VERIFY_DATA} ${OPT_GLOB} ${REPOSITORY}";
|
echo "export BORG_BASE_DIR=\"${BASE_FOLDER}\";${BORG_COMMAND} check ${OPT_PROGRESS} ${OPT_CHECK_VERIFY_DATA} ${OPT_GLOB} ${REPOSITORY}";
|
||||||
fi;
|
fi;
|
||||||
# run info command if not a dry drun
|
# run info command if not a dry drun
|
||||||
if [ ${DRYRUN} -eq 0 ]; then
|
if [ ${DRYRUN} -eq 0 ]; then
|
||||||
# if glob add glob command directly
|
# if glob add glob command directly
|
||||||
if [[ "${CHECK_PREFIX}" =~ $REGEX_GLOB ]]; then
|
if [[ "${CHECK_PREFIX}" =~ $REGEX_GLOB ]]; then
|
||||||
${BORG_COMMAND} check -p ${OPT_CHECK_VERIFY_DATA} -a "${CHECK_PREFIX}" ${REPOSITORY};
|
${BORG_COMMAND} check ${OPT_PROGRESS} ${OPT_CHECK_VERIFY_DATA} -a "${CHECK_PREFIX}" ${REPOSITORY};
|
||||||
else
|
else
|
||||||
${BORG_COMMAND} check -p ${OPT_CHECK_VERIFY_DATA} ${OPT_GLOB} ${REPOSITORY};
|
${BORG_COMMAND} check ${OPT_PROGRESS} ${OPT_CHECK_VERIFY_DATA} ${OPT_GLOB} ${REPOSITORY};
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
# print additional info for use --repair command
|
# print additional info for use --repair command
|
||||||
if [ ${VERBOSE} -eq 1 ]; then
|
if [ ${VERBOSE} -eq 1 ]; then
|
||||||
echo "";
|
echo "";
|
||||||
echo "In case of repair: "
|
echo "In case of needed repair: "
|
||||||
echo "export BORG_BASE_DIR=\"${BASE_FOLDER}\";${BORG_COMMAND} check -p --repair ${OPT_GLOB} ${REPOSITORY}";
|
echo "export BORG_BASE_DIR=\"${BASE_FOLDER}\";${BORG_COMMAND} check ${OPT_PROGRESS} --repair ${OPT_GLOB} ${REPOSITORY}";
|
||||||
echo "Before running repair, a copy from the backup should be made because repair might damage a backup"
|
echo "Before running repair, a copy from the backup should be made because repair might damage a backup"
|
||||||
fi;
|
fi;
|
||||||
. "${DIR}/borg.backup.functions.close.sh";
|
. "${DIR}/borg.backup.functions.close.sh";
|
||||||
|
|||||||
Reference in New Issue
Block a user