Of the 126 user-available snapshots per volume, sixty (60) can be used for policy-based snapshot scheduling. Any given root volume can only participate in one snapshot policy, but a policy can apply to multiple source volumes simultaneously.
First a rule is created and then source volumes are attached to the rule. The rule itself defines the interval between snapshots and the number of them to keep. For example, take a snapshot every 60 minutes and keep 24 of them, ensuring you have a snapshot for every hour of the past 24 hours. The rule can also be created in a multilevel retention structure (up to six levels), where the intervals build upon one another as minutes/hours/days/weeks. For example, set the base interval to 60 minutes and another retention level to keep one snapshot for 7 days will result in keeping one daily copy for a week.
If we set another retention level to keep one of the daily copies for 4 weeks, we ensure that the system maintains (on a rotating basis):
To create the policy described above, use the following CLI command:
scli --add_snapshot_policy --snapshot_policy_name snap_policy_hourly --snapshot_creation_cadence 60 --number_of_snapshots_per_retention_level 24,7,4
Note: The snapshot_creation_cadence is set in minutes.
To add a source volume to this policy we would use, for example:
scli --add_source_volume_to_snapshot_policy --snapshot_policy_name snap_policy_hourly --source_vol_id 5d046acb00000003
To create a snapshot policy in the PowerFlex Manager UI, click Protection > Snapshot Policies, then click Create Snapshot Policy. Provide a policy name, interval, and desired retention periods, then click Create And Activate or Create. The Create button creates the policy but the state will be “Paused”. The following example shows the creation of a snapshot policy identical to the one created in the CLI example but using PowerFlex Manager.
After creating the policy, to add the source volumes, select the policy, then click More Actions and Assign Volumes. In the snapshot policies view, you can view the policy configuration, and modify, activate, or pause the selected policy.
Select the desired volumes and click Assign Policy.
And here we see the newly created snapshot policy in a paused state.