Courseiva
Server Administration →mediumMultiple Choice

C100DBA Server Administration Practice Question

A DBA executes 'mongodump --oplog' against a primary node in a replica set. What is the specific purpose of the --oplog flag in this administrative context?

⚠ Common exam trap

Candidates often think --oplog is used for performance or speed, failing to understand its primary purpose is ensuring point-in-time data consistency across the backup.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

It captures changes during the dump for point-in-time consistency.

When backing up a live database, data changes while the backup is running. The '--oplog' flag tells mongodump to capture all operations that occur during the dump process. This allows the DBA to restore the database to a consistent state by replaying those operations during the 'mongorestore' process, ensuring data integrity.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    It exports the entire oplog collection into a separate BSON file.

    Why it's wrong here

    While it does create a file named 'oplog.bson', it does not export the entire history of the oplog. It only captures the specific range of entries that were created while the mongodump was actively running. To export the full oplog, one would need to dump the 'local' database explicitly.

  • ✓

    It captures changes during the dump for point-in-time consistency.

    Why this is correct

    The --oplog flag is essential for creating a consistent snapshot of a running database. It ensures that the backup reflects a single point in time by including all writes that occurred between the start and end of the dump, which are then applied during restoration to resolve inconsistencies.

  • ✗

    It speeds up the dump process by reading from the oplog instead of collections.

    Why it's wrong here

    This is incorrect because mongodump still must scan the actual collections to retrieve the data. The --oplog flag actually adds a small amount of overhead because the tool must tail the oplog in parallel with the data export, rather than serving as an alternative source for the data itself.

  • ✗

    It automatically compresses the output using the oplog's compression ratio.

    Why it's wrong here

    The --oplog flag has nothing to do with compression. Compression is controlled by the '--gzip' flag. The oplog's internal storage engine compression (like Snappy or Zstd) is not inherited by the mongodump utility; the output is standard BSON unless the gzip option is specifically enabled by the user.

About these practice questions

This C100DBA question is part of Courseiva's 222-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official MongoDB exam blueprint

This C100DBA practice question is part of Courseiva's free MongoDB certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the C100DBA exam.