Migrating and Upgrading Droplet

In attempt to upgrade one of my Droplets from Ubuntu 20.04 to 22.04, I kept run into the usbmuxd errors. I reached out to DigitalOcean and they suggested migrating to a fresh Ubuntu 22.04 server rather than upgrading in-place (sudo do-release-upgrade). The process seemed quite time-consuming. As a result, I tried a different method.

To begin, I updated to the latest versions of all packages for the current release of my Droplet:

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade

In DigitalOcean’s web interface, I powered off my current Droplet, took a snapshot, then created a new Droplet from the snapshot. Once the new Droplet was created, I ran sudo do-release-upgrade. To my relief, the upgrade succeeded without any error.

I have a handful of sites on this Droplet, but they all PHP files and no database. To check and see if my websites worked, I edited the Hosts file in Terminal:

sudo vi /private/etc/hosts donnytruong.com

To edit the Hosts file, type i for insert, then :wq to write and quit. After using sFTP to make sure that the sites were indeed working correctly, I went into Cloudflare’s DNS interface to update my A records to point to the new Droplet.

I am pretty darn proud of myself for figuring this one out.