Last active
August 29, 2015 14:17
-
-
Save solidnerd/752220f6905c9447b0be to your computer and use it in GitHub Desktop.
Mysql Docker backup Script
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
#!/bin/sh | |
DATE=$(date +%d-%m-%Y) | |
MySQL_USER="" | |
MySQL_PASS="" | |
BACKUPNAME="mysql_"$DATE".sql" | |
docker exec mysql mysqldump -u$MySQL_USER -p$MySQL_PASS --all-databases > $BACKUPNAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment