Backing up a user's PVC on GCP

What do folks use to backup a user’s PVC? To a Google storage engine bucket would be fine. I’m needing to experiment with blowing away some user clusters and want to backup and restore user pvc’s…

These are created in the canonical way from the 02jh helm script…

Not even sure how i would construct the name of the PV’s. Am i right in understanding is i mothball a cluster by helm delete it takes thse away. How could I keep them unattached as GCE disks…and is that what i should do.

Or should I be using some Kubernetes based backup service to get the user data of them so I can store it somewhere? What do people do for this? I looked to see discussion on this but am not finding much…

I am also looking to migrate the jupyter hub PVCs to another cluster. i have no solution for this right now at all. i am imagining writing a terrible script that attaches these volumes to a busybox pod and zips up the files slamming them into S3 (i’m in AWS)

restore is just as ugly

While I wouldn’t mind a busybox approach at all, an officially maintained/recommendable script with some safety precautions would be nice. This is really the ugliest part of the deployment cycle right now.

I’ve tried restoring a “broken” ZTJH cluster once, and this volume mapping just makes it near inconceivable to do a proper restore.

We are doing tests now with a backup / cronjob as part of the helm chart to make backups of “local” paths. Depending on your configuration (singleuser storage static/dynamic) or even when adding additional mounts, you can simply provide a collection of backup-configs (basically local paths).

The backup itself is just a filtered tarball uploaded to a bucket.

A restore isn’t yet build but i can imagine we just download and unpack to a _tmp folder from which users can pick their stuff.

Paul