override for when to prevent automatic backups

The mainscript does check if when is set to 'manual'. If so it does not start any backups automatically.

Change-Id: I2be2f07382fd06f2f7a2ca8c39cc9547d552d40a
This commit is contained in:
Emil Breiner 2021-03-24 13:34:24 +01:00
parent 5cc80402dd
commit efc98ec3f3
2 changed files with 7 additions and 0 deletions

View File

@ -124,6 +124,11 @@ These values for 'when' are invalid:
when = tuesday at 2 when = tuesday at 2
when = tues at 02 when = tues at 02
The value 'manual' can be set that backupninja can only be
triggered manually.
when = manual
.TP .TP
.SH DEFAULTS .SH DEFAULTS

View File

@ -326,6 +326,8 @@ function process_action() {
elif [ "$when" == "hourly" ]; then elif [ "$when" == "hourly" ]; then
info ">>>> starting action $file (because 'when = hourly')" info ">>>> starting action $file (because 'when = hourly')"
run="yes" run="yes"
elif [ "$when" == "manual" ]; then
debug ">>>> skipping $file because the 'when' configuration is set to manual"
else else
IFS=$'\t\n' IFS=$'\t\n'
for w in $when; do for w in $when; do