Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
mongo_upgrade_logical [2019/09/16 10:36] – created andonovj | mongo_upgrade_logical [2019/10/25 23:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 80: | Line 80: | ||
</ | </ | ||
+ | =====Instance Modifcations===== | ||
+ | There are couple changes to be done in order to secure our databases: | ||
+ | ====Change the IP==== | ||
+ | In order to change the IP, modify the / | ||
+ | |||
+ | <sxh bash> | ||
+ | # network interfaces | ||
+ | net: | ||
+ | port: 27017 | ||
+ | bindIp: 172.27.1.245 | ||
+ | </ | ||
+ | |||
+ | Restart the instance with: | ||
+ | |||
+ | <sxh bash> | ||
+ | [root@hostname hunter_dev]# | ||
+ | Redirecting to / | ||
+ | </ | ||
+ | |||
+ | ====Add users==== | ||
+ | Users have to be added so we can enable security authentication: | ||
+ | |||
+ | <sxh bash> | ||
+ | [root@tbp-cx-mdb01 hunter_dev]# | ||
+ | MongoDB shell version v4.0.13 | ||
+ | connecting to: mongodb:// | ||
+ | Implicit session: session { " | ||
+ | MongoDB server version: 4.0.13 | ||
+ | Server has startup warnings: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | 2019-10-25T15: | ||
+ | --- | ||
+ | Enable MongoDB' | ||
+ | metrics about your deployment (disk utilization, | ||
+ | |||
+ | The monitoring data will be available on a MongoDB website with a unique URL accessible to you | ||
+ | and anyone you share the URL with. MongoDB may use this information to make product | ||
+ | improvements and to suggest MongoDB products and deployment options to you. | ||
+ | |||
+ | To enable free monitoring, run the following command: db.enableFreeMonitoring() | ||
+ | To permanently disable this reminder, run the following command: db.disableFreeMonitoring() | ||
+ | --- | ||
+ | |||
+ | > use admin | ||
+ | switched to db admin | ||
+ | > db.createUser( | ||
+ | ... { | ||
+ | ... " | ||
+ | ... pwd: " | ||
+ | ... " | ||
+ | ... { | ||
+ | ... " | ||
+ | ... " | ||
+ | ... }, | ||
+ | ... { | ||
+ | ... " | ||
+ | ... " | ||
+ | ... }, | ||
+ | ... { | ||
+ | ... " | ||
+ | ... " | ||
+ | ... }, | ||
+ | ... { | ||
+ | ... " | ||
+ | ... " | ||
+ | ... } | ||
+ | ... ] | ||
+ | ... } | ||
+ | ... ) | ||
+ | </ | ||
+ | |||
+ | ====Enable security==== | ||
+ | Secure authentication has to be enabled again in the / | ||
+ | |||
+ | <sxh bash> | ||
+ | security: | ||
+ | authorization: | ||
+ | </ | ||
+ | |||
+ | Again restart the service: | ||
+ | |||
+ | |||
+ | <sxh bash> | ||
+ | [root@hostname hunter_dev]# | ||
+ | Redirecting to / | ||
+ | [root@hostname hunter_dev]# | ||
+ | </ | ||
+ | =====Import the backup into the new release===== | ||
+ | After that, we can simply import the exported data into the new release as follows: | ||
+ | |||
+ | <sxh bash> | ||
+ | [root@hostname hunter_dev]# | ||
+ | 2019-10-25T16: | ||
+ | 2019-10-25T16: | ||
+ | 2019-10-25T16: | ||
+ | ------------------------------------------------------------------------------ | ||
+ | 2019-10-25T16: | ||
+ | 2019-10-25T16: | ||
+ | 2019-10-25T16: | ||
+ | </ |