Parameters
-vserver <vserver name> - Vserver Name
Specifies the Vserver for the SnapMirror policy.
-policy <sm_policy> - SnapMirror Policy Name
Specifies the SnapMirror policy name.
-snapmirror-label <text> - Snapshot Copy Label
This parameter is primarily used for the purpose of Snapshot copy selection for extended data protection (XDP) relationships. Only Snapshot copies that have a SnapMirror label that matches this parameter will be transferred to the SnapMirror destination. The label can be 31 or fewer characters in length. SnapMirror policies of type
async-mirror and
mirror-vault have a rule added for label
sm_created at the time of policy creation. This rule cannot be removed or modified by the user. This rule when coupled with
create-snapshot field set to
true indicates that the SnapMirror relationship using this policy shall create a new Snapshot copy and transfer it as part of a
snapmirror update operation. SnapMirror policies of type
async-mirror support one additional rule with SnapMirorr label
all_source_snapshots. This rule along with the rule for SnapMirror label
sm_created indicates that
all new Snapshot copies on the primary volume along with the newly created Snapshot copy are transferred a
snapmirror update or
snapmirror initialize operation. Rules with any other SnapMirror labels may not be added to SnapMirror policies of type
async-mirror. The rule for label
sm_created when added to a
snapmirror policy of type
vault indicates that all SnapMirror created Snapshot copies of the primary volume are selected for transfer.
-keep <text> - Snapshot Copy Retention Count
Specifies the maximum number of Snapshot copies that are retained on the SnapMirror destination volume for a rule. The total number of Snapshot copies retained for all the rules in a policy cannot exceed 251. For all the rules in SnapMirror policies of type async-mirror, this parameter must be set to value 1.
[-preserve {true|false}] - Snapshot Copy Preserve Enabled
Specifies the behavior when the Snapshot copy retention count is reached on the SnapMirror vault destination for the rule. The default value is false, which means that the oldest Snapshot copy will be deleted to make room for new ones only if the number of Snapshot copies has exceeded the retention count specified in the "keep" parameter. When set to true, an incremental SnapMirror vault update will fail when the Snapshot copies have reached the retention count. For all the rules in SnapMirror policies of type async-mirror this parameter must be set to value false.
[-warn <integer>] - Warning Threshold Count
Specifies the warning threshold count for the rule. The default value is 0. When set to a value greater than zero, an event is generated after the number of Snapshot copies (for the particular rule) retained on a SnapMirror vault destination reaches the specified warn limit. The preserve parameter for the rule must be true to set the warn parameter to a value greater than zero.
Examples
The following example adds a rule named
nightly to the SnapMirror policy named
TieredBackup on Vserver
vs0.example.com. The rule will retain a maximum of
5 nightly Snapshot copies.
vs0.example.com::> snapmirror policy add-rule -vserver vs0.example.com
-policy TieredBackup -snapmirror-label nightly -keep 5