backup

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteBackup

func DeleteBackup(archivePath string) error

DeleteBackup removes a backup archive.

func Restore

func Restore(archivePath string, opts BackupOptions) error

Restore extracts a backup archive, replacing existing data.

Types

type BackupInfo

type BackupInfo struct {
	Filename  string    `json:"filename"`
	Path      string    `json:"path"`
	Version   string    `json:"version"`
	CreatedAt time.Time `json:"created_at"`
	Size      int64     `json:"size"`
}

BackupInfo describes a backup archive.

func Create

func Create(opts BackupOptions, version string) (*BackupInfo, error)

Create creates a tar.gz backup archive with ClickHouse data, SQLite, and config.

func ListBackups

func ListBackups(backupDir string) ([]BackupInfo, error)

ListBackups returns backups sorted newest first.

type BackupOptions

type BackupOptions struct {
	DataDir    string // ClickHouse data directory
	SQLitePath string // Path to crawlobserver.db
	ConfigPath string // Path to config.yaml
	BackupDir  string // Where to store backups
}

BackupOptions configures what to include in a backup.

Jump to

Keyboard shortcuts

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