Which says update every couple weeks, every couple of months you should update via
If you self-host Discourse, you occasionally need to run a manual update via the command line to get the latest security releases newest libraries. These updates are not picked up in admin/update, which is why you’ll occasionally need to do this additional step.
There are a few other topics which speak about admin->update vs ssh/console update, none of them make it clear which updates can’t be done in the browser.
My experience has been that in 9 months of running discourse, one web/admin update failed, I found the above article, ran the indicated commands in an ssh session.
Is there a better way to know which method to use than “the easier method fails”?
My own habit, now, is always to use the command line. Previously I’d use the web interface, but as it might not work and as it gives me less control and visibility, I no longer bother.
But my forums are quite low-traffic and a bit of downtime isn’t a big deal.
Also noteworthy is that I’m comfortable on the command line. But then, every discourse admin is going to have to use the command line at some point.
Thanks, that’s helpful, I have imagined that the command line could be faster (less downtime/monitoring the process time.
We’d considered a web/gui interface for updates a pretty big plus, because as much as I have decades of unix/linux coding & admin experience, I’m also a single point of failure in the organization, so it was a disappointment to learn that some updates require command line.
All good, it’s a great platform, more than worth the price of admission
It feels like a good idea to be ready for a command line upgrade, even if about to attempt a web one. Personally I check this forum beforehand, to see if anyone has any difficulties at present. It can happen that the codebase is temporarily broken. Also, I always take a backup and download it before starting.
I don’t fully understand Docker (an understatement) but I gather that if you find yourself with a half-upgraded forum which isn’t working you can in some sense start up the pre-upgrade version while you wait for help. (I searched for “restart the old container” but didn’t find the exact information for this.)
./launcher start app should bring back the pre-rebuild version if one fails midway.
Though I update through the UI more often than not. That way there’s no offline time. Occasionally you will need to update through the command line, but generally you’ll be prompted to do that after updating docker manager and before attempting to update Discourse itself.
Usually if a command line rebuild is required the UX will warn you and refuse to do an upgrade itself. That doesn’t always happen, though.
I have a dashboard.literatecomputing.com that will do command line rebuilds with a click. Though I hope that people will pay me to use it (and get my support), for a “limited time” you can join the Free Trial group and use it for free. It handles a fair number of issues, like removing plugins that have been moved to core, Postgres upgrades, restarting the old container if the rebuild fails, upgrading just the web container if it’s a 2-container install, and so on.
Fair point, I’m a bit more paranoid, I run a system snapshot before and after upgrades, in addition to the Discourse application backups. … I should probably learn more about restoring from backups.
I haven’t yet used a snapshot… I’ve a feeling it’s an extra-cost option.
But I do feel it’s important to download that backup: if the instance is completely broken, if my account got cancelled and the hoster deleted everything I was using, I’d still have my forum, and in a format which I can restore with any hoster I choose.
System snapshots (I think) require downtime while they are taking them and are pretty much overkill. A copy of your app.yml and the backup file are all you need. If the backups are on S3 then all you need is your app.yml to spin up a brand new server and restore the data.