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.
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?