Problems after upgrade to 5.0.2

Good morning,
I have an issue on my matomo running live on an external server…
Matomo is installed in a subdirectory inside my site, so that I can access it when I digit: mywebsite com / matomodir

Now I had problems with my website that turned white after an update and I was forced to roll back to a backup version… I am quite sure that I did not select to overwrite the matomo directory, but I suppose it happened anyway because now when I try to access to Matomo this message appears:

Il tuo codice di Matomo è quello della vecchia versione 5.0.1 mentre abbiamo rilevato che il database di Matomo è già stato aggiornato alla nuova versione 5.0.2. Può darsi che i tuoi amministratori di Matomo al momento stiano terminando il processo di aggiornamento. Prova ancora tra qualche minuto. Se hai ancora questo problema contatta il tuo amministratore di Matomo per avere assistenza.

So the directory is stuck at 5.0.1 and the database is allready updated… how can I solve this issue without loosing all the tracking and data collected so far?

Thank you