# Hoe app.yml-bestand te herstellen als ik het per ongeluk verwijder?

**URL:** https://meta.discourse.org/t/how-to-regenerate-app-yml-file-if-i-delete-it-accidentally/272685
**Category:** Self-hosting
**Created:** [24 juli 2023 om 20:14 UTC](https://meta.discourse.org/t/how-to-regenerate-app-yml-file-if-i-delete-it-accidentally/272685 "2023-07-24T20:14:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![th21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/th21/32/211915_2.png) [@th21](https://meta.discourse.org/u/th21)
#### Post date: [24 juli 2023 om 20:14 UTC](https://meta.discourse.org/t/how-to-regenerate-app-yml-file-if-i-delete-it-accidentally/272685/1 "2023-07-24T20:14:38Z")

</div>

I try to add some plugins after restoring a site from a backup and delete the app.yml by mistake, will my site get wiped out if I do ./discourse-setup again?

---

<div class="post-metadata">

### Author: ![italo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/italo/32/315833_2.png) [@italo](https://meta.discourse.org/u/italo)
#### Post date: [24 juli 2023 om 20:48 UTC](https://meta.discourse.org/t/how-to-regenerate-app-yml-file-if-i-delete-it-accidentally/272685/2 "2023-07-24T20:48:04Z")

</div>

Hi @th21!

I’m still new here, but I believe that if you don’t delete your /shared directory, all your data will be safe. What the ./discourse-setup will change are the plugins, smtp settings and then run rebuild. I would wait for further confirmation, as I’m a new user, but I’m almost sure of that.

You can always do a backup and restore later as well. Check this [article](https://meta.discourse.org/t/create-download-and-restore-a-backup-of-your-discourse-database/122710) for more information on that.

---

<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: [25 juli 2023 om 00:03 UTC](https://meta.discourse.org/t/how-to-regenerate-app-yml-file-if-i-delete-it-accidentally/272685/3 "2023-07-25T00:03:50Z")

</div>

Nice work, @italo!

Yes, it should be safe to run discourse-setup again and your data should be intact.

You might do

```plaintext
cd /var/discourse
./launcher start app

```

That will restart your old container.

```plaintext
./launcher enter app
discourse backup

```

That will make a backup.

Type `exit` to get out of the container.
