How do I restore a topic?

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
User avatar
Alison V
Registered User
Posts: 24
Joined: Mon Sep 14, 2020 11:50 am

How do I restore a topic?

Post by Alison V »

I have the backup MySQL file. I just need to restore one topic I accidentally permanently deleted. I was in too much of a hurry and just wanted to delete a post. Instead, I deleted the topic. :x
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: How do I restore a topic?

Post by david63 »

Whilst not impossible it would be difficult without examining the database and entering the data manually into all the tables that would require it - also some tables would just need amending.

The correct option, in my opinion, would be to do a full database restore. Alternatively, if you have the information, is to just repost the post.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
warmweer
Jr. Extension Validator
Posts: 11270
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: How do I restore a topic?

Post by warmweer »

Alison V wrote: Mon Jul 04, 2022 12:41 am I have the backup MySQL file. I just need to restore one topic I accidentally permanently deleted. I was in too much of a hurry and just wanted to delete a post. Instead, I deleted the topic. :x
As david63 stated, it's not as simple as it may seem.
Tables affected are:

_posts
_topics
_topics_posted
_topics_track
_topics_watch
_forums (possibly also _forums_track)
_attachments (possibly)
_users

there could be more.
The problem is that you cannot just copy records from the backup to the live database without creating inconsistencies (if in the meantime new posts/topics were made).
The posts_records could be added to the posts_table and the topic_record could be added to the topics_table but the other tables would require some manual editing (and while you're analysing which edits are necessary, and implementing those: your board should be offline for regular users)

Assuming nothing has been posted after the deletion (not very likely), restoring the database backup is the most simple operation.

If the topic deleted contains few posts (few as in about 10 or less), an option could be to repost those posts (as Admin), and then change the poster and the post_time.

An alternative would be to export the deleted topic (from the backup) as a pdf and then embed that in a new topic on your live board.

How many posts does that deleted topic contain?
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
Post Reply

Return to “[3.2.x] Support Forum”