Documentation
¶
Overview ¶
Package backup creates and restores tar.gz snapshots of the data directory (SQLite DB, certs, generated config, ACME account). The master state needed to reproduce a working panel lives entirely under the data dir.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyPending ¶
ApplyPending applies a staged restore (if any) over dataDir, then clears the staging area. Call it on boot before opening the database. No-op when nothing is staged. Re-downloadable assets not present in the backup (bin/, geo/) are left in place.
func StageRestore ¶
StageRestore unpacks a backup into a staging area inside dataDir and marks it ready. The restore is applied by ApplyPending on the next boot, BEFORE the database is opened — so a live SQLite WAL can't checkpoint stale data back over the restored DB (which would silently revert the restore). On failure the live data is left untouched.
Types ¶
type Manifest ¶
type Manifest struct {
Domain string `json:"domain"`
SecretPath string `json:"secret_path"`
UserCount int `json:"user_count"`
CreatedAt string `json:"created_at"`
}
Manifest is written as manifest.json (the first tar entry) in every backup. It lets the operator preview what a backup contains before restoring.