An open API service indexing awesome lists of open source software.

https://github.com/itskdhere/dsmt

๐ŸณDocker Storage Migration Tool๐Ÿ“ฆ
https://github.com/itskdhere/dsmt

backup-tool backup-utility cli docker docker-container migration-tool storage

Last synced: 3 months ago
JSON representation

๐ŸณDocker Storage Migration Tool๐Ÿ“ฆ

Awesome Lists containing this project

README

          

# ๐Ÿณ Docker Storage Migration Tool ๐Ÿ“ฆ

A command-line utility for seamlessly exporting and importing Docker volumes and bind mounts.

## ๐Ÿ” Overview

DSMT (Docker Storage Migration Tool) provides a simple way to:

- ๐Ÿ“ค Export Docker volumes or bind mounts to compressed tarballs.
- ๐Ÿ“ฅ Import compressed tarballs into Docker volumes or bind mounts.

๐Ÿ”„ This tool makes it easy to backup, restore, or migrate Docker storage across systems.

## ๐Ÿ’ป Installation

```bash
npm install -g dsmt
```

## ๐Ÿš€ Usage

### ๐Ÿ“ค Exporting Docker Storage

Export a Docker volume:

```bash
dsmt export volume_name /path/to/export/directory
```

Export a bind mount:

```bash
dsmt export /path/to/bind/mount /path/to/export/directory
```

### ๐Ÿ“ฅ Importing Docker Storage

Import to a Docker volume:

```bash
dsmt import /path/to/tarball.tar.gz volume_name
```

Import to a bind mount:

```bash
dsmt import /path/to/tarball.tar.gz /path/to/bind/mount
```

## โš™๏ธ Options

Both commands support the following options:

- `-v, --volume`: Explicitly specify source/destination as a Docker volume
- `-m, --mount`: Explicitly specify source/destination as a bind mount

The tool will automatically detect the source/destination type in most cases, but you can use these flags to be explicit.

## ๐Ÿ“‹ Examples

```bash
# 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
```

## ๐Ÿ› ๏ธ Contribution

Please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) file for guidelines on contributing to this project.

## ๐Ÿ”’ Security

Please refer to the [SECURITY.md](SECURITY.md) file for security-related issues and reporting.

## ๐Ÿ“„ License

MIT ยฉ [itskdhere](https://github.com/itskdhere)