Hi Team,
I am trying to completely reset the Mattermost part of my installation.
So basically something like gitlab-ctl cleanse
but only for mattermost.
Is this easily possible?
Hi Team,
I am trying to completely reset the Mattermost part of my installation.
So basically something like gitlab-ctl cleanse
but only for mattermost.
Is this easily possible?
This would hugely helpful. Our early testing has gone very well, but we want to wipe the slate clean before we start using it more broadly.
Requests for additions to gitlab-ctl
would need to go into GitLab’s system, not sure the perfect place but maybe start with https://gitlab.com/gitlab-org/omnibus-gitlab/issues?
Mattermost is design as an archive, so there’s not a straight forward way to reset the database right now. We’ve created a ticket to track the addition of a “Reset Server” command to ./platform
that could do something similar to what’s being requested of gitlab-ctl
: https://mattermost.atlassian.net/browse/PLT-975
Thanks, to both of you!
I see that adding such a feature to platform makes much more sense. I will read through the story and maybe add a thought if necessary .
Thanks for a great tool that’s fun to use.
Here’s what worked for me (use at your own risk):
Login to the database
sudo -u gitlab-psql /opt/gitlab/embedded/bin/psql -h /var/opt/gitlab/postgresql -d gitlabhq_production
Drop mattermost DB
drop database mattermost_production;
Exit (\q
) and run
gitlab-ctl reconfigure
The last step will recreate the database
I think the way you’ve outlined it in your ticket will cover it, generally.
Couple questions/observations:
Great answer. Helped me a lot!
I tried to drop the database as described by @3rdcycle, but the command gitlab-psql cannot be found.
I used omnibus installation for Gitlab 8.0 and upgraded recently to Gitlab 8.4 (Mattermost 0.7-Beta to 1.4.0 respectively).
How can I launch the gitlab-psql command?
Did you forget the -u? gitlab-psql is the user under which the command (psql) is executed, not the command itself.
You’re right
sudo
isn’t installed, therefore I had missed that. Used instead su gitlab-psql
. Thanks!
That ticket is now closed but only the first two commands have been added to ./platform
, as far as I can see. Is a full reset command off the table?
I’m not understanding how this works. I can’t seem to figure out how to reset Mattermost on my GitLab installation. Can someone clarify this?
I dropped the mattermost database as described by @3rdcycle. Now Mattermost is showing the following error
GitLab Mattermost needs your help:
We could not get all teams
UPDATE
I disabled mattermost integration. Executed gitlab-ctl reconfigure
. Re-enabled mattermost and again executed gitlab-ctl reconfigure
. This time it worked.