Disabling and enabling a disk snapshot schedule
Disabling a schedule
To disable an automatic disk snapshot schedule:
- In the management console
, select the folder containing the schedule. - Select Compute Cloud.
- In the left-hand panel, select
Snapshots. - Navigate to the Snapshot schedules tab.
- Next to the schedule you want to disable, click
and select Stop. - Confirm disabling the schedule.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
-
See the description of the CLI commands for managing schedules:
yc compute snapshot-schedule --help yc compute snapshot-schedule disable --help -
Get a list of schedules in the default folder:
yc compute snapshot-schedule list --format yamlResult:
- id: fc852cvb1ipd5******** folder_id: e1ea8s8l71li******** created_at: "2022-09-28T13:25:02Z" name: sched-1 status: ACTIVE schedule_policy: start_at: "2022-10-01T00:00:00Z" expression: 59 14 */1 * * snapshot_spec: {} - id: fc89n1j15l7f******** folder_id: e1ea8s8l71li******** created_at: "2022-09-27T16:04:13Z" name: sched-2 status: ACTIVE schedule_policy: start_at: "1970-01-01T00:00:00Z" expression: 0 */1 * * * retention_period: 3600s snapshot_spec: {} - id: fc8bplhqmh2b******** folder_id: b8gauskl78li******** created_at: "2022-10-03T13:28:01Z" name: sched-3 description: Daily labels: machine: file-server status: ACTIVE schedule_policy: start_at: "2022-12-31T19:04:05Z" expression: 10 19 ? * * snapshot_count: "7" snapshot_spec: {} -
Disable the selected schedule:
yc compute snapshot-schedule disable <schedule_name_or_ID>Result:
done (3s) id: fc8e52mvchb2******** folder_id: e1ea8s8l71li******** created_at: "2022-09-28T09:15:28Z" name: sched-1 status: INACTIVE schedule_policy: start_at: "1970-01-01T00:00:00Z" expression: 36 14 */1 * * snapshot_count: "3" snapshot_spec: {}
- Get a list of schedules using the list REST API method for the SnapshotSchedule resource or the SnapshotScheduleService/List gRPC API call.
- Disable the snapshot schedule using the disable REST API method for the
SnapshotScheduleresource or the SnapshotScheduleService/Disable gRPC API call.
The schedule status will change to INACTIVE: disk snapshots will not be created or deleted.
All snapshot creation and deletion operations that started prior to disabling the schedule will be completed.
Enabling a schedule
To enable an automatic disk snapshot schedule:
- In the management console
, select the folder containing the schedule. - Select Compute Cloud.
- In the left-hand panel, select
Snapshots. - Navigate to the Snapshot schedules tab.
- Next to the schedule you want to enable, click
and select Start.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
-
See the description of the CLI commands for managing schedules:
yc compute snapshot-schedule --help yc compute snapshot-schedule enable --help -
Get a list of schedules in the default folder:
yc compute snapshot-schedule list --format yamlResult:
- id: fc852cvb1ipd5******** folder_id: e1ea8s8l71li******** created_at: "2022-09-28T13:25:02Z" name: sched-1 status: ACTIVE schedule_policy: start_at: "2022-10-01T00:00:00Z" expression: 59 14 */1 * * snapshot_spec: {} - id: fc89n1j15l7f******** folder_id: e1ea8s8l71li******** created_at: "2022-09-27T16:04:13Z" name: sched-2 status: ACTIVE schedule_policy: start_at: "1970-01-01T00:00:00Z" expression: 0 */1 * * * retention_period: 3600s snapshot_spec: {} - id: fc8bplhqmh2b******** folder_id: b8gauskl78li******** created_at: "2022-10-03T13:28:01Z" name: sched-3 description: Daily labels: machine: file-server status: ACTIVE schedule_policy: start_at: "2022-12-31T19:04:05Z" expression: 10 19 ? * * snapshot_count: "7" snapshot_spec: {} -
Enable the selected schedule:
yc compute snapshot-schedule enable <schedule_name_or_ID>Result:
done (3s) id: fc8e52mvchb2******** folder_id: e1ea8s8l71li******** created_at: "2022-09-28T09:15:28Z" name: sched-1 status: ACTIVE schedule_policy: start_at: "1970-01-01T00:00:00Z" expression: 36 14 */1 * * snapshot_count: "3" snapshot_spec: {}
- Get a list of schedules using the list REST API method for the SnapshotSchedule resource or the SnapshotScheduleService/List gRPC API call.
- Enable the snapshot schedule using the enable REST API method for the
SnapshotScheduleresource or the SnapshotScheduleService/Enable gRPC API call.
The schedule status will change to ACTIVE: new disk snapshots will be created and old ones deleted (if the relevant snapshot retention option is selected).