Skip to content

Instantly share code, notes, and snippets.

@unbracketed
Created February 23, 2011 18:20
Show Gist options
  • Save unbracketed/840872 to your computer and use it in GitHub Desktop.
Save unbracketed/840872 to your computer and use it in GitHub Desktop.
Recipes for dumping and restoring different databases, using different compression formats
#Dump
mysqldump db | gzip -c > db.sql.gz
pg_dump db | gzip -c > db.sql.gz
#use gzip --fast
#Restore
gunzip < db.sql.gz | mysql db
bunzip2 < db.sql.bz2 | mysql db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment