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

**URL:** https://meta.discourse.org/t/how-to-copy-the-files-data-posts-from-production-to-staging-instance/291172
**Category:** Support
**Created:** [January 10, 2024, 1:40pm UTC](https://meta.discourse.org/t/how-to-copy-the-files-data-posts-from-production-to-staging-instance/291172 "2024-01-10T13:40:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Srujan\_Madderla](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/srujan_madderla/32/327711_2.png) [@Srujan\_Madderla](https://meta.discourse.org/u/Srujan_Madderla)
#### Post date: [January 10, 2024, 1:40pm UTC](https://meta.discourse.org/t/how-to-copy-the-files-data-posts-from-production-to-staging-instance/291172/1 "2024-01-10T13:40:16Z")

</div>

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 ?

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [January 10, 2024, 1:48pm UTC](https://meta.discourse.org/t/how-to-copy-the-files-data-posts-from-production-to-staging-instance/291172/2 "2024-01-10T13:48:21Z")

</div>

> [@Srujan\_Madderla](#):
>
> if we restore a backup from prod instance to staging the developed theme is getting lost.

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](https://meta.discourse.org/t/beginners-guide-to-developing-discourse-themes/93648)

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

---

<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: [January 10, 2024, 3:52pm UTC](https://meta.discourse.org/t/how-to-copy-the-files-data-posts-from-production-to-staging-instance/291172/3 "2024-01-10T15:52:11Z")

</div>

> [@Srujan\_Madderla](#):
>
> How to copy/transfer the files/data/posts from production to Staging instance ?

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](https://meta.discourse.org/t/setting-up-discourse-for-a-small-business-digital-ocean-communiteq-or-discourse-org/13434)
