Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Backup and restore all volumes in README.md #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

delfer
Copy link

@delfer delfer commented Jun 19, 2022

No description provided.

@Guiorgy
Copy link
Contributor

Guiorgy commented Aug 7, 2023

Running for vl in $(docker volume ls | awk '{print $2 }'); do echo ${vl}.tar.gz ; done prints:

VOLUME.tar.gz
... (volumes)
portainer_data.tar.gz

Where the VOLUME.tar.gz is the result of the headers/title (DRIVER VOLUME NAME) on the first line of output. This should be handled.

Running docker volume ls --help we read -q, --quiet Only display volume names, so this option should be added to your command. In fact, running with this option only prints the names (as the description states) so awk can also be removed:

:~ $ for vl in $(docker volume ls -q); do echo ${vl}.tar.gz ; done
... (volume names)
portainer_data.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants