recovery

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListVersions

func ListVersions(cfg *config.Config, project string) ([]manifest.BackupEntry, error)

ListVersions returns all backup versions for a project. Uses the default production dependencies.

func Recover

func Recover(cfg *config.Config, opts RecoverOptions) error

Recover restores a project from backup. Uses the default production dependencies.

func Verify

func Verify(cfg *config.Config, project, version string) error

Verify checks the integrity of a backup by comparing checksums. Uses the default production dependencies.

Types

type RecoverOptions

type RecoverOptions struct {
	Project string
	Version string // YYYYMMDD-HHMMSS format, empty for latest
	Wipe    bool   // Delete current before restore
	Archive bool   // Archive current before restore
}

RecoverOptions configures a recovery operation.

type Service

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

Service provides recovery operations with injected dependencies.

func NewDefaultService

func NewDefaultService() *Service

NewDefaultService creates a recovery service with real production dependencies.

func NewService

func NewService(fs ports.FileSystem, archiver ports.Archiver) *Service

NewService creates a new recovery service with the given dependencies.

func (*Service) ListVersions

func (s *Service) ListVersions(cfg *config.Config, project string) ([]manifest.BackupEntry, error)

ListVersions returns all backup versions for a project.

func (*Service) Recover

func (s *Service) Recover(cfg *config.Config, opts RecoverOptions) error

Recover restores a project from backup.

func (*Service) Verify

func (s *Service) Verify(cfg *config.Config, project, version string) error

Verify checks the integrity of a backup by comparing checksums.

Jump to

Keyboard shortcuts

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