Exporting data from version 0.9.4 installed through bitnami

I installed Discourse 0.9.4 a while ago using Bitnami. After some troubleshooting, 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.

If you can directly access the database you should be able to use pg_dump to export the data.

Here is what Discourse does.

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

Thank you for the tips. Here’s what I tried so far, following the Bitnami wiki.

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 and this one 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.

I didn’t manage to solve this issue. I’m happy to pay $45 to anybody who can help me solve it. Thank you.