OpenBSD’s sysupgrade

I run OpenBSD on my laptop and a server hosted in the Cloud. When I upgraded OpenBSD on my server: I provisioned a new server instance running the OpenBSD version to upgrade to; copied the configuration from the old to the new server; altered my DNS to point to the new server; and shut down the old server. For my laptop, I usually downloaded & installed the new system from the tarballs using a script I wrote, and ran pkg_add after rebooting. My script didn’t always work, I had to occasionally fix breakages after the upgrade.

That was until last week, when I used sysupgrade for the first time. Sysupgrade automatically upgrade OpenBSD by downloading the new tarballs along with the firmware files, reboot the machine, install the new system, and finally upgrade the packages.

In both cases the upgrade was fast, didn’t require baby-sitting, and everything worked out-of-the-box once the computer rebooted. I had to upgrade my server twice to move from 6.6 to 6.8, since sysupgrade can’t skip intermediate versions. There was some downtime: about 2 to 3 minutes for each upgrade, for about 10 minutes of downtime in total. I also upgraded my laptop with sysupgrade, I started the upgrade, made myself some tea, and when I came back the laptop was all upgraded and ready to go.

And if you like to live on the bleeding edge, sysupgrade also allows you to upgrade to a snapshot via the -s option. I used my own upgrade script to do that, and it didn’t always work well. Now I can use sysupgrade and be confident it will work.