Jump to content

Recommended Posts

Posted

I had a member accidentally get Flagged as a Spammer and have all their content deleted.  
I have a backup databases that contains this lost content.

Is it possible to do the following without causing problems?
1) upload my backup database to my server under a new name
2) take the site offline momentarily
3) use an SQL query to simply copy rows from the mebmers_posts table in my backup db into the active db,
    selecting by their post_id which do appear in the backup db, but do not appear in the active sites members_posts table?
4) rebuild the sitemap and search index

...Or is there some other variable, such as members_post_content somewhere that would no longer line up and cause problems? 

Posted (edited)

Can you get that member to register again at your forum? If you can, you can reassign all his or her previous posts by running a few sql queries. If you can not solve this till tomorrow, I will post the sql queries here after I run a few tests at my developement forum to make sure that it works fine.

Edited by Miss_B
Posted

Oh thank you!  The member is still registered, their account was not deleted, only banned, and then unbanned.  

I didn't realize the members posts would still be preserved in the database, I don't know why I thought the row would've just been removed from the table.  
 

Posted (edited)
12 hours ago, RobotMonkeyHæd said:

Search by either author_name or author_id returns no posts.

In that case it looks like posts are gone from the database. i.e. they have been hard deleted and therefore they will not be in the Mod Cp either.

In this case unfortunately they can not be reassigned. The only way to bring them back is to restore a backup, but that will mean that all recent stuff that have been acquired since the time of that backup till now will be gone too. 

Edited by Miss_B
Posted (edited)

It would be interesting to know if what the OP writes is possible to achieve somehow. I lack the technical knowledge to suggest a solution. However I wonder if this could be solved by merging two sites (databases) and all you merge from one of them is 1 member and/or his content. Probably easier said than done, but I reckon he shouldn't give up until knowing if this, or what he says is possible at all.

If it comes to choosing between the deleted content and the new content generated since the last backup that includes that member's content, I guess it depends on how important that member and his content is, in comparison to the amount of new content generated after the last backup. A potential tough choice indeed.

A pity the site wasn't taken offline immediately after the deletion of posts. This spam flagging function has caused some similar problems in the past from what I've read here. I recommend everyone to use it like I do, please see the screenshot below.

1537490041_ScreenShot2020-04-12at5_42_34pm.png.6a8a9987d1b4672ca4086de9160651a8.png

 

Even the "Hide" option could become a small nightmare if you manage a large community.

Edited by PPlanet
Posted

@Miss_B  Right, given that the menu shown in PPlanet's screenshot, I kind of figured these posts have been completely deleted.  As in their data has been removed from the database.  It was an interesting consideration to check the Moderator Panel and the data rows, but alas, all of that left us where we started.  Which is my original question:

Is it possible to simply get the deleted posts from a backup of the database, and copy their data rows into the forums_posts table and forums_topics tables?

That is the question.  That and "Or is there some other variable, such as members_post_content somewhere that would no longer line up and cause problems?"... meaning if you think the answer is no, why do you think that?  What prevents it? 

 "unfortunately they can not be reassigned" is a barely sufficient answer, but enough to offer resolve because you're not specifying how you came to that conclusion.  How do you know they can not be "reassigned"?  What information lead you to that?  Or is it just a personal suspicion, an er on the side of caution etc? 

Posted
6 minutes ago, RobotMonkeyHæd said:

@Miss_B  Right, given that the menu shown in PPlanet's screenshot, I kind of figured these posts have been completely deleted.  As in their data has been removed from the database.  It was an interesting consideration to check the Moderator Panel and the data rows, but alas, all of that left us where we started.  Which is my original question:

Is it possible to simply get the deleted posts from a backup of the database, and copy their data rows into the forums_posts table and forums_topics tables?

That is the question.  That and "Or is there some other variable, such as members_post_content somewhere that would no longer line up and cause problems?"... meaning if you think the answer is no, why do you think that?  What prevents it? 

 "unfortunately they can not be reassigned" is a barely sufficient answer, but enough to offer resolve because you're not specifying how you came to that conclusion.  How do you know they can not be "reassigned"?  What information lead you to that?  Or is it just a personal suspicion, an er on the side of caution etc? 

If the content is hard deleted, meaning it can not be found in the database, it can not be reassigned. If posts were still in the database, but their author has been deleted, they can be reasigned to another member with a few sql queries. That is what I meant.

To answer your other question, personally I will not do such a thing (getting the deleted posts from a backup of the database, and copy their data rows into the forums_posts table and forums_topics tables). 

It is not that simple imo, because more tables are involved than those 2 that you mentioned. 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...