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 &
sshon 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:
- Ask for the source host (SSH hostname/IP)
- List its Docker volumes and let you pick which to copy
- Ask for the target host
- Let you create new destination volumes or map to existing ones
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docker_volume_migrator-0.1.0.tar.gz.
File metadata
- Download URL: docker_volume_migrator-0.1.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.27
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ed91da89d260d3e9f89ab31d5f12b5e561f2aba3eed4cc09c0bf2f8462e733a
|
|
| MD5 |
2fd5946d59c150f56d1e7cec7f2ca611
|
|
| BLAKE2b-256 |
69b8443991e321723df0fb91a33f75f78031e05cab8763c3936c21ee3a0d97a9
|
File details
Details for the file docker_volume_migrator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: docker_volume_migrator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.27
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e32bf7be1c75e37b05d80c4afcb88f919023277fc26e1a51707c5aed2371d97
|
|
| MD5 |
5ffb906355b6bbbc6780f11ae9ceb836
|
|
| BLAKE2b-256 |
7838cbadde07c3c4f15700b862d741679b5297ecfa10d0a466c6d81bd231fe91
|