# Sincronizando Produção com Staging

**URL:** <https://meta.discourse.org/t/syncing-production-to-staging/109801>\
**Category:** Support\
**Created:** [22 Fevereiro , 2019 06:54 UTC](https://meta.discourse.org/t/syncing-production-to-staging/109801 "2019-02-22T06:54:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![csmu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/csmu/32/124581_2.png) [@csmu](https://meta.discourse.org/u/csmu)\
**Post date:** [22 Fevereiro , 2019 06:54 UTC](https://meta.discourse.org/t/syncing-production-to-staging/109801/1 "2019-02-22T06:54:08Z")

</div>

Given we have different settings on a staging site, mainly

1. Url is different
2. Auth0 settings are different and
3. Email is disabled  
what would be a good way to get the latest data from a production discourse site into a staging site.

I’m thinking.

1. Export settings via console.
2. backup production database to s3
3. restore staging from s3
4. restore settings via console.

---

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [22 Fevereiro , 2019 10:23 UTC](https://meta.discourse.org/t/syncing-production-to-staging/109801/2 "2019-02-22T10:23:56Z")

</div>

That sounds like a good approach. We have a couple of [rake tasks](https://github.com/discourse/discourse/blob/master/lib/tasks/site_settings.rake) to help with exporting/importing site settings:

```plaintext
rake site_settings:export

```

and

```plaintext
rake site_settings:import

```

---

<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:** [22 Fevereiro , 2019 11:22 UTC](https://meta.discourse.org/t/syncing-production-to-staging/109801/3 "2019-02-22T11:22:22Z")

</div>

I’ve also got a ruby app that will upload settings  
[https://github.com/pfaffman/discourse-settings-uploader](https://github.com/pfaffman/discourse-settings-uploader)

The auth0 config might be as simple as allowing the new site to the auth0 config.

If you don’t configure email, it doesn’t matter if you disable it.

---

<div class="post-metadata">

**Author:** ![Ravi\_Teja\_Varma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ravi_teja_varma/32/195200_2.png) [@Ravi\_Teja\_Varma](https://meta.discourse.org/u/Ravi_Teja_Varma)\
**Post date:** [18 Janeiro , 2021 04:40 UTC](https://meta.discourse.org/t/syncing-production-to-staging/109801/4 "2021-01-18T04:40:37Z")

</div>

Isso tem falhado para mim… diz `Don't know how to build task 'site_settings:export'`

---

<div class="post-metadata">

**Author:** ![erikds](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erikds/32/245561_2.png) [@erikds](https://meta.discourse.org/u/erikds)\
**Post date:** [24 Janeiro , 2023 19:25 UTC](https://meta.discourse.org/t/syncing-production-to-staging/109801/5 "2023-01-24T19:25:55Z")

</div>

Sei que isto é muito tarde, mas para referência futura, você precisa configurar as tarefas do rake mencionadas na postagem à qual você está respondendo para que elas estejam disponíveis via `rake`.

---

<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:** [1 Fevereiro , 2024 23:59 UTC](https://meta.discourse.org/t/syncing-production-to-staging/109801/6 "2024-02-01T23:59:05Z")

</div>

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