Microsoft Virtualization Discussions

Snapvault update with ONTAP PowerShell?

MARC_GALLOWAY
5,042 Views

I have many OSSV snapvault relationships established and wanted to know if the toolkit has the snapvault update function?

6 REPLIES 6

cknight
5,042 Views

Hello, Marc.

The 'snapvault update' command is equivalent to the Data ONTAP API 'snapvault-secondary-initiate-incremental-transfer'.  This API is supported by the PowerShell Toolkit's Start-NaSnapvaultSecTransfer cmdlet.

When I wrote the SnapVault cmdlets, I tested OSSV relationships from the Data ONTAP (i.e. secondary) side.  I was able to create and update SnapVault relationships as expected.

You can see the full list of SnapVault cmdlets by issuing 'Get-NaHelp -Category snapvault'.

clackamas
5,042 Views

Exactly the info I was looking for, thanks.  BTW - Why not do an Invoke-Snapvaultupdate? it would be consistent with the invoke-snapmirrorupdate.

It would be really cool to also have a |. "Get-Na Snapvault | Invoke-SnapvaultUpdate "

cknight
5,042 Views

Cmdlet naming is always a challenge, but as the Microsoft PowerShell team is fond of saying, "To ship is to choose"!

It would be really cool to also have a |. "Get-Na Snapvault | Invoke-SnapvaultUpdate "

Agreed on pipelining SnapVault objects to Start-NaSnapvaultSecTransfer.  That didn't make the cut for 1.5, but it's already in 1.6.

RONALDTOP
5,042 Views

Hi Clinton,

Got a question on the SnapVault update cmdlet. From the cli you can specify the -w option, so execution waits for completion of the transfer. Apperently this option didn;t make in 1.7. Can you please add this option also to the cmlet?

BR,

Ronald

bsti
5,042 Views

If you are scripting this, you can actually achieve the equivalent now.  After calling Start-NaSnapvaultSecTransfer, then you go into a wait loop:

while ( Get-NaSnapvaultSecStatus -Path [mypath] | ? { $_.Status -ine "idle" } )

{

  Write-Host "Waiting for SV Transfer to finish..."

  Start-Sleep -seconds 30

}

#  Continue on from here in your script

RONALDTOP
5,042 Views

Yep! figured that one out as a workaround already!

Thanks anyway!

Grtz,

Ronald

Public