Migrating from Ubuntu to OpenBSD on one of my boxes

Ubuntu is getting way too big, I migrate to OpenBSD…

I have most of my domains and git repositories sit on one VPS. As a result of the fact that it was the first VPS I had, this box was the one that hosts most of my stuff. Back in the days I was quite happy installing Ubuntu LTS, updating from 12.04 to 14.04 to 16.04. But the latest version; 18.04 Bionic Beaver, had such big requirements, especially memory-wise, it’s installation failed on one of my newer and smaller boxes.

I starter looking at other options I ended up installing OpenBSD 6.5 and I was pretty happy with it’s structure and decided that for my private boxes I was going to switch to OpenBSD.

To be able to install a new OS the box should first be released of it’s current duties to run a handful of personal websites of me and some friends. That means moving everything to another box. Which is actually quite simple for now, it is only running a webserver with PHP, no database, and it hosts my personal git repositories over ssh.

So I’ll be moving /var/www and /var/git-bares using Rsync:

$ rsync -azP /var/www user@remote:~/backup-from-server

This will put the directory www inside ~/backup-from-server.

When you want to sync the content you’ll need a trailing slash: /var/www/

-a: “archive”, does a recursive sync and preserves symlinks, modtimes, ownership and permissions.

-z: “zip”, adds compression to the network transfer

-P: combines “progress” and “partial”

After that I move the files to the right position on the new target box and make sure they are being served, swap the DNS to point all domains to the new box and I have my first box ready for installing OpenBSD 6.5.