แสดงบทความที่มีป้ายกำกับ mongodb แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ mongodb แสดงบทความทั้งหมด

25 พฤษภาคม 2563

MongoDB playground

MongoDB

MongoDB is a NoSQL database designed for storing and managing large volumes of unstructured or semi-structured data. Unlike traditional relational databases that use tables and rows, MongoDB stores data in flexible, JSON-like documents (called BSON), making it easier to scale and adapt to changing data models.

MongoDB official URL is https://www.mongodb.com



MongoDB playground

If you want to test your MongoDB query logic and try something without installing MongoDB database. You can use Mongo Playground online by going to website and play.



17 พฤศจิกายน 2562

upgrade mongodb in docker from 3.x to 4.x

If you have MongoDB 3.x running on docker and you want to upgrade to version 4.x, you cannot re-use the old data volume.



Please follow these steps to achieve upgrading MongoDB=

1. I will assume that you want to upgrade MongoDB from version 3.2 to 4.2

2. You need to incremental upgrade from 3.2 to 3.4, 3.6, 4.0 and then finally 4.2

3. run the following command to upgrade from version 3.2 o 3.4

docker run --name mongo -p 27017:27017 -v /volume:/data/db -d mongo:3.4

4. run the following command to set feature compatibility

docker exec -it mongo bash -c 'mongo --eval "db.adminCommand( { setFeatureCompatibilityVersion: \"3.4\" } )"'

5. repeat steps 3 and 4 three times

- upgrade from 3.4 to 3.6
- upgrade from 3.6 to 4.0
- upgrade from 4.0 to 4.2

6. verify the MongoDB version by running

docker exec -it mongo bash -c 'mongo --version'

credit: https://forums.rocket.chat/t/solved-trying-to-update-mongodb-from-3-2-to-4-0-in-docker-but-errors/3200