Software Development Kit (SDK) and API Discussions
Software Development Kit (SDK) and API Discussions
Hi,
anyone knows if we can use SDK to perform NDMPcopy operations?
Thanks
There are no ONTAPI interfaces for performing backup tasks currently in the SDK
Thanks,
Any plan to include this function?
Regards.
As far as I know.. Nope..
Thanks a lot nagendrk.
Did you check here:
Thanks, but we need to use NDMPCopy from Windows machine.
Would be great to be able to trigger an ndmpcopy with an API call.
Hi,
whe can use Invoke-NaSsh to use ndmpcopy commands.
Firs we get NDMP password for filer, then create string with command and then invoke this command.
[string]$NetappSource = "Filer"
[string]$VolSource = "USUARIOS"
# Path in format NetApp ej: USERS/xxxxxx
[string]$FolderSource = "USERS/xxxxxx"
[string]$NetappDestination = "Filer2"
[string]$VolDestination = "PERFIL"
# Ruta completa en formato NetApp ej: PERFIL/xxxxx
[string]$ForlderDestination = "PERFIL/xxxxx"
Start-Transcript -Path c:\log_ndmp.txt
Import-Module DataOnTap
# Get Password NDMP
$NetappList = (
"Filer","Filer2"
)
$password = Get-Content encrypted.txt | ConvertTo-SecureString -key (1..16)
$cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "Administrator",$password
$oNdmpConnection = @()
foreach ($NetAppNdmp in $NetappList){
$oNdmpPass = New-Object -TypeName PSCustomObject | Select-Object NAS,User,Password
Connect-nacontroller $NetAppNdmp -Credential $cred | Out-Null
$GetNdmpPass = Invoke-NaSsh ndmpd password administrator
$oNdmpPass.NAS = $NetAppNdmp
$oNdmpPass.User = "Administrator"
$oNdmpPass.Password = $GetNdmpPass.Substring($GetNdmpPass.length - 17,16)
$oNdmpConnection += $oNdmpPass
}
#$oNdmpConnection | ft -Wrap
# Copy Data
$tNow = get-date -format T
$tNow
Connect-NaController $NetappSource -Credential $cred | Out-Null
$sNdmpPassCopy = $oNdmpConnection | Where-Object {$_.NAS -eq $NetappDestination}
[string]$Command = "ndmpcopy -da administrator:$($sNdmpPassCopy.Password.ToString()) /vol/$($VolSource)/$($FolderSource) $($NetappDestination.Substring(0,11)):/vol/$($VolDestination)/$($ForlderDestination)"
$Command
Invoke-NaSsh $Command
$tNow = get-date -format T
$tNow
Stop-Transcript
Francisco,
I've developed an standalone java ndmpcopy util, maybe it can be useful to you, if you want to use it from Windows.
Check it out at: http://cronsult.com/jndmpcopy_man.aspx
Robert