Previous Thread
Next Thread
Print Thread
Hop To
#250877 11/16/2012 10:03 PM
Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
Somehow one of my editors has accidentally deleted a very popular thread. Is there any way for me to re-insert a post with the proper starting ID, at least, so that all the links that went to the main page of this thread point to it again? I'm not even hoping to recreate the entire thread. Just that starting point that everything linked to.


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
OK I did some digging and here is what I did.

I restored the previous database to a new schema name - forum999.

I then ran these three commands, with the missing thread's ID:

insert into ubbt7.ubbt7_topics
select * from forum999.ubbt7_topics where topic_id = 64605

insert into ubbt7.ubbt7_posts
select * from forum999.ubbt7_posts where topic_id = 64605

insert into ubbt7.ubbt7_topic_views
select * from forum999.ubbt7_topic_views where topic_id = 64605

It looks like it worked perfectly and it's back in business again.

Are there any other tables I should have filled in to go with these three, from the backup set?


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
Wow, you are a brave soul.Messing with the tables.
I would have just left it as deleted.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jan 2008
Posts: 514
addict
addict
Joined: Jan 2008
Posts: 514
Ingenuity.....when it positively absolutely has to just flipping work.....

Great job Bella!

Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
Ruben -

I'm fortunate in that my profession has been a database designer / developer since 1989 or so. I've been in this industry a while. I don't get too worried about tables, I just figure out what the rows are for and how they relate.

I figure, what's the worst that could have happened? Something would be disconnected and I'd have to figure out what rows I missed smile. It would be unlikely to bring the entire system to a crashing halt smile.

And even if by some really bizarre case having some extra rows in the data table did bring the entire system to its knees, I'd just go back to the backup I made right before I started.


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
Well I know we could just reload a db backup if all else fails,
It is just with a forum of your size it would seem to take forever to complete.
So again hats off for being brave.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Originally Posted by BellaOnline
And even if by some really bizarre case having some extra rows in the data table did bring the entire system to its knees, I'd just go back to the backup I made right before I started.
Great rule to live by; backups before db work.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Originally Posted by Ruben
Well I know we could just reload a db backup if all else fails,
It is just with a forum of your size it would seem to take forever to complete.
So again hats off for being brave.
If you do it via command line (the backup and restore) it only takes a few moments.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Pooh-Bah
D Offline
Joined: Jan 2004
Posts: 2,474
Likes: 3
Originally Posted by BellaOnline
I figure, what's the worst that could have happened?

ha ha smile What a brilliant attitude! I'm like a headless chicken whenever something goes wrong eek

Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
Right Gizmo a backup and restore runs fairly quickly on my server. I also do these things at 4am so they're fairly quiet. I do get 20 million pageviews a month on the main server, so it's not zero traffic, but heck the visitors just have to learn with occasional outages. Otherwise I could never upgrade anything, and that would be bad smile. They can live with a short while of no-site.

I figure life is too short to panic over something like a down server. Yes, it's down. And I'll get it back up. We've had hard drives fail, network trunk lines go out, snowstorms take out the entire city, and a plethora of other issues over the years. Eventually the site comes back up, and life goes on.

But yes I always have a backup. Even if the entire server melts - which has happened - my hosting facility rebuilds me a new one in a few hours, we load up the data again, and we're OK. At most we lose a few days of data, which is a pain, but we can live with it.



Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
I just realized that something about my recent upgrade from MySQL 5.1 to 5.5. That server I upgraded has my LisaShea forum on it. Apparently when I was done with my upgrade, I somehow imported the previous week's backup file instead of the one I'd just made smile. LOL. So I lost a week's worth of forum posts in my LisaShea forum.

I did that on the 27th (Tue). People have been adding to the forum since then.

The forum members there are patient and understanding about it. We know what happened, and I'll see if I can gently re-insert the missing threads without disturbing what we've done since then.

It won't do any good to panic or get upset or riled about it. It happened, I knew I was in a brain fog because of this cold I'm fighting, and I knew something like this could happen. In the grand scheme of things, it was only a week. Either I'm able to re-insert those rows, or I'm not and we do our best to remember what we said. In either case life will go on smile.

Also, it was a good test case, since that forum is fairly quiet. I want to make sure I have all these kinks worked out before I do the upgrade on my main forum.


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Pooh-Bah
D Offline
Joined: Jan 2004
Posts: 2,474
Likes: 3
Originally Posted by BellaOnline
The forum members there are patient and understanding about it.
[Linked Image from 1.bp.blogspot.com]
Ahh well - therein lies the difference. My users would not be so forgiving.

I suspect this image would reflect their sentiments...

Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
Driv -

My view is that it's critical to build a community of support and caring during the quiet times. That way during a crisis period you have that support and encouragement to work with.

My community knows I do my best, and that I care. If things hit a glitch, they chime in with offers to help. They are "in the trenches with me".

It takes time to build that atmosphere, but it's well worth it.


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Pooh-Bah
D Offline
Joined: Jan 2004
Posts: 2,474
Likes: 3
Oh I get it Lisa, I really do.

But I have a lot of very serious people using my site.

"I don't have time for any nonsense..." (...and I expect this resource for free)

I get multiple complaints daily. (Not about the site, about users being frivolous.)

I've been trying to built community for 12 nail-biting years. lol onoes

Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
Driv -

I'm sorry to hear that! My view is that my forums are free and they are the way I want them to be. If someone joins them, they accept that our community is the way it is. If they'd rather have a different type of community, there are plenty of them out there smile.



Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
2 members (Ruben, 1 invisible), 998 guests, and 205 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)