Is there any way to restore your site from backup in the terminal?

This seems like a handy thing to be able to do since if you screw up configuring SSO you can’t get back into your site. I spent a week one day trying to get SSO configured, and now that it is configured correctly it seems that my account on the SSO (which I don’t control) is gone, so I can’t get in.

So, script/discourse restore fails because thor isn’t installed.

gem install thor fixes that, but then I’m still denied because:

URGENT: FATAL:  Peer authentication failed for user "discourse"

Solving my immediate problem, I suppose I could turn off SSO from the Rails console. . .

edit: to disable SSO from the rails console:

cd /var/discourse
./launcher enter app
rails c
SiteSetting.enable_sso=false
exit
exit
2 Likes