TL;DR:
Hold the Zammad package, upgrade your distribution, migrate PostgreSQL, unhold your Zammad package and upgrade Zammad based on the current distribution.
Longer version:
This might differ on source code installations where you basically wanna take the same steps, but:
You’ll have to “re run” the installation part on the new OS version to have correct rubies installed and stuff. This might be a lot more difficult than with a package installation. If you feel unsafe with these steps, you may want to prefer using a backup and restore based migration.
ok before all of these i’ve to be sure to manage few things
i’ll backup as you suggest and i’ll duplicate the VM into my esxi host that i’ll restore if any problem i’ll come during updates
so after that i’ll create new istance in new ubuntu updated and i’ll restore the backup, after that, before zammad starts to read email again i’ve to be sure that all is done and i don’t have any error, is there a way to start zammad again in new istance and stops read email?