Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 2.02 KB

File metadata and controls

48 lines (33 loc) · 2.02 KB

Usage

pv-migrate supports:

  • PVC-to-PVC migration: copy data directly from one Kubernetes PersistentVolumeClaim to another using rsync-based strategies.
  • Bucket backup and restore: back up a PVC to object storage, restore it later, or use pv-migrate as the data mover in a scheduled backup CronJob.

See Installation for CLI and kubectl plugin setup.

See the CLI reference for all flags and generated help.

The Kubernetes resources created by pv-migrate are sourced from the embedded Helm chart. You can pass raw values to the backing Helm chart using the --helm-* flags for further customization: container images, resources, service accounts, annotations, labels, affinity, tolerations, and other chart values.

Detached operations

Both migration and bucket backup/restore support detach mode. Use --detach to let the data mover job continue after the CLI exits.

$ pv-migrate --source old-pvc --dest new-pvc --detach --id my-migration
$ pv-migrate status my-migration
$ pv-migrate status my-migration --follow
$ pv-migrate cleanup my-migration

For bucket backup/restore, use the same status and cleanup commands:

$ pv-migrate backup --source app-data --backend s3 --bucket backups --name app-data --detach --id app-backup
$ pv-migrate status app-backup
$ pv-migrate cleanup app-backup

Cleanup

By default, pv-migrate cleans up the Helm release after attached operations complete. Use --no-cleanup or --no-cleanup-on-failure when you need to inspect generated resources.

Detached operations are not cleaned up automatically. Use pv-migrate cleanup <id> after the job completes.

Where to go next