Copy SimpliVity Backups to another SimpliVity Cluster

Recently a fellow SA, @agoelammohamed, had a customer who deployed a new production SimpliVity cluster and was planning to decommission and re-purpose the original SimpliVity cluster. Migrating the VMs from the original cluster to the new cluster was easy enough, but they also needed to move around 700 SimpliVity backups, which need to be kept through the configured retention periods, to the new cluster. This can be done from the vSphere Web Client, but @agoelammohamed was looking to see if there was an easy way to automate this process. There is! The SimpliVity REST API includes an operation to copy backups from one OmniStack Cluster to another.

There are a couple other situations where this may come in handy, @agoelammohamed‘s is one and another could be that customer originally deployed SimpliVity for production and later added a DR site and wants to get the existing backups to the DR site.

I put together a powershell script which uses the SimpliVity REST API to automate copying backups from one OmniStack Cluster to another OmniStack Cluster. The script, SVT-CopyBackups.ps1, can be found here:

There are a few variables which need to be configured in the script:

$ovc = "" # OVC Management IP Address
$username = "user@domain" #vCenter Username
$pass = "Password-01" #vCenter Password

# Source OmniStack Cluster to Copy Backups From
$srcOSCluster = "ProductionCluster"
# Destination OmniStack Cluster to Copy Backups to
$dstOSCluster = "DRCluster"
#Number of backups to copy
$numberBackups = "1000"
#Starting backup 
$backupStartingOffset = "0"

When the powershell script, SVT-CopyBackups.ps1, is run it first grabs all the SimpliVity backups in the source OmniStack Cluster, $srcOSCluster, up to the number configured, $numberBackups, from the offset, $backupStartingOffset. It you have 1000 backups in the source cluster and you want to copy these in two chunks run the script with the number set to 500 and the offset set to 0, then run it again with the number set to 500 and the offset set to 500. This would also allow you to run two instances of the script in parallel to copy the backups – one instance working on backups 0-499, the other working on backups 500-999.

For each backup the SimpliVity REST API is used to:

  1. Checks to see if backup already exist in the destination OmniStack Cluster, $dstOSCluster.
    • If the backup is already in the destination OmniStack Cluster it moves on to the next backup.
  2. Checks to see if the backup has a retention policy set. If so it calculates the remaining retention time in minutes from the current time.
  3. Copies the backup from the source OmniStack Cluster to the destination OmniStack Cluster.
    • The copy task is monitored until completed. If the task fails an error is displayed and the script moves on to the next backup.
  4. If the source backup has a retention period set, the calculated retention period is set on the copy.
  5. The process is repeated for each backup in the source OmniStack Cluster.

Here is an example of the output from the script:

This script copies all backups from one OmniStack Cluster to another OmniStack Cluster in a SimpliVity Global Federation. The backup copy will leverage SimpliVity’s Global Data Virtualization Platform to ensure efficient copy between clusters.

It could easily be modified to copy just the backups for a single VM. I will probably create a separate script for that as I have also received some request for that.

Hope you find this helpful. Comments or feedback always appreciated.

One thought on “Copy SimpliVity Backups to another SimpliVity Cluster

  • Daniel

    Hi thanks for the great content. I wasn’t able to find the script you mentioned for copying the backups for a named VM. Would be awesome if you could post that. We are looking to move our backups from one cluster to another to then be able to offload to a store once. I’ve been told that it’s not possible to copy backups from 1 cluster to a store once that’s attached to another cluster. Is that correct?


Leave a Reply

Your email address will not be published. Required fields are marked *

10 − 9 =