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

Discussion in 'XenForo Questions and Support' started by Veer, Jan 22, 2014.

  1. Veer

    Veer Well-Known Member

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

    Brogan XenForo Moderator Staff Member

    It's not possible to do a partial restore/import as there are a lot of connected tables and data.
     
  3. Veer

    Veer Well-Known Member

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

    Brogan XenForo Moderator Staff Member

    Do the threads exist in the database?

    If they do it may be possible to recover them.
     
  5. Veer

    Veer Well-Known Member

    The last thread created under the lost forum node I remember is exist in the xf_thread table.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

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

    Veer Well-Known Member

    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.
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    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 likes this.
  9. Veer

    Veer Well-Known Member

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

    Brogan XenForo Moderator Staff Member

    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.
     
    Veer likes this.
  11. Gene Steinberg

    Gene Steinberg Well-Known Member

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

    Slavik XenForo Moderator Staff Member

    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.
     
  13. tommydamic68

    tommydamic68 Well-Known Member

    Have you tried simply disabling the recently upgraded/ installed add ons just because? :)
     
  14. Veer

    Veer Well-Known Member

Share This Page