XF 1.4 Restoring a single thread from a backup

rys

Member
I accidentally hard deleted a thread in my forum earlier today. I have a backup of the database from a few hours before. It is possible to restore the thread and its posts?

If so, is it as simple as restoring the inserts into xf_thread and xf_post, or are there more tables involved?

Thanks in advance!
 
There really isn't a way to do this. There are potentially a large number of tables involved, including some denormalized data in places like the user table.
 
Well there is a rather clunky way to do it with Addons but I would not want to try it with a long thread

You need to repost everything manually using the Addons login as user and change date
 
Thanks for the clarification it's a nightmare. I manually copied and pasted from a server running the backup copy of the DB, into the live site. It broke attribution for the posts (nearly 400 of them) but at least the post contents are back.
 
Would it not work to run the backup database on a copy/test installation then create a new forum and move that thread to it, delete all threads and forums except that thread and forum, delete all users not in that thread and then do an import?

(With forum closed and backed up of course)
 
Last edited:
I was able to restore a thread recently with a crude method.

Do this in your older database. Go to phpMyAdmin
1. Select the table xf_thread (xf is my prefix)
2. Find the thread_id of the thread you deleted.
3. Delete all threads except the thread you want. Run this: DELETE * FROM xf_thread where thread_id !=your thread number
4. Do the same for xf_posts. DELETE * FROM xf_post where thread_id !=your thread number
5. Delete all tables except xf_thread and xf_post
6. Now export the database and import into your current database
 
Top Bottom