Last active
July 14, 2020 09:53
-
-
Save StoneMoe/40af7f4571e22e06b347df95b7245bea to your computer and use it in GitHub Desktop.
volume to 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
# make tarball from sentry_pgdb volume | |
docker run --rm -v sentry_pgdb:/var/lib/postgresql/data -v (pwd):/backup busybox tar cvf /backup/backup.tar /var/lib/postgresql/data | |
# create a sentry-postgres volum | |
docker volume create sentry-postgres | |
# restore to sentry-postgres volume | |
# NOTE: tarball will keep absolute path folder structure, so we don't need specify the target extract path | |
docker run --rm -v sentry-postgres:/var/lib/postgresql/data -v (pwd):/backup busybox tar xvf /backup/backup.tar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment