Last active
April 2, 2020 19:45
-
-
Save stabastian/f4967e78dfc11aeb1ae1f31596a62ec0 to your computer and use it in GitHub Desktop.
Docker MySql Dump
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
# Dump | |
docker run --rm -i mysql:TAG /usr/bin/mysqldump -uroot -proot --skip-comments DATABASE_NAME > dump_`date +%Y-%m-%d"_"%H-%M-%S`.sql | |
# Restore | |
cat dump.sql | docker run --rm -i mysql:TAG /usr/bin/mysql -uroot -proot DATABASE_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment