Name | vbart JSON |
Version |
0.1.5
JSON |
| download |
home_page | None |
Summary | Volume Backup And Restoration Tool for Docker |
upload_time | 2024-11-15 17:24:50 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT License Copyright 2024 Peter Nardi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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://lh3.googleusercontent.com/d/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
Install it 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
```
You can also install it with [uv][def6]:
```shell
uv tool 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
```
### License
This project is licensed under the MIT License. See the [LICENSE][def3]
file for details.
### Acknowledgements
This project uses the [docker library][def5] which is licensed under the
Apache 2.0 License. The full license text can be found in the
[LICENSE-APACHE-2_0][def4] file.
[def]: https://hub.docker.com/extensions/docker/volumes-backup-extension
[def2]: https://pipx.pypa.io/stable/
[def3]: https://github.com/geozeke/vbart/blob/c87927233222bd5ac86a4a83083cc123e9fc0f9f/LICENSE
[def4]: https://github.com/geozeke/vbart/blob/c87927233222bd5ac86a4a83083cc123e9fc0f9f/LICENSE-APACHE-2_0
[def5]: https://github.com/docker/docker-py
[def6]: https://docs.astral.sh/uv
Raw data
{
"_id": null,
"home_page": null,
"name": "vbart",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Peter Nardi <pete@nardi.com>",
"keywords": "archive, backup, compose, compress, compression, docker, restore, vbart, volume, volumes",
"author": null,
"author_email": "Peter Nardi <pete@nardi.com>",
"download_url": "https://files.pythonhosted.org/packages/59/32/ec76b57bf8869c35888ad5b5bd4444f3e50311d26a459edc1376b97b4481/vbart-0.1.5.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://lh3.googleusercontent.com/d/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,\neasy-to-use command line tool that allows me to backup and restore my\nnamed docker 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\nInstall it 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\nYou can also install it with [uv][def6]:\n\n```shell\nuv tool 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### License\n\nThis project is licensed under the MIT License. See the [LICENSE][def3]\nfile for details.\n\n### Acknowledgements\n\nThis project uses the [docker library][def5] which is licensed under the\nApache 2.0 License. The full license text can be found in the\n[LICENSE-APACHE-2_0][def4] file.\n\n[def]: https://hub.docker.com/extensions/docker/volumes-backup-extension\n[def2]: https://pipx.pypa.io/stable/\n[def3]: https://github.com/geozeke/vbart/blob/c87927233222bd5ac86a4a83083cc123e9fc0f9f/LICENSE\n[def4]: https://github.com/geozeke/vbart/blob/c87927233222bd5ac86a4a83083cc123e9fc0f9f/LICENSE-APACHE-2_0\n[def5]: https://github.com/docker/docker-py\n[def6]: https://docs.astral.sh/uv\n",
"bugtrack_url": null,
"license": "MIT License Copyright 2024 Peter Nardi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Volume Backup And Restoration Tool for Docker",
"version": "0.1.5",
"project_urls": {
"Bug Tracker": "https://github.com/geozeke/vbart/issues",
"Source Code": "https://github.com/geozeke/vbart"
},
"split_keywords": [
"archive",
" backup",
" compose",
" compress",
" compression",
" docker",
" restore",
" vbart",
" volume",
" volumes"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "3f5d8b5e97bfeeb517c7dd0f25eb0a45ee99fbda94b35ec3669eb70d7ba4e631",
"md5": "16955bc0b976f1d91143a4f2be8c54b1",
"sha256": "4f0ce0983b225297c845ee76eaae463daa2c68633655011b660ffdc553db72c8"
},
"downloads": -1,
"filename": "vbart-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "16955bc0b976f1d91143a4f2be8c54b1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 19464,
"upload_time": "2024-11-15T17:24:49",
"upload_time_iso_8601": "2024-11-15T17:24:49.681890Z",
"url": "https://files.pythonhosted.org/packages/3f/5d/8b5e97bfeeb517c7dd0f25eb0a45ee99fbda94b35ec3669eb70d7ba4e631/vbart-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5932ec76b57bf8869c35888ad5b5bd4444f3e50311d26a459edc1376b97b4481",
"md5": "50f396edd4cb00ebf9b0679a9d80e1c7",
"sha256": "60938199f1cd323390414f6f5b0caef1db26391428ed1af3e032bab87482770d"
},
"downloads": -1,
"filename": "vbart-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "50f396edd4cb00ebf9b0679a9d80e1c7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 13943,
"upload_time": "2024-11-15T17:24:50",
"upload_time_iso_8601": "2024-11-15T17:24:50.729534Z",
"url": "https://files.pythonhosted.org/packages/59/32/ec76b57bf8869c35888ad5b5bd4444f3e50311d26a459edc1376b97b4481/vbart-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-15 17:24:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "geozeke",
"github_project": "vbart",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "vbart"
}