Created
October 10, 2022 14:31
-
-
Save pedro-vasconcelos/2d1a6197b80ff28f13bf0ec4d4a40aa0 to your computer and use it in GitHub Desktop.
Backup / Restore docker volume
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm -v $VOLUME:/$VOLUME alpine tar -czv --to-stdout -C /$VOLUME . > $VOLUME.tgz | |
cat $VOLUME.tgz | docker run --rm -i -v $VOLUME:/$VOLUME alpine tar xzf - -C /$VOLUME | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment