ONTAP 9.15.1 commands

snapmirror policy modify-rule

Modify an existing rule in SnapMirror policy

Availability: This command is available to cluster and Vserver administrators at the admin privilege level.

Description

The snapmirror policy modify-rule command can be used to modify the retention count, preserve setting, warning threshold count, schedule, and prefix for a rule in a SnapMirror policy. Reducing the retention count or disabling the preserve setting for a rule in a SnapMirror policy might result in the deletion of Snapshot copies on the vault destination when the next transfer by the snapmirror update command occurs or when the next scheduled Snapshot copy creation on the destination for the rule occurs. Modifying a rule to add a schedule will enable creation of Snapshot copies on the SnapMirror destination. Snapshot copies on the source that have a SnapMirror label matching this rule will not be selected for transfer. Schedule and prefix can only be modified for rules associated with SnapMirror policies of type vault or mirror-vault . A SnapMirror policy with rules must have at least one rule without a schedule.

The rules in SnapMirror policies of type async-mirror cannot be modified.

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 specifies the rule that is to be modified in a SnapMirror policy.

[-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 1019. 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 , and when the Snapshot copies have reached the retention count, then an incremental SnapMirror vault update transfer will fail or if the rule has a schedule, Snapshot copies will no longer be created on the SnapMirror destination. 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.

[-schedule <text>] - Snapshot Copy Creation Schedule

This optional parameter specifies the name of the schedule associated with a rule. This parameter is allowed only for rules associated with SnapMirror policies of type vault or mirror-vault . When this parameter is specified, Snapshot copies are directly created on the SnapMirror destination. The Snapshot copies created will have the same content as the latest Snapshot copy already present on the SnapMirror destination. Snapshot copies on the source that have a SnapMirror label matching this rule will not be selected for transfer. The default value is - .

You define and name a schedule using the job schedule cron create command.
[-prefix <text>] - Snapshot Copy Creation Prefix

This optional parameter specifies the prefix for the Snapshot copy name to be created as per the schedule. If no value is specified, then the snapmirror-label will be used as the prefix. The prefix parameter can only be specified for rules which have a schedule.

[-retention-period {{<integer> seconds|minutes|hours|days|months|years} | infinite}] - Snapshot Copy Retention Period

This optional parameter specifies the duration for which the Snapshot copies associated with this rule will be locked. The parameter is specified as a number followed by a suffix. The valid suffixes are seconds , minutes , hours , days , months , and years . For example, a value of 6months represents a retention period of 6 months. It can also be set to a special value of infinite for infinite retention. The destination volume must have the snapshot-locking-enabled parameter set to true for this field to take effect else it will be ignored.

Examples

The following example changes the retention count for nightly Snapshot copies to 6 for a rule named nightly on a SnapMirror policy named TieredBackup on Vserver vs0.example.com :

vs0.example.com::> snapmirror policy modify-rule -vserver vs0.example.com
        -policy TieredBackup -snapmirror-label nightly -keep 6
Top of Page