2010-10-26 06:46 AM
I need some help and guidence on scripting in SMVI? I have a power shell script that creates a SV snapshot and updates as Snap vault relationship from a consistant snapshot on the primary filer. I want this to run once the SMVI job has completed but I cant get this to work. The powershell script work fine if run independantly and I have checked that this is not a permissions issue. Please can some one point me to some same scripts or setup guides me on how to get this working as currently SMVI just gives a time out error?
Write-Debug "Begin Main Functions"
# Comfirm succesfull backup
write-eventlog -logname Application -source SMVI -EventID "9990" -EntryType Information -message "SMVI Snapvault Update Started"
# Connect to Snapvault secondary
Write-Debug "Connect to Controller"Connect-NaController -Name Secondary
#Update Snapvault Secondaries and transfer from primary Snapshot
Write-Debug "Snapshot Secondary"
Start-NaSnapvaultSecSnapshot -VolumeName SV_Secondary -ScheduleName SV_Nightly
Write-Debug "Snapvault to Secondary"
Start-NaSnapvaultSecTransfer -SecondaryPath /vol/SV_Secondary/Q_SV_Secondary -PrimarySnapshot smvi_PROD_BACKUPS_novmsnap_recent
Thanks in advance...
Solved! SEE THE SOLUTION
2010-10-26 07:03 AM
Here’s a sample script
REM CONTROLLER is the SnapVault target NetApp Controller
REM SECPATH is the path to the SnapVault Volume on the target controller including the qtree
REM SVSCHED is the schedule name for the retention schedule configured on the SnapVault volume
REM SVVOLUME is the SnapVault target volume not including the qtree
REM USER is the limiter user id for the SnapVault transfer
REM PASSWORD is the password for the limited user
REM SNAPNAME is the name of the snapshot to be transfered
REM ZAPIPATH is the path to the ONTAP SDK
set ZAPIPATH="E:\Program Files\NetApp\Virtual Storage Console\smvi\server\scripts"
REM LOGPATH Is the path to the log generated by the SMVI script
set LOGPATH="E:\Program Files\NetApp\Virtual Storage Console\smvi\server\log\scripts"
REM LOGFILE is the logfile generate by the SMVI script
if %BACKUP_PHASE% == POST_BACKUP goto doSnapVault
echo SCRIPT STARTING FOR SMVI JOB:%BACKUP_NAME%>>%LOGPATH%\%LOGFILE%
echo BEGIN SNAPVAULT UPDATE>>%LOGPATH%\%LOGFILE%
echo BEGIN SNAPVAULT UPDATE FOR %SVVOLUME%>>%LOGPATH%\%LOGFILE%
apitest.exe %CONTROLLER% %USER% %PASSWORD% snapvault-secondary-initiate-incremental-transfer primary-snapshot %SNAPNAME% secondary-path %SECPATH%>>%LOGPATH%\%LOGFILE%
apitest.exe %CONTROLLER% %USER% %PASSWORD% snapvault-secondary-initiate-snapshot-create schedule-name %SVSCHED% volume-name %SVVOLUME%>>%LOGPATH%\%LOGFILE%
echo END SNAPVAULT UPDATE FOR %SVVOLUME%>>%LOGPATH%\%LOGFILE%
2011-01-01 11:34 PM
You use the line if %BACKUP_PHASE% == POST_BACKUP goto doSnapVault in you script. Means that, that it is also possible to start scripts befor the backup (PRE scripts)?
I cannot find a documentation about the scripts for SMVI (SVC 2.0). Which parameters are possible and so on.
Have you some docu?
2011-01-02 10:55 PM
You can take a look at the SMVI BPG. Here’s the link to this
Also we have a SnapVault integration script that you can take a look at