Can I restore Yunohost 11.3.0.2 to a server with Debian 12 and then do the migration?

Ok so I did it. I will post here in case others face the same situation.

  1. I made backups for all of the apps and the YNH install with Borg.
  2. I bought a dedicated server from Hetzner who still provides Debian 11 images.
  3. I installed the older YNH there with curl https://install.yunohost.org/bullseye | bash
  4. Installed Borg, connected to Borgbase where my backups were.
  5. Restored all backups from BorgBase.
  6. Go to /etc/yunohost/migrations.yml and if the migration to Bookworm is set as “skipped” edit it and add “pending”. Else YNH thinks there is no migration to do.
  7. Go to the YNH admin and run the updates and migrations.
  8. After all is done, voilla, you have the new YNH and Debian 12 running.

I also moved them back to Webdock (hosting) after the migration.

But well this is how I fixed it.