Adding a Schedule to a Snapshot Policy
Add schedules to a snapshot policy.
A snapshot policy can contain a maximum of 10 schedules, and schedules must be a combination of schedule type, effective from, and snapshot retention duration that's unique to the policy. You can add schedules to a snapshot policy at the same time you create the snapshot policy. You can add more schedules to an existing policy, if needed.
When you create a snapshot schedule, you can configure the time that the schedule becomes effective, how often the schedule runs, provide other timing details, and set the retention duration for snapshots created by the schedule. For more information, see Schedule Types and Timing.
- Open the navigation menu and click Storage. Under File Storage, click File Systems.
- (Optional) In the List scope section, under Compartment, select a compartment.
- Under Additional resources, click Snapshot Policies.
- Click the name of the snapshot policy that you want to add a schedule to.
- On the snapshot policy's details page, under Resources, click Schedules.
- Click Add schedule.
-
In the Add schedule panel, provide the following details:
- Click Add schedule.
Use the
oci fs filesystem-snapshot-policy update
command and the--schedules
parameter to add schedules to a snapshot policy:oci fs filesystem-snapshot-policy update --filesystem-snapshot-policy-id <snapshot_policy_OCID> --schedules [<list_of_JSON_schedules>] [OPTIONS]
The following example includes a
schedules
object with multiple schedules:oci fs filesystem-snapshot-policy update --filesystem-snapshot-policy-id <snapshot_policy_OCID> --schedules '[{"timeZone":"UTC", "period":"DAILY", "hourOfDay":18}, {"timeZone":"UTC", "period":"WEEKLY", "hourOfDay":12, "dayOfWeek":"TUESDAY"}]'
For a complete list of flags and variable options for CLI commands, see the CLI Command Reference.
Use UpdateFilesystemSnapshotPolicy to add a schedule to an existing snapshot policy.
For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.