Skip to content

backube/snapscheduler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

SnapScheduler

Build Status Go Report Card codecov

SnapScheduler provides scheduled snapshots for Kubernetes CSI-based volumes.

Quickstart

Install:

$ helm repo add backube https://backube.github.io/helm-charts/
"backube" has been added to your repositories

$ kubectl create namespace backube-snapscheduler
namespace/backube-snapscheduler created

$ helm install -n backube-snapscheduler snapscheduler backube/snapscheduler
NAME: snapscheduler
LAST DEPLOYED: Mon Jul  6 15:16:41 2020
NAMESPACE: backube-snapscheduler
STATUS: deployed
...

Keep 6 hourly snapshots of all PVCs in mynamespace:

$ kubectl -n mynamespace apply -f - <<EOF
apiVersion: snapscheduler.backube/v1
kind: SnapshotSchedule
metadata:
  name: hourly
spec:
  retention:
    maxCount: 6
  schedule: "0 * * * *"
EOF

snapshotschedule.snapscheduler.backube/hourly created

In this example, there is 1 PVC in the namespace, named data:

$ kubectl -n mynamespace get pvc
NAME   STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS      AGE
data   Bound    pvc-c2e044ab-1b24-496a-9569-85f009892ccf   1Gi        RWO            csi-hostpath-sc   9s

At the top of each hour, a snapshot of that volume will be automatically created:

$ kubectl -n mynamespace get volumesnapshots
NAME                       AGE
data-hourly-202007061600   82m
data-hourly-202007061700   22m

More information

Interested in giving it a try? Check out the docs.

The operator can be installed from:

Other helpful links:

Licensing

This project is licensed under the GNU AGPL 3.0 License with the following exceptions: