How to copy the files/data/posts from production to Staging instance

AI-generated summary

Copy Files/Data/Posts from Production to Staging Instance

Srujan_Madderla is seeking guidance on copying files/data/posts from production to a staging instance without losing a developed theme during the process.

itsbhanusharma suggests reviewing the approach to theme development, citing potential issues with the current method. They also point out that restoring a backup should not typically result in lost design and recommend following best practices for theme development.

pfaffman provides a straightforward solution: create a backup in production and restore it in staging, especially if they share an S3 backup bucket. Alternatively, if only themes are involved, a staging site may not be necessary; instead, install the test theme and have the developer use it.

How to copy/transfer the files/data/posts from production to Staging instance ?
we are working on developing a new theme if we restore a backup from prod instance to staging the developed theme is getting lost.

To test all the functionalities, we would need to import the existing posts from PROD to Staging.

Can someone please guide on this ?

That means there is something wrong with your approach of developing the theme. You need to review your approach and follow best practices for development of themes.
Read: Developing Discourse Themes & Theme Components

I’ve performed backup/restore across many discourse sites but have never had an instance where design was lost due to backup/restore.

Make a backup on production and restore it in staging. if they share an S3 backup bucket then it’s pretty easy.

If it’s just themes, though, your don’t really need a staging site, you can just install the test theme and have your developer use it. check out the Install the Discourse Theme CLI console app to help you build themes