Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateEncryptedArchive ¶
func CreateEncryptedArchive(ctx context.Context, dataDir, snapshotDB string, masterKey []byte, appVersion, recipientText string, created time.Time, dst io.Writer) error
CreateEncryptedArchive snapshots the panel's durable data into an age-encrypted, versioned tar.gz stream. The files of the data directory are streamed into it, not copied first: their hashes are taken in a first pass (the manifest leads the archive), and a file that changes before it is written fails the backup.
func RestoreEncryptedArchive ¶
func RestoreEncryptedArchive(ctx context.Context, src io.Reader, identities []age.Identity, destination string) error
RestoreEncryptedArchive decrypts and validates a v1 backup into a new data directory. It refuses any existing target and never follows archive paths or archive links.
Types ¶
type Config ¶
type Config struct {
Store *store.Store
Vault *vault.Vault
DataDir string
MasterKey []byte
StepUp func(context.Context) error
// OnResult is told how every backup ended: "" when it worked, else the error code (backup_storage_failed, ...). The
// Telegram alerts hang on it. It must not block.
OnResult func(code string)
Log *slog.Logger
}