It's not. I was using a gitlab backup to migrate between two gitlab servers, and it didn't migrate mattermost together with the rest of the gitlab stuff.
So I followed this http://forum.mattermost.org/t/solved-how-do-i-back-up-a-gitlab-mattermost-database/1748 to dump the database, and I was trying to import the database with sudo -u mattermost /opt/gitlab/embedded/bin/psql -U gitlab_mattermost -h /var/opt/gitlab/postgresql -p 5432 mattermost_production < mattermost_production_backup
, but there were many errors with relations already existing.
What's a good way to restore the database?