package backup import "time" // Manifest defines the metadata stored inside the backup zip archive. type Manifest struct { Version string `json:"version"` // Backup format specification version ("1.0") DebTikVersion string `json:"debtik_version"` // DebTik version that created the backup Hostname string `json:"hostname"` // Router hostname at backup time CreatedAt time.Time `json:"created_at"` // Timestamp of backup generation Comment string `json:"comment,omitempty"` // Optional user note or comment Files []FileInfo `json:"files"` // List of files included in the archive } // FileInfo contains metadata for an individual file in the backup. type FileInfo struct { Path string `json:"path"` // Path relative to zip root (e.g. "debtik/metadata.json") Size int64 `json:"size"` // File size in bytes Mode uint32 `json:"mode"` // File permission bits SHA256 string `json:"sha256"` // SHA-256 checksum of file content } // BackupInfo summarizes a stored local backup archive. type BackupInfo struct { Filename string `json:"filename"` Size int64 `json:"size"` ModTime time.Time `json:"mod_time"` DebTikVersion string `json:"debtik_version,omitempty"` Hostname string `json:"hostname,omitempty"` Comment string `json:"comment,omitempty"` } // RestoreResult describes the outcome of a restoration operation. type RestoreResult struct { Success bool `json:"success"` Message string `json:"message"` Manifest *Manifest `json:"manifest,omitempty"` SafetyBackup string `json:"safety_backup,omitempty"` RestoredAt time.Time `json:"restored_at"` }