Skip to content

Instantly share code, notes, and snippets.

@mariomka
Created March 16, 2020 09:31
Show Gist options
  • Save mariomka/1550fe09a46702e345e5bef004b3cc5e to your computer and use it in GitHub Desktop.
Save mariomka/1550fe09a46702e345e5bef004b3cc5e to your computer and use it in GitHub Desktop.
Dump mysql using Docker
docker run -e PASSWORD=DATABASE_PASSWORD --rm -v `pwd`:/backup mysql sh -c 'exec mysqldump --column-statistics=0 --databases DATABASE_NAME --opt -h DATABASE_HOST -u DATABASE_USER -p"$PASS" > /backup/backup.sql'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment