cloudnative-pg / cloudnative-pg/klio
Backup restore: support reading base backups from a Barman Cloud object-store layout as a fallback (read-only, tar-based)
- Dominant language
- Go
- Stars
- 26
- Forks
- 5
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 113
Description
## Problem
Klio has no way to restore a base backup produced by the Barman Cloud plugin prior to migration, unless that backup is deliberately imported into Kopia. When a requested `backupID` isn't found in Klio's own catalog, there's currently no way to know whether it exists in a Barman Cloud tar-mode layout in the same object store, nor any way to retrieve it.
## Requirements
- Read-only: no re-encoding of Barman Cloud backups into Kopia, no retention, pinning, or write of any kind against them.
- No dependency on the barman-cloud plugin being installed or running.
- Must handle Barman Cloud's tar-mode backup layout, including multi-tablespace backups, and all its supported compression variants (none, gzip, bzip2, snappy).
- Backup ID resolution between Klio's `-backup-` convention and Barman Cloud's own backup-id format must be unambiguous in both directions.
- Behaviour must be configuration-gated: fully inert when disabled, with no extra object-store calls and no change to existing behaviour.
## Verification
- [ ] A restore request for a backupID absent from Klio's native catalog successfully resolves and restores from a matching Barman Cloud tar-mode backup, feature enabled.
- [ ] Multi-tablespace backups restore to the correct locations.
- [ ] All three compression variants restore correctly.
- [ ] With the feature disabled, behaviour and object-store call volume are identical to today.
- [ ] No write, retention, or pin operation is ever issued against the Barman Cloud objects, confirmed by test.
- [ ] Covered by an integration/e2e test against a real Barman Cloud tar backup (single- and multi-tablespace cases).
## Open questions
- Confirm exact Barman Cloud backup-id format and timezone semantics.
- Confirm the mapping between a Klio backupID and its corresponding Barman Cloud backup-id is unambiguous in both directions.
## Out of scope
- Any write path back into Klio's own catalog.
- WAL retrieval past the restored base backup (sibling WAL fallback ticket).
Contributor guide
Research direction
Start at the restore path that resolves a requested backupID after the Klio catalog lookup, then trace the object-store read path and configuration gate. Use the verification checklist to define done: read-only restoration of single- and multi-tablespace Barman Cloud tar backups across the listed compression variants, plus integration/e2e coverage and disabled-mode call-volume and write-safety checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- backend, cloud, databases, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100