Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Shariq Ansari Posted April 7, 2016 Posted April 7, 2016 Since IPS4 removed the undelete/soft delete functionality, we actually haven't had any problems... until today, when someone deleted a two-year old thread of their own that they care passionately about... I've got a database backup from yesterday... I don't want to restore it and lose everything that's happened today... Is there any documentation, or does anyone know, the specific queries one would have to execute to migrate a SINGLE topic, along with all its posted and associated data structures, from a backup/separate database (same IPS version, 4.1.9) into the current, live database?
Tom Irons Posted April 7, 2016 Posted April 7, 2016 You would have to look for the topic in forums_topics, then find all the posts related to that topic in forums_posts. If you have a database backup then they should all be queries ready to copy and paste into what ever database manager you use.
Shariq Ansari Posted April 7, 2016 Author Posted April 7, 2016 4 minutes ago, Hulu said: You would have to look for the topic in forums_topics, then find all the posts related to that topic in forums_posts. If you have a database backup then they should all be queries ready to copy and paste into what ever database manager you use. Thanks... do you know for sure that things are limited to just those two tables? What I'm worried about is other obscure system tables that might get touched or stuff like that... those two I know about and make sense... if they're good enough, that's great... any way to be sure about that?
Tom Irons Posted April 7, 2016 Posted April 7, 2016 There shouldn't be any other tables, they did a good job in IPS4 with the table names.
Colonel_mortis Posted April 7, 2016 Posted April 7, 2016 Any attachments in the thread may have been irrecoverably lost, but I think they are just cleaned up by a task, so it you recover it quickly it should be OK. You're looking in core_attachments_map where location_key=forums_Forums (I think), and id1 is the topic ID. Those rows will have been deleted from the db, but you want to recover them before the actual files are removed. The tag cache and search index will be messed up - tags probably don't matter, but the search index probably does, and is harder to fix. I think you need to run some manual PHP code calling \IPS\Content\Search\Index::i()->index( $comment ); where comment is each post in the thread. All follows for the topic will have been removed, as well as all notifications about it. If there was a poll, that will have been removed too.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.