Docs Menu

replSetFreeze

On this page

  • Definition
  • Syntax
  • Behavior
replSetFreeze

The replSetFreeze command prevents a replica set member from seeking election for the specified number of seconds. Use this command in conjunction with the replSetStepDown command to make a different node in the replica set a primary.

The command has the following syntax:

db.runCommand(
{
replSetFreeze: <seconds>
}
)

If you want to unfreeze a replica set member before the specified number of seconds has elapsed, you can issue the command with a seconds value of 0:

db.runCommand(
{
replSetFreeze: 0
}
)

Restarting the mongod process also unfreezes a replica set member.

replSetFreeze is an administrative command, and you must issue it against the admin database.

←  replSetAbortPrimaryCatchUpreplSetGetConfig →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.