Skip to content

Instantly share code, notes, and snippets.

@jabenninghoff
Last active December 10, 2017 15:14
Show Gist options
  • Save jabenninghoff/87100f90a851f9759d6cf1617151de4c to your computer and use it in GitHub Desktop.
Save jabenninghoff/87100f90a851f9759d6cf1617151de4c to your computer and use it in GitHub Desktop.
Instructions for upgrading the graylog MongoDB database

Graylog uses mongo:3 in its docker-compose image, which automatically pulls the latest production version of MongoDB, but does not set the feature compatibility version. This will cause databases created in 3.2 or earlier to fail to start in 3.6.

Per https://docs.mongodb.com/manual/reference/command/setFeatureCompatibilityVersion/, this will show the current running compatibility version and upgrade from 3.4 to 3.6:

docker exec -it mongo_container /bin/bash
mongo
db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
db.adminCommand( { setFeatureCompatibilityVersion: "3.6" } )
exit
exit

Warning! Setting the featureCompatibilityVersion will prevent you from downgrading your mongo instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment