1

Topic: How to undelete a deleted topic?

Is there any way to "undelete" a deleted topic? Provided that I have a backup copy of the database. Current database contains many new messages, so to simply replace current db with its backup copy is not a good idea.

Re: How to undelete a deleted topic?

Find the topic's row and all it's posts' rows in the backup and insert them into topics and posts tables.

Carpe diem

Re: How to undelete a deleted topic?

You don't have to completely replace it. First, backup your current database. Then, replace the current db with the old one.

Now, open phpMyAdmin, and browse 'punbb_topics'. Now, look for the "id" of this topic you want to undelete. Then, click the checkbox to the left of its id, and then click the small "Export" icon under the topics table. On the next page, click go, then select everything and save it to a text file.

Next, go to 'punbb_posts' and click "SQL" on the tabbed navbar. Now, replace '{ID}' with your topic's id on the following piece of code and paste it on the text area (if your table prefix differs, just change it):

SELECT * FROM `punbb_posts` WHERE `topic_id` = '{ID}'

Now, click "Check All" and export the info and add it to your text file.

After you have the info, restore the new db, go to phpMyAdmin, click "SQL", paste the info from the text file, and click "Go".

That should work.

Re: How to undelete a deleted topic?

I will update my extension "Deleted Posts Log" soon.

It is a FluxBB extension, but I heard rumors that they should be compatible wink

FluxBB - v1.4.8

Re: How to undelete a deleted topic?

Even better, an extension that creates a "Recycle bin" forum that gets cleaned by command or in a time lapse. Deleted topics are moved to this recycle bin. As for posts, the same could be done, except with a "Recycle bin" topic.

6

Re: How to undelete a deleted topic?

Thanks much for the instructions. Will try them tonight.