MyBB Community Forums

Full Version: Restore some threads from old backup
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all!
Here is my situation:
After some wrong manipulation, one of our admin deleted some important threads from forum.
We have only a 1 month backup.

Question is: how to make posible to integrate only some threads from backup (phpmyadmin) with present day forum?

I'll be waitin any help and sugestions.

ps: tryed to search, nothing found, maybe you show me.
nobody ?
Please don't bump your threads until 1 day has passed

You will have to manually copy the threads you want to restore from the backup file. Look for the threads you want; they will look similar to:
INSERT INTO `mybb_threads` (`tid`, `fid`, `subject`, <a lot more stuff here>) VALUES (23, 3, 'Thread subject', <a lot more stuff here>);
Paste it in the phpMyAdmin SQL window and run it. Take note the thread IDs you have restored (in the example above, the thread ID is 23.

Additionally, you will have to restore the posts in those select threads. What I would do is restore the whole mybb_posts table from the backup (just select the structure and data of mybb_posts section of the backup file) into a test database. Run the SQL code on the test database:
DELETE FROM mybb_posts WHERE tid != 23
Remember you should run this code on the test database, not your real forum database. You should now have a list of posts that are in thread ID 23. Now export this table (data only, no structure needed) and then restore it into your real forum database mybb_posts table.

Then you'll have to drop the test mybb_posts table, and start over again for each thread.

Alternatively, you can look through the backup file in all the mybb_posts entries for the posts with tid 23, and restore those.