Cannot restore from backups (Mattermost)

My YunoHost server

**Hardware:**PC self built amd64
YunoHost version: 11.2.21.2
I have access to my server : Through SSH | through the webadmin |
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If yes, please explain:

Description of my issue

I upgraded mattermost to development branch but it failed. I uninstalled MM completely.
I tried to restore mattermost to my server but it failed with this log:
https://paste.yunohost.org/raw/ceyoqutuvu

Can somebody please help with this?
I have tried two backups but both fail with same error…

Hmmokay, if you are able to open the .tar backup archive, can you find the system configuration (should be somewhere in … something like mattermost/etc/systemd/system/mattermost.service) and share the content of the ExecStart line ?

Downloaded via Filezilla in macOS :slight_smile:
here it is extracted in macOS:
ExecStart=__INSTALL_DIR__/bin/mattermost
Downloaded by filezilla in Linux
also when I extract it in linux the line is
ExecStart= /var/www/mattermost/bin/mattermost
and the same extracted on the server via ssh…
thanks for helping me with this @Aleks

OK we found a solution with @Aleks and @orhtej2 which I will summarise here:

  1. We cheated the restore by modifying the restore script inside the archive by commenting out the line
    # ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Started Mattermost"
  2. We then tried to restart the mattermost service and got an error
  3. We removed the error by adding server to the mattermost.service file like this ExecStart= /var/www/mattermost/bin/mattermost server
  4. It then showed an error saying Error: Must enable Forward80To443 when using LetsEncrypt
  5. We then edited the file /var/www/mattermost/config/config.json so that UseLetsEncrypt": false was set
  6. This was the solution and it is now running again
1 Like

Good to hear it works again. But if you backup now then try to restore, will it require these steps again?

(I don’t think so because the issue lied in the fact that this person manually set UseLetsEncrypt to true in the past … which doesn’t immediately breaks Mattermost but most probably break upon restart/reboot … but if set back to false, everything is back to normal)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.