Apr
15

NOS 4.0 – Use Powershell To Offload Tape Backup At A Remote Site

NOS 4.0 introduced PowerShell as a third way of automating your Nutanix Infrastructure. Also apart of 4.0 was the ability to clone VM’s without having to active the whole protection domain. Pre 4.0 this would interfere with replication.

With these two features in our back pocket we can automate getting your workloads backed up to tape with the use of Veeam or some other 3rd Party backup software.

1) Install the Nutanix command-lets.
Pretty easy as they wrapped up in a MSI which you can download from Prism. Installation pre-requirements – Powershell 2.0 & onwards, .Net 4.0

2) Connect to your Remote Nutanix Cluster
Connect-NutanixCluster -server -U -P

3) Get the last snapshot that was replicated
$snaps = Get-SnapshotsForPd -Name
***NOTE*****
$snap[0] will return the last snapshot
$snaps[0].vms.vmName will return all of the VM’s in the protection domain

4) Restore All the VM’s for the remote snapshot
Restore-Entities -SnapshotId $snaps[0].snapshotID -VmNames $snaps[0].vms.vmName -name -\PathPrefix \restore

You can see the action taking place in Prism.
Screen Shot 2014-04-15 at 4.54.03 PM

The backup software should be able to pick them up from here. If the remote site has active workloads, you could get fancy and throttle the disk IO with shares\limits too.

All of the cmdlets are based off the Nutanix REST-API so anything in you see in the UI you can automate.

Speak Your Mind

*