0

I have snapshotting enabled in my k8s cluster, and am able to snapshot my volumes - yet I have not found documentation on how to actually store those snapshots outside the cluster without using a product or specialized deployment to store them elsewhere.

My question - is there a way for me to manually copy volume snapshots at a file/block level and store them outside a k8s cluster, then import them if necessary in a DR scenario? I'd rather be able to export/import snapshot files directly (if possible) than needing to configure additional products and services to pull these elsewhere.

R. StackUser
  • 101
  • 1
  • Does it have to be manual? Would you rather use a 3rd party tool if necessary? – Wytrzymały Wiktor Jan 22 '21 at 10:35
  • I'd rather not use an additional tool, hence the question. For example, if I already backup the host filesystem on one of the nodes with a traditional backup application, would there be a way to only extract a volume snapshot file/block from the backup and restore the pod volume? From what I can tell, k8s wouldn't expose these snapshots on the host filesystem anywhere, but would rather have me deploy another cluster service, such as Velero. – R. StackUser Jan 22 '21 at 20:12

1 Answers1

0

I have analyzed your question and came to the following conclusions.

"is there a way for me to manually copy volume snapshots at a file/block level and store them outside a k8s cluster, then import them if necessary in a DR scenario?"

implies that a volume snapshot is a file, whereas the K8s volume snapshot API is intentionally generic and gives much freedom to CSI implementors. The only thing that is required is that a volume snapshot content be uniquely identified by a handle. Indeed, some CSI drivers may perform snapshotting at the filesystem level, for example democratic-csi which uses ZFS' directory snapshots or ceph-csi which can use CephFS-based snapshots.

It should still be possible to implement some solution that restores a snapshot to a new volume, then archive this into a file but at that point you're basically rolling out your own version of Velero.

So despite the fact that you would rather avoid using some 3rd party tools, it is actually the way to go in your particular use case.

  • But can velero parse a snapshot at file level on a separate server? For example, if I need to pull an old configuration file from a cStor or mayaStor volume, but not the entire container block, would velero be able to do this? Or would I have to restore/clone the backed up object, remount the clone on my cluster (meaning, the object storage for openebs, cstor, and mayastor must be installed), pull the file in question, and then have a process to push it back to the original location? – R. StackUser Feb 01 '21 at 16:38
  • Unfortunately, I am not an expert with Valero and thus cannot address this question. I suggest closing this topic (manual snapshots import/export) as we got it covered and asking another question regarding that particular Valero functionality. That way it would be more clear for the rest of community and also more probable for you to get a satisfactory answer. – Wytrzymały Wiktor Feb 02 '21 at 13:26