Server Upgrade: Debian 12 “bookworm” to Debian 13 “trixie”

Overview

Yes, I know “trixie” has been out and stable for over half a year now. In fact, it’s been running on my desktop shortly after it was released. But servers are another kettle of fish, and in the past it’s taken some time to ensure everything is upgraded and working correctly. So I finally set aside a weekend for the update..

TL;DR: apart from breaking mariadb, everything went pretty smoothly..

What worked well

The standard update steps worked well:

  • apt update && apt upgrade
  • edit all of the `sources.list` to change bookworm to trixie.
  • apt update && apt full-upgrade
  • update various configuration files – vimdiff works very well for this!

There were no errors or issues, and the system rebooted cleanly with its new kernel.

What broke

Part-way through the upgrade, the system ran out of space in /var. While I’m not entirely sure, I suspect that this is what caused mariadb to be broken following the restart. I noticed since neither roundcube nor nextcloud started up following the reboot.

That’s when I noticed that the database wasn’t running..

Eventually I managed to rescue the database by using the innodb_force_recovery option. Of course I immediately did a full database dump and then reinitialized the entire database using the dump.

Despite the database being back up and running, nextcloud still refused to run. This was due to php8.2 having been upgraded, but the php8.2-redis package is not available in Debian 13. I spent quite a bit of time trying various things, including changing to php8.4 which my version of Nextcloud did not yet support. I eventually “fixed” it by simply disabling the redis configuration in Nextcloud..

The only other thing to break was exim4 because I accidentally duplicated a configuration key while merging the configuration from the upstream maintainer, but this was quickly fixed.

What I learned (again)

  • ALWAYS take backups, no matter how sure you are that things will go smoothly.
  • Ensure you have enough disk-space. I had checked and thought I had enough, but part-way through the upgrade ran out..
  • Ensure all critical apps are upgraded or can run with the new versions of any dependencies after the system has been upgraded.

Follow-up Steps

  • Upgraded Nextcloud from 30 to 34, mostly using the web updater, although a few versions required some additional manual twiddling. I wish Nextcloud would have Long Term Service (LTS) releases..
  • Switched the system to php8.4 and removed php8.2
  • Upgraded Piwigo from 14.5 to 16.4

There may be more things which I need to tweak/fix over the coming weeks, but the essentials are working – web, email, cloud, and photo albums.