A fast, dependency-free command-line utility to Import, Export and Migrate Docker Volumes and Bind Mounts on Windows, Linux and macOS.
DSMT provides a simple way to:
- Export Docker volumes or bind mounts to compressed tarballs.
- Import compressed tarballs into Docker volumes or bind mounts.
- Migrate data directly from one Docker storage to another (without using intermediary tarballs).
This tool makes it easy to backup, restore, or migrate Docker storage across systems.
- Cross-Platform: Pre-compiled standalone binaries for Windows, Linux and macOS (supporting both x64 and ARM64).
- Flexible Installation: Install via package managers (NPM, Yarn, PNPM, Bun), quick Bash / PowerShell scripts, or direct standalone binary downloads.
- Isolated Operations: Runs compression and restoration inside temporary, isolated Docker containers to guarantee compatibility and system isolation.
- Auto-Detection: Automatically determines whether path/name parameters refer to a Docker Volume or Host Bind Mount, with manual overrides.
- Native Engine Connection: Auto-detects and integrates with the local Container Engine (Docker, Podman, Colima, Orbstack etc.) via Unix sockets or Windows Named Pipes.
Install the pre-compiled binary instantly and add it to your PATH using our quick install scripts:
irm https://dsmt.itskdhere.com/install.ps1 | iexcurl -fsSL https://dsmt.itskdhere.com/install.sh | shIf you already have a Node.js or Bun environment, you can install the CLI globally:
# npm
npm install -g dsmt
# yarn
yarn global add dsmt
# pnpm
pnpm add -g dsmt
# bun
bun add -g dsmt# npx (npm)
npx dsmt <command> [args]
# bunx (bun)
bunx dsmt <command> [args]
# pnpm dlx
pnpm dlx dsmt <command> [args]
# yarn dlx
yarn dlx dsmt <command> [args]Download standalone binaries directly from the GitHub Releases page. No runtimes required.
- Windows:
dsmt-windows-x64.exe,dsmt-windows-arm64.exe - Linux:
dsmt-linux-x64,dsmt-linux-arm64 - macOS:
dsmt-macos-x64,dsmt-macos-arm64
Exports a Docker Volume or local directory to a compressed .tar.gz archive.
# Export a Docker Volume
dsmt export volume_name /path/to/export/directory
# Export a local directory (Bind Mount)
dsmt export /path/to/local/directory /path/to/export/directoryImports files from a compressed .tar.gz archive back into a Docker Volume or local directory. If a destination Docker volume does not exist, DSMT will automatically create it.
# Import into a Docker Volume
dsmt import /path/to/tarball.tar.gz volume_name
# Import into a local directory (Bind Mount)
dsmt import /path/to/tarball.tar.gz /path/to/local/directoryMigrates data directly from a source Docker Storage (volume or bind mount) to a destination Docker Storage (volume or bind mount) in a single command, without generating any intermediary tar archives.
# Migrate data from a volume to another volume
dsmt migrate src_volume_name dst_volume_name
# Migrate data from a volume to a bind mount
dsmt migrate src_volume_name /path/to/destination
# Migrate data from a bind mount to a volume
dsmt migrate /path/to/source dst_volume_name
# Migrate data from a bind mount to another bind mount
dsmt migrate /path/to/source /path/to/destinationBoth export and import commands support the following overrides:
-v, --volume: Force DSMT to treat the parameter as a Docker Volume (disables auto-detection).-b, --bind: Force DSMT to treat the parameter as a Host Bind Mount (disables auto-detection).
The migrate command supports the following overrides to specify source and destination types explicitly:
--sv, --src-volume: Force treating the source as a Docker Volume (disables auto-detection).--sb, --src-bind: Force treating the source as a Host Bind Mount (disables auto-detection).--dv, --dst-volume: Force treating the destination as a Docker Volume (disables auto-detection).--db, --dst-bind: Force treating the destination as a Host Bind Mount (disables auto-detection).
# Export a volume named 'mongodb_data' to the current directory
dsmt export mongodb_data ./
# Import a tarball to a new volume
dsmt import ./mongodb_data.tar.gz new_mongodb_data
# Export a bind mount to the /backups directory
dsmt export /var/www/html /backups
# Import a tarball to a bind mount
dsmt import ./html.tar.gz /var/www/html
# Force treating destination as bind mount (skips volume check)
dsmt import -b ./backup.tar.gz ./restored_folder
# Migrate data directly from 'old_volume' to 'new_volume'
dsmt migrate old_volume new_volume
# Migrate a bind mount to a Docker volume
dsmt migrate /var/lib/mydata my_volume
# Migrate a volume to a bind mount, explicitly specifying types
dsmt migrate my_volume /var/lib/mydata --sv --dbThis project is organized as a Turborepo monorepo:
apps/cli/: The core DSMT CLI utility.apps/web/: A Next.js landing page & interactive CLI documentation site.packages/ui/: Shared UI components and styles.packages/eslint-config/&packages/tsconfig/: Shared development configurations.
First, make sure you have Bun installed.
# Clone the repository
git clone https://github.com/itskdhere/dsmt.git
cd dsmt
# Install all workspace dependencies
bun install
# Build workspace packages & CLI
bun run build
# Link the CLI globally for local testing
bun run link
# Start development dev servers/watchers
bun run dev
# Run linting across the monorepo
bun run lint
# Unlink the package when done
bun run unlinkPlease refer to:
- CONTRIBUTING.md for local development workflows and guidelines.
- SECURITY.md for reporting vulnerabilities.
MIT Β© itskdhere