{"id":13622219,"url":"https://github.com/utkuozdemir/pv-migrate","last_synced_at":"2025-05-14T12:08:58.615Z","repository":{"id":38155211,"uuid":"170209617","full_name":"utkuozdemir/pv-migrate","owner":"utkuozdemir","description":"CLI tool to easily migrate Kubernetes persistent volumes","archived":false,"fork":false,"pushed_at":"2025-04-09T23:46:07.000Z","size":14567,"stargazers_count":1838,"open_issues_count":26,"forks_count":91,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-11T04:57:48.893Z","etag":null,"topics":["kubernetes","migration","persistent-volume-claims","persistent-volumes"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/utkuozdemir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-11T22:02:51.000Z","updated_at":"2025-04-09T23:46:10.000Z","dependencies_parsed_at":"2023-02-19T11:31:02.844Z","dependency_job_id":"681034c5-c600-4d51-abf2-19d1588bd98c","html_url":"https://github.com/utkuozdemir/pv-migrate","commit_stats":{"total_commits":968,"total_committers":21,"mean_commits":"46.095238095238095","dds":0.5743801652892562,"last_synced_commit":"03853fdf5f36fd875fe9cc17c5a8edd80645e43e"},"previous_names":[],"tags_count":61,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utkuozdemir%2Fpv-migrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utkuozdemir%2Fpv-migrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utkuozdemir%2Fpv-migrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utkuozdemir%2Fpv-migrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/utkuozdemir","download_url":"https://codeload.github.com/utkuozdemir/pv-migrate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345273,"owners_count":21088244,"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":["kubernetes","migration","persistent-volume-claims","persistent-volumes"],"created_at":"2024-08-01T21:01:16.062Z","updated_at":"2025-04-11T04:57:58.228Z","avatar_url":"https://github.com/utkuozdemir.png","language":"Go","funding_links":[],"categories":["Go","kubernetes"],"sub_categories":[],"readme":"# pv-migrate\n\n[![build](https://github.com/utkuozdemir/pv-migrate/actions/workflows/build.yml/badge.svg)](https://github.com/utkuozdemir/pv-migrate/actions/workflows/build.yml)\n[![codecov](https://codecov.io/gh/utkuozdemir/pv-migrate/branch/master/graph/badge.svg?token=41ULBTVG7X)](https://codecov.io/gh/utkuozdemir/pv-migrate)\n[![Go Report Card](https://goreportcard.com/badge/github.com/utkuozdemir/pv-migrate)](https://goreportcard.com/report/github.com/utkuozdemir/pv-migrate)\n![Latest GitHub release](https://img.shields.io/github/release/utkuozdemir/pv-migrate.svg)\n[![GitHub license](https://img.shields.io/github/license/utkuozdemir/pv-migrate)](https://github.com/utkuozdemir/pv-migrate/blob/master/LICENSE)\n![GitHub stars](https://img.shields.io/github/stars/utkuozdemir/pv-migrate.svg?label=github%20stars)\n[![GitHub forks](https://img.shields.io/github/forks/utkuozdemir/pv-migrate)](https://github.com/utkuozdemir/pv-migrate/network)\n[![GitHub issues](https://img.shields.io/github/issues/utkuozdemir/pv-migrate)](https://github.com/utkuozdemir/pv-migrate/issues)\n![GitHub all releases](https://img.shields.io/github/downloads/utkuozdemir/pv-migrate/total)\n![Docker Pulls](https://img.shields.io/docker/pulls/utkuozdemir/pv-migrate)\n![SSHD Docker Pulls](https://img.shields.io/docker/pulls/utkuozdemir/pv-migrate-sshd?label=sshd%20-%20docker%20pulls)\n![Rsync Docker Pulls](https://img.shields.io/docker/pulls/utkuozdemir/pv-migrate-rsync?label=rsync%20-%20docker%20pulls)\n\n`pv-migrate` is a CLI tool/kubectl plugin to easily migrate \nthe contents of one Kubernetes `PersistentVolumeClaim` to another.\n\n---\n\n\u003e [!WARNING]\n\u003e I get that it can be frustrating not to hear back about the stuff you've brought up or the changes you've suggested. But honestly, for over a year now, I've hardly had any time to keep up with my personal open-source projects, including this one. I am still committed to keep this tool working and slowly move it forward, but please bear with me if I can't tackle your fixes or check out your code for a while. Thanks for your understanding.\n\n---\n\n## Demo\n\n![pv-migrate demo GIF](img/demo.gif)\n\n## Introduction\n\nOn Kubernetes, if you need to rename a resource (like a `Deployment`) or to move it to a different namespace, \nyou can simply create a copy of its manifest with the new namespace and/or name and apply it.\n\nHowever, it is not as simple with `PersistentVolumeClaim` resources: They are not only metadata,\nbut they also store data in the underlying storage backend.\n\nIn these cases, moving the data stored in the PVC can become a problem, making migrations more difficult.\n\n## Use Cases\n\n:arrow_right: You have a database that has a PersistentVolumeClaim `db-data` of size `50Gi`.  \nYour DB grew over time, and you need more space for it.  \nYou cannot resize the PVC because it doesn't support [volume expansion](https://kubernetes.io/blog/2018/07/12/resizing-persistent-volumes-using-kubernetes/).  \nSimply create a new, bigger PVC `db-data-v2` and use `pv-migrate` to copy data from `db-data` to `db-data-v2`.\n\n\n:arrow_right: You need to move PersistentVolumeClaim `my-pvc`  from namespace `ns-a` to namespace `ns-b`.  \nSimply create the PVC with the same name and manifest in `ns-b` and use `pv-migrate` to copy its content.\n\n\n:arrow_right: You are moving from one cloud provider to another, \nand you need to move the data from one Kubernetes cluster to the other.  \nJust use `pv-migrate` to copy the data **securely over the internet**.\n\n:arrow_right: You need to change the `StorageClass` of a volume, for instance,\nfrom a `ReadWriteOnce` one like `local-path`) to a `ReadWriteMany` like NFS.\nAs the `storageClass` is not editable, you can use `pv-migrate` to transfer\nthe data from the old PVC to the new one with the desired StorageClass.\n\n## Highlights\n\n- Supports in-namespace, in-cluster as well as cross-cluster migrations\n- Uses rsync over SSH with a freshly generated [Ed25519](https://en.wikipedia.org/wiki/EdDSA) \n  or RSA keys each time to securely migrate the files\n- Allows full customization of the manifests (e.g. specifying your own docker images for rsync and sshd, configuring affinity etc.)\n- Supports multiple migration strategies to do the migration efficiently and fallback to other strategies when needed\n- Customizable strategy order\n- Supports arm32v7 (Raspberry Pi etc.) and arm64 architectures as well as amd64\n- Supports completion for popular shells: bash, zsh, fish, powershell\n\n## Installation\n\nSee [INSTALL.md](INSTALL.md) for various installation methods and shell completion configuration.\n\n## Usage\n\nSee [USAGE.md](USAGE.md) for the CLI reference and examples.\n\n\n# Star History\n\n\u003ca href=\"https://star-history.com/#utkuozdemir/pv-migrate\u0026Date\"\u003e\n \u003cpicture\u003e\n   \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=utkuozdemir/pv-migrate\u0026type=Date\u0026theme=dark\" /\u003e\n   \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=utkuozdemir/pv-migrate\u0026type=Date\" /\u003e\n   \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=utkuozdemir/pv-migrate\u0026type=Date\" /\u003e\n \u003c/picture\u003e\n\u003c/a\u003e\n\n# Contributing\n\nSee [CONTRIBUTING](CONTRIBUTING.md) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futkuozdemir%2Fpv-migrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Futkuozdemir%2Fpv-migrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futkuozdemir%2Fpv-migrate/lists"}