Commit Graph
15 Commits
Author SHA1 Message Date
Julien LutranandClaude Fable 5 f264592d7d incus-container-upgrade: record the real OS as user.os after each run
incus list -c config:image.description reports the image a container
was CREATED from (2019 for most of this fleet) and says nothing about
dist-upgrades since — misleading as an inventory. The script now sets
user.os / user.os-checked from /etc/os-release on every pass, leaving
image.* intact as provenance. -o refreshes the metadata without
upgrading anything.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 19:43:52 +02:00
Julien LutranandClaude Fable 5 54ff1431b1 Add restic-restore-test.sh: repeatable restore drill
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>
2026-08-28 18:42:33 +02:00
Julien LutranandClaude Fable 5 bab0ae5386 restic-backup: unlock stale locks before backing up
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>
2026-08-28 18:10:38 +02:00
Julien LutranandClaude Fable 5 1ab7337d22 restic-backup: db-exclude (legacy plakar-db-exclude still honored, with a warning)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 16:03:35 +02:00
Julien LutranandClaude Fable 5 75760ba303 restic scripts: absolute /usr/local/bin/restic — cron PATH lacks it
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>
2026-08-28 12:53:04 +02:00
Julien LutranandClaude Fable 5 c5c958f511 incus-copy: --quiet — the progress meter mangles log files with \r updates
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-27 16:59:38 +02:00
Julien LutranandClaude Fable 5 28da17752a restic-paths: no comments — --files-from-verbatim takes every line literally
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-25 14:16:46 +02:00
Julien LutranandClaude Fable 5 57a6c0520b Generalize the exclude file: restic-exclude (was restic-nextcloud-exclude)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-25 13:07:39 +02:00
Julien LutranandClaude Fable 5 590279190a Add restic drivers: data leg, incus leg via file mount, weekly maintenance
restic-backup.sh: dump phase carried over verbatim from
plakar-backup.sh, then one restic backup invocation (dump dir +
restic-paths, nextcloud excludes) into restic-data; -s dumps|backup
for staged seeding. restic-incus-backup.sh: per-instance incus file
mount (distinct mountpoints — restic parents by host+path), expanded
config yaml alongside, giants excluded. restic-maintenance.sh: weekly
prune (--max-unused 10%, --max-repack-size 4G) + structure check +
rotating 1/52 data check. Plus restic-paths and the nextcloud
excludes list.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-25 12:53:16 +02:00
Julien LutranandClaude Fable 5 528dec1121 plakar-incus-backup: self-heal a silently expelled incus plugin
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>
2026-08-24 18:19:35 +02:00
Julien LutranandClaude Fable 5 c080c780ba Add plakar-incus-backup.sh: leg-4 driver (incus integration -> S3)
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>
2026-08-24 17:53:02 +02:00
Julien LutranandClaude Fable 5 0dd8fed645 Add plakar-backup.sh: nightly plakar driver replacing incus-backup.sh
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>
2026-08-23 08:56:30 +02:00
Julien Lutran 6c4550a9ea Remove spot container from incus-backup DB 2026-08-22 12:12:23 +02:00
Julien LutranandClaude Fable 5 43b3ab5841 Harden incus-container-upgrade: containers only, flock, error reporting
- 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>
2026-08-09 22:50:26 +02:00
Julien LutranandClaude Fable 5 856ea28d93 Rework incus-copy and incus-backup for the new two-leg backup scheme
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>
2026-08-09 19:57:09 +02:00