Rook: How to backup PVs and PVCs?

Created on 21 May 2019  路  4Comments  路  Source: rook/rook

I set up Rook-Ceph with CSI.
I can create and restore VolumeSnapshots like described in the docs https://rook.io/docs/rook/v1.0/ceph-csi-drivers.html.

What is the preferred way to make a backup of the snapshots?

In https://kubernetes.io/blog/2018/10/09/introducing-volume-snapshot-alpha-for-kubernetes/ under "Importing an existing snapshot with Kubernetes" a procedure is described. Does that mean I would need to save all SnapShot Handles from every VolumeSnapshotContent and manually

  • Import all rbd snap images I exported
  • Create VolumeSnapshotContent and VolumeSnapshot resources for every rbd snap?

That doesn't sound feasible given the number of PVCs in our infrastructure. How do you do it?

All these questions assume that I have to completely set up the cluster from the start and all API objects are gone.

ceph question

Most helpful comment

For a Kubernetes "native way" most people use either https://github.com/appscode/stash or https://github.com/heptio/velero.

You can also use Ceph native tools like rbd export, http://backy2.com/, etc.

All 4 comments

No one? I mean, isn't the most important thing when working with data the backup procedure? What do you do, when your cluster dies for some reason? How do you restore your data?

For a Kubernetes "native way" most people use either https://github.com/appscode/stash or https://github.com/heptio/velero.

You can also use Ceph native tools like rbd export, http://backy2.com/, etc.

Closing as the question itself has been answered from my perspective.

To note, with Ceph CSI there is the possibility to do snapshots of volumes when certain "requirements" are met (e.g., Ceph version and others).

Was this page helpful?
0 / 5 - 0 ratings