backups

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileInfo

type FileInfo struct {
	Name    string    `json:"name"`
	Size    int64     `json:"size"`
	ModTime time.Time `json:"modTime"`
}

type RestoreDrillResult

type RestoreDrillResult struct {
	BackupName       string   `json:"backupName"`
	DatabaseFiles    []string `json:"databaseFiles"`
	IntegrityChecked int      `json:"integrityChecked"`
}

type Service

type Service struct {
	App    core.App
	Config config.Config
	Alerts *alerts.Service
	Now    func() time.Time
}

func NewService

func NewService(app core.App, cfg config.Config, alertService *alerts.Service) *Service

func (*Service) Configure

func (s *Service) Configure() error

func (*Service) Create

func (s *Service) Create(ctx context.Context) (string, error)

func (*Service) GetStatus

func (s *Service) GetStatus(ctx context.Context, verify bool) (Status, error)

func (*Service) RegisterHooks

func (s *Service) RegisterHooks()

func (*Service) RestoreDrill

func (s *Service) RestoreDrill(ctx context.Context) (RestoreDrillResult, error)

type Status

type Status struct {
	Enabled           bool      `json:"enabled"`
	Cron              string    `json:"cron,omitempty"`
	MaxKeep           int       `json:"maxKeep"`
	Offsite           bool      `json:"offsite"`
	BackupCount       int       `json:"backupCount"`
	Latest            *FileInfo `json:"latest,omitempty"`
	LatestVerified    bool      `json:"latestVerified"`
	VerificationError string    `json:"verificationError,omitempty"`
}

Jump to

Keyboard shortcuts

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