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>
This commit is contained in:
co-authored by
Claude Fable 5
parent
c080c780ba
commit
528dec1121
@@ -52,6 +52,18 @@ export PLAKAR_PASSPHRASE
|
||||
|
||||
rc=0
|
||||
|
||||
# The plakar pkg backend has been observed to silently expel an
|
||||
# installed plugin (its reload path deletes the ptar when the cache
|
||||
# re-extraction fails — seen 2026-08-24). Self-heal from the kept
|
||||
# ptar instead of failing the nightly run with
|
||||
# "unsupported importer protocol".
|
||||
if ! plakar pkg list 2>/dev/null | grep -q "^incus@"; then
|
||||
PTAR=$(ls -t /root/incus-plugin/incus_v*.ptar 2>/dev/null | head -1)
|
||||
echo "incus plugin missing — reinstalling ${PTAR:-<no ptar found>}" >&2
|
||||
[ -n "$PTAR" ] && plakar pkg add "$PTAR" \
|
||||
|| { echo "incus plugin reinstall failed" >&2; exit 1; }
|
||||
fi
|
||||
|
||||
log "backup @$SOURCE -> $KLOSET"
|
||||
plakar -quiet at "$KLOSET" backup -tag "$SOURCE" "@$SOURCE" \
|
||||
|| { echo "backup @$SOURCE failed" >&2; rc=1; }
|
||||
|
||||
Reference in New Issue
Block a user