Upgrade to new version fron a very old one

we manage an older instance 2.0.2, installed trough yunohost, if we update it from yunohost the mobilizon login doesn’t work anymore.

My idea is to install e temporary installation (with a new url), import and migrate the data from the previous version, test it and if everything is ok rename it.

What do you think about this idea? Do you have any suggestion?

Migrating a database from 2.0.2 to 4.0.2 is working.
Just duplicate (restore) the DB, run data migrations from a 4.0.2 installation.

BTW What is the issue between last version en Ynh ? They seem to have upgraded two weeks ago, no issue raised apparently.

Thanks for your response.

I will retry with yunohost update, otherwise I will use the method I suggested.

Update done!

Now, after the migrate database is working, but i see this error when it sends an email:
Couldn’t send an email. Internal error.