fix(backup): exclude lost+found from the Forgejo [storage] tar #199

Sammanfogat
supernaut sammanfogade 1 incheckning från fix/backup-storage-lost-found in i main 2026-07-21 23:01:46 +00:00
Ägare

Bug

The #188 Forgejo [storage] volume export fails the entire nightly backup:

[backup] exporting Forgejo [storage] volume (/srv/gitborg-lfs)
tar: ./lost+found: Cannot open: Permission denied
tar: Exiting with failure status due to previous errors
bitborg-backup.service: Failed with result 'exit-code'

podman unshare tar -C /srv/gitborg-lfs . reads the tree as the mapped git subuid, but a dedicated ext4 volume's mount root carries a root-owned drwx------ lost+found it can't open → tar exits 1 → pipefail fails the whole backup (no archive written). Same lost+found gotcha that bit the #188 chown.

Caught by a manual systemctl --user start bitborg-backup.service after the 2026-07-21 cutover — it would have failed every scheduled run from now on.

Fix

--exclude=./lost+found on the storage tar. It's a filesystem artifact, never Forgejo data, and a restored filesystem creates its own, so dropping it is safe.

Verified: applied to prod + re-ran the backup; the storage export now completes and the archive contains forgejo-storage.tar.gz (confirming in the same run).

## Bug The #188 Forgejo `[storage]` volume export fails the **entire** nightly backup: ``` [backup] exporting Forgejo [storage] volume (/srv/gitborg-lfs) tar: ./lost+found: Cannot open: Permission denied tar: Exiting with failure status due to previous errors bitborg-backup.service: Failed with result 'exit-code' ``` `podman unshare tar -C /srv/gitborg-lfs .` reads the tree as the mapped git subuid, but a dedicated ext4 volume's mount root carries a root-owned `drwx------ lost+found` it can't open → tar exits 1 → `pipefail` fails the whole backup (no archive written). Same `lost+found` gotcha that bit the #188 chown. Caught by a manual `systemctl --user start bitborg-backup.service` after the 2026-07-21 cutover — it would have failed **every** scheduled run from now on. ## Fix `--exclude=./lost+found` on the storage tar. It's a filesystem artifact, never Forgejo data, and a restored filesystem creates its own, so dropping it is safe. Verified: applied to prod + re-ran the backup; the storage export now completes and the archive contains `forgejo-storage.tar.gz` (confirming in the same run).
supernaut lade till 1 incheckning 2026-07-21 22:59:35 +00:00
fix(backup): exclude lost+found from the Forgejo [storage] tar
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m24s
80dfc53e40
The #188 storage-volume export (`podman unshare tar -C /srv/gitborg-lfs .`) hits
the ext4 `lost+found` at the mount root — root-owned `drwx------`, unreadable by the
mapped git subuid — so tar prints 'Cannot open: Permission denied' and exits 1,
which under pipefail fails the ENTIRE nightly backup (no archive produced). Caught
by a manual run after the 2026-07-21 cutover; it would have failed every scheduled
run. lost+found is an fs artifact (never Forgejo data; a restored fs makes its own),
so --exclude=./lost+found is safe. Same lost+found gotcha as the #188 chown.
supernaut sammanfogade incheckning f263c1cedd till main 2026-07-21 23:01:46 +00:00
supernaut tog bort grenen fix/backup-storage-lost-found 2026-07-21 23:01:46 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-infra!199
Ingen beskrivning angiven.