• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 How to Recover a lost forum section through the Backup

Veer

Well-known member
#1
Hello,

Today I just noticed that one of my forum node (including threads) is gone, I mean just not there. Its shocking because I'm the only admin and I have not deleted any node. I have checked admin log and there is no record related to the node deletion. I still don't know what happened and how is this possible. I remember I have just installed and upgrade a couple of add-ons. The add-ons are not related to forum nodes & threads (separate application add-on, like Gallery, Blog)

I have a backup but its 10 days old, I can't restore full backup, there are lots of new data in these 10 days. Now the question is how to recover the lost forum node (and its threads) through this backup? Is it possible?
 

Veer

Well-known member
#3
There maybe a hint or clue in the error message, when I click on the lost forum node url it says:
The requested forum could not be found.

and when I open a thread that was under the lost forum node, it also says:
The requested forum could not be found.

Isn't this an unexpected error for a deleted thread?
 

Brogan

XenForo moderator
Staff member
#6
If all the "missing" threads have the same node ID then they can be restored using a query.
Are you able to check if that is the case?
 

Veer

Well-known member
#7
Yeah, Missing phrase is better :)

Well, there are hundreds of threads in that missing node, I don't know how to search and confirm all of them. But the last thread I remember is there and the node_id is the same id of missing node.
 

Brogan

XenForo moderator
Staff member
#8
You can use this query to move all threads from one node to another.

Take a backup first!

Code:
UPDATE xf_thread
SET node_id = 4
WHERE node_id = 2
In the query above, 2 is the current node ID of the "missing" threads, 4 is the destination node ID.
 

Veer

Well-known member
#9
Thank you Brogan, I will try this query on a backup installation first because I'm scared now.

Do you have any idea how the forum node was lost? It would be even worse if the same thing happened again with another node, that is why I'm looking to know the reason of deletion without human delete action. Would you suggest me the areas to check or try something to investigate it more?
 

Brogan

XenForo moderator
Staff member
#10
It can only be an add-on.

There is nothing in the core code which would account for that.
If there was a bug such as that it would have been reported by now.
 

Gene Steinberg

Well-known member
#11
Curious, I just found several threads that are missing in action. Is there a way to view recently deleted threads (maybe deleted by accident), or are they deleted from the database?
 

Slavik

XenForo moderator
Staff member
#12
There is some situations this happens, eg if you start an import with retain content id's entact, it will drop the default nodes (1 and 2 iirc).

You can either restore the information from a backup for the missing information to restore the nodes to the same id's or do as Brogan said and make a new node ID and move the threads there.
 

tommydamic68

Well-known member
#13
Hello,

Today I just noticed that one of my forum node (including threads) is gone, I mean just not there. Its shocking because I'm the only admin and I have not deleted any node. I have checked admin log and there is no record related to the node deletion. I still don't know what happened and how is this possible. I remember I have just installed and upgrade a couple of add-ons. The add-ons are not related to forum nodes & threads (separate application add-on, like Gallery, Blog)

I have a backup but its 10 days old, I can't restore full backup, there are lots of new data in these 10 days. Now the question is how to recover the lost forum node (and its threads) through this backup? Is it possible?
Have you tried simply disabling the recently upgraded/ installed add ons just because? :)