Surf the Dream A discourse of links and articles from Justin Avery

Restoring mySQL database from the file system MT

When you get a flat backup of your server the SQL is useless to you. Unless you’ve run SQL exports and backups your self you’re going to have to recover the databases from these flat unusable files.

Fortunately there’s a tool in the Media Temple back end that allows for this. Simple connect to the server via SSH and run the following command

/usr/local/mt/bin/mib --restoredbs --apply

Note that this doesn’t need to be run from your /old/ section of the site, the command relies on the current working system. You will then be prompted to go with either /restore or /old, and then choose the database you want to restore. I’m not sure if you can restore all of them at once, I tried a comma separated list and it failed so ended up doing one at a time.

Surf the Dream is a blog that has been running since the mid 2000's when it started on BlogSpot. Over the years it's been rebranded as (now my resume) and (which now redirects back to this site).

I offer consultation services through Simple Things, produce a range of educational pocket notebooks, write about the Universe and run a responsive design and a RWD Weekly Newsletter