# Restore hosted discourse on local self-hosted

**URL:** https://meta.discourse.org/t/restore-hosted-discourse-on-local-self-hosted/123997
**Category:** Support
**Created:** [July 25, 2019, 9:24pm UTC](https://meta.discourse.org/t/restore-hosted-discourse-on-local-self-hosted/123997 "2019-07-25T21:24:12Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![phallguy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/phallguy/32/150760_2.png) [@phallguy](https://meta.discourse.org/u/phallguy)
#### Post date: [July 25, 2019, 9:24pm UTC](https://meta.discourse.org/t/restore-hosted-discourse-on-local-self-hosted/123997/1 "2019-07-25T21:24:12Z")

</div>

I’m hacking on some custom themes and sso and want to work locally instead of against our discourse-hosted instance. I’ve taken a backup of the hosted instance and uploaded to my local self-hosted instance.

When I try to restore I get an error about versions

```plaintext
[2019-07-25 21:16:55] Current version: 20190717133743
[2019-07-25 21:16:55] Restored version: 20190725020422
[2019-07-25 21:16:55] EXCEPTION: You're trying to restore a more recent version of the schema. You should migrate first!
[2019-07-25 21:16:55] /var/www/discourse/lib/backup_restore/restorer.rb:250:in `validate_metadata'

```

I’ve already visited `/admin/upgrade` on the local instance and it tells me everything is already up-to-date.

How can I get this backup installed locally?

As a side note, this turned into an experiment about what would happen if we ever needed to bring it in-house and I’d like to be more confident that we can do that in the future.

Thanks all!

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [July 25, 2019, 9:30pm UTC](https://meta.discourse.org/t/restore-hosted-discourse-on-local-self-hosted/123997/2 "2019-07-25T21:30:09Z")

</div>

Is your self-hosted instance installed using our official guide and tracking the `tests-passed` branch?

---

<div class="post-metadata">

### Author: ![phallguy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/phallguy/32/150760_2.png) [@phallguy](https://meta.discourse.org/u/phallguy)
#### Post date: [July 25, 2019, 9:32pm UTC](https://meta.discourse.org/t/restore-hosted-discourse-on-local-self-hosted/123997/3 "2019-07-25T21:32:41Z")

</div>

I installed following the guide [here](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md) but setup a local Ubuntu in VirtualBox instead of using DigitalOcean. I’m not sure specifically about what branch I’m tracking. Dashboard version shows this:

 ![30%20PM](https://global.discourse-cdn.com/meta/original/3X/8/d/8d50127cbdf0f0f9555d9c28d7aeb97e65f7ffbb.png)

---

<div class="post-metadata">

### Author: ![phallguy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/phallguy/32/150760_2.png) [@phallguy](https://meta.discourse.org/u/phallguy)
#### Post date: [July 25, 2019, 9:33pm UTC](https://meta.discourse.org/t/restore-hosted-discourse-on-local-self-hosted/123997/4 "2019-07-25T21:33:50Z")

</div>

And upgrade page:

 ![21%20PM](https://global.discourse-cdn.com/meta/original/3X/a/c/ac7ad941221e68f492dedb9fea7ad18ed5ea809a.png)

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [July 25, 2019, 9:36pm UTC](https://meta.discourse.org/t/restore-hosted-discourse-on-local-self-hosted/123997/5 "2019-07-25T21:36:08Z")

</div>

Are you hosted in which plan?

You may be missing a migration that comes from a plugin.

---

<div class="post-metadata">

### Author: ![phallguy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/phallguy/32/150760_2.png) [@phallguy](https://meta.discourse.org/u/phallguy)
#### Post date: [July 25, 2019, 9:36pm UTC](https://meta.discourse.org/t/restore-hosted-discourse-on-local-self-hosted/123997/6 "2019-07-25T21:36:59Z")

</div>

Yes the site I took the backup from is hosted with y’all. We’re on the “Business” plan. I haven’t made any attempt to get plugins working locally yet.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [July 25, 2019, 9:38pm UTC](https://meta.discourse.org/t/restore-hosted-discourse-on-local-self-hosted/123997/7 "2019-07-25T21:38:33Z")

</div>

> [@phallguy](#):
>
> I haven’t made any attempt to get plugins working locally yet.

Oh I see, per this error message:

> [@phallguy](#):
>
> Restored version: 20190725020422

Is is missing a migration from [GitHub - discourse/discourse-user-notes: Plugin for Staff users to create notes on users · GitHub](https://github.com/discourse/discourse-user-notes).

To get a full 1-to-1 copy, you will want to install the plugins listed here for standard AND business: [Plugin directory | Discourse - Civilized Discussion](https://www.discourse.org/plugins#business)

---

<div class="post-metadata">

### Author: ![phallguy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/phallguy/32/150760_2.png) [@phallguy](https://meta.discourse.org/u/phallguy)
#### Post date: [July 25, 2019, 9:38pm UTC](https://meta.discourse.org/t/restore-hosted-discourse-on-local-self-hosted/123997/8 "2019-07-25T21:38:59Z")

</div>

Awesome I’ll take a crack at that. Thanks!

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [August 24, 2019, 9:39pm UTC](https://meta.discourse.org/t/restore-hosted-discourse-on-local-self-hosted/123997/9 "2019-08-24T21:39:00Z")

</div>

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