Skip to content

Instantly share code, notes, and snippets.

@redesigned
Created September 14, 2013 02:25
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 redesigned/6558336 to your computer and use it in GitHub Desktop.
Save redesigned/6558336 to your computer and use it in GitHub Desktop.
Backup and Restore Database via SSH
mysqldump --user username --password='password' databasename | gzip -9 > ./backup_database.sql.zip
cat ./backup_database.sql | mysql --user username --password=password databasename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment