MyBB Community Forums

Full Version: Merging tables from two mysql databases?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys.

I was working on my forum today, and I made a big mistake. I wanted to delete two categories and have the posts moved to another category after I erased them. So I erased the categories, and the posts were gone. I learned that I was supposed to move the posts BEFORE I erased the categories..good to know for the future. Smile

I have backups of the 400+ posts I erased, they are mostly older posts. The backup is from one week ago. I've made a lot of changes to the forum today, template changes, category changes, moved the forum from .com/forum to .com/. I don't want to lose four hours of work, and I would like the posts back. There have also been posts made in the past week that I would prefer not to lose.

Is there a way that I can get the two categories back, the 400 posts and the ?? amount of threads? I've been perusing the .sql backup file, and I noticed that there are tables such as mybb_posts and mybb_threads. Is there a way that I can combine the needed tables from last weeks backup, with all the changes in todays backup to get the old posts back? I'm using mybb 1.2.8.

Thanks in advance.
I wouldn't know, but, how mnay posts were made since the last backup and now?
p0Wer Wrote:I wouldn't know, but, how mnay posts were made since the last backup and now?

Not that many, probably 40-50. I could definitely get by without them if I had to.
I'd just install the old backup Wink
If I install the old backup, I would lose all of the work that I have done today, forum modifications and such.

Right now I'm trying various things, such as using the week old backup and importing todays backup into it, which didnt work. I'm about to try using todays backup, dropping some of the tables such as mybb_posts and mybb_threads, and using the tables from a week ago.

Edit: Ok. I used todays backup, but took the following tables from the older backup: mybb_posts, mybb_forums, mybb_threads, mybb_threadsread and mybb_threadratings.

It seems the posts are back, but I can't see the two categories on the main page. Under Manage Forums in the Admin CP, I see the changes that I made today to the categories but i cant see the two categories that I deleted. What am I missing?

Is there some place that keeps track of deleted categories or something? I have all the posts back, with all the original categories, except for the ones that I erased.
I think I got it worked out...thanks guys.