Skip to main content

Use path name pattern matching

Contributors

You can use pattern matching to specify the source and destination paths in snapmirror commands.

snapmirror commands use fully qualified path names in the following format: vserver:volume. You can abbreviate the path name by not entering the SVM name. If you do this, the snapmirror command assumes the local SVM context of the user.

Assuming that the SVM is called “vserver1” and the volume is called “vol1”, the fully qualified path name is vserver1:vol1.

You can use the asterisk (*) in paths as a wildcard to select matching, fully qualified path names. The following table provides examples of using the wildcard to select a range of volumes.

*

Matches all paths.

vs*

Matches all SVMs and volumes with SVM names beginning with vs.

:*src

Matches all SVMs with volume names containing the src text.

:vol

Matches all SVMs with volume names beginning with vol.

vs1::> snapmirror show -destination-path *:*dest*
                                                                                Progress
Source              Destination  Mirror        Relationship  Total              Last
Path          Type  Path         State         Status        Progress   Healthy Updated
------------- ---- ------------ ------------- -------------- ---------- ------- --------
vs1:sm_src2
              DP   vs2:sm_dest1
                                Snapmirrored  Idle           -          true    -