package backup import ( "context" "time" ) // BackupInfo contains metadata about a backup type BackupInfo struct { Host string Source string // "local" or "hetzner" Path string // Full path to backup Timestamp time.Time // Last modified time SizeBytes int64 // Total size HasRoot bool // Has /root backup HasOpt bool // Has /opt backup HasEtc bool // Has /etc backup } // BackupSource defines the interface for backup sources type BackupSource interface { // Name returns the source name Name() string // List returns available backups for a host (or all hosts if empty) List(ctx context.Context, host string) ([]BackupInfo, error) // SyncTo syncs backup data to target VM via rsync over SSH // targetSSH is user@host, sshKeyPath is path to private key SyncTo(ctx context.Context, host string, targetSSH string, sshKeyPath string, dirs []string) error // GetPath returns the base path for a host's backup GetPath(host string) string // Validate checks if backup source is accessible Validate(ctx context.Context) error } // SupportedDirs lists directories that can be restored var SupportedDirs = []string{"root", "opt", "etc"}