How to restore SQL DB from local clean backup?

How to restore SQL DB from local clean backup?

Posted by: biodrama
Posted on: 2009-11-01 20:18:00

I am unfamiliar with the phpMyAdmin interface. I have 3 Wordpress blogs that got infected when I missed the last update. I restored the databases in the Dreamhost control panel, but the oldest copy there is 5 days old, and the infection was 6 or 7 days old. I have clean local copies that predate the infection, but could not figure out how to proceed in DreamHost's phpMyAdmin interface. I know this must be possible! How do I get my local database backup restored into my blog? I need to delete or overwrite the databases of these blogs, because I am pretty sure the attack was an SQL injection to the DB.

I have already cleaned the visible foreign code out, updated Wordpress, and changed all passwords.

Edited by biodrama on 11/01/09 08:38 PM (server time).

Re: How to restore SQL DB from local clean backup?

Posted by: sdayman
Posted on: 2009-11-02 06:24:00

You'll first have to Drop all tables from the existing database. The interface has an Import link which you use to upload a local file.

-Scott

Re: How to restore SQL DB from local clean backup?

Posted by: sXi
Posted on: 2009-11-02 08:02:00

Doesn't WP have an embedded database restore function?




How To Install PHP.INI / ionCube on DreamHost

Re: How to restore SQL DB from local clean backup?

Posted by: biodrama
Posted on: 2009-11-02 10:02:00

Thank you! I have found detailed instructions here, as well:

http://www.tamba2.org.uk/wordpress/restore/

Re: How to restore SQL DB from local clean backup?

Posted by: biodrama
Posted on: 2009-11-02 10:04:00

I don't see anything about the database in the Wordpress admin screens. From what I've read so far, the only way in is via phpMyAdmin, whether in the ISP's interface, or standalone.

Re: How to restore SQL DB from local clean backup?

Posted by: sXi
Posted on: 2009-11-02 16:37:00

I must be thinking of another CMS.




How To Install PHP.INI / ionCube on DreamHost

Re: How to restore SQL DB from local clean backup?

Posted by: sdayman
Posted on: 2009-11-02 18:45:00

WordPress only has an export/import function for posts and pages. It's not *that* useful.

-Scott

Tags: database backupsql injectionserver timepasswordsphpmyadmindatabasescontrol panelinterfaceblogsblog