# Cannot complete an export

**URL:** https://forum.mattermost.com/t/cannot-complete-an-export/25436
**Category:** Uncategorized
**Created:** [November 3, 2025, 12:51pm UTC](https://forum.mattermost.com/t/cannot-complete-an-export/25436 "2025-11-03T12:51:35Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![technical\_circle](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@technical\_circle](https://forum.mattermost.com/u/technical_circle)
#### Post date: [November 3, 2025, 12:51pm UTC](https://forum.mattermost.com/t/cannot-complete-an-export/25436/1 "2025-11-03T12:51:35Z")

</div>

Hi

Every export I have tried hits this:

`Data: map[bots_exported:12 channel_schemes_exported:0 channels_exported:285 direct_channels_exported:1308 emojis_exported:227 error:Error during job execution. — exportAllDirectPosts: Unable to get direct posts., failed to find Posts: context deadline exceeded include_archived_channels:true include_profile_pictures:true include_roles_and_schemes:true posts_exported:330470 roles_exported:22 skipped_direct_channels:,1m4q7kq9qfyibkbkc9c1nu8rho,5ewghuo8tib15x9my33z49j4iy,9e65xx4fppy8dg5g1k7k3xfe6w,drjao7hkkjycbp3m47dz8afjhr,np4bcgg53ig6bmq8zze5zm9ehh,uzt8jo7eoj8j8q736mp8anfatr,x1godf3w1jbmirsufmqjy7dfbe,zq35ssckufnd8mz13je9rwjxoc team_schemes_exported:0 teams_exported:3 users_exported:66]`

I’ve tried with various options e.g. –no-attachments

Every time this happens I see this in the journalctl

`mariadbd[182427]: 2025-11-03 12:45:54 419 [Warning] Aborted connection 419 to db: ‘mattermost’ user: ‘mmuser’ host: ‘localhost’ (Got an error writing communication packets)`

Our mysql has been altered thus:

`innodb_buffer_pool_size=100M`  
`net_read_timeout=3600`  
`net_write_timeout=3600`  
`max_allowed_packet = 1024M`  
`max_connections = 800`

And restarted.  
Also enable low-query-logging on mysql but nothing is logged.

I’ve also looked at config.json and upped “MaxOpenConns” to 800 in the sql section.

And restarted mattermost.

The docs mention “batches” at various points but do not seem to include any relevant links to indicate what to do.

how can we get past this error?

Any help gratefully taken.

Thanks

Bails

---

<div class="post-metadata">

### Author: ![technical\_circle](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@technical\_circle](https://forum.mattermost.com/u/technical_circle)
#### Post date: [November 4, 2025, 10:39am UTC](https://forum.mattermost.com/t/cannot-complete-an-export/25436/2 "2025-11-04T10:39:01Z")

</div>

> [@technical\_circle](#):
>
> Unable to get direct posts

I’m currently re running the export using the method here:

> <https://github.com/mattermost/mattermost/issues/13829#issuecomment-585136011>
>
> Hello dear team.
> 
> Would it be possible to export into CSV the particular chann…el from the team? I only found the way to export the whole team with the only limit by the time.

increasing the read /write timeouts on the sql connection line in the config.  
Seems to be working as its been running for over an hour with no timeouts.
