backup

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: AGPL-3.0 Imports: 35 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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, workDir string, dst io.Writer) error

CreateEncryptedArchive snapshots the panel's durable data into an age-encrypted, versioned tar.gz stream. workDir must be a private temporary directory owned by the caller.

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.

func RunCLI

func RunCLI(args []string, out io.Writer) error

RunCLI runs the offline backup recovery commands. The private identity is read only by restore and is never sent to the running panel or an object store.

Types

type Config

type Config struct {
	Store     *store.Store
	Vault     *vault.Vault
	DataDir   string
	MasterKey []byte
	StepUp    func(context.Context) error
	Log       *slog.Logger
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(cfg Config) (*Service, error)

func (*Service) Handler

func (s *Service) Handler(opts ...connect.HandlerOption) (string, http.Handler)

func (*Service) Run

func (s *Service) Run(ctx context.Context)

Jump to

Keyboard shortcuts

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