Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DailyBackupsRetention = 24 * 2 * 365 * time.Hour
DailyBackupsRetention controls how long daily backups are kept.
View Source
var HourlyBackupsRetention = 24 * 7 * time.Hour
HourlyBackupsRetention controls how long hourly backups are kept.
Functions ¶
Types ¶
type BackupCleanup ¶
type BackupCleanup struct {
// contains filtered or unexported fields
}
BackupCleanup encapsulates the logic around periodically removing old backups
func NewBackupCleanup ¶
func NewBackupCleanup(backupStore backup.Store) *BackupCleanup
NewBackupCleanup constructs a BackupCleanup
func (*BackupCleanup) MaybeDoBackupMaintenance ¶
func (m *BackupCleanup) MaybeDoBackupMaintenance(ctx context.Context) error
MaybeDoBackupMaintenance removes old backups, if a suitable interval has passed. It should be called periodically, after every backup for example.
type BackupController ¶
type BackupController struct {
// contains filtered or unexported fields
}
func NewBackupController ¶
func (*BackupController) Run ¶
func (m *BackupController) Run(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.