Created
December 2, 2019 16:29
-
-
Save constrict0r/bfe74d897c2d6f9491dbd255ae998f23 to your computer and use it in GitHub Desktop.
Mariadb Backup/Restore with Docker
This file contains hidden or 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 - from the host machine run: | |
docker exec CONTAINER mysqldump -u root --password=PASS DATABASE > CONTAINER.sql | |
# Restore - from the host machine run: | |
cat CONTAINER.sql | docker exec -i CONTAINER mysql -u root --password=PASS DATABASE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment