Restoring lost posts from mails

(Greg) #1

We recently had a catastrophic failure of the hypervisor running or Discourse VM, and had to restore from a previous backup. Huge props to the people who on that, it was trivial to restore the site.

My question is about the data lost in the intervening time. Many of my users have mailing list mode enabled, and as such have a complete archive of the lost data. Is it possible to import that data in some way? have some vague ideas about dumping the data to disk in appropriate maildir / mbox format and using the importers… thoughts?

(Felix Freiberger) #2

If it’s just a few posts, you can manually re-post them and use the change ownership tool to assign these to the right users.

If you have too much posts for this to be feasible, building a custom tool to do so using the API might be your only option.

(Greg) #3

Update: so I did this in a fairly horrible manner. I used the mbox importer to import them into a new staff-only category, and then went through them and cleaned them up by hand. Painful, but at 142 mails, not too big a job.

Biggest pain point is that using the mailing list mode archive means every email is <> so all the posts get assigned to the same user. It’s also a pain because it (obviously) can’t handle posts that should be part of an existing thread.

Overall, it’s been a nasty job, but the excellent moderation tools (Change Ownership and Merge to Topic especially) make it fairly straightforward.