Mattermost, Inc.

[SOLVED] How to restore Off-Topic channel

Hello!

I accidentally deleted the default “Off-Topic” Channel.
Now I get an error in the mattermost log when a new created accounts joins the team.

[EROR] Encountered an issue joining default channels user_id=j7hco6gbntg5pg8n5aeoeqg1er, team_id=newg8s7goffiipfsuup9j16noa, err=SqlChannelStore.GetByName: Channel does not exist, teamId=newg8s7goffiipfsuup9j16noa, name=off-topic, sql: no rows in result set

When I try to recreate this channel I get error:

EROR] /api/v4/channels:SqlChannelStore.Save code=400 rid=74hu7xeb6bf5dqxjzou9tyedoa uid=9ze9i1sb83nnzn1gc4x9go5d8h ip=10.0.10.12 A channel with that URL was previously created [details: id=kf69irqn93gbtrptn6c51w8tke, Error 1062: Duplicate entry ‘off-topic-newg8s7goffiipfsuup9j16noa’ for key ‘Name’]

Any ideas how to resolve this?

(I have V 4.7.3 installed)

Thanks!

Hi!

You can use the CLI command “channel restore”,

For example platform channel restore myteam:off-topic.

You can find more information here: https://docs.mattermost.com/administration/command-line-tools.html#platform-channel-restore

Hi,

thanks a lot! That was exactly what I was looking for!

Cheers!

1 Like