backup

package
v0.0.0-...-380da73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

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

func (*BackupManager) Start

func (m *BackupManager) Start(ctx context.Context) error

Start starts the backup manager

func (*BackupManager) Stop

func (m *BackupManager) Stop()

Stop stops the backup manager

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL