backup

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxArchiveBytes int64 = 512 * 1024 * 1024
)

Variables

View Source
var ErrSQLiteOnly = errors.New("fonction backup disponible uniquement en mode sqlite")

Functions

func ApplyPendingRestore

func ApplyPendingRestore(dataDir, dbType string) error

Types

type BackupInfo

type BackupInfo struct {
	Name         string    `json:"name"`
	SizeBytes    int64     `json:"size_bytes"`
	CreatedAt    time.Time `json:"created_at"`
	Reason       string    `json:"reason"`
	Source       string    `json:"source"`
	DisplayLabel string    `json:"display_label"`
	IsLegacyName bool      `json:"is_legacy_name"`
}

type Service

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

func NewService

func NewService(dataDir string, db *database.DB) *Service

func (*Service) ApplyRetention

func (s *Service) ApplyRetention(keep int) error

func (*Service) BackupPath

func (s *Service) BackupPath(name string) (string, error)

func (*Service) CreateBackup

func (s *Service) CreateBackup(reason string) (BackupInfo, error)

func (*Service) DeleteBackup

func (s *Service) DeleteBackup(name string) error

func (*Service) ImportBackup

func (s *Service) ImportBackup(filename string, r io.Reader) (BackupInfo, error)

func (*Service) ListBackups

func (s *Service) ListBackups() ([]BackupInfo, error)

func (*Service) PrepareRestore

func (s *Service) PrepareRestore(name string) error

func (*Service) RestorePostgresBackup

func (s *Service) RestorePostgresBackup(name string) error

func (*Service) SetNotifier

func (s *Service) SetNotifier(n *notify.Notifier)

func (*Service) StartScheduler

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

func (*Service) SupportsSQLiteArchive

func (s *Service) SupportsSQLiteArchive() bool

Jump to

Keyboard shortcuts

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