Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaovilai/c9f15c725dd2b49d12501de340710cbc to your computer and use it in GitHub Desktop.
Save kaovilai/c9f15c725dd2b49d12501de340710cbc to your computer and use it in GitHub Desktop.

When creating backup

  • TODO:

When restoring During volumesnapshots.snapshot.storage.k8s.io restoreItemAction when VOLUME_SNAPSHOT_MOVER Env is true We wait for VolumeSnapshot.spec.Source.PersistentVolumeClaimName to be populated

  • this is populated by volsync I think. We get VolumeSnapshotRestoreList using restoreName, PVC.Name.
  • The list option used to get this list is
      VSRListOptions := client.MatchingLabels(map[string]string{
      		velerov1api.RestoreNameLabel: restoreName,
      		PersistentVolumeClaimLabel:   PVCName,
      	})
  • When this list is returned, we assume the first volumeSnapshotRestore in the list is the one meant for this restore.
			if len(vsrList.Items) > 0 {
				snapHandle = vsrList.Items[0].Status.SnapshotHandle
			} else {
  • If more than one VSR in the cluster has this label (failed cleanup etc.), we're screwed.

Restore issue workarounds

  • Try restore using different name
  • Try removing VolumeSnapshotRestore objects in the cluster prior to creating a new restore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment