{"id":16540963,"url":"https://github.com/linki/snapshot-controller","last_synced_at":"2025-10-28T14:31:59.830Z","repository":{"id":57586030,"uuid":"78365513","full_name":"linki/snapshot-controller","owner":"linki","description":"Snapshot Controller snapshots the GCE Persistent Disks that are backing your Kubernetes Persistent Volumes. (Deprecated: use https://github.com/heptio/ark instead)","archived":false,"fork":false,"pushed_at":"2017-01-16T23:11:56.000Z","size":15185,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-07-30T18:52:39.618Z","etag":null,"topics":["backup","go","google-cloud","kubernetes","persistent-storage","snapshot"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-08T19:28:52.000Z","updated_at":"2022-12-07T23:11:03.000Z","dependencies_parsed_at":"2022-09-12T10:41:46.595Z","dependency_job_id":null,"html_url":"https://github.com/linki/snapshot-controller","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linki%2Fsnapshot-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linki%2Fsnapshot-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linki%2Fsnapshot-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linki%2Fsnapshot-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linki","download_url":"https://codeload.github.com/linki/snapshot-controller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219859399,"owners_count":16556036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","go","google-cloud","kubernetes","persistent-storage","snapshot"],"created_at":"2024-10-11T18:53:44.565Z","updated_at":"2025-10-28T14:31:49.822Z","avatar_url":"https://github.com/linki.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# snapshot-controller\n\n`snapshot-controller` snapshots the GCE Persistent Disks that are backing your\nKubernetes Persistent Volumes.\n\n# Purpose\n\nKubernetes has the concept of Persistent Volumes which is an abstraction over\nsome form of persistent storage in the environment that Kubernetes runs in. Two\nof the most popular implementations of Persistent Volumes are GCE Persistent\nDisks and AWS EBS volumes. Both of them have the ability to be snapshotted while\nthey are attached to a node.\n\n`snapshot-controller` runs in your cluster that finds any Persistent\nVolumesbacked by GCE Persistent Disks and regularly takes a snapshot of them.\n\n# Usage\n\n```\n$ go get -u github.com/linki/snapshot-controller\n$ kubectl proxy \u0026\n$ snapshot-controller --project=some-project --zone=europe-west1-d --interval=1h\nINFO[0000] Found the following Kubernetes Persistent Volumes:\nINFO[0000]   gke-somename-29c0222a--pvc-01d45471-c249-11e6-a767-42010a8400d7\n...\nINFO[0001] Found the following Google Cloud Engine Persistent Disks:\nINFO[0001]   gke-somename-29c0222a--pvc-01d45471-c249-11e6-a767-42010a8400d7\n...\nINFO[0002] Found the following Google Cloud Engine Snapshots:\nINFO[0002]   gke-somename-29c0222a--pvc-01d45471-c249-11e6-a767-42010a8-1b4m (for: gke-somename-29c0222a--pvc-01d45471-c249-11e6-a767-42010a8400d7)\nINFO[0002]   gke-somename-29c0222a--pvc-01d45471-c249-11e6-a767-42010a8-1wus (for: gke-somename-29c0222a--pvc-01d45471-c249-11e6-a767-42010a8400d7)\n...\nINFO[0002] Going to create the following snapshots:\nINFO[0002]   gke-somename-29c0222a--pvc-01d45471-c249-11e6-a767-42010a8400d7 -\u003e gke-somename-29c0222a--pvc-01d45471-c249-11e6-a767-42010a8-onjf\n...\nINFO[0042] Going to delete the following expired snapshots:\nINFO[0042]   gke-somename-29c0222a--pvc-01d45471-c249-11e6-a767-42010a8-9okp\n...\nINFO[0050] Sleeping for 1h0m0s...\n```\n\nIf you're running inside the same Kubernetes cluster as the PVs you want to\nsnapshot, you can use the `--in-cluster` flag instead of using `kubectl proxy`.\n\nSee [snapshot-controller.yml](snapshot-controller.yml) for an example Deployment\nmanifest.\n\n# Caveats\n\nThis is a very early state and there are many things that need improvement:\n\n* Limited to a GKE cluster (a custom deployed cluster on GCE should also work)\n* Limited to a single zone (disks in other zones won't be found)\n* Runs, takes snapshots, sleeps. It will do this on every restart of the\n  process.\n* Takes a snapshots at any time, regardless how your disk is used at that time.\n\n# Related Work\n\n[k8s-snapshots](https://github.com/miracle2k/k8s-snapshots/tree/v0.1) by\n[miracle2k](https://github.com/miracle2k) is a similar project implemented in\nPython and started about the same time as this project. It looks for annotations\non Persistent Volumes and snapshots them. It supports a quite sophisticated\nbackup retention policy and also removes old snapshots. Limited to GCE\nPersistent Disks as is this tool.\n\n[volume-snapshotting.md](https://github.com/kubernetes/kubernetes/blob/v1.5.1/docs/design/volume-snapshotting.md)\nby [Cindy Wang](https://github.com/ciwang) is a design doc for standardizing\nvolume backups and restores for a Kubernetes cluster. It's based on the same\nidea of using the cloud provider's disk snapshot abilities and goes into much\nmore detail on how this can be done in a safe way and integrated into the\nKubernetes API. It also describes how restores from those snapshots can work.\nSomething that this tool doesn't even consider.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinki%2Fsnapshot-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinki%2Fsnapshot-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinki%2Fsnapshot-controller/lists"}