Skip to content

OADP Qcow2 incremental backup workflow

Wesley Hayutin edited this page Jan 15, 2026 · 56 revisions

OADP glues the VirtualMachineBackup together.

Initial Configuration

OADP Config:

  • kubevirt-datamover plugin enabled. vconfiguration.velero.defaultPlugins.
  • ConfigMap w/ VolumePolicy created w/
    • policy: kubevirt, Not: skip, backup or fsbackup. With volume matching to the VM w/ label
    • kubevirt = skip in the volume policy

KubeVirt Config:

OADP / KubeVirt VirtualMachineBackupo / Qcow2 snapshot

sequenceDiagram
    autonumber
    participant Velero as OADP_Velero
    participant Plugin as KV_DataMover_Plugin
    participant API as K8s_API
    participant Controller as DataMover_Controller
    participant KubeVirt as KubeVirt_System
    participant S3 as S3_Storage

    Note over Velero, S3: **1. Initiation**
    Velero->>API: Create Backup CR
    Velero->>Plugin: Execute Plugin (per VM instance)
    Plugin->>Plugin: Check Prerequisites<br/>(VolumePolicy match, PVC exists)
    Plugin->>API: Create DataUpload CR<br/>(spec: datamover=kubevirt)

    Note over Velero, S3: **2. Preparation**
    API-->>Controller: Watch Event: New DataUpload CR
    Controller->>S3: Get latestCheckpoint (if incremental)
    S3-->>Controller: Return Checkpoint Info (or nil)
    Controller->>API: Create Temp PVC (OADP_VMB_TEMP)
    API-->>Controller: PVC Ready
    Controller->>API: Create VirtualMachineBackup (VMB) CR<br/>(Ref: Temp PVC, latestCheckpoint)
     Controller->>API: Validate or Create new VirtualMachineBackupTracker (VMBT)

    Note over Velero, S3: **3. Execution (KubeVirt)**
    API-->>KubeVirt: Watch Event: New VMB CR
    KubeVirt->>KubeVirt: Execute VMB Backup (Push Mode)<br/>Writes qcow2/delta to OADP_VMB_TEMP
    KubeVirt->>API: Update VMB Status: Ready/Complete

    Note over Velero, S3: **4. Data Movement**
    API-->>Controller: Watch Event: VMB Complete
    Controller->>Controller: Create DM pod and mount OADP_VMB_TEMP
    Controller->>S3: Upload Backup Data<br/>(qcow2 snapshot/delta)
    Controller->>S3: Upload Metadata<br/>(VMB CR, Tracker JSON)
    Controller->>S3: Update latestCheckpoint
    Controller->>Controller: Unmount OADP_VMB_TEMP

    Note over Velero, S3: **5. Cleanup**
    Controller->>API: Delete VMB CR
    Controller->>API: Delete Temp PVC (OADP_VMB_TEMP)
    Controller->>API: Update DataUpload Status: Completed
    API-->>Plugin: DataUpload Completed
    Plugin->>Velero: Plugin Execution Success
Loading

Steps from the above workflow in a list

  • Flow:
    • Velero creates a Backup CR.
    • Plugin checks prerequisites (VolumePolicy, PVC match).
    • Plugin creates DataUpload CR.
  • Preparation:
    • DM_Controller watches DataUpload.
    • DM_Controller creates a temporary PVC (OADP_VMB_TEMP).
    • DM_Controller creates VirtualMachineBackup (VMB) CR, pointing to the temp PVC and referencing the latestCheckpoint from s3 if incremental.
    • DM_Controller creates VirtualMachineBackupTracker (VMBT), if an existing VMBT for the same VM does not exist
  • Execution (KubeVirt):
    • KubeVirt system executes the VMB (Push mode) into OADP_VMB_TEMP.
    • KubeVirt updates VMB status to "Ready/Complete".
    • Data Movement:
      • DM_Controller detects VMB completion.
      • DM_Controller mounts OADP_VMB_TEMP.
      • DM_Controller uploads data to S3:
        • qcow2 snapshot / delta.
        • VMB CR metadata / Tracker JSON.
        • DM_Controller updates latestCheckpoint in S3 for future incrementals.
  • Cleanup:
    • Resources (VMB, temp PVC) are cleaned up.
    • DataUpload status updated to Completed.

Possible enhancements

  • add a label / annotation to the du/dd w/ the datamover type so customers can sort by kubevirt, in extended oc get du/dd
  • dataupload needs to reference the vm it needs to connect to.

Task breakdown

  • Velero upstream changes (Allowing users to set volume policy actions other than velero-supported ones)
  • Plugin work
    • Async BIA which creates DU
    • DeleteItemAction to handle cleanup on backup deletion
  • Controller work
    • Detailed design for s3 usage
      • custom prefix, parallel to BSL-specified prefix
      • full API spec for json files which map the list qcow2 snapshots to VM+backup, with the checkpoint ID for each, etc.)
    • Basic controller impl
    • datamover pod/uploader actions
  • Restore work
    • RIA (if needed)
    • controller work

Task breakdown ( Gantt )

gantt
    title OADP Qcow2 Incremental Backup Task Breakdown
    dateFormat  YYYY-MM-DD
    axisFormat  %m-%d

    section Velero Upstream
    Velero Upstream Changes (Policy Actions)       :upstream, 2026-01-20, 10d

    section Plugin Work / Controller Design
    Async BIA which creates DU                     :bia, 2026-01-20, 10d
    Detailed Design (S3 Usage & API Spec)          :design, 2026-01-20, 5d
    Add Checksums to files                         :checksum, after design, 5d
    DeleteItemAction (Cleanup)                     :cleanup, after bia,  5d
    RIA plugin for VMB/VMBT to discard on restore  :ria, after bia,  5d

    section Controller Work
    Basic Controller Impl                          :ctrl_basic, after design, 15d
    DataMover Pod/Uploader Actions                 :dm_actions, after ctrl_basic, 10d
    DPA updates                                    :dpa_updates, after ctrl_basic, 5d
    Quay builds, makefile, etc                     :builds, after ctrl_basic, 5d

    section Restore Work
    Restore Work (RIA & Controller)                :restore, after dm_actions, 15d
Loading

New git repos

github issues and work board

background info for OADP team

RESTORE: Scott has this :)

Clone this wiki locally