Do you mean different servers entirely (as opposed to upgrading Debian in place?). You really only need the Moodle_migration
documentation. There shouldn't be any specific issues regarding the different versions of Debian but make sure the 'standard' version of PHP is compatible with Moodle 3.2. MySQL
are the same for all practical purposes. You can dump the database
and re-load it on MariaDB without issue. Moodle is compatible with both but, again, just double-check the versions.
I should also point out that Moodle 3.2 has been completely unsupported for getting on for 2 years. I would *strongly* advise you to upgrade. However, unless you are confident, I would migrate and then upgrade (or upgrade then migrate) in two steps.