Upgrade mongodb 3.6 to 4.4 Ubuntu server 20.4

Hello community

First of all I want to say hello :grinning: , I hope to be able to learn and contribute to this great community.

I am currently having a problem with Mongodb.
I am running mongodb 3.6 on Ubuntu 20.4 server, when I go to the mongodb page to get the guide on how to upgrade to 4.4 I encounter a problem which is the version of Ubuntu server I am running at the moment is not supported to upgrade to the version I want to reach.

I saw the documentation and the recommended steps are to do the upgrades progressively 3.6 > 4.0 > 4.2 > 4.4 and so on until you reach the desired version.

From 3.6 to 4.2 is not supported to that version of Ubuntu server

The current version that I am running on the Ubuntu server is 20.4 and the last version supported for this upgrade was 18.04, could you recommend any steps to follow to solve this problem?

So far what occurred to me was to set up a virtual machine on my PC and install the version of Linux which is supported to do the upgrade, I installed version ubuntu server 18.04, made a copy of the database and passed it to see if It was working and I could see the data, I continued doing the update until I reached 4.4 with some problems since some keys for the Ubuntu package manager are no longer available, when I tried to do the mongorestore a number of errors came out, which is why I would like to know if someone can give me an idea on how to do the update on the server where the original database is located.

Thanks in advance