Skip to content

Instantly share code, notes, and snippets.

@jkullick
Last active July 29, 2016 12:08
Show Gist options
  • Save jkullick/805e73526fd2538707ccfc21b2ffeeda to your computer and use it in GitHub Desktop.
Save jkullick/805e73526fd2538707ccfc21b2ffeeda to your computer and use it in GitHub Desktop.
Backup & Restore MySQL Databases
# Backup
mysqldump -u root -p --all-databases | gzip > dump.sql.gz

# Restore
gzip -d dump.sql.gz | mysql -u root -p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment