Channel restore


#1

Hi,

I used CLI to destroy customers account. By my mistake I deleted channel town-square. How I can restore it? Yes… I know, it has been hardcoded. I use MM 5.0


#2

Hi @moon! Here is a command that might help you: https://docs.mattermost.com/administration/command-line-tools.html#mattermost-channel-restore.


#3

Thanks for help, but I did “./mattermost delete town-square user” instead “./mattermost remove town-square user”. Restore did’nt work. Is any way to put some records into database ?


#4

Hi @moon! What error message are you getting when you try the restore command?

Would this API command help: https://api.mattermost.com/#tag/channels%2Fpaths%2F~1channels~1{channel_id}~1restore%2Fpost?


#5

On chat (in team):
/join town-square
give me: An error occurred while listing channels.

CLI:
./mattermost channel restore xxx:town-square
give me:
SqlChannelStore.GetByName: Channel does not exist, teamId=poez7bhn3bbkifqy8niitq66fo, name=town-square, sql: no rows in result set
Unable to find channel ‘xxx:town-square’

PS
I have “admin” access account.


#6

@moon Are you able to see the channel in a list when you run the channel list command https://docs.mattermost.com/administration/command-line-tools.html#mattermost-channel-list?