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

XF 1.1 Help; Deleted Entire Forum

Discussion in 'XenForo Questions and Support' started by cbertozz, Aug 1, 2013.

  1. cbertozz

    cbertozz Member

    Hi Guys
    I stupidly deleted a live forum when trying to prune a duplicate!!

    How can I recover a deleted Forum and the threads/posts within it?

    Appreciate your help....anyone!

    Thanks
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You will need to restore from a backup.

    Any content created since the backup was taken will be lost.
     
  3. cbertozz

    cbertozz Member

    Ok so that assumes that I have a backup service? Xenforo doesn't do anything automatically does it?
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    No.
    You or your host must make backups - it's a good idea to do it at least once a day.
     
  5. Chris D

    Chris D XenForo Developer Staff Member

    Frankly, not having a backup service would be ridiculous. So I'm sure you have one (y)
     
  6. Martok

    Martok Well-Known Member

    No, Xenforo doesn't back things up.

    If you aren't making backups yourself, check with your host - some run backups of databases as part of the service.

    If they don't and you haven't got any backup, then you've learned a valuable lesson today. ;)
     
  7. Chris D

    Chris D XenForo Developer Staff Member

    The good news is, if you've not yet upgraded to XenForo 1.2, your posts and threads may still be in the database. But it will be easier to restore from a backup if you have one.
     
    cbertozz and Brogan like this.
  8. cbertozz

    cbertozz Member

    OK so apparently we have nightly backups, is there a procedure that I need to follow to get the forum back - can I do it without affecting the rest of the site?
     
  9. cbertozz

    cbertozz Member

    No this is 1.1.4 - it will take ages to get at the backup - is there a procedure for getting them back out of the database?
     
  10. cbertozz

    cbertozz Member

    I have requested a backup but either way could you point me in the way of restoring from both backup or database?
     
  11. Chris D

    Chris D XenForo Developer Staff Member

    There's something you can try, but the problem is it's probably not recommended.

    As funny as it may sound, before trying this you should do a full backup so that if this goes wrong, you can just go back to how you were now. Better to have more backups than you need :)

    You might also want to wait and see if other people such as @Brogan or @Mike agree it's worth a try... I think Mike yesterday said something similar was NOT recommended.

    You need to know the node ID of the forum you deleted. If your forum had the "URL portion" option configured, let me know as the instructions will be different.
    • Create a new, blank forum where the one you deleted was.
    • Once created, make a note of the NEW forum's node_id.
    • Using PHP My Admin or similar, find the xf_node table and find the NEW node in the list. Change the node_id value for the NEW node so it has the node_id of the DELETED node.
    • Still in PHP My Admin, find the xf_forum table and again, find the NEW node in the list. Change the node_id value so that the new node again, has the ID of the old node.
    That *should* be enough to have those posts visible again. But you will need to go into Tools > Rebuild Caches and rebuild Forum information.

    Again, you can try this if you wish, but make sure you do have your hands on a working backup before you do so.
     
  12. cbertozz

    cbertozz Member

    Thanks just working through it all, appreciate the help!
     
  13. cbertozz

    cbertozz Member

    So should I be able to see the OLD forum in the in the xf_node table?
     
  14. Chris D

    Chris D XenForo Developer Staff Member

    No. You deleted it.

    You need to know what the node ID of the deleted forum is.
     
  15. cbertozz

    cbertozz Member

    So I need to remember it? There's no other trace remaining in the database I could search? If its not there at all - how can I restore it?

    I know you are going out of the way to help and I appreciate it.
     
  16. cbertozz

    cbertozz Member

    OK so admin log shows:

    array(2) {
    ["node_id"] => string(1) "7"
    ["_xfConfirm"] => string(1) "1"
    }

    So I assume the id is 7
     
  17. Chris D

    Chris D XenForo Developer Staff Member

  18. cbertozz

    cbertozz Member

    Hi Chris

    Almost there - looks like the right stuff is in the database but can't get the forum to appear on the site. I've done all the rebuild stuff in the Tools page but its still not appearing. Any ideas ? I'm new to Xenforo
     
  19. cbertozz

    cbertozz Member

    Its in the Node Tree in the Admin interface as well.
     
  20. Brogan

    Brogan XenForo Moderator Staff Member

    Have you tried rebuilding the other caches, or try editing the node and saving again, from within the ACP node tree.
     
    Chris D likes this.

Share This Page