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

**URL:** <https://meta.discourse.org/t/is-there-any-way-to-restore-your-site-from-backup-in-the-terminal/42377>\
**Category:** Support\
**Created:** [2016年四月11日 06:31 UTC](https://meta.discourse.org/t/is-there-any-way-to-restore-your-site-from-backup-in-the-terminal/42377 "2016-04-11T06:31:25Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2016年十月14日 17:53 UTC](https://meta.discourse.org/t/is-there-any-way-to-restore-your-site-from-backup-in-the-terminal/42377/7 "2016-10-14T17:53:06Z")

</div>

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:

```plaintext
cd /var/discourse
./launcher enter app
rails c
SiteSetting.enable_sso=false
exit
exit

```

---

_[View the full topic](https://meta.discourse.org/t/is-there-any-way-to-restore-your-site-from-backup-in-the-terminal/42377)._
