feat: add archive listing and resolution to restore.sh
This commit is contained in:
+13
@@ -52,6 +52,19 @@ run_cmd() {
|
||||
"$@"
|
||||
}
|
||||
|
||||
resolve_archive() {
|
||||
if [[ -n "$ARCHIVE_OVERRIDE" ]]; then
|
||||
RESOLVED_ARCHIVE="$ARCHIVE_OVERRIDE"
|
||||
return 0
|
||||
fi
|
||||
RESOLVED_ARCHIVE="$(borg list --short --lock-wait 60 2>/dev/null | tail -n1)"
|
||||
[[ -n "$RESOLVED_ARCHIVE" ]] || die "no archives found in repo $REPO"
|
||||
}
|
||||
|
||||
list_archives() {
|
||||
borg list --lock-wait 60
|
||||
}
|
||||
|
||||
usage() {
|
||||
cat <<'EOF'
|
||||
Usage:
|
||||
|
||||
Reference in New Issue
Block a user