Last active
July 12, 2023 02:52
-
-
Save healthy-tree/1fffe7e3c8afa084a5e101bac870b0d0 to your computer and use it in GitHub Desktop.
Docker Dump and restore MySQL All Databases
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
# backup | |
docker exec -it container mysqldump -u**** -p*** --all-databases > mysql_dump_yyyy_mm_dd.sql | |
# restore | |
cat backup.sql | docker exec -it container mysql -u**** -p**** --all-databases |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment