Skip to content

VolSync

VolSync backs up one PVC per ReplicationSource with restic. VolSync has no object per backup: bret treats the last sync of a ReplicationSource as its backup. It restores that sync into a scratch PVC with a ReplicationDestination and runs the check against all restored PVCs.

bret restores each ReplicationSource into a scratch PVC with a ReplicationDestination
  1. For each source, bret reads the ReplicationSource named by backupRef. It takes the repository Secret name from spec.restic.repository and checks that spec.sourcePVC matches the source.
  2. It creates a plain scratch PVC and a ReplicationDestination with:
    • trigger.manual set to the Restore name, so it runs once,
    • restic.copyMethod: Direct and destinationPVC set to the scratch PVC,
    • restic.restoreAsOf, when the source has one, to pin the restic snapshot,
    • restic.moverSecurityContext with the mover UID (see Mover UID).
  3. When every ReplicationDestination reports status.latestImage.kind: PersistentVolumeClaim, it runs the check pod with all scratch PVCs mounted.
  4. On cleanup the operator deletes the ReplicationDestination objects and the scratch PVCs.

A RestoreTest pins every run: each Restore source gets restoreAsOf set to the lastSyncTime it picked. A sync that lands during the run does not change what is tested.

Skip this if VolSync already runs. Tested with VolSync 0.17.0 and restic on kind with Kubernetes 1.37:

Terminal window
helm repo add backube https://backube.github.io/helm-charts/
helm install volsync backube/volsync --namespace volsync-system --create-namespace