Storage snapshot-policies snapshot_policy.uuid schedules endpoint overview
- PDF of this doc site
Collection of separate PDF docs
Creating your file...
Overview
In ONTAP, scheduled Snapshot copy creation works based on the schedules associated with Snapshot copy policies. ONTAP provides six cluster-wide schedules: "5min", "8hour", "hourly", "daily", "weekly" and "monthly". A Snapshot copy policy is created using at least one of these schedules and up to 5 schedules can be associated with a Snapshot copy policy. A Snapshot copy policy can be linked to a storage object and based on the schedule in the policy, Snapshot copies are created on the object at that interval. Each schedule in a Snapshot copy policy has a Snapshot copy name prefix attached to it. Every Snapshot copy created using this policy has this prefix in its name. There is also a retention count associated with every schedule. This count indicates the maximum number of Snapshot copies that can exist for a given schedule. Once the Snapshot copy count reaches the retention count, on the next create operation, the oldest Snapshot copy is deleted. A retention period can be associated with every schedule. During Snapshot copy creation, this period is set as SnapLock expiry time on Snapshot copy locking enabled volumes.
A schedule can be added, modified or deleted from a Snapshot copy policy.
Snapshot copy policy schedule APIs
The following APIs are used to perform operations related to Snapshot copy policy schedules:
– POST /api/storage/snapshot-policies/{snapshot_policy.uuid}/schedules/
– GET /api/storage/snapshot-policies/{snapshot_policy.uuid}/schedules/
– GET /api/storage/snapshot-policies/{snapshot_policy.uuid}/schedules/{schedule.uuid}
– PATCH /api/storage/snapshot-policies/{snapshot_policy.uuid}/schedules/{schedule.uuid}
– DELETE /api/storage/snapshot-policies/{snapshot_policy.uuid}/schedules/{schedule.uuid}
Examples
Adding schedule to a Snapshot copy policy
The POST operation is used to create a schedule for a Snapshot copy policy with the specified attributes.
# The API: /api/storage/snapshot-policies/{snapshot_policy.uuid}/schedules/ # The call: curl -X POST "https://<mgmt-ip>/api/storage/snapshot-policies/32a0841a-818e-11e9-b4f4-005056bbab9c/schedules" -H "accept: application/hal+json" -d '{"schedule.uuid": "7c985d80-818a-11e9-b4f4-005056bbab9c", "count": "5", "prefix": "new_hourly" }' # The response: HTTP/1.1 201 Created Date: Wed, 29 May 2019 22:41:33 GMT Server: libzapid-httpd X-Content-Type-Options: nosniff Cache-Control: no-cache,no-store,must-revalidate Location: /api/storage/snapshot-policies/32a0841a-818e-11e9-b4f4-005056bbab9c/schedules Content-Length: 271 Content-Type: application/json { "num_records": 1, "records": [ { "snapshot_policy": { "uuid": "32a0841a-818e-11e9-b4f4-005056bbab9c" }, "schedule": { "uuid": "7c985d80-818a-11e9-b4f4-005056bbab9c" }, "count": 5, "prefix": "new_monthly" } ] }
Retrieving Snapshot copy policy schedules
The GET operation is used to retrieve Snapshot copy policy schedules.