Skip to content

Instantly share code, notes, and snippets.

@solidnerd
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save solidnerd/752220f6905c9447b0be to your computer and use it in GitHub Desktop.
Save solidnerd/752220f6905c9447b0be to your computer and use it in GitHub Desktop.
Mysql Docker backup Script
#!/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