Schedules and Retention Policies
You can define custom schedules and retention policies to use when creating a share snapshot. Schedules can be very flexible and be defined to run a certain Dates, Days of the Week, Hours, Minutes, etc. The following examples show how to define schedules and retention policies, and then create a share snapshot with a schedule and retention policy.
Schedules can also be applied to tasks other than snapshots.
Snapshots are quick and space efficient, but they can consume large amounts of storage over time because blocks are not released when files are deleted if the files are in a snapshot.
Retention policies applied to a snapshot task cause the snapshot to be automatically deleted either at a certain age, or after a certain number of newer snapshots are created.
Snapshots can also be offloaded into cloud/object storage to remove any space pressure from primary storage.
Schedule Examples
Creating a Schedule
# schedule-create --day-of-week MON-FRI --hour 12 --minute 30 --name my-schedule
Viewing Schedules
# schedule-list
Retention Policy Examples
Creating a Policy for Retention Time
# snapshot-retention-create --retention-time 14:00:00 --name fortnight
Creating a Policy for Number of Copies to Retain
# snapshot-retention-create --number-of-copies 5 --name my-retain
Snapshot with a Schedule and a Retention Policy Example
Creating a Scheduled Share Snapshot with a Retention Policy
# share-snapshot-create --share-name test --schedule-name my-schedule --retention-name my-retain