Courseiva
Replication →mediumMultiple Choice

C100DBA Replication Practice Question

You are a DBA for a MongoDB replica set. A secondary node has been down for several days and is far behind the primary. The oplog on the primary has wrapped, and the secondary's last oplog entry is no longer present. What must you do to bring the secondary back into sync?

⚠ Common exam trap

The trap here is assuming that changing the sync source or increasing oplog size can recover a secondary whose oplog entries have been overwritten, rather than performing a full resync.

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

✓

Perform a full resync by stopping the secondary, deleting its data files, and restarting it.

If a secondary's last oplog entry is no longer in the primary's oplog, the secondary cannot catch up incrementally. A full resync is required, which means deleting the secondary's data files and restarting it to perform an initial sync. This process copies all data from the primary or another sync source.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Increase the oplog size on the primary to prevent wrapping and then restart the secondary.

    Why it's wrong here

    Increasing the oplog size on the primary does not recover the already-wrapped oplog entries. The secondary still cannot find the missing entries, so it cannot catch up. Increasing oplog size is a preventive measure for the future, but it does not solve the current stale secondary issue.

  • ✗

    Restart the secondary with the --resync option to force a full resync.

    Why it's wrong here

    The --resync option is not a valid MongoDB startup option. To force a full resync, you can remove the data files and restart, or use the resync command in the mongo shell, but --resync is not a recognized parameter. Simply restarting with an invalid option will cause the mongod to fail to start.

  • ✗

    Run rs.syncFrom() on the secondary to point it to a different sync source.

    Why it's wrong here

    rs.syncFrom() changes the sync source for a secondary, but it does not help if the required oplog entries are missing. The secondary still needs those entries to catch up. Changing the sync source to another secondary that has the needed oplog entries could work, but only if that secondary has them; otherwise, a full resync is required.

  • ✓

    Perform a full resync by stopping the secondary, deleting its data files, and restarting it.

    Why this is correct

    When a secondary's oplog is too stale and the primary's oplog has wrapped, the secondary cannot catch up incrementally. The only way to resync is to perform a full resync, which involves stopping the secondary, deleting its data directory (or using rs.resync() in the shell), and restarting it to perform an initial sync from scratch.

About these practice questions

Courseiva writes every C100DBA question from scratch — 222 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.