Skip to content

Instantly share code, notes, and snippets.

@asaph
Created November 2, 2017 21:32
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 asaph/503fdc4c023679119e0b9e99f561b479 to your computer and use it in GitHub Desktop.
Save asaph/503fdc4c023679119e0b9e99f561b479 to your computer and use it in GitHub Desktop.
Back Up Remote MySQL Database
#!/bin/sh
mysqldump -h host -u username -p --compress --single-transaction databasename | gzip > /tmp/databasename.sql.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment