Microsoft Virtualization Discussions

SMSQL snapvault post script

ANDY_MCKEE

Hi, I'm looking for some help again 🙂  Ideally i'd like to replace all rsh based batch files for the post backup  snapvaultscripts with a powershell script based on the toolkit commands.

Snapmanger calls a bat file which in turn runs a ps1 file containing the  Start-NasnapVaultSecTransfer (s) and the Start-NaSnapvaultSecSnapshot.

My issue due to my limited scripting ability is transfering the post command arguments from SnapManager -PostCmdArgs '$SqlSnapshot $SqlSnapshot $InfoSnapshot' into the -PrimarySnapshot

I can get the script to work no issue when using and explicitly stating an (_recent) snapshot in the powershell script.  But we would like stick with timestamped snapmanager source snapshots.

Has anyone achieved this or any scripting tips?

Thanks in advance,

Andy

2 REPLIES 2

ivan_huter

Try this script: https://communities.netapp.com/docs/DOC-15159

Good luck!

--Ivan

stephan_troxler

You can access parameters in Powershell like this:

param($value1,$value2)

To update the Vault relationship with the latest snapshot the script could look like this:

param($SqlSnapshot,$InfoSnapshot)

Start-NaSnapvaultSecTransfer /vol/vol_primary/qtree_primary -PrimarySnapshot $SqlSnapshot

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public