Export-RubrikVApp
SYNOPSIS
Exports a given snapshot for a vCD vApp
SYNTAX
Partial
Full
DESCRIPTION
The Export-RubrikVApp cmdlet exports a snapshot from a protected vCD vApp.
EXAMPLES
EXAMPLE 1
This exports the vApp snapshot with an id of 7acdf6cd-2c9f-4661-bd29-b67d86ace70b to a new vApp in the same Org VDC
EXAMPLE 2
This exports the vApp snapshot with an id of 7acdf6cd-2c9f-4661-bd29-b67d86ace70b to a new vApp in the same Org VDC and remove existing network mappings from VM NICs
EXAMPLE 3
This exports the vApp snapshot with an id of 7acdf6cd-2c9f-4661-bd29-b67d86ace70b to a new vApp in an alternate Org VDC
EXAMPLE 4
$snapshot = Get-RubrikSnapshot -id $vapp.id -Latest $restorableVms = $vapp.vms $restorableVms[0].PSObject.Properties.Remove('vcenterVm') $vm = @() $vm += $restorableVms[0] Export-RubrikVApp -id $vapp.id -snapshotid $snapshot.id -Partial $vm -ExportMode ExportToTargetVapp
This retreives the latest snapshot from the given vApp 'vApp01' and perform a partial export on the first VM in the vApp. The VM is exported into the existing parent vApp. Set the ExportMode parameter to 'ExportToNewVapp' parameter to create a new vApp for the partial export. This is an advanced use case and the user is responsible for parsing the output from Get-RubrikVApp, or gathering data directly from the API. Syntax of the object passed with the -Partial Parameter is available in the API documentation.
PARAMETERS
-id
Rubrik id of the vApp to export
-snapshotid
Rubrik snapshot id of the vApp to export
-Partial
Perform a Partial vApp restore. Default operation is a Full vApp restore, unless this parameter is specified.
-ExportMode
Specifies whether export should use the existing vApp or create a new vApp. Valid values are ExportToNewVapp or ExportToTargetVapp
-TargetVAppID
ID of target vApp for Partial vApp Export. By default the VM(s) will be exported to their existing vApp.
-TargetOrgVDCID
ID of target Org VDC for Full vApp Export. By default the VM(s) will be exported to their existing Org VDC. /vcd/hierarchy API calls can be used to determine Org VDC IDs.
-DisableNetwork
Disable NICs upon restoration. The NIC(s) will be disabled, but remain mapped to their existing network.
-NoMapping
Remove network mapping upon restoration. The NIC(s) will not be connected to any existing networks.
-RemoveNetworkDevices
Remove network interfaces from the restored vApp virtual machines.
-NetworkMapping
Map all vApp virtual machine NICs to specified network.
-PowerOn
Power on vApp after restoration.
-Server
Rubrik server IP or FQDN
-api
API version
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
-Confirm
Prompts you for confirmation before running the cmdlet.
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
NOTES
Written by Matt Elliott for community usage Twitter: @NetworkBrouhaha GitHub: shamsway
RELATED LINKS
Last updated