RFC: What backup and restore API should DBaaS expose for M1? #247
Yohansenanayake
started this conversation in
Ideas
Replies: 1 comment
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
What we are asking
We need to agree on the user-facing backup and restore contract for the DBaaS M1 release.
The proposal follows the core Amazon RDS experience while keeping M1 narrow:
This discussion is intentionally limited to API concepts and observable behavior. Backup tooling, VM orchestration, repository layout, retention execution, and other implementation details can be introduced in follow-up comments.
Proposed API concepts
BackupRepositoryDBInstance.spec.backupDBSnapshotDBRestore1. BackupRepository
A repository is not the S3 bucket itself. It is one database's isolated destination: bucket, prefix, and credentials.
Proposed behavior:
status.binding.databaseUIDThe repository is optional when the DB instance has no automated backups and no final-snapshot policy.
2. Automated backups and PITR
Proposed behavior:
retentionPeriodDays: 0disables automated backups and PITR.earliestRestorableTimeandlatestRestorableTimebased on recovery data that is actually usable.Example status:
3. Manual and final snapshots
A manual snapshot is a first-class, immutable
DBSnapshotresource:Proposed behavior:
Pending → Creating → AvailableorFailed.The DB instance deletion policy can request a final snapshot:
The final snapshot must become
Availablebefore destructive deletion continues. It then follows the same durable lifecycle as a manual snapshot.For M1, automated PITR data is removed during DB instance teardown. Retaining automated PITR after source deletion, as a separate restorable resource, is proposed as a later feature.
4. Restore
Restore always creates a new DB instance and leaves the source unchanged.
PITR selects an active source DB instance and either a UTC timestamp inside its reported recovery window or
useLatestRestorableTime: true.Example restoring
orders-dbto a specific point in time:The request is accepted only when
restoreTimeis between the source's reportedearliestRestorableTimeandlatestRestorableTime. The source remains unchanged, whileorders-restoredis created with database state recovered to the requested UTC time.Proposed restore behavior:
Available.BackupRepository requirement matrix
A manual snapshot always requires a ready repository, but that repository can be introduced after DB provisioning.
M1 non-goals
Clarifications requested
DBSnapshotandDBRestoreresources, or should restore be expressed asDBInstance.spec.restoreFrom?BackupRepository.spec.databaseRef.nameplus the immutable UID recorded in status be the authoritative one-database binding?Once these user-facing decisions are agreed, follow-up comments can cover backup tooling, storage layout, garbage collection, operation state machines, VM integration, credentials, and validation strategy.
All reactions