backup

package
v0.0.0-...-85855aa Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup

type Backup struct {
	Config   *Config
	Metadata BackupMetadata
}

func (*Backup) CleanOld

func (r *Backup) CleanOld(retentionDays int) error

func (*Backup) Create

func (b *Backup) Create() error

func (*Backup) List

func (r *Backup) List() ([]string, error)

func (*Backup) Restore

func (r *Backup) Restore(backupPath string) error

type BackupMetadata

type BackupMetadata struct {
	Timestamp     time.Time `json:"timestamp"`
	Hostname      string    `json:"hostname"`
	OS            string    `json:"os"`
	PolkitVersion string    `json:"polkit_version"`
	FilesCount    int       `json:"files_count"`
	TotalSize     int64     `json:"total_size"`
}

type Config

type Config struct {
	Paths         []string `json:"paths"`
	Compress      bool     `json:"compress"`
	IncludeMeta   bool     `json:"include_meta"`
	OutputPath    string   `json:"output_path"`
	BackupDir     string   `json:"backup_dir"`
	RetentionDays int      `json:"retention_days"`
}

func NewConfig

func NewConfig() *Config

Jump to

Keyboard shortcuts

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