💾 Archived View for the.teabag.ninja › gemlog › 20230425-adventures-in-migrating-servers captured on 2023-09-08 at 16:05:52. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

Adventures in Migrating Servers

2023-04-25

Server...?

Okay, so maybe "server" is a bit strong.... lets say a small VPS in the cloud, perhaps. Yeah. Lets run with that - because thats what it is ;-)

When I set up the teabag.ninja Akkoma instance, I had it running on a Linode "Nanode": 1CPU, 1GB RAM, and 25GB storage. And it ran fine. I could not see an as cost effective option based in New Zealand, so stayed with it.

Though, for a few months, I had a federation issue. I noticed a few posts would not show which I know existed... I could search, or click through from replies and the posts never showed. Log files showed nothing. - I will return to this later

Hetzner

Anyway, I investigated other VPS, and settled on Hetzner as a cheaper alternative. They had USA West option now, which is *sort of* close enough? Linode is Australia, and I am based in NZ. So to give it a stab, I did a backup of the Akkoma DB and migrated it over to a fresh Akkoma OTP install, on the smallest VPS on Hetzner. Which adds an extra GB of RAM over Linode!

I did however notice lag over ssh.., which made me wary, but the web frontend (and using Husky app on mobile) all worked fine for Akkoma. And it saved me a couple of bucks a month. :grin:

ARM64

So then Hetzner released ARM64 options!!! 2 cores, 4GB RAM.... and for the same low price or 4-ish Euro!

So of course I then did `pgdump` and moved over to the ARM instance... but found no OTP build for ARM! I had never done a source build... but no time like the present. Finally found an image that had the prerequisite packages (Fedora 37) and set up Akkoma from source. I then imported the akkoma.pgdump, then realised I had to run migrate-to-db still, as things like the uploads and static dir were being read from the db and were incorrect due to being different in OTP and source builds.

This did not take me a short amount of time to work out why the Frontend would not load on reboot. But hey, this isnt my job so whatever - I call it a learning opportunity. While sorting this I did a nuke and pave, and the Fedora 38 images came out so I set up on that too. So yeah that works fine also.

Back to x86

The ARM64 VPS is a rocket. If there were a similar thing closer to home I'd be all over it. But it lasted 7 days...

Because I got the opportunity to relocate to NZ. I got offered a similar x86 setup to use back home, and I wanted to be listed as an NZ instance because thats what it is. So, back to x86, did the db migration thing again (twice as the settings didn't stick first time) and re set up everything like this blog.

Back to NZ.

So here I am. A week of evenings mucking around on VPS around the world, but now happily sitting on a server back home. A lot of learning in a short time for someone not in the industry, a few friends helping with advice, and basically almost back where I started. But still much happier for it.

...that federation issue?

Oh yeah, that. The problem persisted through multiple db dumps and imports, and fresh configs. I even removed the settings from the DB completely to try and solve the issue. Then... I noticed that a particular post I could not see on the web interface, Akkoma-FE, I could see fine using Husky, the mobile app. So I started digging through the settings and sure enough.... I had some word filters there I had forgotten about.

OOPS

I thought "you have got to be shitting me" as I removed the entries that I had only a vague recollection of setting up now that I saw them. It turns out, a filter of "RT" will filter anything with rt in them, like user@mastodon.art or any word with it included. So for now they are all removed.

Which also means my instance that I thought I had broken for months, is now "fixed." :-D