dbbackup

package
v0.1.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

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 New

func New() *Backuper

New returns an empty Backuper.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL