Add monthly offsite restore tests and automatic cleanup
This commit is contained in:
1 parent
64eab1d3c2
commit
f0c761213d
18 files changed
+1386
-16
No files matched your search
+7
-2
@@ -11,7 +11,12 @@ acquire_backup_lock() {
|
||||
echo 'Inherited lock descriptor does not match configured lock' >&2; return 1;
|
||||
}
|
||||
else
|
||||
exec 9>"$LOCKFILE"
|
||||
exec 9>"$LOCKFILE" || return 1
|
||||
fi
|
||||
flock -n 9 || { echo "Another backup/restore/update holds $LOCKFILE" >&2; return 1; }
|
||||
local lock_code
|
||||
flock -E "${1:-1}" -n 9 || {
|
||||
lock_code=$?
|
||||
echo "Another backup/restore/update holds $LOCKFILE, or the lock is unavailable" >&2
|
||||
return "$lock_code"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user