Full disclosure, I have not done any manual maintenance on our self hosted Discourse install in a long long time, and somebody else set it up originally.
I needed to change my SMTP credentials, because SendGrid is requiring a move away from basic auth to API keys.
I found this document: Recommended Email Providers for Discourse
Which says:
To change the current email service, run
./discourse-setup
as well (this will bring the forum offline for a few minutes while it gets rebuilt).
I ran that command, answered the questions as expected, and this kicked off about 2,000 lines of output to stdout, ending with:
Upgrade Complete
----------------
Optimizer statistics are not transferred by pg_upgrade so,
once you start the new server, consider running:
./analyze_new_cluster.sh
Running this script will delete the old cluster's data files:
./delete_old_cluster.sh
-------------------------------------------------------------------------------------
UPGRADE OF POSTGRES COMPLETE
Old 10 database is stored at /shared/postgres_data_old
To complete the upgrade, rebuild again using:
./launcher rebuild app
-------------------------------------------------------------------------------------
cfd4df26701b4b4cd4a4202f30a9c8165a1ba609c921bffc25f250f52fee6cbe
Now, I was not expecting this to “upgrade” anything. I only wanted to change the SMTP credentials. But the site didn’t come back up automatically, so I did what the text says “to complete the upgrade” and ran:
./launcher rebuild app
This triggered another ~8,000 lines of output to stdout. The site eventually came back up, BUT it does not look the same:
- My logo was missing, replaced with “Discourse” logo.
- User avatar images were broken. Eventually, these just started working again.
- Images in posts and category logos were broken. These are still not working. I looked for images with matching filenames in the
./discourse/share
directory AND on our S3 bucket (where the URL is expecting to find them) but they do not exist. - Posts from my “support” category which I had hidden from the “latest” page is now visible on that page again.
- My “support” category is no longer visible on the “categories” page.
- The “categories” page now is 2 columns, with categories on the left and “latest” on the right. I think it was just a list of categories, before.
- The colour of
+
in my+ New Topic
button has changed from white to grey.
At this point I suspect some configuration has been lost, but all my posts are intact. Then I suspect that Discourse has upgraded itself (from what verison I don’t know, probably many many versions), and some underlying default settings, CSS, templates, etc., have changed causing the problems listed above.
Viewing the source, I can see that the version is now 2.6.0.beta6 which was apparently released only 7 days ago.
So my questions are:
- Is it normal to have to completely upgrade the software like this in order to apply a simple settings change, like SMTP credentials?
- How can I change settings or apply security updates without upgrading the whole software?
- Where are my images, or why has their URL changed in some way as to make them no longer accessible?
- Is there any way to rollback, without losing new posts since all this happened? I don’t even know what version we were running before. I do have Discourse backups on S3 (just a gzipped SQL dump).
- Do I just need to go through all the settings and customisation manually to fix things like the
+ New Topic
colour, and hidden/visible “support” category?
I thought that we had been keeping EBS snapshots of our EC2 volume where Discourse is hosted, but that turned out to not be the case. I’ve since enabled snapshots so we can rollback that way in future if necessary.
Thanks.