# Upgrade Percona for MongoDB v3.6.8 to v5.0.8-7

**URL:** <https://forums.percona.com/t/upgrade-percona-for-mongodb-v3-6-8-to-v5-0-8-7/23796>\
**Category:** Percona Server for MongoDB\
**Created:** [July 20, 2023, 5:33pm UTC](https://forums.percona.com/t/upgrade-percona-for-mongodb-v3-6-8-to-v5-0-8-7/23796 "2023-07-20T17:33:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![srcrtx](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@srcrtx](https://forums.percona.com/u/srcrtx)\
**Post date:** [July 20, 2023, 5:33pm UTC](https://forums.percona.com/t/upgrade-percona-for-mongodb-v3-6-8-to-v5-0-8-7/23796/1 "2023-07-20T17:33:47Z")

</div>

We are trying to upgrade from Percona Server for MongoDB 36 v3.6.8 to Percona Server for MongoDB v5.0.8-7.

Is there any documentation for the doing this upgrade? Will I need to do incremental upgrades to perform this upgrade?

Can I make backups of the databases and remove the old MongaDB and install the v50 server and import the databases?

Thank you.

---

<div class="post-metadata">

**Author:** ![Igor\_Solodovnikov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/igor_solodovnikov/32/1265_2.png) [@Igor\_Solodovnikov](https://forums.percona.com/u/Igor_Solodovnikov)\
**Post date:** [July 21, 2023, 9:20am UTC](https://forums.percona.com/t/upgrade-percona-for-mongodb-v3-6-8-to-v5-0-8-7/23796/2 "2023-07-21T09:20:49Z")

</div>

Hello @srcrtx ,

Generally speaking it is necessary to do incremental upgrades between major versions: 3.6 → 4.0 → 4.2 → 4.4 -\>5.0. Skipping some major versions (like upgrading 3.6 → 5.0) is not supported.  
On each step you need to do backup to be able to revert to working setup in case of failure.  
Percona has these documents on upgrade process:  
[Upgrading from Percona Server for MongoDB 3.6 to 4.0](https://docs.percona.com/percona-server-for-mongodb/4.0/install/upgrade-from-36.html)  
[Upgrade from 4.0 to 4.2](https://docs.percona.com/percona-server-for-mongodb/4.2/install/upgrade-from-40.html)  
[Upgrade from 4.2 to 4.4](https://docs.percona.com/percona-server-for-mongodb/4.4/install/upgrade-from-42.html)  
[Upgrade from 4.4 to 5.0](https://docs.percona.com/percona-server-for-mongodb/5.0/install/upgrade-from-44.html)

---

<div class="post-metadata">

**Author:** ![Corrado\_Pandiani](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/corrado_pandiani/32/1459_2.png) [@Corrado\_Pandiani](https://forums.percona.com/u/Corrado_Pandiani)\
**Post date:** [July 21, 2023, 2:48pm UTC](https://forums.percona.com/t/upgrade-percona-for-mongodb-v3-6-8-to-v5-0-8-7/23796/3 "2023-07-21T14:48:51Z")

</div>

As already suggested, the incremental upgrade procedure is the one strongly recommended.

Just to add some more info: it is possible to use mongoexport and mongoimport to perfom the upgrade skipping major versions, but it’s not recommended.  
The solution is similar to `mongodump` / `mongorestore` but instead of using binary files (BSON), you are using plain text JSON files.  
It’s lot slower than mongodump / mongorestore and you are not saving the metadata so you will have to recreate the indexes manually. Mongodump/mongorestore is faster and it’s supposed to work only from a major versione to the next one.

So, in the end, use the incremental upgrades.
