{"id":13742033,"url":"https://github.com/bpineau/katafygio","last_synced_at":"2025-04-06T19:10:59.707Z","repository":{"id":44463143,"uuid":"126734908","full_name":"bpineau/katafygio","owner":"bpineau","description":"Dump, or continuously backup Kubernetes objets as yaml files in git","archived":false,"fork":false,"pushed_at":"2023-12-15T07:26:02.000Z","size":364,"stargazers_count":190,"open_issues_count":9,"forks_count":27,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-02-15T12:32:43.963Z","etag":null,"topics":["backups","git","kubernetes","yaml"],"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/bpineau.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-03-25T19:59:57.000Z","updated_at":"2024-01-21T03:08:00.000Z","dependencies_parsed_at":"2024-01-13T12:52:33.736Z","dependency_job_id":"91f9efae-3670-46b5-94ea-49e98e1d6e8e","html_url":"https://github.com/bpineau/katafygio","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpineau%2Fkatafygio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpineau%2Fkatafygio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpineau%2Fkatafygio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpineau%2Fkatafygio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bpineau","download_url":"https://codeload.github.com/bpineau/katafygio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247535516,"owners_count":20954576,"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":["backups","git","kubernetes","yaml"],"created_at":"2024-08-03T04:01:05.618Z","updated_at":"2025-04-06T19:10:59.686Z","avatar_url":"https://github.com/bpineau.png","language":"Go","funding_links":[],"categories":["Tools and Libraries"],"sub_categories":["Backup and Restore"],"readme":"# katafygio\n\n[![Build Status](https://github.com/bpineau/katafygio/workflows/CI/badge.svg)](https://github.com/bpineau/katafygio/actions)\n[![Coverage Status](https://coveralls.io/repos/github/bpineau/katafygio/badge.svg?branch=master)](https://coveralls.io/github/bpineau/katafygio?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/bpineau/katafygio)](https://goreportcard.com/report/github.com/bpineau/katafygio)\n\n**katafygio** discovers Kubernetes objects (deployments, services, ...),\nand continuously save them as yaml files in a git repository.\nThis provides real time, continuous backups, and keeps detailled changes history.\n\n## Usage\n\nTo dump the cluster content once and exit:\n```bash\nkatafygio --no-git --dump-only --local-dir /tmp/clusterdump/\n```\n\nTo create a local git repository and continuously save the cluster content:\n```bash\nkatafygio --local-dir /tmp/clusterdump/\n```\n\nTo continuously push changes to a remote git repository:\n```bash\nkatafygio --git-url https://user:token@github.com/myorg/myrepos.git --local-dir /tmp/clusterdump/\n```\n\nFiltering out irrelevant objects (esp. ReplicaSets and Pods) with `-w`, `-x`, `-y`\nand `-z` is useful to keep a concise git history.\n\n```bash\n# Filtering out objects having an owner reference (eg. managed pods or replicasets,\n# from Deployments, Daemonsets etc that we already archive), secrets (confidential),\n# events and nodes (irrelevant), helm secrets/configmap releases, and a configmap\n# named \"leader-elector\" that has low value and is causing commits churn:\n\nkatafygio \\\n  --local-dir /tmp/clusterdump/ \\\n  --git-url https://user:token@github.com/myorg/myrepos.git \\\n  --exclude-having-owner-ref \\\n  --exclude-kind secrets,events,nodes,endpoints \\\n  --exclude-object configmap:kube-system/leader-elector \\\n  --filter 'owner!=helm'\n```\n\nYou can also use the [docker image](https://hub.docker.com/r/bpineau/katafygio/).\n\n## CLI options\n\n```\nBackup Kubernetes cluster as yaml files in a git repository.\n--exclude-kind (-x), --exclude-object (-y) and --exclude-namespaces (-z)\nmay be specified several times, or once with several comma separated values.\n\nUsage:\n  katafygio [flags]\n  katafygio [command]\n\nAvailable Commands:\n  help        Help about any command\n  version     Print the version number\n\nFlags:\n  -s, --api-server string            Kubernetes api-server url\n  -c, --config string                Configuration file (default \"/etc/katafygio/katafygio.yaml\")\n  -q, --context string               Kubernetes configuration context\n  -d, --dry-run                      Dry-run mode: don't store anything\n  -m, --dump-only                    Dump mode: dump everything once and exit\n  -w, --exclude-having-owner-ref     Exclude all objects having an Owner Reference\n  -x, --exclude-kind strings         Ressource kind to exclude. Eg. 'deployment'\n  -z, --exclude-namespaces strings   Namespaces to exclude. Eg. 'temp.*' as regexes. This collects all namespaces and then filters them. Don't use it with the namespace flag.\n  -y, --exclude-object strings       Object to exclude. Eg. 'configmap:kube-system/kube-dns'\n  -l, --filter string                Label selector. Select only objects matching the label\n  -t, --git-timeout duration         Git operations timeout (default 5m0s)\n  -g, --git-url string               Git repository URL\n  -p, --healthcheck-port int         Port for answering healthchecks on /health url\n  -h, --help                         help for katafygio\n  -k, --kube-config string           Kubernetes configuration path\n  -e, --local-dir string             Where to dump yaml files (default \"./kubernetes-backup\")\n  -v, --log-level string             Log level (default \"info\")\n  -o, --log-output string            Log output (default \"stderr\")\n  -r, --log-server string            Log server (if using syslog)\n  -a, --namespace string             Only dump objects from this namespace\n  -n, --no-git                       Don't version with git\n  -i, --resync-interval int          Full resync interval in seconds (0 to disable) (default 900)\n```\n\n## Configuration file and env variables\n\nAll settings can be passed by command line options, or environment variable, or in\n[a yaml configuration file](https://github.com/bpineau/katafygio/blob/master/assets/katafygio.yaml)\nThe environment are the same as command line options, in uppercase, prefixed by \"KF_\", and with underscore instead of dashs. ie.:\n\n```\nexport KF_GIT_URL=https://user:token@github.com/myorg/myrepos.git\nexport KF_LOCAL_DIR=/tmp/clusterdump\nexport KF_LOG_LEVEL=info\nexport KF_EXCLUDE_KIND=\"pod ep rs clusterrole\"\n\n# non-prefixed KUBECONFIG works the same as for kubectl\nexport KUBECONFIG=/tmp/kconfig\n```\n\n## Installation\n\nYou can find pre-built binaries in the [releases](https://github.com/bpineau/katafygio/releases) page,\nready to run on your desktop or in a Kubernetes cluster.\n\nWe also provide a docker image on [docker hub](https://hub.docker.com/r/bpineau/katafygio/)\nand on [quay.io](https://quay.io/bpineau/katafygio).\n\nOn MacOS, you can use the brew formula:\n```bash\nbrew install bpineau/tap/katafygio\n```\n\nYou can also deploy with the provided [helm](https://helm.sh/) chart and/or repository:\n```shell\nhelm repo add katafygio https://bpineau.github.io/katafygio\nhelm repo update\n\nhelm install kube-backups katafygio/katafygio\n```\n\n## See Also\n\n* [Heptio Velero](https://github.com/heptio/velero) does sophisticated clusters backups, including volumes\n* [Stash](https://github.com/appscode/stash) backups volumes\n* [etcd backup operator](https://github.com/coreos/etcd-operator) save etcd dumps (archived project)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbpineau%2Fkatafygio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbpineau%2Fkatafygio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbpineau%2Fkatafygio/lists"}