Jump to content

.Sql file backup situation


Recommended Posts

Hello, I'm in desperate need of help. Some posts were lost on my vBulletin forum and I have a backup from a month ago. I got the backup and extracted the .sql file. The problem is now, I want to update the posts and threads tables without replacing the entire .sql file.


I need some way of using php to connect to the .sql file and then update the tables on the real database. Any help would be appreciated! Thanks!

Link to comment
Share on other sites

Create a new database named "restoreData" or something.

Change the database name in the .SQL file (to this new database name)

Load the .SQL file so it goes into the new database.


Run queries to update the data from one database to the other.  For instance:


INSERT INTO newDatabase.tableName SELECT * FROM oldDatabase.tableName WHERE ID = missingIDvalue;


will let you copy data from one to the other.


HOWEVER -- I do NOT know the database structure and table structures and cannot advise as to which rows/tables need to be moved.  If you are not careful, you will clobber the current database.


I would highly -- VERY HIGHLY -- recommend, creating a COPY of the current database on a development platform, then test your update process against it. Then test the application against the updated database, thouroughly. When you are satisfied that it works, and ALL vBulletin checks come up clean, then BACK UP THE FUNCTIONING DATABASE and run your entire process against it.  You will want to lock out the users while you are updating the database if possible (at least I would want to).


Edit: NEVER - EVER even THINK of running a database cleanup/fixup without FIRST TESTING THOUROUGHLY and BACKING UP the working database.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.