For troubleshooting questions, please post in the following format:
Summary
Accidentaly deleted a Gitlab project associated with a team, tried to restore the Mattermost team by “platform channel restore team:channel” command but couldn’t get it to work.
Steps to reproduce
Version: 4.8.1
Observed behavior
Can list the channels of the deleted team by “platform channel list team_name” and also team statistics shows up on the System Console statistics page. When i try to restore the channels by “platform channel restore team:channel” the output is this:
[2018/06/04 13:47:23 +03] [INFO] Loaded system translations for 'en' from '/opt/gitlab/embedded/service/mattermost/i18n/en.json'
[2018/06/04 13:47:23 +03] [INFO] Server is initializing...
[2018/06/04 13:47:23 +03] [INFO] Pinging SQL master database
[2018/06/04 13:47:23 +03] [INFO] Pinging SQL replica-0 database
Checked the logs but couldn’t find anything about this issue. Google was not helpful too. So how can i go about solving this? Thanks in advance.
It looks like the connection to your replica database isn’t working or is timing out. Can you verify that Mattermost is able to connect to that database?
If it can, try increasing the log level and re-running the command. There are two settings in Mattermost that can increase the log level.
To set the File Log Level to Debug: Go to System Console > General > Logging and set File Log Level to DEBUG. If you can’t access the System Console find this line in config.json
"FileLevel": "INFO"
and change it to this:
"FileLevel": "DEBUG"
To enable database query debugging: Go to System Console > Advanced > Database and then set Trace to true. If you can’t access the System Console find this line in config.json:
"Trace": false
and change it to this:
"Trace": true
Note: Disable these once you’ve reproduced the problem to prevent log bloat.
And another thing to worry about: even though the team and the channels are deleted for at least a week, team statistics page give graphics like this :
Unfortunately I am not knowledgeable enough about this topic, so I encourage you to join our nightly build server and then join either Developer Toolkit channel or Peer-to-peer help channel to discuss this issue - our engineers can most certainly help with this and they are most active at the build server.