Safe reinstallation of a chatmail relay

I’m currently running delta.ybti.net on Ubuntu 24.04, but would like to switch to Debian as soon as Debian 13 compatibility is solved.

The document Migrating to a new machine explains migrating between two running servers, but should be adaptable to a reinstallation. Just to make sure I don’t overlook any potential issues, would this work?

  1. Disable mail service as in step 3.
  2. Backup all the data mentioned in step 4.
  3. Reinstall server.
  4. Pre-configure chatmail relay as in step 2.
  5. Restore the data mentioned in step 4.
  6. Activate chatmail relay as in step 6.