<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SnapDrive snapshots with snapmirror label in Data Protection</title>
    <link>https://community.netapp.com/t5/Data-Protection/SnapDrive-snapshots-with-snapmirror-label/m-p/139451#M11859</link>
    <description>&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sdcli snap create -s sd_weekly.0 -D d -u&lt;BR /&gt;sdcli snapvault archive -force -a sd_weekly_%DATE:~6,4%%DATE:~3,2%%DATE:~0,2% -DS d sd_weekly.0&lt;BR /&gt;sdcli snap delete -D d -s sd_weekly.1&lt;BR /&gt;sdcli snap rename -d d -o sd_weekly.0 -n sd_weekly.1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console" size="1" color="#0000ff"&gt;Import-Module&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#8a2be2"&gt;DataONTAP&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console" size="1" color="#0000ff"&gt;Connect-NcController&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#000080"&gt;-name&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#8a2be2"&gt;Filer1&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console" size="1" color="#ff4500"&gt;$q&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#a9a9a9"&gt;=&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#0000ff"&gt;Get-NcSnapshot&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#000080"&gt;-Template&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console" size="1" color="#ff4500"&gt;$q&lt;/FONT&gt;&lt;FONT face="Lucida Console" size="1" color="#a9a9a9"&gt;.&lt;/FONT&gt;&lt;FONT face="Lucida Console" size="1"&gt;Name &lt;/FONT&gt;&lt;FONT face="Lucida Console" size="1" color="#a9a9a9"&gt;=&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#8b0000"&gt;"sd_weekly.0"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console" size="1" color="#ff4500"&gt;$a&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#a9a9a9"&gt;=&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#0000ff"&gt;Get-NcSnapshot&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#000080"&gt;-Template&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console" size="1" color="#ff4500"&gt;$a&lt;/FONT&gt;&lt;FONT face="Lucida Console" size="1" color="#a9a9a9"&gt;.&lt;/FONT&gt;&lt;FONT face="Lucida Console" size="1"&gt;SnapmirrorLabel &lt;/FONT&gt;&lt;FONT face="Lucida Console" size="1" color="#a9a9a9"&gt;=&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#8b0000"&gt;"Weekly"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console" size="1" color="#0000ff"&gt;Get-NcSnapshot&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#000080"&gt;-Volume&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#8a2be2"&gt;server01_d&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#000080"&gt;-SnapName&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#8a2be2"&gt;sd_weekly.0&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#a9a9a9"&gt;|&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#0000ff"&gt;Update-NcSnapshot&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#000080"&gt;-Query&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#ff4500"&gt;$q&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#000080"&gt;-Attributes&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#ff4500"&gt;$a &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console" size="1" color="#0000ff"&gt;Get-NcSnapshot&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#000080"&gt;-Volume&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#8a2be2"&gt;server01_d&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#000080"&gt;-SnapName&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#8a2be2"&gt;sd_weekly.0&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#a9a9a9"&gt;|&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#0000ff"&gt;Select-Object&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#8a2be2"&gt;Volume&lt;/FONT&gt;&lt;FONT face="Lucida Console" size="1" color="#a9a9a9"&gt;,&lt;/FONT&gt;&lt;FONT face="Lucida Console" size="1" color="#8a2be2"&gt;SnapmirrorLabel &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However if I run the following from putty on the filer1 it does show that it has updated the snapmirror label&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;snapshot show -vserver SVM01 -volume server01_d -fields snapmirror-label&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone have any idea's on how I can get this to update correctly in powershell??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console" size="1" color="#8a2be2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 13:50:08 GMT</pubDate>
    <dc:creator>Rapp</dc:creator>
    <dc:date>2025-06-04T13:50:08Z</dc:date>
    <item>
      <title>SnapDrive snapshots with snapmirror label</title>
      <link>https://community.netapp.com/t5/Data-Protection/SnapDrive-snapshots-with-snapmirror-label/m-p/139451#M11859</link>
      <description>&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sdcli snap create -s sd_weekly.0 -D d -u&lt;BR /&gt;sdcli snapvault archive -force -a sd_weekly_%DATE:~6,4%%DATE:~3,2%%DATE:~0,2% -DS d sd_weekly.0&lt;BR /&gt;sdcli snap delete -D d -s sd_weekly.1&lt;BR /&gt;sdcli snap rename -d d -o sd_weekly.0 -n sd_weekly.1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console" size="1" color="#0000ff"&gt;Import-Module&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#8a2be2"&gt;DataONTAP&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console" size="1" color="#0000ff"&gt;Connect-NcController&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#000080"&gt;-name&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#8a2be2"&gt;Filer1&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console" size="1" color="#ff4500"&gt;$q&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#a9a9a9"&gt;=&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#0000ff"&gt;Get-NcSnapshot&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#000080"&gt;-Template&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console" size="1" color="#ff4500"&gt;$q&lt;/FONT&gt;&lt;FONT face="Lucida Console" size="1" color="#a9a9a9"&gt;.&lt;/FONT&gt;&lt;FONT face="Lucida Console" size="1"&gt;Name &lt;/FONT&gt;&lt;FONT face="Lucida Console" size="1" color="#a9a9a9"&gt;=&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#8b0000"&gt;"sd_weekly.0"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console" size="1" color="#ff4500"&gt;$a&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#a9a9a9"&gt;=&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#0000ff"&gt;Get-NcSnapshot&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#000080"&gt;-Template&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console" size="1" color="#ff4500"&gt;$a&lt;/FONT&gt;&lt;FONT face="Lucida Console" size="1" color="#a9a9a9"&gt;.&lt;/FONT&gt;&lt;FONT face="Lucida Console" size="1"&gt;SnapmirrorLabel &lt;/FONT&gt;&lt;FONT face="Lucida Console" size="1" color="#a9a9a9"&gt;=&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#8b0000"&gt;"Weekly"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console" size="1" color="#0000ff"&gt;Get-NcSnapshot&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#000080"&gt;-Volume&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#8a2be2"&gt;server01_d&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#000080"&gt;-SnapName&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#8a2be2"&gt;sd_weekly.0&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#a9a9a9"&gt;|&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#0000ff"&gt;Update-NcSnapshot&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#000080"&gt;-Query&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#ff4500"&gt;$q&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#000080"&gt;-Attributes&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#ff4500"&gt;$a &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console" size="1" color="#0000ff"&gt;Get-NcSnapshot&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#000080"&gt;-Volume&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#8a2be2"&gt;server01_d&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#000080"&gt;-SnapName&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#8a2be2"&gt;sd_weekly.0&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#a9a9a9"&gt;|&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#0000ff"&gt;Select-Object&lt;/FONT&gt; &lt;FONT face="Lucida Console" size="1" color="#8a2be2"&gt;Volume&lt;/FONT&gt;&lt;FONT face="Lucida Console" size="1" color="#a9a9a9"&gt;,&lt;/FONT&gt;&lt;FONT face="Lucida Console" size="1" color="#8a2be2"&gt;SnapmirrorLabel &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However if I run the following from putty on the filer1 it does show that it has updated the snapmirror label&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;snapshot show -vserver SVM01 -volume server01_d -fields snapmirror-label&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone have any idea's on how I can get this to update correctly in powershell??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Lucida Console" size="1" color="#8a2be2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 13:50:08 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Data-Protection/SnapDrive-snapshots-with-snapmirror-label/m-p/139451#M11859</guid>
      <dc:creator>Rapp</dc:creator>
      <dc:date>2025-06-04T13:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: SnapDrive snapshots with snapmirror label</title>
      <link>https://community.netapp.com/t5/Data-Protection/SnapDrive-snapshots-with-snapmirror-label/m-p/139498#M11862</link>
      <description>&lt;P&gt;Not sure if this will help a script i did years ago where before there was snapmirror integration in SME i highlighted the command in orange i was running to add the label&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;###########################################################################&lt;BR /&gt;### IMPORT NETAPP DATAONTAP TOOLKIT&lt;/P&gt;
&lt;P&gt;if((Get-Module -Name "DataOntap") -eq $Null){ &lt;BR /&gt; Import-Module -Name DataONTAP&lt;BR /&gt; Write-Host "Module DataONTAP imported"&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;###########################################################################&lt;BR /&gt;### CONNECT TO Cluster vserver&lt;/P&gt;
&lt;P&gt;### add password to file location can be whatever you want&lt;BR /&gt;$username = "vsadmin"&lt;BR /&gt;$password = convertto-securestring "netapp1" -AsPlainText -force&lt;BR /&gt;$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password&lt;BR /&gt;$Controller = "10.10.10.178"&lt;/P&gt;
&lt;P&gt;Connect-NcController -Name $Controller -Credential $cred -HTTPS -Vserver sonetapp7&lt;/P&gt;
&lt;P&gt;###########################################################################&lt;BR /&gt;### PREDEFINED SNAPMIRROR LABEL&lt;/P&gt;
&lt;P&gt;$SnapmirrorLabel = "EXCH_DAILY"&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;###########################################################################&lt;BR /&gt;### GET VOLUME LIST EXCHANGE VOLUMES&lt;/P&gt;
&lt;P&gt;$EXCH_Volumes = Get-NcVol | Where-Object {$_.Name -like "soexch*"}&lt;/P&gt;
&lt;P&gt;for($i = 0;$i -lt $EXCH_Volumes.Length; $i++){&lt;/P&gt;
&lt;P&gt;$UpdateSnapVault = $False&lt;BR /&gt; $VolumeSnapshot = Get-NcSnapshot -Volume $EXCH_Volumes[$i].Name | Where-Object {$_.Name -like "exchsnap*"} | sort descending&lt;/P&gt;
&lt;P&gt;if(($VolumeSnapshot[0].Name -like "exchsnap*") -and ($VolumeSnapshot[0].SnapmirrorLabel -eq $Null) ){&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; $UpdateSnapVault = $True&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF9900"&gt;Set-NcSnapshot -Vserver $EXCH_Volumes[$i].Vserver -Volume $EXCH_Volumes[$i].Name -Snapshot $VolumeSnapshot[0].Name -SnapmirrorLabel $SnapmirrorLabel&lt;/FONT&gt;&lt;BR /&gt; &lt;BR /&gt; if($UpdateSnapVault -eq $True){&lt;/P&gt;
&lt;P&gt;$SnapmirrorRelation = $Null&lt;BR /&gt; $SnapmirrorRelation = Get-NcSnapmirror -SourceVolume $EXCH_Volumes[$i].Name&lt;BR /&gt; Invoke-NcSnapmirrorUpdate -Source $SnapmirrorRelation.SourceLocation -Destination $SnapmirrorRelation.DestinationLocation&lt;/P&gt;
&lt;P&gt;}&lt;BR /&gt; &lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 19:17:47 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Data-Protection/SnapDrive-snapshots-with-snapmirror-label/m-p/139498#M11862</guid>
      <dc:creator>grahame</dc:creator>
      <dc:date>2018-04-10T19:17:47Z</dc:date>
    </item>
  </channel>
</rss>

