Skip to content

On Demand Backup

VMware VM On-Demand Backup

To Perform an On-Demand Backup, you will need the Virtual Machine ID and SLA ID.

mutation {
  vsphereBulkOnDemandSnapshot(
    input: {
      config: {
        vms: ["EC6A4D79-8F6F-4105-9DD6-11F4875C7A8B"]
        slaId: "def96ac0-be74-5e59-87e2-5af73b65ac1e"
        }
      }
    ) {
    responses {
      id
    }
  }
}
$query = New-Rscmutation -GqlMutation vsphereBulkOnDemandSnapshot -FieldProfile FULL
$query.var.input = Get-RscType -Name vsphereBulkOnDemandSnapshotInput
$query.var.input.config = Get-RscType -Name BulkOnDemandSnapshotJobConfigInput
$query.var.input.config.Vms = @($vm.id)
$query.var.input.config.SlaId = $vm.EffectiveSlaDomain.Id
invoke-rsc $query

To monitor the status of the on-demand backup, see job status