backup

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDrillBusy = errors.New("backup: a restore drill is already running")
View Source
var ErrNoDatabaseSnapshot = errors.New("backup: no consistent database snapshot for this driver")

ErrNoDatabaseSnapshot is returned when the payload cannot carry a consistent copy of the database, so a capsule without one is never sealed as if it were a backup.

Functions

func Checks

func Checks(dir string, opened capsule.Manifest) []recoveryclient.Check

Checks validates the recipe from the capsule that was actually opened. A malformed recipe is a failed drill, never permission to omit a required product check.

func Collect

func Collect(ctx context.Context, cfg *config.Config, appVersion string) (recoveryclient.Payload, error)

Collect assembles the payload every sealing caller uses: the local application files (SQLite database, configuration) plus the members that may only ever travel inside a sealed capsule (the encryption key, the pinned recovery public key). Nothing that returns from here may leave the process except through a Sealer.

func DrillRoot

func DrillRoot(cfg *config.Config) string

DrillRoot keeps opened instance data beneath the deployment's data directory.

func Members

func Members(cfg *config.Config, managed bool) []string

Members names what a capsule carries, for the screen; it is what Collect would seal now.

func NewSealer

func NewSealer(cfg *config.Config) (recoveryclient.Sealer, error)

NewSealer seals the KyRecovery token under the deployment key, domain-separated so a row copied from another setting will not open.

func RunConfig

func RunConfig(cfg *config.Config, appVersion string) (recoveryclient.RunConfig, error)

RunConfig is what Run needs from the scaffold's configuration.

func RunDrill

RunDrill serializes HTTP and CLI drills sharing a data directory. The persistent lock file must not be unlinked: all processes must lock the same inode. Closing the descriptor (including process exit) releases the advisory lock.

func Settings

Settings binds the request context to the settings store for one call into the lib.

Types

This section is empty.

Jump to

Keyboard shortcuts

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