Restore .sql backup


#1

Hi,

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

Thanks


#2

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


#3

Thank you, great help!


#4

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