Upgrading MongoDB#
The instructions on this page apply to FiftyOne users who are using the MongoDB binary that is bundled with FiftyOne.
If you utilize a custom/shared MongoDB database, then follow the upgrade path advised by your database provider.
Note
It is strongly recommended to perform a backup of your MongoDB database before upgrading your MongoDB version.
Upgrading to MongoDB 8#
Close any Python sessions that are running
fiftyone
Ensure that the bundled mongo process has been shut down
ps -ef | egrep "fiftyone.*mongod"
ps -ef | egrep "fiftyone.*mongod"
Get-Process | \
Where-Object { \
$_.Name -like "*fiftyone*" \
-and $_.Name -like "*mongod*" \
}
Upgrade to
fiftyone>=1.3
andfiftyone-db>=1.2.0
pip install --upgrade fiftyone fiftyone[db]
Find the MongoDB URI using your operating system’s network libraries
sudo lsof -iTCP -sTCP:LISTEN -P -n | egrep "mongod"
sudo lsof -iTCP -sTCP:LISTEN -P -n | egrep "mongod"
Get-NetTCPConnection | \
Where-Object { $_.State -eq 'Listen' } | \
Select-String -Pattern "mongod"
Connect to MongoDB using
mongosh
mongosh "$URI_FROM_ABOVE"
Enable backwards-incompatible MongoDB 8.0 features by setting your database’s feature compatibility version
db.adminCommand({ setFeatureCompatibilityVersion: "8.0", confirm: true }) // Verify the upgrade db.adminCommand({ getParameter: 1, featureCompatibilityVersion: 1 })