The MU forums have moved to WordPress.org

How do I restore a blog's posts after I accidentally deleted a user? (14 posts)

  1. billdennis5
    Member
    Posted 16 years ago #

    I went a little nuts and deleted a bunch of users I though were spammers. It turned out that I deleted a legitimate user, and now her blog is mussing all her posts. If there is a doc that will tell me how to use the a one-week0old database backup to restore her posts and all her posts, comments, categories, etc.

  2. STDestiny
    Member
    Posted 16 years ago #

    Basically you need to extract the tables that were used in her blog. Look for the blog number that is used in her tables and import all of the tables that use that number (wp_24_posts, wp_24_comments, etc) using mysqladmin or some other tool.

    One thing I've found useful with wpmu is to have a daily database backup (my host does this automatically for me). It's saved my butt a number of times already.

  3. billdennis5
    Member
    Posted 16 years ago #

    Thank you. Will do.

  4. billdennis5
    Member
    Posted 16 years ago #

    OK. Here's the situation. I have on my desktop a file called "wpmu.sql"

    How can i use this file to reinstall the data for this one blog alone. Forgive me for the stupid question, but I am but an egg.

  5. andrea_r
    Moderator
    Posted 16 years ago #

    Do you know the blog ID? You can open up that file in a text editor (as long as it's not so huge it crashes), and find all the tables with wp_BLOG ID YOU NEED_table names.

    They will all be in a group. Copy them into their own text file. There will be a bunch of insert statements as well. Save it as another file.

    Take this new file, go into phpmyadmin and Import it into your database. You may have to re-assign that user to that blog, but the data will be there.

    (standard disclaimers apply)

  6. billdennis5
    Member
    Posted 16 years ago #

    Thanks for the info.

    The data base downloaded a .gz file and I cannot open it as a text file. What program can I use to open/extract it? Again, I am but an egg.

  7. andrea_r
    Moderator
    Posted 16 years ago #

    Aw man, my memory is failing... you're on Windows? PKunzip, I think. Also WinZip. It's been a while. If you double-click on it, what happens? :D

    Next time you back up, you can tell it to be a .zip. ;)

  8. billdennis5
    Member
    Posted 16 years ago #

    Thanks everyone. All is well now.

  9. mking10004
    Member
    Posted 15 years ago #

    Hi everyone, I have the same issue but the blogger was away and did not notice for a week that her blog had been deleted. Are the posts still in my 3 day old database backup? Where do I find her blog id?

    Thanks for any help you can provide, the blog had over a years worth of entries.

  10. dgilmour
    Member
    Posted 15 years ago #

    Your 3 day old database backup contains exactly what the database had in it at the time - there's no "Recycle Bin" equivalent. You need a backup taken before the blog was deleted.

    You can get the blog ID from Site Admin / Blogs - it's the first column.

  11. billdennis5
    Member
    Posted 15 years ago #

    I have a bit of a residual problem .... it seems that all the photographs this user uploaded to his site prior to the ungrade have turned up missing. I open his file in blogs.dir and there's nothing there for those years.

    Anything that I can do to help this guy? Do I need to contact my hosting company and see if they have some server backup that MIGHT have these files?

    Thanks in advance for what I am sure is a stupid question.

  12. dgilmour
    Member
    Posted 15 years ago #

    From your original post, you said you'd deleted the user account, but not the blog. It was still there, just missing the posts. If nothing else has changed, the uploaded files should still be there.

    Are you definitely looking in the right place? There's no personal "file in blogs.dir" associated with the user, just the upload directories for each blog, identified by blog ID.

    Even if the user had deleted the individual image files, say to clear space, I'd expect the directory structure for her blog to remain.

  13. billdennis5
    Member
    Posted 15 years ago #

    Where would I find the upload directories? I know this must sound like a stupid question, but I simply CANNOT find them...

  14. Trent
    Member
    Posted 15 years ago #

    yoursite.com/wp-content/blog.dir/ and the "blog id" that you are looking for should have a folder.

    Trent

About this Topic

  • Started 16 years ago by billdennis5
  • Latest reply from Trent