Looking to automate the clone, mount and share creation from snapmirror destination volumes. I was toying with the idea of creating a snapshot from a script at the source (something as simple as DR), and then creating a script at the destination that would create a clone using "DR" as the parent. This doesn't work because we are using the mirror-vault relationships, and this won't copy all snapshots (I would hope they would change this at some point, but I am not holding my breath).
I can update the snapshot policy to create a single snapshot with the smlabel DR, and that sorta works out here. The snapshot winds up being named:
dr.2021-08-02_1555
If there is only one of these at the destination, I am looking for a way to select whatever is labeled "dr.*" as the parent snapshot.
I can do something like this:
Get-ncSnapshot $vol_name | ?{ $_.Name -like "dr.*"}
and only get a return of the "dr.*" snapshot, but I don't know to get a clone based off of this:
get-ncvol $vol_name | New-Ncvolclone -CloneVolume syseng_DR -parentsnapshot { 'Get-ncSnapshot syseng_sm | ?( $_.Name -like "dr.*")
Any ideas?
Thanks