vbart


Namevbart JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/geozeke/vbart
SummaryVolume Backup And Restoration Tool for Docker
upload_time2024-03-23 11:45:34
maintainerPeter Nardi
docs_urlNone
authorPeter Nardi
requires_python<4.0.0,>=3.8.1
licenseNone
keywords archive backup compose compress compression docker restore vbart volume volumes
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # vbart

![GitHub](https://img.shields.io/github/license/geozeke/vbart)
![PyPI](https://img.shields.io/pypi/v/vbart)
![PyPI - Status](https://img.shields.io/pypi/status/vbart)
![GitHub last commit](https://img.shields.io/github/last-commit/geozeke/vbart)
![GitHub issues](https://img.shields.io/github/issues/geozeke/vbart)
![PyPI - Downloads](https://img.shields.io/pypi/dm/vbart)
![GitHub repo size](https://img.shields.io/github/repo-size/geozeke/vbart)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/vbart)

<br>

<img
src="https://drive.google.com/uc?export=view&id=1H04KVAA3ohH_dLXIrC0bXuJXDn3VutKc"
alt = "Dinobox logo" width="120"/>

## Volume Backup And Restoration Tool for Docker

Why is backing up named docker volumes so hard? There's an
[extension][def] for Docker Desktop, but I just want a simple, easy to
use, command-line tool that allows me to backup and restore my named
docker volumes. That's what vbart does.

With vbart you can:

* Backup a single named volume.
* Backup all active named volumes on your host.
* Backup just the volumes you list in a separate file.
* Restore a single backup to a named volume.

All backups are stored in compressed (xz) tar archives. Once you create
a backup, you can copy it off-host, install it on another machine, share
with friends, etc.

### Installation

The preferred way to install vbart is with [pipx][def2]:

```shell
pipx install vbart
```

Alternatively, you can create a separate virtual environment and install
it the traditional way:

```shell
pip3 install vbart
```

### Usage

For an overview, run:

```shell
vbart -h
```

### Backup a Single Volume

```shell
vbart backup volume_name
```

For example, to backup a volume named `mysql_db`, use:

```shell
vbart backup mysql_db
```

vbart will then create a backup file in your current working directory
named:

```text
YYYYMMDD-mysql_db-backup.xz
```

### Backup Multiple Volumes

```shell
vbart backups [-v VOLUMES]
```

Note the plural command name (`backups` as opposed to `backup`).
`VOLUMES` is the optional name of a textfile that contains case
sensitive volume names (one per line) that you want to backup. Within
`VOLUMES` blank lines and lines beginning with `#` are ignored, so you
can comment the file if you wish.

If `VOLUMES` is not specified, all active docker volumes on the current
host are backed up. All volume backups are saved in the current working
directory and named as:

```text
YYYYMMDD-{volume_name}-backup.xz
```

### Restore a Single Volume

```shell
vbart restore backup_file volume_name
```

The first argument (`backup_file`) is the compressed tar archive you
created when you made a backup. The file must have a `.xz` extension.

The second argument (`volume_name`) is the named volume to create from
the backup. If the named volume already exists, vbart will terminate
with no action. Otherwise, a new empty volume will be created with the
given name and the backup will be restored to that volume.

### Refresh vbart

If vbart is interrupted during execution (e.g. hitting `Control+C`),
then there may be dangling docker containers that hang on to existing
volumes. Running the refresh command will clear those dangling
containers.

Also, when you run vbart for the first time, it creates a small
(alpine-based) docker image to perform the actual backups. This image is
called `vbart_utility`. The refresh command also deletes the utility
image, causing it to be recreated the next time you run vbart.

To refresh vbart, use:

```shell
vbart refresh
```

[def]: https://hub.docker.com/extensions/docker/volumes-backup-extension
[def2]: https://pipx.pypa.io/stable/

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/geozeke/vbart",
    "name": "vbart",
    "maintainer": "Peter Nardi",
    "docs_url": null,
    "requires_python": "<4.0.0,>=3.8.1",
    "maintainer_email": "pete@nardi.com",
    "keywords": "archive, backup, compose, compress, compression, docker, restore, vbart, volume, volumes",
    "author": "Peter Nardi",
    "author_email": "pete@nardi.com",
    "download_url": "https://files.pythonhosted.org/packages/e4/dd/5d28d84887b44b0293ba1578c558241e37903c2973d91c45fbaac69ef620/vbart-0.1.1.tar.gz",
    "platform": null,
    "description": "# vbart\n\n![GitHub](https://img.shields.io/github/license/geozeke/vbart)\n![PyPI](https://img.shields.io/pypi/v/vbart)\n![PyPI - Status](https://img.shields.io/pypi/status/vbart)\n![GitHub last commit](https://img.shields.io/github/last-commit/geozeke/vbart)\n![GitHub issues](https://img.shields.io/github/issues/geozeke/vbart)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/vbart)\n![GitHub repo size](https://img.shields.io/github/repo-size/geozeke/vbart)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/vbart)\n\n<br>\n\n<img\nsrc=\"https://drive.google.com/uc?export=view&id=1H04KVAA3ohH_dLXIrC0bXuJXDn3VutKc\"\nalt = \"Dinobox logo\" width=\"120\"/>\n\n## Volume Backup And Restoration Tool for Docker\n\nWhy is backing up named docker volumes so hard? There's an\n[extension][def] for Docker Desktop, but I just want a simple, easy to\nuse, command-line tool that allows me to backup and restore my named\ndocker volumes. That's what vbart does.\n\nWith vbart you can:\n\n* Backup a single named volume.\n* Backup all active named volumes on your host.\n* Backup just the volumes you list in a separate file.\n* Restore a single backup to a named volume.\n\nAll backups are stored in compressed (xz) tar archives. Once you create\na backup, you can copy it off-host, install it on another machine, share\nwith friends, etc.\n\n### Installation\n\nThe preferred way to install vbart is with [pipx][def2]:\n\n```shell\npipx install vbart\n```\n\nAlternatively, you can create a separate virtual environment and install\nit the traditional way:\n\n```shell\npip3 install vbart\n```\n\n### Usage\n\nFor an overview, run:\n\n```shell\nvbart -h\n```\n\n### Backup a Single Volume\n\n```shell\nvbart backup volume_name\n```\n\nFor example, to backup a volume named `mysql_db`, use:\n\n```shell\nvbart backup mysql_db\n```\n\nvbart will then create a backup file in your current working directory\nnamed:\n\n```text\nYYYYMMDD-mysql_db-backup.xz\n```\n\n### Backup Multiple Volumes\n\n```shell\nvbart backups [-v VOLUMES]\n```\n\nNote the plural command name (`backups` as opposed to `backup`).\n`VOLUMES` is the optional name of a textfile that contains case\nsensitive volume names (one per line) that you want to backup. Within\n`VOLUMES` blank lines and lines beginning with `#` are ignored, so you\ncan comment the file if you wish.\n\nIf `VOLUMES` is not specified, all active docker volumes on the current\nhost are backed up. All volume backups are saved in the current working\ndirectory and named as:\n\n```text\nYYYYMMDD-{volume_name}-backup.xz\n```\n\n### Restore a Single Volume\n\n```shell\nvbart restore backup_file volume_name\n```\n\nThe first argument (`backup_file`) is the compressed tar archive you\ncreated when you made a backup. The file must have a `.xz` extension.\n\nThe second argument (`volume_name`) is the named volume to create from\nthe backup. If the named volume already exists, vbart will terminate\nwith no action. Otherwise, a new empty volume will be created with the\ngiven name and the backup will be restored to that volume.\n\n### Refresh vbart\n\nIf vbart is interrupted during execution (e.g. hitting `Control+C`),\nthen there may be dangling docker containers that hang on to existing\nvolumes. Running the refresh command will clear those dangling\ncontainers.\n\nAlso, when you run vbart for the first time, it creates a small\n(alpine-based) docker image to perform the actual backups. This image is\ncalled `vbart_utility`. The refresh command also deletes the utility\nimage, causing it to be recreated the next time you run vbart.\n\nTo refresh vbart, use:\n\n```shell\nvbart refresh\n```\n\n[def]: https://hub.docker.com/extensions/docker/volumes-backup-extension\n[def2]: https://pipx.pypa.io/stable/\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Volume Backup And Restoration Tool for Docker",
    "version": "0.1.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/geozeke/vbart/issues",
        "Homepage": "https://github.com/geozeke/vbart",
        "Source Code": "https://github.com/geozeke/vbart"
    },
    "split_keywords": [
        "archive",
        " backup",
        " compose",
        " compress",
        " compression",
        " docker",
        " restore",
        " vbart",
        " volume",
        " volumes"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d18f77b7fbbd796590aadc121bed80d195a6df0f58eb0a550469f4bf9094c437",
                "md5": "9c0e8588195de7d89459bf947043f3c9",
                "sha256": "aea8f05302b0ddb9d5ddd11ccd58f98666d74c90ab23166d2530bea0c03b2222"
            },
            "downloads": -1,
            "filename": "vbart-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9c0e8588195de7d89459bf947043f3c9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0.0,>=3.8.1",
            "size": 15472,
            "upload_time": "2024-03-23T11:45:32",
            "upload_time_iso_8601": "2024-03-23T11:45:32.773457Z",
            "url": "https://files.pythonhosted.org/packages/d1/8f/77b7fbbd796590aadc121bed80d195a6df0f58eb0a550469f4bf9094c437/vbart-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e4dd5d28d84887b44b0293ba1578c558241e37903c2973d91c45fbaac69ef620",
                "md5": "2df2f4e6416372ec4f3afdc4c9413477",
                "sha256": "9160d09afb0f0a163a23288f3e7bb3850a6ea7e87332811b33e0a57ad534f6c2"
            },
            "downloads": -1,
            "filename": "vbart-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "2df2f4e6416372ec4f3afdc4c9413477",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0.0,>=3.8.1",
            "size": 11205,
            "upload_time": "2024-03-23T11:45:34",
            "upload_time_iso_8601": "2024-03-23T11:45:34.447383Z",
            "url": "https://files.pythonhosted.org/packages/e4/dd/5d28d84887b44b0293ba1578c558241e37903c2973d91c45fbaac69ef620/vbart-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-23 11:45:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "geozeke",
    "github_project": "vbart",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "vbart"
}
        
Elapsed time: 0.21300s