# Exporting data from version 0.9.4 installed through bitnami

**URL:** https://meta.discourse.org/t/exporting-data-from-version-0-9-4-installed-through-bitnami/33844
**Category:** Marketplace
**Tags:** unsupported-install, backups
**Created:** [September 28, 2015, 3:25pm UTC](https://meta.discourse.org/t/exporting-data-from-version-0-9-4-installed-through-bitnami/33844 "2015-09-28T15:25:51Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![alphydan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alphydan/32/106870_2.png) [@alphydan](https://meta.discourse.org/u/alphydan)
#### Post date: [September 28, 2015, 3:25pm UTC](https://meta.discourse.org/t/exporting-data-from-version-0-9-4-installed-through-bitnami/33844/1 "2015-09-28T15:25:51Z")

</div>

I installed Discourse 0.9.4 a while ago using Bitnami. After [some troubleshooting](https://community.bitnami.com/t/bitnami-discourse-amazon-mandrill-email-configuration-fails/14586), it worked for a few months without problem. However, when I tried to upgrade, I ran into all sorts of problems but I didn’t have the time to debug back then. A few months later, I could not access the website online anymore (I would just see a blank page).

I now have a bit of time again, and was hoping to backup the contents (maybe a json, csv or some format that I can parse and upload somewhere else). I can log into the EC2 instance and see the `apps`, `htdocs`, `stack` directories.

Is there an easy way to export? Is there a tutorial to do so?

Any help appreciated.

---

<div class="post-metadata">

### Author: ![johnmuhl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johnmuhl/32/43413_2.png) [@johnmuhl](https://meta.discourse.org/u/johnmuhl)
#### Post date: [September 28, 2015, 7:07pm UTC](https://meta.discourse.org/t/exporting-data-from-version-0-9-4-installed-through-bitnami/33844/2 "2015-09-28T19:07:35Z")

</div>

If you can directly access the database you should be able to use [`pg_dump`](http://www.postgresql.org/docs/9.4/static/app-pgdump.html) to export the data.

---

<div class="post-metadata">

### Author: ![johnmuhl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johnmuhl/32/43413_2.png) [@johnmuhl](https://meta.discourse.org/u/johnmuhl)
#### Post date: [September 28, 2015, 7:09pm UTC](https://meta.discourse.org/t/exporting-data-from-version-0-9-4-installed-through-bitnami/33844/3 "2015-09-28T19:09:18Z")

</div>

Here is what Discourse does.

> <https://github.com/discourse/discourse/blob/a726f5efea29fe6edb4d620747edfde74cdb9de7/lib/backup_restore/backuper.rb#L174-L194>

---

<div class="post-metadata">

### Author: ![alphydan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alphydan/32/106870_2.png) [@alphydan](https://meta.discourse.org/u/alphydan)
#### Post date: [September 28, 2015, 8:23pm UTC](https://meta.discourse.org/t/exporting-data-from-version-0-9-4-installed-through-bitnami/33844/4 "2015-09-28T20:23:03Z")

</div>

Thank you for the tips. Here’s what I tried so far, following the [Bitnami wiki](https://wiki.bitnami.com/Applications/BitNami_Discourse).

trying to edit any file would result in: `No space left on device`.  
So I decided to backup the images first:

```
scp -r -i ~/.bitnami/bitnami-hosting.pem bitnami@myserver.bitnamiapp.com:/opt/bitnami/apps/discourse/htdocs/public/uploads/default/* .

```

I tried,

```
pg_dump -U postgres bitnami_discourse > backup.sql 

```

but got an error:

```
/opt/bitnami/postgresql/bin/pg_dump.bin: error while loading shared libraries: libpq.so.5: cannot open shared object file: No such file or directory

```

I tried to find the offending library with `sudo find /opt/bitnami/postgresql/ -name libpq.so.5` and indeed it’s at `/opt/bitnami/postgresql/lib/libpq.so.5`

I tried `sudo ldconfig -v` as per this [SO answer](http://stackoverflow.com/questions/12781566/error-while-loading-shared-libraries-libpq-so-5-cannot-open-shared-object-file) and [this one](http://stackoverflow.com/questions/480764/linux-error-while-loading-shared-libraries-cannot-open-shared-object-file-no-s) but without success.

I’m afraid when I opened `/opt/bitnami/postgresql/bin/setenv.sh` to try to change the psql password, because of lack of space nothing was saved. So `setenv.sh` is now empty. Are the contents of `sentenv.sh ` standard? Or should I ask at Bitnami?

Thank you.

---

<div class="post-metadata">

### Author: ![alphydan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alphydan/32/106870_2.png) [@alphydan](https://meta.discourse.org/u/alphydan)
#### Post date: [April 6, 2016, 8:52am UTC](https://meta.discourse.org/t/exporting-data-from-version-0-9-4-installed-through-bitnami/33844/5 "2016-04-06T08:52:53Z")

</div>

I didn’t manage to solve this issue. I’m happy to [pay $45](https://www.upwork.com/job/Backup-database-old-Discourse-forum-version_~01d6c689ad4f28e95a/) to anybody who can help me solve it. Thank you.
