Documentation
¶
Index ¶
- Constants
- func CreateBackupJob(catalog *ducklakev1alpha1.DuckLakeCatalog, backupPath string) (*batchv1.Job, error)
- type BackupManager
- func (m *BackupManager) BackupCatalog(ctx context.Context, catalog *ducklakev1alpha1.DuckLakeCatalog) error
- func (m *BackupManager) CancelBackup(ctx context.Context, catalog *ducklakev1alpha1.DuckLakeCatalog)
- func (m *BackupManager) CleanupOldBackups(ctx context.Context, catalog *ducklakev1alpha1.DuckLakeCatalog) error
- func (m *BackupManager) ScheduleBackup(ctx context.Context, catalog *ducklakev1alpha1.DuckLakeCatalog) error
- func (m *BackupManager) Start(ctx context.Context) error
- func (m *BackupManager) Stop()
- type Manager
- func (m *Manager) CleanupOldBackups(ctx context.Context, catalog *ducklakev1alpha1.DuckLakeCatalog) error
- func (m *Manager) CreateBackupCronJob(catalog *ducklakev1alpha1.DuckLakeCatalog) (*batchv1.CronJob, error)
- func (m *Manager) ListBackups(ctx context.Context, catalog *ducklakev1alpha1.DuckLakeCatalog) ([]types.Object, error)
Constants ¶
View Source
const ( // DefaultBackupRetention is the default number of days to retain backups DefaultBackupRetention = 30 * 24 * time.Hour // DefaultBackupSchedule is the default cron schedule for backups (daily at 2am) DefaultBackupSchedule = "0 2 * * *" )
Variables ¶
This section is empty.
Functions ¶
func CreateBackupJob ¶
func CreateBackupJob(catalog *ducklakev1alpha1.DuckLakeCatalog, backupPath string) (*batchv1.Job, error)
CreateBackupJob creates a job to backup a catalog
Types ¶
type BackupManager ¶
type BackupManager struct {
// contains filtered or unexported fields
}
BackupManager manages catalog backups
func NewBackupManager ¶
func NewBackupManager(client client.Client, s3Client *s3.Client, logger *zerolog.Logger) *BackupManager
NewBackupManager creates a new backup manager
func (*BackupManager) BackupCatalog ¶
func (m *BackupManager) BackupCatalog(ctx context.Context, catalog *ducklakev1alpha1.DuckLakeCatalog) error
BackupCatalog performs a backup of a catalog
func (*BackupManager) CancelBackup ¶
func (m *BackupManager) CancelBackup(ctx context.Context, catalog *ducklakev1alpha1.DuckLakeCatalog)
CancelBackup cancels any scheduled backups for a catalog
func (*BackupManager) CleanupOldBackups ¶
func (m *BackupManager) CleanupOldBackups(ctx context.Context, catalog *ducklakev1alpha1.DuckLakeCatalog) error
CleanupOldBackups removes backups older than retention period
func (*BackupManager) ScheduleBackup ¶
func (m *BackupManager) ScheduleBackup(ctx context.Context, catalog *ducklakev1alpha1.DuckLakeCatalog) error
ScheduleBackup schedules backups for a catalog
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles catalog backup operations
func NewManager ¶
func NewManager(k8sClient kubernetes.Interface, s3Client *s3.Client, podTemplate *config.PodTemplateConfig) *Manager
NewManager creates a new backup manager
func (*Manager) CleanupOldBackups ¶
func (m *Manager) CleanupOldBackups(ctx context.Context, catalog *ducklakev1alpha1.DuckLakeCatalog) error
CleanupOldBackups removes backups older than retention period
func (*Manager) CreateBackupCronJob ¶
func (m *Manager) CreateBackupCronJob(catalog *ducklakev1alpha1.DuckLakeCatalog) (*batchv1.CronJob, error)
CreateBackupCronJob creates or updates a CronJob for catalog backups
func (*Manager) ListBackups ¶
func (m *Manager) ListBackups(ctx context.Context, catalog *ducklakev1alpha1.DuckLakeCatalog) ([]types.Object, error)
ListBackups lists all backups for a catalog
Click to show internal directories.
Click to hide internal directories.