# Backup not working on development environment

**URL:** https://meta.discourse.org/t/backup-not-working-on-development-environment/183849
**Category:** Development
**Created:** [March 20, 2021, 5:56am UTC](https://meta.discourse.org/t/backup-not-working-on-development-environment/183849 "2021-03-20T05:56:25Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![jakelunniss](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jakelunniss/32/194661_2.png) [@jakelunniss](https://meta.discourse.org/u/jakelunniss)
#### Post date: [March 20, 2021, 5:56am UTC](https://meta.discourse.org/t/backup-not-working-on-development-environment/183849/1 "2021-03-20T05:56:25Z")

</div>

Hi there,

I _finally_ managed to import posts from bbpress! Hooray!

Unfortunately now I can’t create a backup file of the development instance to import into the production.

Prior to the import, I created a backup and that worked fine.

Since the import, I get this page with zero progress (been like this for over 30 mins now):

 ![image](https://global.discourse-cdn.com/meta/original/3X/2/f/2f105fa36b25de78f93de4e0b374e1c4d6be683e.png)

As always help is most appreciated!

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [March 20, 2021, 10:57am UTC](https://meta.discourse.org/t/backup-not-working-on-development-environment/183849/2 "2021-03-20T10:57:02Z")

</div>

Maybe your development server crashed? 🤷‍♂️ You should see log output in the console where you started the rails server. Anyway, I recommend using the command line for creating backups in your development environment. Execute `script/discourse backup` in your `discourse` directory.

---

<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: [March 20, 2021, 11:12am UTC](https://meta.discourse.org/t/backup-not-working-on-development-environment/183849/3 "2021-03-20T11:12:53Z")

</div>

What Gerhard said!.

And you can restore from the command line too.

./launcher enter app  
discourse enable\_restore  
discourse restore

The last command will print the available backup files (letting you know you really got it in the right place), then you can copy paste the one you want.

---

<div class="post-metadata">

### Author: ![jakelunniss](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jakelunniss/32/194661_2.png) [@jakelunniss](https://meta.discourse.org/u/jakelunniss)
#### Post date: [March 20, 2021, 4:57pm UTC](https://meta.discourse.org/t/backup-not-working-on-development-environment/183849/4 "2021-03-20T16:57:28Z")

</div>

Amazing, thank you both @gerhard @pfaffman Super easy when you know how, hey.

Last question and I’ll leave you alone: how do I disable emails on the destination forum? I don’t want to spam bomb 3000 people… I’ve deleted the SMTP details from app.yml yet somehow I’m still receiving system emails form the production discourse and want to be reeeeeeeally sure I’m not going to accidentally email everyone.

---

<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: [March 20, 2021, 5:13pm UTC](https://meta.discourse.org/t/backup-not-working-on-development-environment/183849/5 "2021-03-20T17:13:03Z")

</div>

> [@jakelunniss](#):
>
> Super easy when you know how, hey.

Indeed, but it took me quite a while to figure out the command line backup in development. I’m thinking about a howto with such tricks.

When you restore it defaults to setting email to staff only. You’ll see a banner (it says all mail, but that’s not quite true).

---

<div class="post-metadata">

### Author: ![jakelunniss](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jakelunniss/32/194661_2.png) [@jakelunniss](https://meta.discourse.org/u/jakelunniss)
#### Post date: [March 21, 2021, 9:28pm UTC](https://meta.discourse.org/t/backup-not-working-on-development-environment/183849/6 "2021-03-21T21:28:57Z")

</div>

That would be very useful to muppets like me 🤣

EDIT: I was in the wrong directory. Doh.

---

<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: [April 20, 2021, 9:29pm UTC](https://meta.discourse.org/t/backup-not-working-on-development-environment/183849/7 "2021-04-20T21:29:32Z")

</div>

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