Documentation
¶
Index ¶
- type Backup
- type BackupConfig
- type Manager
- func (bm *Manager) CleanupOldBackups(retentionDays int) error
- func (bm *Manager) CreateBackup(config *BackupConfig) (*Backup, error)
- func (bm *Manager) DeleteBackup(id string) error
- func (bm *Manager) GetBackup(id string) (*Backup, error)
- func (bm *Manager) ListBackups() []*Backup
- func (bm *Manager) ListScheduledBackups() ([]*BackupConfig, error)
- func (bm *Manager) RestoreBackup(backupID, destination string) error
- func (bm *Manager) ScheduleBackup(config *BackupConfig) error
- func (bm *Manager) StartBackup(backupID string, config *BackupConfig) error
- type RestorePoint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backup ¶
type Backup struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"` // "full", "incremental", "differential"
Status string `json:"status"` // "pending", "running", "completed", "failed"
CreatedAt time.Time `json:"created_at"`
StartedAt time.Time `json:"started_at,omitempty"`
CompletedAt time.Time `json:"completed_at,omitempty"`
Size int64 `json:"size"`
FileCount int `json:"file_count"`
FilePath string `json:"file_path"`
Metadata map[string]interface{} `json:"metadata"`
Error string `json:"error,omitempty"`
}
Backup represents a backup operation
type BackupConfig ¶
type BackupConfig struct {
Name string `json:"name"`
Type string `json:"type"`
Schedule string `json:"schedule"` // cron expression
Retention int `json:"retention"` // days
Compression bool `json:"compression"`
Encryption bool `json:"encryption"`
Include []string `json:"include"`
Exclude []string `json:"exclude"`
Destination string `json:"destination"`
Options map[string]string `json:"options"`
}
BackupConfig represents backup configuration
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages backup and recovery operations
func (*Manager) CleanupOldBackups ¶
CleanupOldBackups removes old backups based on retention policy
func (*Manager) CreateBackup ¶
func (bm *Manager) CreateBackup(config *BackupConfig) (*Backup, error)
CreateBackup creates a new backup
func (*Manager) DeleteBackup ¶
DeleteBackup deletes a backup
func (*Manager) ListBackups ¶
ListBackups returns all backups
func (*Manager) ListScheduledBackups ¶
func (bm *Manager) ListScheduledBackups() ([]*BackupConfig, error)
ListScheduledBackups returns all scheduled backups
func (*Manager) RestoreBackup ¶
RestoreBackup restores from a backup
func (*Manager) ScheduleBackup ¶
func (bm *Manager) ScheduleBackup(config *BackupConfig) error
ScheduleBackup schedules a backup
func (*Manager) StartBackup ¶
func (bm *Manager) StartBackup(backupID string, config *BackupConfig) error
StartBackup starts a backup operation
type RestorePoint ¶
type RestorePoint struct {
ID string `json:"id"`
BackupID string `json:"backup_id"`
Name string `json:"name"`
CreatedAt time.Time `json:"created_at"`
Size int64 `json:"size"`
FileCount int `json:"file_count"`
Description string `json:"description"`
}
RestorePoint represents a restore point
Click to show internal directories.
Click to hide internal directories.