Restore .sql backup

Hi,

How to restore easily a sql backup (.tar.gz or .sql) file from another host to DreamHost using SSH?

Thanks

Gotta unzip it, so it’s a .sql file.

Then run the command (replacing the values with their appropriate values):

mysql -h hostname.com -u myuser -p databasename < /path/to/file.sql

Thank you, great help!

There’s also an article in the wiki titled migrate mysql that can help you with this. It’s possible to transfer your databases in one command if you have appropiate access.

-Matttail