News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Recovering deleted threads - not appearing in board list

Started by v.bampton, November 09, 2010, 06:06:31 PM

Previous topic - Next topic

v.bampton

Long story short, I'm trying to restore months worth of threads from a backup, which will later be merged back in with current threads. 

Couple of problems with that - it turns out that the only forum backup had quit mid-backup, so it's missing tables alphabetically after the personal messages table.  And I haven't played much with SQL until tonight, but I learn fast!

So far I've managed to use SQL to rebuild the missing smf_topics and if I enter the correct link into the address bar, it does put the correct posts together into their threads.  So far so good.

My problem is that they don't show up in the board lists, for example, I can go straight to topic=1917.0 fine, and the breadcrumb bar at the top identifies the correct board (board=51.0) but when I view that board index, that thread doesn't appear.

So, what am I missing?  It's got to be something obvious but I can't find it anywhere.  I'm running 2.0 RC4.  Any thoughts would be much appreciated.

Victoria

xenovanis

Hi Victoria, welcome to SMF :)

Have you tried Admin -> Maintenance -> Forum Maintenance -> Routine
- Find and repair any errors
- Recount all forum totals and statistics?
"Insanity: doing the same thing over and over again and expecting different results."

v.bampton

Thanks for the welcome xenovanis.

Yes I tried both of those - and I finally figured it out.  In case anyone else has the same problem in future... when I'd rebuilt the smf_topics tables, I'd only done topic number, first post number, first poster, and something else.  I'd missed out the last post number and last poster as I couldn't figure out how to do those.  Having since worked out how to add those details, and run those 2 maintenance scripts again, they now show up in the board index.  I'd still like to figure out how to update to add the number of posts, but no big deal if I can't figure it out.

So thank you!

xenovanis

No problem, great you figured that out.

What number of posts are you referring to? Is it the members profile that isn't updating?
"Insanity: doing the same thing over and over again and expecting different results."

v.bampton

It's the smf_topics.num_replies that I'd love to figure out how to fill, for all of those topics that I had to add.  I'm guessing it's a combination of UPDATE and COUNT, perhaps, but as I said, my SQL knowledge is all of about 24 hours old!  I could be working on that for a few months!   :o

xenovanis

Really, running find and repair errors should correct that. In fact, if you truncate the smf_topics table and run find and repair any errors, it should rebuilt the table from scratch.

However, this takes a hugh strain on your server, so it would be best to do it locally.

Ofcourse, you'll make a backup before doing that, won't you?
"Insanity: doing the same thing over and over again and expecting different results."

v.bampton

Yes, this is all running locally at the moment, and not affecting the working forum.  And yes I have incremental backups galore.

That worked!  It wasn't rebuilding all of the smf_topics table for some reason - only everything since March (not sure why!), but those were rebuilt manually and then running the find and repair errors has rebuilt all of the post counts correctly.  Thank you so much.  I'm breathing a huge sigh of relief tonight.

xenovanis

"Insanity: doing the same thing over and over again and expecting different results."

Advertisement: