Making a backup of your Persistent Volumes in GKE
/ 1 min read
There is a recommended way for doing this, but it’s not applicable for my case. Apparently the PV for my Bitnami Moodle cluster was provisioned with an in-tree persistent disk driver which does not support snapshots.
I can’t afford a service disruption at this point in time so I’m using the trusted
cp tool instead.
The official approach
Using GKE’s volume snapshot feature
Create a VolumeSnapshotClass object to specify the CSI driver and deletionPolicy for your volume snapshots
Create a VolumeSnapshot object — a request to GKE to create a snapshot of an existing PersistentVolumeClaim object
Confirm that GKE created the VolumeSnapshotContents object
If empty - check GKE logs (filter for Warnings)
Of course that doesn’t work for me so I stopped here.
The cop-out solution
Using the plain old