How does the "schedule" parameter in an ONTAP 9 SnapMirror policy rule work?
Applies to
- ONTAP 9
- SnapMirror
- Long-Term Retention Snapshots
Answer
- SnapMirror relationship updates are scheduled via the
schedule
parameter on the SnapMirror relationship itself as seen insnapmirror show -instance
ClusterDR::> snapmirror show -instance
Source Path: svmSrc:volSrc
Destination Path: svmDst:volDst
Relationship Type: XDP
Relationship Group Type: none
SnapMirror Schedule: daily
- Alternatively, SnapMirrors can be scheduled via the
-transfer-schedule-name
parameter in the SnapMirror policy - SnapMirror policy rules has a separate schedule parameter that can be seen in
snapmirror policy show -instance
and is an option when creating or modifying a SnapMirror policy rule withsnapmirror policy add-rule
andsnapmirror policy modify-rule
- This article discusses the use of this schedule parameter
ClusterDR::> snapmirror policy show -policy CustomMirrorVault -instance
Vserver: ClusterDR
SnapMirror Policy Name: CustomMirrorVault
SnapMirror Policy Type: vault
Policy Owner: cluster-admin
Tries Limit: 8
Transfer Priority: normal
Ignore accesstime Enabled: false
Transfer Restartability: always
Network Compression Enabled: false
Create Snapshot: false
Comment: -
Total Number of Rules: 2
Total Keep: 15
Rules:
SnapMirror Label Keep Preserve Warn Schedule Prefix
----------------------------- ---- -------- ---- -------- ----------
daily 10 false 0 - -
weekly 5 false 0 weekly weekly
ClusterDR::> snapmirror policy add-rule ?
-vserver Vserver Name
[-policy] SnapMirror Policy Name
[-snapmirror-label] Snapshot Copy Label
[-keep] Snapshot Copy Retention Count
[[-preserve] {true|false}] Snapshot Copy Preserve Enabled
[ -warn <integer> ] Warning Threshold Count
[ -schedule ] Snapshot Copy Creation Schedule
[ -prefix ] Snapshot Copy Creation Prefix
- This schedule parameter found in a SnapMirror policy rule is not a transfer schedule and will not trigger a SnapMirror update
- Instead, this schedule controls a feature known as Long-Term Retention (LTR) Snapshots
- LTR Snapshots create independent snapshot copies directly on a SnapMirror destination volume without having to create and transfer a corresponding Snapshot copy on the SnapMirror source volume
- When a schedule is used in a SnapMirror policy rule assigned to a SnapMirror relationship, that rule will create snapshots on the SnapMirror destination volume when the schedule triggers. These rules will not transfer Snapshots from the source volume
Other considerations of Long-Term Retention Snapshots
- Ensure the schedule configured for LTR Snapshots does not overlap with the actual transfer schedule of the SnapMirror
- Long-Term Retention Snapshots are only supported if the destination volume is not also a source (cascade). LTR Snapshots can still be used on the last volume of a cascade
- This feature is only available for use with
vault
andmirror-vault
type SnapMirror policies - You must have at least one rule in your SnapMirror policy with no schedule parameter
- The feature is not supported for FlexGroup & SnapMirror under Cloud Backup Service. It is also not supported for Consistency Group SnapMirror
- Beginning in ONTAP 9.14.1, LTR Snapshots are supported in SnapLock for SnapVault configurations