Created
January 16, 2017 20:14
-
-
Save totojack/892321adba4594d147a86407e16bcda0 to your computer and use it in GitHub Desktop.
docker container files backup
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
#mysqldump | |
docker exec CONTAINER sh -c 'exec mysqldump -u BKPUSER -pBKPPWD -h localhost DATABASE' | $GZIP -9 > $NOW.gz | |
#tar gz | |
docker cp CONTAINER:/custom/dir - | gzip > $FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment