Author |
Topic |
|
pierretopping
Junior Member
United Kingdom
224 Posts |
Posted - 19 June 2007 : 18:15:33
|
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 |
|
pierretopping
Junior Member
United Kingdom
224 Posts |
Posted - 20 June 2007 : 05:11:17
|
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 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
pierretopping
Junior Member
United Kingdom
224 Posts |
Posted - 20 June 2007 : 06:11:25
|
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 |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 20 June 2007 : 06:25:21
|
I'm sure you already know, but make sure you make a backup of your database before you start anything... |
|
|
gary b
Junior Member
USA
267 Posts |
Posted - 20 June 2007 : 07:41:40
|
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... |
|
|
pierretopping
Junior Member
United Kingdom
224 Posts |
Posted - 20 June 2007 : 10:30:49
|
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
|
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 20 June 2007 : 13:22:14
|
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... |
|
|
pdrg
Support Moderator
United Kingdom
2897 Posts |
Posted - 20 June 2007 : 14:02:11
|
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 |
|
|
pierretopping
Junior Member
United Kingdom
224 Posts |
Posted - 20 June 2007 : 18:12:00
|
Will do.
Thanks people :-) |
|
|
pierretopping
Junior Member
United Kingdom
224 Posts |
Posted - 26 June 2007 : 04:52:42
|
Hi, Does anybody have a list of all tables and fields with descriptions (to make sure I don't miss out on anything ) ?
P. |
|
|
pierretopping
Junior Member
United Kingdom
224 Posts |
Posted - 29 June 2007 : 10:37:49
|
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 |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 29 June 2007 : 11:10:31
|
Glad its all working. |
|
|
pdrg
Support Moderator
United Kingdom
2897 Posts |
Posted - 01 July 2007 : 11:40:09
|
Woohoo! Well done :) |
|
|
|
Topic |
|