Exclude the zoekt index from backups (derived, regenerable data) #189

Stängd
öppnade 2026-07-21 19:09:17 +00:00 av supernaut · 2 kommentarer
Ägare

The zoekt code-search index is derived data — fully rebuildable by re-indexing the repos — so it should not be in the age-encrypted backup archives (ADR 0022), same hygiene as caches.

Exclude the index path ([indexer] REPO_INDEXER_PATH / the zoekt data dir) from the backup role's tar. Benefits: smaller/faster backups + off-site storage savings, faster restore drills (ADR 0027), and never restoring a stale/corrupt index. Trade-off: search is degraded post-restore until Forgejo re-indexes (minutes–hours) — acceptable (search is non-critical; forgejo doctor doesn't need it).

Zoekt is currently OFF (#165) so there's no index today — bake the exclusion in now so it's ready when re-enabled (behind the zoekt re-enable gate). Relates: #162, #165, ADR 0022/0027.

The zoekt code-search index is derived data — fully rebuildable by re-indexing the repos — so it should not be in the age-encrypted backup archives (ADR 0022), same hygiene as caches. Exclude the index path (`[indexer] REPO_INDEXER_PATH` / the zoekt data dir) from the backup role's tar. Benefits: smaller/faster backups + off-site storage savings, faster restore drills (ADR 0027), and never restoring a stale/corrupt index. Trade-off: search is degraded post-restore until Forgejo re-indexes (minutes–hours) — acceptable (search is non-critical; `forgejo doctor` doesn't need it). Zoekt is currently OFF (#165) so there's no index today — bake the exclusion in now so it's ready when re-enabled (behind the zoekt re-enable gate). Relates: #162, #165, ADR 0022/0027.
Upphovsperson
Ägare

Checked 2026-10-17: the hot backup excludes /forgejo/indexers (roles/backup/templates/bitborg-backup-hot.sh.j2:155). The forgejo role removes the Zoekt index while the indexer is off. The Done-when looks met. Close it, unless the archive backup (forgejo-data volume export) must also exclude the index once search is back on.

Checked 2026-10-17: the hot backup excludes `/forgejo/indexers` (`roles/backup/templates/bitborg-backup-hot.sh.j2:155`). The forgejo role removes the Zoekt index while the indexer is off. The Done-when looks met. Close it, unless the archive backup (`forgejo-data` volume export) must also exclude the index once search is back on.
Upphovsperson
Ägare

The hot backup already excludes /forgejo/indexers. Code search is disabled, so the archive has no index to exclude. Closing until code search is re-enabled; the approach and its tests are in the closed PR #775.

The hot backup already excludes `/forgejo/indexers`. Code search is disabled, so the archive has no index to exclude. Closing until code search is re-enabled; the approach and its tests are in the closed PR #775.
Logga in för att delta i denna konversation.
Ingen milstolpe
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#189
Ingen beskrivning angiven.