Skip to content

Add optional forced full backup interval #34

@shubham-pampattiwar

Description

@shubham-pampattiwar

Problem

Incremental backup chains can grow unbounded. A long chain of incrementals means:

  • Slower restores - every incremental in the chain must be downloaded and applied in sequence to reconstruct the disk
  • Larger blast radius - if any single incremental in the chain is corrupted or missing, all subsequent backups in that chain become unrestorable
  • Growing S3 storage - dirty blocks accumulate across many incrementals, potentially approaching the size of a full backup anyway

Currently we support forcing a full backup via the kubevirt-datamover.io/force-full-backup annotation on a DataUpload, or automatically when the checkpoint chain is broken/stale. But there's no way to configure an automatic interval where a full backup is periodically forced (e.g. "every 7 backups" or "every 7 days").

Proposed Fix

Add an optional configuration to force a full backup after N incremental backups in a chain. When the threshold is reached, the controller automatically sets ForceFullBackup=true on the VMB, starting a new chain.

Configuration

TBD - options to consider:

  • Annotation or label on the Velero Schedule (e.g. kubevirt-datamover.io/force-full-backup-interval: "7")
  • Field in the DPA
  • Annotation on the DataUpload itself

Logic

In resolveBackupMode(), after checking the existing force-full annotation and BSL chain validation:

  1. Look up the VM's checkpoint index from S3
  2. Count consecutive incremental checkpoints since the last full
  3. If count >= configured interval, set forceFullBackup = true

Open questions

  • Should the interval be count-based (every N backups) or time-based (every N days since last full) or both?
  • Where should this configuration live? Per-schedule, per-DPA, or per-DataUpload?
  • Should there be a default interval, or is it purely opt-in?

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions