Mattermost, Inc.

Howto move postgresql data to docker

I want to move my mattermost installation to a docker-compose setup. Once I get docker-compose setup on a machine how do I restore my existing database.sql file to the postgresql container that is shipped with mattermost-docker github project?

Hi there, @gregf

As of now, we do not have an explicit way to migrate Mattermost instances between different environment (in this case native PostgreSQL > Docker PostgreSQL). If you are referring to the process of backing up and restoring the database itself, getting the SQL Dump and restoring it should do the trick.

Another alternative way to move Mattermost installation across different environments will be to perform a bulk export and bulk load process according to the following documentations:

Take note of the limitation of data types that can be exported and loaded back into Mattermost.