PostgreSQL update wrecked my forum. Please help!

I wrecked my Discourse install at I had to update to PostgreSQL 12 but only had 11GB free for my 7GB database and kept throwing errors, so I used used the “manual update” method here: PostgreSQL 12 update

All seemed to work well (no errors), but now my site is reset to default and wants to me to re-register and set it up from scratch … no posts, no users, no settings. I know I have backups … we pay the $2/mo for Digital Ocean to take weekly backups (looks like they’re 3 days old, though), and the forum’s own internal backups seem to be accessible (4 days old), but I’m hoping I didn’t actually lose my data and there’s a way to reassociate it. I ran “./launcher cleanup” though.

Thanks for any help.

I checked my database size via terminal command: du -h /var/discourse/shared/standalone/postgres_data

My database was down to 83MB from 7GB previously. So it seems to have really been overwritten by the update. I ran ./launcher cleanup as part of the PostgreSQL update (as per the update directions), so there’s nothing to go back to except my backups. Discord wasn’t just disconnected from the database somehow.

I restored my backups, I can live with losing a couple of days of posts (my own fault for not backing up before updating). I just wish I knew why the PostgreSQL update overwrote my database, since I’m going to have try do it again eventually.


I would suggest, in the future only run ./launcher cleanup once your site is up and running and everything is working 100%.

and always backup when you do a big change like this :slight_smile: