Daily Sync to INT environment?

AI-generated summary

The discussion revolves around synchronizing a Discourse INT environment with PROD, focusing on automating the process while preserving INT-specific configurations. Wurzelseppi asks about cloning PROD to INT regularly, preserving individual settings like hostname and SSL. RGJ suggests using rake site_settings:import for this purpose. Wurzelseppi shares their current method involving app.yaml and backups, then asks how to prevent email notifications to users during testing. Moin explains that the disable emails setting can be restricted to non-staff, preventing user emails while allowing staff to receive them. Wurzelseppi confirms this resolves their concern, and RGJ notes that this setting is automatically applied when restoring a backup.

Hi guys,

We have a INT and prod environment and it´s hard at the moment to keep track of all the differences.
Is it possible somehow, to clone the PROD environment (topics / categories / settings / … ) to INT regulary and keep the INT individual stuff (hostname / ssl / email / … ) ?

Do I have to do that manually (store the individual stuff somewhere / clone / overwrite the individual stuff with int specifics / … ), or is there some discourse tool which I could use ?

Many thanks in advance and Greetings,

JP

There is rake site_settings:import

See Restoring forum to a new server - #2 by csmu

Hey guys,

It´s actually as simple as:

  • Specify all stage-individual settings as hard-coded variables in app.yaml
  • Copy backup from prod to int
  • Restore it
  • Rebuild the app

At least here it works, but here comes the next question: So the instance won´t pester the users, how can I deactivate all settings that could lead to an email to the users?

  • Personal email settings
  • Watched, tracked categories
  • …

At the moment, I intentionally misconfigured the mail server, but someday when I want to test something with mails …

Any ideas?

Thanks and greetings,

WS

There is a disable emails site setting. I think it’s automatically activated when you restore a backup. For testing, you could enable e-mails for staff only.

Hey @Moin (that´s a German term for good morning, I like that :slight_smile: )

thanks for your answer. I´m aware of that option, but I´m afraid as soon as I activate it there will be a flood of mails going out.

What did you mean by

How would that be possible without reenabling the whole mail thing and don´t spam the users ?

The only thing I can imagine is to switch off the mail related user specific settings via rake console for every user.

Or

Would any of these

  • Deactivate
  • Stage
  • Suspend
  • Silence

do the trick ?

Cheers and thanks again,

WS

By choosing to disable emails for non-staff

Doh, that would be possible, yes :see_no_evil_monkey:

Thanks, I forgot completely, there is that “non-staff” option in that field :frowning:

Have a great day and thanks!

WS

That option is set automatically when you restore a backup, so you don’t need to do anything extra.