# How to properly package discourse as an image

**URL:** https://meta.discourse.org/t/how-to-properly-package-discourse-as-an-image/367363
**Category:** Support
**Created:** [May 23, 2025, 1:54pm UTC](https://meta.discourse.org/t/how-to-properly-package-discourse-as-an-image/367363 "2025-05-23T13:54:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![user14893](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/user14893/32/512271_2.png) [@user14893](https://meta.discourse.org/u/user14893)
#### Post date: [May 23, 2025, 1:54pm UTC](https://meta.discourse.org/t/how-to-properly-package-discourse-as-an-image/367363/1 "2025-05-23T13:54:56Z")

</div>

Can I package the running Discourse instance as an image and import it into a new VPS while ensuring it runs successfully? It has been hacked, so the backup cannot be exported from the panel. Will using docker commit cause issues with the database?

---

<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: [May 23, 2025, 3:59pm UTC](https://meta.discourse.org/t/how-to-properly-package-discourse-as-an-image/367363/2 "2025-05-23T15:59:33Z")

</div>

> [@user14893](#):
>
> ? It has been hacked,

If your VM has been hacked you have to assume that your Discourse container was hacked too.

> [@user14893](#):
>
> the backup cannot be exported from the panel

Your backups are in /var/discourse/shared/standalone/backups/default. See [Restore a backup from the command line](https://meta.discourse.org/t/restore-a-backup-from-the-command-line/108034). What I would do is [Move a Discourse site to another VPS with rsync](https://meta.discourse.org/t/move-a-discourse-site-to-another-vps-with-rsync/43812)

---

<div class="post-metadata">

### Author: ![user14893](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/user14893/32/512271_2.png) [@user14893](https://meta.discourse.org/u/user14893)
#### Post date: [May 23, 2025, 5:47pm UTC](https://meta.discourse.org/t/how-to-properly-package-discourse-as-an-image/367363/3 "2025-05-23T17:47:58Z")

</div>

Wanna get the latest backup from panel though.

---

<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: [May 23, 2025, 6:15pm UTC](https://meta.discourse.org/t/how-to-properly-package-discourse-as-an-image/367363/4 "2025-05-23T18:15:19Z")

</div>

There is no backup on the panel. The back up is on the hard drive (or SSD) in ` /var/discourse/shared/standalone/backups/default`. The panel is a way to download the file, except you can’t use it now, so you can copy it from the VM via SCP or something like it.
