Skip to main content

Interactive CLI utility to migrate Docker named volumes between hosts via SSH.

Project description

Docker Volume Migrator

Interactive command-line tool to copy Docker named volumes between two remote hosts over SSH – no local Docker daemon required.

Features

  • 📦 Stream-based transfer – data is piped directly between hosts, never written to disk
  • 🔐 SSH first – authenticate with existing SSH keys/agents
  • 🎛️ Interactive wizard – guided, step-by-step prompts to pick source/target hosts & volumes
  • 🐳 Minimal deps – only needs Docker & ssh on your machine; the rest happens remotely
  • 🪄 One command – install & run in seconds

TODO (PRs welcome)

  • Direct host to host transfer with ssh keys transfer
  • Tests

Installation

pip install docker-volume-migrator

or install the bleeding-edge version from GitHub:

pip install git+https://github.com/djbios/docker-volume-migrator.git

Usage

docker-volume-migrate run

The wizard will:

  1. Ask for the source host (SSH hostname/IP)
  2. List its Docker volumes and let you pick which to copy
  3. Ask for the target host
  4. Let you create new destination volumes or map to existing ones
  5. Show a summary and start the streaming transfer

Non-interactive / automation

All prompts have sensible defaults and can be pre-answered by setting environment variables or using CLI options (coming soon).

How it works

Under the hood, data is transferred via a TAR streaming pipeline:

ssh SRC_HOST "docker run --rm -v SRC_VOL:/from alpine tar czf - -C /from ." \
  | ssh DST_HOST "docker run --rm -i -v DST_VOL:/to alpine tar xzf - -C /to"

No temporary files, no Docker daemon on your workstation.

Contributing

Pull requests welcome! Please open an issue first to discuss major changes.

# set up dev env
git clone https://github.com/djbios/docker-volume-migrator.git
cd docker-volume-migrator
uv venv  # or python -m venv .venv
source .venv/bin/activate
uv pip install -e .[dev]

License

MIT © djbios

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docker_volume_migrator-0.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docker_volume_migrator-0.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file docker_volume_migrator-0.1.0.tar.gz.

File metadata

File hashes

Hashes for docker_volume_migrator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3ed91da89d260d3e9f89ab31d5f12b5e561f2aba3eed4cc09c0bf2f8462e733a
MD5 2fd5946d59c150f56d1e7cec7f2ca611
BLAKE2b-256 69b8443991e321723df0fb91a33f75f78031e05cab8763c3936c21ee3a0d97a9

See more details on using hashes here.

File details

Details for the file docker_volume_migrator-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for docker_volume_migrator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e32bf7be1c75e37b05d80c4afcb88f919023277fc26e1a51707c5aed2371d97
MD5 5ffb906355b6bbbc6780f11ae9ceb836
BLAKE2b-256 7838cbadde07c3c4f15700b862d741679b5297ecfa10d0a466c6d81bd231fe91

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page