Software Development Kit (SDK) and API Discussions

SDK supports NDMPcopy?

FranciscoHH
9,614 Views

Hi,

 

anyone knows if we can use SDK to perform NDMPcopy operations?

 

Thanks

9 REPLIES 9

nagendrk
9,614 Views

There are no ONTAPI interfaces for performing backup tasks currently in the SDK

FranciscoHH
9,614 Views

Thanks,

Any plan to include this function?

Regards.

nagendrk
9,614 Views

As far as I know.. Nope..

FranciscoHH
9,614 Views

Thanks a lot nagendrk.

robbie
9,614 Views

FranciscoHH
9,614 Views

Thanks, but we need to use NDMPCopy from Windows machine.

timthomas
9,615 Views

Would be great to be able to trigger an ndmpcopy with an API call.

FranciscoHH
9,614 Views

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

rsimac278
9,614 Views

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

Public