I was looking at the migration documents https://docs.mattermost.com/administration/migrating.html#migrating-the-mattermost-server.
In particular, step 4. And step 4 says:
Backup the database from the SOURCE Mattermost server and restore it in place of the database to which the DESTINATION server is connected.
And I’m like, duh. But what are the commands to do it?
I searched around and found the commands to export the database, but trying to restore it, not so lucky. There is this command:
sudo -u mattermost /opt/gitlab/embedded/bin/psql -U gitlab_mattermost -h /var/opt/gitlab/postgresql -d mattermost_production -f ./mattermost_production
But all I get is a bunch of relation exists errors. Is that normal?