Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteBackup ¶
DeleteBackup removes a backup archive.
func PruneBackups ¶ added in v0.8.2
PruneBackups keeps only the most recent maxKeep backups, deleting older ones.
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.
Click to show internal directories.
Click to hide internal directories.