# Private messages bulk export

**URL:** <https://forum.mattermost.com/t/private-messages-bulk-export/7228>\
**Category:** Troubleshooting\
**Created:** [May 6, 2019, 10:16am UTC](https://forum.mattermost.com/t/private-messages-bulk-export/7228 "2019-05-06T10:16:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://forum.mattermost.com/u/leon)\
**Post date:** [May 6, 2019, 10:16am UTC](https://forum.mattermost.com/t/private-messages-bulk-export/7228/1 "2019-05-06T10:16:22Z")

</div>

Hallo 🙂 I am running a mattermost server (v 5.10) on a Bitnami installation and I want to move the content to another server using the bulk export tool.

The general bulk export command “sudo ./mattermost export bulk file.json --all-teams” as meantioned in the docs works but it doesn’t export direct messages and private group messages.

Shouldn’t this work with version 5.10 like the changelog claimed?

I tried to specify the command but all the options that the command allows is “–all-teams”. How can I specify that direct messages are exported too? Is that even possible?

Thank you for your help 🙂

---

<div class="post-metadata">

**Author:** ![amy.blais](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/amy.blais/32/7481_2.png) [@amy.blais](https://forum.mattermost.com/u/amy.blais)\
**Post date:** [May 6, 2019, 12:51pm UTC](https://forum.mattermost.com/t/private-messages-bulk-export/7228/2 "2019-05-06T12:51:42Z")

</div>

Hi @leon,

Thank you for reaching out,

Did you try this section in our docs: [https://docs.mattermost.com/administration/bulk-export-data.html#directchannel-object](https://docs.mattermost.com/administration/bulk-export-data.html#directchannel-object)?

---

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://forum.mattermost.com/u/leon)\
**Post date:** [May 6, 2019, 12:57pm UTC](https://forum.mattermost.com/t/private-messages-bulk-export/7228/3 "2019-05-06T12:57:36Z")

</div>

Hi @amy.blais

thank you for your answer. I checked the documentation for the bulk command and also this page but how to I specify the direct channel object in the export command? So far neither the direct channels nor the messages are part of the file.json file.

---

<div class="post-metadata">

**Author:** ![amy.blais](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/amy.blais/32/7481_2.png) [@amy.blais](https://forum.mattermost.com/u/amy.blais)\
**Post date:** [May 20, 2019, 2:49pm UTC](https://forum.mattermost.com/t/private-messages-bulk-export/7228/5 "2019-05-20T14:49:20Z")

</div>

Hi @leon,

DMs should be part of the export, by default ([see here](https://github.com/mattermost/mattermost-server/pull/10421)). Did the export (with log level debug) produce any logging output?

---

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://forum.mattermost.com/u/leon)\
**Post date:** [May 20, 2019, 8:02pm UTC](https://forum.mattermost.com/t/private-messages-bulk-export/7228/6 "2019-05-20T20:02:00Z")

</div>

Hi @amy.blais

I found the error. Some custom emojis caused an error which stopped the bulk export before it stored the DMs. After deleting the custom emojis the export worked perfectly as in the docs.

Still thank you for your support.
