Skip to content

Instantly share code, notes, and snippets.

@jtarleton
Created January 25, 2013 10:50
Show Gist options
  • Save jtarleton/4633466 to your computer and use it in GitHub Desktop.
Save jtarleton/4633466 to your computer and use it in GitHub Desktop.
Shell script to back up MySQL to a Gzipped file
#!/bin/bash
mysqldump -h localhost -u foouser --password=foopass foodb | gzip > /var/db_backup.sql.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment