I need to get an application consistant snapshot of an RDM volume, which I am during by running the following script to take a weekly backup of the D drive on a server. The only problem with this is I don't seem to be able to apply a snapmirror label to the snapshot. I can't seem to find an option to do this using the sdcli commands.
sdcli snap create -s sd_weekly.0 -D d -u
sdcli snapvault archive -force -a sd_weekly_%DATE:~6,4%%DATE:~3,2%%DATE:~0,2% -DS d sd_weekly.0
sdcli snap delete -D d -s sd_weekly.1
sdcli snap rename -d d -o sd_weekly.0 -n sd_weekly.1
So I have written the following powershell script to apply a snapmirror label to the snapshot, which works but when I run the last command to return the results it doesn't do so.
Import-ModuleDataONTAP
Connect-NcController-nameFiler1
$q=Get-NcSnapshot-Template
$q.Name ="sd_weekly.0"
$a=Get-NcSnapshot-Template
$a.SnapmirrorLabel ="Weekly"
Get-NcSnapshot-Volumeserver01_d-SnapNamesd_weekly.0|Update-NcSnapshot-Query$q-Attributes$a
Get-NcSnapshot-Volumeserver01_d-SnapNamesd_weekly.0|Select-ObjectVolume,SnapmirrorLabel
However if I run the following from putty on the filer1 it does show that it has updated the snapmirror label
snapshot show -vserver SVM01 -volume server01_d -fields snapmirror-label
Does anyone have any idea's on how I can get this to update correctly in powershell??