Giter Club home page Giter Club logo

pv-migrate's Introduction

pv-migrate

build codecov Go Report Card Latest GitHub release GitHub license GitHub stars GitHub forks GitHub issues GitHub all releases Docker Pulls SSHD Docker Pulls Rsync Docker Pulls

pv-migrate is a CLI tool/kubectl plugin to easily migrate the contents of one Kubernetes PersistentVolumeClaim to another.

Demo

pv-migrate demo GIF

Introduction

On Kubernetes, if you need to rename a resource (like a Deployment) or to move it to a different namespace, you can simply create a copy of its manifest with the new namespace and/or name and apply it.

However, it is not as simple with PersistentVolumeClaim resources: They are not only metadata, but they also store data in the underlying storage backend.

In these cases, moving the data stored in the PVC can become a problem, making migrations more difficult.

Use Cases

➡️ You have a database that has a PersistentVolumeClaim db-data of size 50Gi.
Your DB grew over time, and you need more space for it.
You cannot resize the PVC because it doesn't support volume expansion.
Simply create a new, bigger PVC db-data-v2 and use pv-migrate to copy data from db-data to db-data-v2.

➡️ You need to move PersistentVolumeClaim my-pvc from namespace ns-a to namespace ns-b.
Simply create the PVC with the same name and manifest in ns-b and use pv-migrate to copy its content.

➡️ You are moving from one cloud provider to another, and you need to move the data from one Kubernetes cluster to the other.
Just use pv-migrate to copy the data securely over the internet.

Highlights

  • Supports in-namespace, in-cluster as well as cross-cluster migrations
  • Uses rsync over SSH with a freshly generated Ed25519 or RSA keys each time to securely migrate the files
  • Allows full customization of the manifests (e.g. specifying your own docker images for rsync and sshd, configuring affinity etc.)
  • Supports multiple migration strategies to do the migration efficiently and fallback to other strategies when needed
  • Customizable strategy order
  • Supports arm32v7 (Raspberry Pi etc.) and arm64 architectures as well as amd64
  • Supports completion for popular shells: bash, zsh, fish, powershell

Installation

See INSTALL.md for various installation methods and shell completion configuration.

Usage

See USAGE.md for the CLI reference and examples.

Stargazers over time

Stargazers over time

Contributing

See CONTRIBUTING for details.

pv-migrate's People

Contributors

utkuozdemir avatar renovate[bot] avatar renovate-bot avatar cgroschupp avatar frankkkkk avatar 0dragosh avatar jtackaberry avatar mertcangurcan avatar goreleaserbot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.