Software Development Kit (SDK) and API Discussions

SDK supports NDMPcopy?

FranciscoHH

Hi,

 

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

 

Thanks

9 REPLIES 9

FranciscoHH

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

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

nagendrk

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

FranciscoHH

Thanks,

Any plan to include this function?

Regards.

nagendrk

As far as I know.. Nope..

FranciscoHH

Thanks a lot nagendrk.

robbie

FranciscoHH

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

timthomas

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

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.

Public