Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Restore a deleted post
Avatar
Kenn
Somerset, UK
Member
Free Members
sp_UserOfflineSmall Offline
Jul 2, 2015 - 12:00 pm

Hi all,

My customer has accidentally removed a topic with 5 years worth of posts in it. The topic was responsible for a lot of visitors to the site and I would like to restore the post if possible.

I have a backup of the database and can grab the information from the necessary tables. If you can offer any advice it would be great.

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Jul 2, 2015 - 12:26 pm

Hey Kenn,

Before I start I should just say that I've never done this, just working from my understanding. If you would like clarification or more advanced help we will have to wait for Andy or Steve later.

You should be able to open your backup database and export the relevant XXX_sftopics row and XXX_sfposts row's and import them to your current database.

All entries in the 'sftopics' table have a topic ID, and all entries in the 'sfposts' table reference the unique topic ID that they belong to, so using something like phpMyAdmin you could select all the right posts using SQL commands (i.e, only show rows with topic ID of 1234..)

I'm guessing no users have been deleted? I think that's the only thing that could cause a problem but again, never done this so just a rough idea of what to do more than anything!

Hope that helps, if not I'm sure Andy or Steve are not too far away.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 2, 2015 - 2:51 pm

I ** think ** you might get away with that. I have to admit I ave never tried it.

However - after you have moved the table rows back in you will need to go to the toolbox > housekeeping and re-index the forum it belongs to.

But... there are other important issues that wont be so easy to deal with. People who may have subscriptions to the topic for example (is you use subscriptions plugin). Image attachments (if you use the file upload plugin). I would start with Ike's proposal above and then see what you have.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Kenn
Somerset, UK
Member
Free Members
sp_UserOfflineSmall Offline
Jul 3, 2015 - 4:51 am

Thanks both, will run the test on the Dev site and then report back.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 3, 2015 - 5:35 am

please do

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626