Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Merge from old into new database (access)
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

pierretopping
Junior Member

United Kingdom
224 Posts

Posted - 19 June 2007 :  18:15:33  Show Profile  Visit pierretopping's Homepage
Hi All,

I wonder if anybody can help me. I few weeks ago I had to restore from a backup from around one month before because of hardware failure on my server. The restore went to plan, and the users were soon back on the forum. Unfortunately, because I had to restore from a backup 3 weeks old, I lost around 200 posts.

Now today, I managed to restore a backup that was minutes before the crash. Now how can I get the old messages back into the (access) database? Looking at the FORUM_TOPICS table, I will have records using the same TOPIC_ID number for example?

I think I need to merge the old 200 records back into the database?

Can anybody give me some pointers please?

Thanks,

Pierre

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 20 June 2007 :  03:47:28  Show Profile  Send ruirib a Yahoo! Message
Quite likely you will have duplicate topic and reply id's now. If you do, there is no easy way to merge the records, except by writing code to do it.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

pierretopping
Junior Member

United Kingdom
224 Posts

Posted - 20 June 2007 :  05:11:17  Show Profile  Visit pierretopping's Homepage
quote:
Originally posted by ruirib

Quite likely you will have duplicate topic and reply id's now. If you do, there is no easy way to merge the records, except by writing code to do it.



Since it's only 200 records, could I insert the old once into the newer FORUM_TOPIC table and give it a new TOPIC_ID number ? If so, what other fields in other tables would I need to manually change when I copy them in TOPIC_REPLY for example ?

Is it just as simple as that ?

Thanks for your help,

Pierre

Edited by - pierretopping on 20 June 2007 05:12:38
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 20 June 2007 :  06:00:52  Show Profile  Send ruirib a Yahoo! Message
Basically you'd need to insert the new value into all the reply records for that topic's replies.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

pierretopping
Junior Member

United Kingdom
224 Posts

Posted - 20 June 2007 :  06:11:25  Show Profile  Visit pierretopping's Homepage
quote:
Originally posted by ruirib

Basically you'd need to insert the new value into all the reply records for that topic's replies.



Thats great. Thanks for your help people

Pierre
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 20 June 2007 :  06:25:21  Show Profile  Visit AnonJr's Homepage
I'm sure you already know, but make sure you make a backup of your database before you start anything...
Go to Top of Page

gary b
Junior Member

USA
267 Posts

Posted - 20 June 2007 :  07:41:40  Show Profile  Visit gary b's Homepage
Another perspective...

If you are comfortable in Access, you could REPLACE the "new" database with the "old" database. You could rather easily identify forum additions (topics, replies, etc) added since OLD database went off-line. Import the appropriate tables from the NEW database and then run APPEND/UPDATE queries as necessary to add new topics/posts. The advantage of this method is that APPENDING the topic records will auto-increment topic numbers. Either way, it will take you some time to do this.

Don't forget AnonJr 's reminder...

And one more thing... Unless you stop the forum (to prevent addition of new topics/replies) while you make the corrections, your re-compiled database could still be out of sync. Just a thought...
Go to Top of Page

pierretopping
Junior Member

United Kingdom
224 Posts

Posted - 20 June 2007 :  10:30:49  Show Profile  Visit pierretopping's Homepage
Hi Gary b


What a great idea!

Like you said, all I need to do is to add the new records to the old one. Now why didn’t I think of that

I will back it up before hand.

Thanks again guys, you’ve saved me a lot of work.

Would I need to re-build any index's or anything would you know?

Rgds,

Pierre

Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 20 June 2007 :  13:22:14  Show Profile  Visit AnonJr's Homepage
Since you are using Access you'll probably want to do a "Compact and Repair" locally when you are done. Don't forget to shut down the forum before you do it...
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 20 June 2007 :  14:02:11  Show Profile  Send pdrg a Yahoo! Message
Do take care with parent/child relationships doing this though, and do practice it on test db's first. If you lose concentration and mis-handle/fail to update a key in a related record pair, you'll end up in a right old muddle
Go to Top of Page

pierretopping
Junior Member

United Kingdom
224 Posts

Posted - 20 June 2007 :  18:12:00  Show Profile  Visit pierretopping's Homepage
Will do.

Thanks people :-)
Go to Top of Page

pierretopping
Junior Member

United Kingdom
224 Posts

Posted - 26 June 2007 :  04:52:42  Show Profile  Visit pierretopping's Homepage
Hi,
Does anybody have a list of all tables and fields with descriptions (to make sure I don't miss out on anything ) ?

P.
Go to Top of Page

pierretopping
Junior Member

United Kingdom
224 Posts

Posted - 29 June 2007 :  10:37:49  Show Profile  Visit pierretopping's Homepage
Hi,

Just to let you know that the merge from the two databases went to plan, and its all now looking great.

Thanks for your help on this [:-)]

Pierre
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 29 June 2007 :  11:10:31  Show Profile  Visit AnonJr's Homepage
Glad its all working.
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 01 July 2007 :  11:40:09  Show Profile  Send pdrg a Yahoo! Message
Woohoo! Well done :)
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.48 seconds. Powered By: Snitz Forums 2000 Version 3.4.07