MyBB Community Forums

Full Version: Moderator freaked out and deleted a lot
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi people,

Recently one of my super moderators freaked out and deleted a lot of topics. A couple days earlier I made a database backup (gz) in admin cp.
I would like to restore those deleted topics, but I don't want to override topics that were not deleted.
How can I use my backup to restore those deleted threads while I won't mess up the rest?
Is there some sort of merge option in PHPMyAdmin?

Thanks
No way, it would be difficult or impossible to recover deleted thing!

You have to know, some simple MySQL query and imported the deleted thread and related post manually, extracting the mybb_threads and mybb_post tables. You have to find and filter all related posts to thread then imported. PHPMyadmin utility may your friend.. Its hard work, to do! Especially if you have more than hundreds posts..

From now on, I suggest you to use this plugin http://community.mybb.com/thread-119431.html
And make it the trash forum accessible for admin only.
And then, be careful to choose moderator Smile
Hmm... could it be possible to use the backup database to create a local backup version of your forum, delete everything on that forum other than the topics you want to bring back, save the database then and merge that database to your existing forum's database?
Rename all mybb_ tables to mybbnew_ (in structure tab, check all, with selected: rename prefix).

Restore your backup.

Rename all mybb_ tables (the ones from the backup) to mybbold_

REPLACE INTO mybbold_posts (SELECT * FROM mybbnew_posts);
REPLACE INTO mybbold_threads (SELECT * FROM mybbnew_threads);

Rename mybbold_posts to mybb_posts, mybbold_threads to mybb_threads, and all other mybbnew_ (except posts and threads) to mybb_.

If you don't know what you're doing, don't do it without making another new full backup first. Chances are you will break your board for good.
Here's a tip for the future.
Install the plugin Undo Delete!