Documentation
¶
Index ¶
- Constants
- type BackupInfo
- type Manager
- func (m *Manager) BackupAllVolumes(cfg *config.Config) ([]BackupInfo, error)
- func (m *Manager) BackupVolume(volumeName string) (*BackupInfo, error)
- func (m *Manager) CleanupOldBackups(retentionDays int) (int, error)
- func (m *Manager) DeleteBackup(volumeName, backupID string) error
- func (m *Manager) ListBackups(volumeName string) ([]BackupInfo, error)
- func (m *Manager) RestoreVolume(volumeName, backupID string) error
- func (m *Manager) ScheduleBackup(schedule string, volumeName string) error
Constants ¶
View Source
const ( // BackupDir is the directory where backups are stored on the server BackupDir = "/var/lib/tako/backups" // DefaultRetention is the default number of days to keep backups DefaultRetention = 7 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupInfo ¶
type BackupInfo struct {
ID string `json:"id"`
Service string `json:"service"`
Volume string `json:"volume"`
Size int64 `json:"size"`
CreatedAt time.Time `json:"created_at"`
Path string `json:"path"`
Compression string `json:"compression"`
}
BackupInfo contains metadata about a backup
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles volume backup and restore operations
func NewManager ¶
NewManager creates a new backup manager
func (*Manager) BackupAllVolumes ¶
func (m *Manager) BackupAllVolumes(cfg *config.Config) ([]BackupInfo, error)
BackupAllVolumes backs up all volumes for the project
func (*Manager) BackupVolume ¶
func (m *Manager) BackupVolume(volumeName string) (*BackupInfo, error)
BackupVolume creates a backup of a Docker volume
func (*Manager) CleanupOldBackups ¶
CleanupOldBackups removes backups older than retention days
func (*Manager) DeleteBackup ¶
DeleteBackup deletes a specific backup
func (*Manager) ListBackups ¶
func (m *Manager) ListBackups(volumeName string) ([]BackupInfo, error)
ListBackups lists all backups for a volume or all volumes
func (*Manager) RestoreVolume ¶
RestoreVolume restores a volume from a backup
Click to show internal directories.
Click to hide internal directories.