MongoDB.local SF, Jan 15: See the speaker lineup & ship your AI vision faster. Use WEB50 to save 50%
Find out more >
Docs Menu
Docs Home
/ /
Replication Methods

rs.freeze()

rs.freeze(seconds)

Makes the current replica set member ineligible to become primary for the period specified.

Important

mongo Shell Method

This page documents a mongo method. This is not the documentation for database commands or language-specific drivers, such as Node.js. To use the database command, see the replSetFreeze command.

For MongoDB API drivers, refer to the language-specific MongoDB driver documentation.

The rs.freeze() method has the following parameter:

Parameter
Type
Description

seconds

number

The duration the member is ineligible to become primary.

Back

rs.conf()

On this page