Backup Restore Failed, log.txt inside

AI-generated summary

A user reports a failed backup restore on a Discourse installation, tracing the issue to a broken upgrade in March 2023. Despite attempting various restore methods, including command-line and UI options, the process fails. The user has started a fresh installation with a clean setup (3.2.0, PostgreSQL 16.2, Redis 7.2) and attempted to restore from S3 backups, but the restore fails with a PostgreSQL error: ERROR: relation "chat_channels" already exists. The log file is attached for reference. JammyDodger notes that the user is using the unsupported Bitnami install and recommends switching to the official Discourse installation for better community support. They also highlight the duplicate table error, suggesting the need to drop the existing “chat_channels” table, though they admit unfamiliarity with the solution.

I have spent a few days trying many things.

To preface this, some upgrade broke my discourse, I believe it was when Discourses upgraded to 3+.

That was back in March 2023, I worked on it intermittently the past 12 months to no avail and this week hit it hard.

No amount of restore worked, not on the command line, not over discourse UI.

I thought rather than fixing the old I would start a new install, had plenty of auto backups on my S3, 3.2.0/16.2 postgres/7.2 redis — very clean install works great .. .so I went for the restore and then it failed.

Being DB is not my expertise I am on a steep learning curve even trying to surmise what could solve my problem.

I thought maybe schema diff could, and while I see there are 14 tables with differences in a compare to a base install I still do not understand how to synchronize DB nor could I find a script to do so.

log.txt (97.7 KB)

It looks like you’re using the bitnami install rather than the official install, which is unsupported here. If you can move to using the standard install instead that would be great (and open you up to much more community support on here as well).

Though this stands out from your log:

ActiveRecord::StatementInvalid: PG::DuplicateTable: ERROR:  relation "chat_channels" already exists 

You may be able to have a search and see how others have handled similar issues. I believe you may need to drop the table, but it’s not something I’m familiar with.