Phew, good question - maybe Mattermost is not where it seems to be or they installed two instances or something like that.
You did use this download, right?
I’ll see if I can try to reproduce that this week, but I’m not sure how soon I can get to it.
When you’re logged in there via SSH, make sure nothing with regards to Mattermost is running:
ps ax | grep -i [m]atter
According to the documentation, Mattermost should be installed in /opt/mattermost
. When you copied over your files, did you make sure to overwrite everything that’s there or did you remove the files first?
I think it’s the best to move the current installation away and unpack the files you carried over from the old system into a freshly created directory:
cd /opt
mv mattermost mattermost.preinstalled
tar xf /pat/to/your/archive.tgz
Ideally, this should give you a new mattermost
directory (depending on the directory name in the archive, if it doesn’t match, rename it with mv
).
The ownerships might also differ, usually, you will assign ownership of the files to a mattermost
user:
chown -R mattermost: /opt/mattermost
If the user is not known, check the previous directory for a hint on how this user should be named.
The error message you’re seeing is definitely telling us that the database version is too new, so there must be some remrants of the old database available, so with all Mattermost-related service stopped, switch to the PostgreSQL user and drop the DB again:
su - postgres
dropdb mattermost
createdb mattermost -O mattermost
(But I’m not 100% sure what the username for the Mattermost user is, here it might also have a different name, you can check that by logging into the PostgreSQL console:
su - postgres
psql
\du
I think /etc/mattermost
is probably just a symlink to the configuration, but to see what we’re dealing with, can you share the output of the following commands?
ls -lR /etc/mattermost
ls -lR /opt/mattermost
systemctl status mattermost
su - postgres
psql
\du
\l
Thanks!