Skip to main content

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

Release files for docker-volume-migrator 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docker-volume-migrator 0.1.0
File Size Uploaded
docker_volume_migrator-0.1.0.tar.gz 6.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for docker-volume-migrator 0.1.0
File Interpreter ABI Platform
docker_volume_migrator-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.2 kB

Release files / docker_volume_migrator-0.1.0.tar.gz

Download URL docker_volume_migrator-0.1.0.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3ed91da89d260d3e9f89ab31d5f12b5e561f2aba3eed4cc09c0bf2f8462e733a
BLAKE2b-256 checksum
How to use checksums
69b8443991e321723df0fb91a33f75f78031e05cab8763c3936c21ee3a0d97a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.27

Release files / docker_volume_migrator-0.1.0-py3-none-any.whl

Download URL docker_volume_migrator-0.1.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e32bf7be1c75e37b05d80c4afcb88f919023277fc26e1a51707c5aed2371d97
BLAKE2b-256 checksum
How to use checksums
7838cbadde07c3c4f15700b862d741679b5297ecfa10d0a466c6d81bd231fe91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.27

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page