MCPcopy Index your code
hub / github.com/backube/snapscheduler

github.com/backube/snapscheduler @v3.5.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.5.0 ↗ · + Follow
44 symbols 145 edges 9 files 32 documented · 73% updated 8d agov3.5.0 · 2025-05-14★ 32420 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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:

Core symbols most depended-on inside this repo

updateNextSnapTime
called by 6
internal/controller/snapshotschedule_controller.go
getExpirationTime
called by 5
internal/controller/snapshots_expire.go
expireByTime
called by 4
internal/controller/snapshots_expire.go
deleteSnapshots
called by 4
internal/controller/snapshots_expire.go
snapshotsFromSchedule
called by 4
internal/controller/snapshots_expire.go
listPVCsMatchingSelector
called by 4
internal/controller/snapshotschedule_controller.go
expireByCount
called by 3
internal/controller/snapshots_expire.go
sortSnapsByTime
called by 3
internal/controller/snapshots_expire.go

Shape

Function 21
Method 16
Struct 7

Languages

Go100%

Modules by API surface

api/v1/zz_generated.deepcopy.go14 symbols
internal/controller/snapshotschedule_controller.go11 symbols
internal/controller/snapshots_expire.go8 symbols
api/v1/snapshotschedule_types.go7 symbols
cmd/main.go2 symbols
internal/controller/suite_test.go1 symbols
internal/controller/snapshotschedule_test.go1 symbols

For agents

$ claude mcp add snapscheduler \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact