# 从邮件恢复丢失的帖子

**URL:** https://meta.discourse.org/t/restoring-lost-posts-from-mails/87526
**Category:** Support
**Created:** [2018年五月15日 10:53 UTC](https://meta.discourse.org/t/restoring-lost-posts-from-mails/87526 "2018-05-15T10:53:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![gwmngilfen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gwmngilfen/32/302925_2.png) [@gwmngilfen](https://meta.discourse.org/u/gwmngilfen)
#### Post date: [2018年五月15日 10:53 UTC](https://meta.discourse.org/t/restoring-lost-posts-from-mails/87526/1 "2018-05-15T10:53:06Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [2018年五月15日 13:16 UTC](https://meta.discourse.org/t/restoring-lost-posts-from-mails/87526/2 "2018-05-15T13:16:27Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![gwmngilfen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gwmngilfen/32/302925_2.png) [@gwmngilfen](https://meta.discourse.org/u/gwmngilfen)
#### Post date: [2018年五月16日 01:09 UTC](https://meta.discourse.org/t/restoring-lost-posts-from-mails/87526/3 "2018-05-16T01:09:44Z")

</div>

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 `<noreply@your.discourse.site>` 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.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2020年十一月1日 01:56 UTC](https://meta.discourse.org/t/restoring-lost-posts-from-mails/87526/4 "2020-11-01T01:56:59Z")

</div>


