A free, open, self-hosted app platform (GNU AGPLv3): one-click app deploys, Traefik reverse proxy with automatic SSL, rootless Docker support, gluetun VPN routing, and a web dashboard to manage it all. Free & open forever to self-host; optional paid hosted services fund it. See PROMISE.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
31 lines
732 B
Bash
31 lines
732 B
Bash
#!/bin/bash
|
|
|
|
restorePickSnapshot()
|
|
{
|
|
local app_name="$1"
|
|
local idx="$2"
|
|
local snapshot_arg="$3"
|
|
local host="${4:-$CFG_INSTALL_NAME}"
|
|
|
|
if [[ -z "$idx" ]]; then
|
|
idx=$(resticEnabledLocations | head -1)
|
|
fi
|
|
|
|
if [[ -z "$idx" ]]; then
|
|
isError "No backup locations available"
|
|
return 1
|
|
fi
|
|
|
|
if [[ "$snapshot_arg" == "latest" || -z "$snapshot_arg" ]]; then
|
|
local id
|
|
id=$(engineSnapshotLatestId "$idx" "$app_name" "$host")
|
|
if [[ -z "$id" ]]; then
|
|
isError "No snapshots found for app=$app_name on host=$host in $(resticLocationName "$idx")"
|
|
return 1
|
|
fi
|
|
echo "$idx:$id"
|
|
else
|
|
echo "$idx:$snapshot_arg"
|
|
fi
|
|
}
|