Documentation
¶
Overview ¶
Package dbbackup captures and restores snapshots of a database Egg, for point-in-time recovery. A capture runs pg_dump inside the Egg's own container and streams the dump to a durable file on the host (so the data never leaves the box); a restore pipes a chosen dump back into the container. Both run ASYNCHRONOUSLY (a dump/restore can take minutes and must not block the reconcile tick), reporting incremental progress the agent ships on the status endpoint.
Phase 1 stores snapshots locally on the Egg's host: this survives a logical mistake (a bad migration, a dropped table), not the host disk dying. A later phase relays them to a durable off-host Vault. British English. No em dashes. Nothing secret is logged (the DB password lives only in the container's own environment).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backuper ¶
type Backuper struct {
// contains filtered or unexported fields
}
Backuper tracks in-flight captures and restores, one per backup id.
func (*Backuper) Ensure ¶
func (b *Backuper) Ensure(ctx context.Context, containerID, blobID string, d *contract.BackupDirective) (done bool, report *contract.BackupReport)
Ensure runs the backup for d.BackupID against the given running container the first time it is seen, then returns incremental progress on every call. blobID locates the on-host snapshot directory. Idempotent and cheap once a job exists.