Recover Deleted Threads

akia

Well-known member
I've got loads of threads in my database that I'd like to try and recover.

The threads were in a forum which was deleted, but due to the bug at the time the threads were not removed.

Now I've had a poke around my database and they all have the node id set to 38.

I want to put them in in a forum that is node number 118.
I've tried to manually update one record and change the node id and it seems to work. The thread is showing in that forum.

Is this safe to do to recover all the other threads.

And is there a quick way to change all the node ids from 38 to 118
 
This query run on your database should do the trick.

Code:
UPDATE xf_thread SET node_id = 38 WHERE node_id = 118

Of course with any mass database operation such as this you should always back up your database first.

After running, you will need to go to Admin CP > Tools > Rebuild Caches and rebuild Thread and Forum information. Maybe Search Index too? Not sure on the last one.
 
Hmm. I think I got the query the wrong way round.

I really need to start getting more sleep.

118 is the destination. So I think my query needs to be swapped.
 
permanently,, there was not other option, what is soft? just visibility?
Usually if you have relevant permissions, you get two options:
raEXi9o.png


If you permanently deleted the first post in a thread, you permanently deleted the posts too. Only solution is to restore from a recent backup if you have one.
 
Top Bottom