MongoDB MongoDB Security and Administration 2 — Questions and Answers
Question 1: What does the mongorestore utility do?
- Restores MongoDB to a previous stable version
- Loads data from a mongodump backup into a MongoDB instance (Correct answer)
- Restores dropped collections from a recycle bin
- Resets MongoDB configuration to defaults
Correct answer: Loads data from a mongodump backup into a MongoDB instance
mongorestore reads BSON files created by mongodump and inserts them into a running MongoDB instance, restoring backed-up data.
Question 2: What is MongoDB Atlas?
- A self-hosted MongoDB distribution for enterprises
- MongoDB's fully managed cloud database service (Correct answer)
- An open-source MongoDB monitoring tool
- A MongoDB geospatial data visualization platform
Correct answer: MongoDB's fully managed cloud database service
MongoDB Atlas is MongoDB's official cloud database service offering automated deployment, scaling, backup, and monitoring across AWS, Azure, and GCP.
Question 3: What is the purpose of the mongoexport tool?
- Exports MongoDB data to a CSV or JSON text format (Correct answer)
- Exports MongoDB metrics to monitoring systems
- Exports collection schemas to documentation
- Exports indexes to a portable format
Correct answer: Exports MongoDB data to a CSV or JSON text format
mongoexport converts MongoDB collection data to JSON or CSV format, useful for sharing data with systems that don't support BSON.
Question 4: What does enabling the --auth flag when starting mongod do?
- Enables automatic authentication token refresh
- Requires clients to authenticate before accessing the database (Correct answer)
- Enables OAuth2 authentication
- Automatically creates admin users on startup
Correct answer: Requires clients to authenticate before accessing the database
The --auth flag enables MongoDB's access control system, requiring all connections to authenticate with valid credentials before performing operations.
Question 5: What is MongoDB's Ops Manager used for?
- Managing MongoDB Atlas cloud deployments
- On-premises deployment management, monitoring, backup, and automation for MongoDB (Correct answer)
- Managing MongoDB driver versions across applications
- Handling operations-level shell commands
Correct answer: On-premises deployment management, monitoring, backup, and automation for MongoDB
MongoDB Ops Manager is an on-premises management platform for deploying, monitoring, backing up, and automating MongoDB clusters in private infrastructure.
Question 6: What does the db.currentOp() command show in MongoDB?
- The current replication operation status
- Currently running operations on the MongoDB instance (Correct answer)
- The current user's active permissions
- Current index build operations only
Correct answer: Currently running operations on the MongoDB instance
db.currentOp() returns a document containing information about all active and pending operations currently running in the MongoDB instance.
What does the mongorestore utility do?