In a discussion titled “Syncing Production to Staging,” users explore methods to sync data from a production Discourse site to a staging environment, which has different settings including URL, Auth0, and disabled email. csmu proposes exporting settings via console, backing up the production database to S3, restoring it to staging, and re-importing settings. david supports this and references built-in rake tasks — rake site_settings:export and rake site_settings:import — available in Discourse’s GitHub repo. pfaffman adds a Ruby app for uploading settings and notes that Auth0 config may simply require adding the staging site to Auth0’s allowed list; also clarifies that email doesn’t need manual disabling if not configured. Ravi_Teja_Varma reports failure with the rake task, citing “Don’t know how to build task ‘site_settings:export’”. erikds, replying belatedly, advises that those rake tasks must first be set up in the environment before they can be invoked via rake. The thread collectively offers practical, code-backed solutions for safely syncing production data while preserving staging-specific configurations.
csmu
(Keith John Hutchison - Ceiteach Seán Mac Úistin)
1
Given we have different settings on a staging site, mainly
Url is different
Auth0 settings are different and
Email is disabled
what would be a good way to get the latest data from a production discourse site into a staging site.
I realize this is very late but for future reference, you need to set up the rake tasks linked in the post you are replying to before they will be available via rake.