Created
December 27, 2021 01:41
-
-
Save ihebski/442a5a6e437c6b910bf0b0802af9ac08 to your computer and use it in GitHub Desktop.
backup and restore mysql database from defectdojo container
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
# Get container id | |
docker ps | grep mysql | |
# Backup | |
docker exec -it <container_id> mysqldump -u defectdojo --password=defectdojo defectdojo > backup.sql | |
# Restore | |
docker exec -i <container_id> mysql -u defectdojo --password=defectdojo defectdojo < cat backup.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment