PDA

View Full Version : Merging two MySQL Databases from same forum, one old, one new


xtrememods
07-10-2003, 03:07 PM
Right guys, I've already scanned through these here forums for an answer to my problem, and have tried some of the scripts here, but I just can't seem to get it to work.

Recently I pruned me forums without realising what I was doing. And doing this, I've deleted a lot of important threads and posts. I have a backup of my forums from two days ago, and basically I would like to pull all user, threads, posts etc from the old backup, and insert it back into the existing database.

If anyone can help, I would be prepared to pay to get this sorted.
Thanks in advance.

N!ck
07-10-2003, 04:17 PM
Just drop your whole database and restore it using the backup .sql file. Make sure it has the CREATE TABLE xxxxx junk in it though, because I'm not 100% sure.

xtrememods
07-10-2003, 04:44 PM
Erm, that kinda isn't any help at all, sorry, all that does is replaces the existing database with the old one, therefore it will not contain data from the existing one. So it's kinda pointless in me doing that, as I loose the data that I wish to keep from the new one. Thanks for your post though.

Gavin B.
07-10-2003, 04:47 PM
ohh - messy ;)

I'm trying to think of the most efficiant way to do this - maybe if you export all the posts/threads/attachments from the backup (only the ones which you pruned though!) and then import them into the new database. Not 100% on that solution though.

There may me a database sync. tool which allows you to compare/add/update two database's but I don't know of one offhand.

xtrememods
07-10-2003, 08:53 PM
Thanks for the help guys, but all is fixed now. A good friend of mine who is experienced with MySQL has manually inserted ALL the data, and it all works! Thanks for your help though.

N!ck
07-11-2003, 03:49 AM
Today at 10:44 AM xtrememods said this in Post #3 (https://vborg.vbsupport.ru/showthread.php?postid=416744#post416744)
Erm, that kinda isn't any help at all, sorry, all that does is replaces the existing database with the old one, therefore it will not contain data from the existing one. So it's kinda pointless in me doing that, as I loose the data that I wish to keep from the new one. Thanks for your post though.

Since you responded so rudely and condescendingly, I'll make it a point to offer you no advice in the future, even when I have clearer solutions in mind.

base
07-11-2003, 03:07 PM
i dont see that as being rude, in fact, he was quite polite to you.

Gavin B.
07-11-2003, 03:17 PM
Yeah, don't take it the wrong way- I think he was just being a bit blunt. I doubt he meant to come across as rude :)