mongocli atlas maintenanceWindow update
This version of the documentation is archived and no longer supported. View the current documentation to learn how to upgrade your version of MongoCLI.
The maintenanceWindow update
command updates the configuration of
one Atlas maintenance window
for the specified project. You can also update the configuration of a
maintenance window through the Atlas UI or API.
Important
Maintenance Window Considerations
- Urgent Maintenance Activities
- Urgent maintenance activities such as security patches cannot wait for your chosen window. Atlas will start those maintenance activities when needed.
- Ongoing Maintenance Operations
- Once maintenance is scheduled for your cluster, you cannot change your maintenance window until the current maintenance efforts have completed.
- Maintenance Requires Replica Set Elections
- Atlas performs maintenance the same way as the maintenance procedure described in the MongoDB Manual. This procedure requires at least one replica set election during the maintenance window per replica set.
- Maintenance Starts As Close to the Hour As Possible
- Maintenance always begins as close to the scheduled hour as possible, but in-progress cluster updates or unexpected system issues could delay the start time.
Syntax
mongocli atlas maintenanceWindow update --dayOfWeek <numerical-day-of-week> --hourOfDay <numerical-hour-of-day> [ --profile|-P <profile-name> ] [ --projectId <project-ID> ]
Options
Option | Type | Description | Required? | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dayOfWeek | number | Day of the week that you want the maintenance window to start, as a 1-based integer.
| yes | ||||||||||||||||
hourOfDay | number | Hour of the day that you want the maintenance window to
start. This parameter uses the 24-hour clock, where midnight is
0 and noon is 12 . | yes | ||||||||||||||||
--profile , -P | string | Name of the profile where the public and private
keys for the project are saved. If omitted, uses the
default profile. To learn more about creating a
profile, see Configure the MongoDB CLI. | no | ||||||||||||||||
--projectId | string | Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable. | no |
Output
Maintenance window updated.
Example
The following example uses the mongocli atlas maintenanceWindow
update
command to update the maintenance window configured for the
project specified in the default profile. It specifies that the
maintenance window should occur at midnight each Saturday.
mongocli atlas maintenanceWindow update --dayOfWeek 7 --hourOfDay 0