Upgrading MongoDB Binaries¶
Voxel51 advises performing database backups of your mongodb data directory whenever performing a database upgrade.
Note
The following steps apply to FiftyOne users who utilize the pre-packaged Fiftyone MongoDB instance. If you utilize a custom/shared MongoDB database, follow the upgrade path advised by your database provider.
Upgrading Mongodb 7 to Mongodb 8¶
Stop the Fiftyone session and exit the python interpreter. Ensure that the mongo process has been shut down.
Mac/Linux users:
ps -ef | egrep "fiftyone.*mongod"
Windows users:
Get-Process | \ Where-Object { \ $_.Name -like "*fiftyone*" \ -and $_.Name -like "*mongod*" \ }
Upgrade Fiftyone to 1.3.0+ and Fiftyone-db to 1.2.0+
pip install --upgrade fiftyone fiftyone[db]
Relaunch Fiftyone
Find the MongoDB URI using your operating systems network libraries
Mac/Linux users:
sudo lsof -iTCP -sTCP:LISTEN -P -n | egrep "mongod"
Windows users:
Get-NetTCPConnection | \ Where-Object { $_.State -eq 'Listen' } | \ Select-String -Pattern "mongod"
Connect to mongodb using mongosh
mongosh "$URI_FROM_ABOVE"
Run the following command:
db.adminCommand({ setFeatureCompatibilityVersion: "8.0", confirm: true }) // Verify the upgrade db.adminCommand({ getParameter: 1, featureCompatibilityVersion: 1 })