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.
How it works
Section titled “How it works”- For each source, bret reads the
ReplicationSourcenamed bybackupRef. It takes the repository Secret name fromspec.restic.repositoryand checks thatspec.sourcePVCmatches the source. - It creates a plain scratch PVC and a
ReplicationDestinationwith:trigger.manualset to theRestorename, so it runs once,restic.copyMethod: DirectanddestinationPVCset to the scratch PVC,restic.restoreAsOf, when the source has one, to pin the restic snapshot,restic.moverSecurityContextwith the mover UID (see Mover UID).
- When every
ReplicationDestinationreportsstatus.latestImage.kind: PersistentVolumeClaim, it runs the check pod with all scratch PVCs mounted. - On cleanup the operator deletes the
ReplicationDestinationobjects 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.
Next steps
Section titled “Next steps”- Add bret to an existing VolSync setup: the checklist.
- Walkthrough: a WordPress + MariaDB example from install to
RestoreTest. - Limitations: what bret cannot do with VolSync, and fixes.
Install VolSync
Section titled “Install VolSync”Skip this if VolSync already runs. Tested with VolSync 0.17.0 and restic on kind with Kubernetes 1.37:
helm repo add backube https://backube.github.io/helm-charts/helm install volsync backube/volsync --namespace volsync-system --create-namespace