- Reference >
- Database Commands >
- replSetMaintenance
replSetMaintenance¶
-
replSetMaintenance
¶ The
replSetMaintenance
admin command enables or disables the maintenance mode for a secondary member of a replica set.The command has the following prototype form:
Consider the following behavior when running the
replSetMaintenance
command:- You cannot run the command on the Primary.
- You must run the command against the
admin
database. - When enabled
replSetMaintenance: 1
, the member enters theRECOVERING
state. While the secondary isRECOVERING
:- The member is not accessible for read operations.
- The member continues to sync its oplog from the Primary.