Restores a filesystem tree (diffed against live) and a database dump
(well-formedness, and with -d loaded into a throwaway container) from
the S3 repo, then cleans up. Turns the 'restore test' release gate
into something runnable each quarter instead of a one-off.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A backup killed mid-run leaves a lock behind; the next night's backup
still works (non-exclusive) but forget fails and the run reports
rc=1 for ever. restic-maintenance.sh already did this.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
First cron run (2026-08-28 05:00) failed with 'restic: command not
found'; interactive shells had /usr/local/bin, cron does not.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
plakar's pkg backend deletes an installed ptar when its cache
re-extraction fails (observed 2026-08-24: orphaned .incus-* temps,
final ptar unlinked, 'unsupported importer protocol'). Reinstall from
the kept ptar before backing up instead of failing the night.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Thin wrapper chained after incus-copy in the same cron entry: backs
up the incus source (quiesced backup-project replicas via the plakar
incus integration) into @s3incus, prune + maintenance.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Dumps incus state + auto-discovered databases (MariaDB/MySQL either
binary naming, native and docker-hosted PostgreSQL, grants/globals),
backs up the dump tree and the fs sources listed in plakar-sources
into any plakar kloset (-k @s3), applies retention, optional sync to
a second store. Loud SKIP lines for the plakar-db-exclude opt-out.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- filter type=container (a running VM without apt/agent would hang)
- skip containers without apt-get instead of erroring
- flock against overlapping runs, csv parsing, apt-get instead of apt
- capture stderr into the log, report per-container failures and
exit non-zero so cron/monitoring can alert
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
incus-copy.sh: add -r <src-remote> (pull all of a remote's instances to
the local host) and -p <dest-project> (copy local instances into another
local project/pool, for the on-host backup leg on a second disk). Copy
all instances instead of only running ones, abort cleanly if the
instance list fails, and keep boot.autostart=false on every replica.
incus-backup.sh: add a local destination mode (-d local, now the
default) that writes dumps/rsyncs straight to the backup root without
ssh; add -b to override the /backup root, flock against overlapping
runs, set -u, non-zero exit when any step fails, and fix the invalid
`incus exec -n` flag that made MariaDB dumps fail on modern incus.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>