Skip to content

Instantly share code, notes, and snippets.

@jmillerdesign
Last active February 17, 2016 22:15
Show Gist options
  • Save jmillerdesign/9920243 to your computer and use it in GitHub Desktop.
Save jmillerdesign/9920243 to your computer and use it in GitHub Desktop.
MySQL dump to backup to .gz
# .gz
mysqldump -h 'db.example.com' -u'username' -p'password' 'database' --single-transaction | gzip -c | cat > 'database_backup_2014-01-01.sql.gz'
# .sql
mysqldump -h 'db.example.com' -u'username' -p'password' 'database' --single-transaction > 'database_backup_2014-01-01.sql'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment