decoder-leco / plateforme

La plateforme de Data Engineering Décoder l'éco
0 stars 0 forks source link

backup/restore jupyterhub #8

Open Jean-Baptiste-Lasselle opened 5 months ago

Jean-Baptiste-Lasselle commented 5 months ago

IT is possible to find out exactly which minio bucket is matching which user:

pierre@first-test-vm:~$ kubectl -n decoderleco get pvc
NAME            STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   VOLUMEATTRIBUTESCLASS   AGE
claim-jbadmin   Bound    pvc-66843be8-55d5-472f-a2d1-f02b877f8eb9   2Gi        RWO            csi-s3         <unset>                 59m
claim-pierre    Bound    pvc-a067b982-2c34-443a-bf04-462a82646ddf   2Gi        RWO            csi-s3         <unset>                 7m17s
hub-db-dir      Bound    pvc-c6006ac9-0212-4668-a571-7e46ddb0830d   1Gi        RWO            standard       <unset>                 8m19s

This means that to restore a given user's data after a teraform destroy, i need to be able to force a given pvc to create a persistent volue from a given snapshot, and to use csi volume snapshotter. I think i'm right there.

If this works, then i would need to keep track a a database matching users and their volume snapshot

So well this issue is about bringing a full backup restore automation to the jupyterhub part of the platform.

Jean-Baptiste-Lasselle commented 5 months ago

First tooling stack i'm gonna try out is k8up + restic (note: wrestic was merged into k8up some time ago) :