Success in upgrading to 4.2.0 from 4.1.6

What I learned:

- go sequential. 4.1.6 to 7 to 8 to 9 and then .20

- do server level backups along the way

- be precise in the steps for 4.2.0. The Mastodon docs aren't very good at outlining the EXACT steps to follow.... you've got to examine several upgrade docs to figure out the process. Personally, I find the docs kind of dumb; why they can't outline all the steps in one doc I don't know

Here's what I did 4.2.0

su - mastodon

cd .home/mastodon/live

git fetch --tags
git checkout v4.2.0

THEN

update Ruby as documented here

"If you are using `rbenv`, update the list of available versions and install Ruby 3.2.2 by doing `RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install` in the Mastodon install directory (e.g. `/home/mastodon/live`)"

(You won't find these details on the upgrade page that shows up first at https://github.com/mastodon/mastodon/releases. You will find it at
https://github.com/mastodon/mastodon/releases/tag/v4.2.0)

"v4.2." · Releases · mastodon/mastodon

Your self-hosted, globally interconnected microblogging community - mastodon/mastodon

GitHub

THEN

bundle install
yarn install --frozen-lockfile

RAILS_ENV=production bundle exec rails assets:precompile

SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate

then exit

Start processes
systemctl restart mastodon-sidekiq
systemctl reload mastodon-web
systemctl restart mastodon-streaming

Test that you can still get back in

@jimcarroll All of what you describe makes me so happy that I can satisfy my mastodon needs (single user instance) with a dockerized deployment. Usually no more than 3 or 4 commands to run, all outlined in the release notes.
@bplein @jimcarroll Are there instructions on how to move from a native (naked) to a dockerized version of Mastodon? I would so prefer to be running in containers but it was iffy when I started this instance last year.
@sfoskett @bplein i've avoided docker....
@jimcarroll @sfoskett I’m not trying to evangelize it. I crossed the knowledge chasm of containers back in 2017, so it’s a natural thing for me to utilize. I have a friend who I convinced to use Docker for Mastodon and the learning curve for the ins and outs was steep.
@bplein @sfoskett No worries. I gave it a go and it wasn't my thing. Having said that, I'm running a Home Assistant container inside a Virtual Machine on an old 2009 iMac running Ventura. We all have our unique paths to go down!

@jimcarroll @sfoskett Haha! And I, a container-first practitioner, installed a VM on an old iMac in order to run the complete HomeAssistant OS … because the container is missing some things.

As you said, we all have our own paths. Thank goodness we have choices and some freedom!

@bplein @sfoskett My home server rack. All of the Mac's but one are running Linux. Gives old machines a new life! But there's also a 2009 iMac running the Home Assistant setup under Virtual Box within Ventura.

I think stuff like this keeps the minds of oldsters like us busy and engaged LOL.

@jimcarroll @sfoskett

My office closet has 3 Mac mini Servers (running Ubuntu), a bunch of Unifi switching, and a "server" built on an AMD workstation motherboard (also running Ubuntu), in a gaming style case. Used to have my old Mac Pro running Linux but I decided the watts per compute were too low. My old iMac (still macOS) sits on top of my bookcase.

No photos, the closet is a wiring disaster :)

@sfoskett

It would be offline but pretty easy. Test it with a test instance first. But you'd basically take down your running instance (after a complete postgres backup, along with redis dump and let's assume you rebuild elastic index), initialize the new instance (same name), take down the web/streaming/sidekiq containers, and restore postgres. You can restore redis too but I think your system will come up with few glitches even if you didn't restore redis.

@sfoskett

I have a github repo with docker-compose that "just works", but my running instance has drifted a bit from it. I'd be happy to discuss AFTER I get back from vacation in a couple weeks or so.

@sfoskett

https://github.com/bplein/mastodon-docker-compose

I have changed my sidekiq around a bit, and may change it again, I think I'm doing it overkill right now for a single user instance.

GitHub - bplein/mastodon-docker-compose

Contribute to bplein/mastodon-docker-compose development by creating an account on GitHub.

GitHub