Do we need to stop the mattermost service prior to exporting data?

Dear all,

I am reading this page:

I wish to do:

sudo -u mattermost bin/mattermost export bulk file.json --all-teams --attachments

OR:

sudo mmctl export create --attachments

My query is : Can I do either of the above 2 commands without stopping the mattermost service?

Where is this documented?

I am on Mattermost 9.11.12 in a Linux environment.

I would stop the mattermost service like this:

$ sudo systemctl stop mattermost

Thank you.

Hello,

Can someone please answer this query?

You don’t need to stop the Mattermost service to run an export with either bin/mattermost export bulk or mmctl export create. Both commands are designed to run against a live instance.

Stopping the service is only necessary if you want to guarantee that no new messages or attachments are created during the export (to ensure a perfectly consistent snapshot). In most environments, the small window of changes that might occur during export is acceptable.

Documentation reference: Bulk Export Tool. It notes that exports run against a running server, though it doesn’t explicitly say to stop the service.

So in practice:

  • For normal exports → safe to run without downtime.

  • For a fully consistent snapshot → briefly stop Mattermost, run the export, then start it again.

Dear Sir,

Many thanks for your reply.

The documentation reference that was given above I think is not correct. I think that this: Bulk export tool - Mattermost documentation is the correct reference.

Thank you and Best Regards,

Ashim