Veritas NetBackup™ Commands Reference Guide

Last Published:
Product(s): NetBackup (8.1.2)
  1. Introduction
    1.  
      About NetBackup commands
    2.  
      Navigating multiple menu levels
    3.  
      NetBackup command conventions
    4.  
      NetBackup Media Manager command notes
    5.  
      IPV6 updates
    6.  
      Removal of nbexecute command
  2. Appendix A. NetBackup Commands
    1.  
      acsd
    2.  
      add_media_server_on_clients
    3.  
      backupdbtrace
    4.  
      backuptrace
    5.  
      bmrc
    6.  
      bmrconfig
    7.  
      bmrepadm
    8.  
      bmrprep
    9.  
      bmrs
    10.  
      bmrsrtadm
    11.  
      bp
    12.  
      bparchive
    13.  
      bpbackup
    14.  
      bpbackupdb
    15.  
      bpcatarc
    16.  
      bpcatlist
    17.  
      bpcatres
    18.  
      bpcatrm
    19.  
      bpcd
    20.  
      bpchangeprimary
    21.  
      bpclient
    22.  
      bpclimagelist
    23.  
      bpclntcmd
    24.  
      bpclusterutil
    25.  
      bpcompatd
    26.  
      bpconfig
    27.  
      bpdbjobs
    28.  
      bpdbm
    29.  
      bpdgclone
    30.  
      bpdown
    31.  
      bpduplicate
    32.  
      bperror
    33.  
      bpexpdate
    34.  
      bpfis
    35.  
      bpflist
    36.  
      bpgetconfig
    37.  
      bpgetdebuglog
    38.  
      bpimage
    39.  
      bpimagelist
    40.  
      bpimmedia
    41.  
      bpimport
    42.  
      bpinst
    43.  
      bpkeyfile
    44.  
      bpkeyutil
    45.  
      bplabel
    46.  
      bplist
    47.  
      bpmedia
    48.  
      bpmedialist
    49.  
      bpminlicense
    50.  
      bpnbat
    51.  
      bpnbaz
    52.  
      bppficorr
    53.  
      bpplcatdrinfo
    54.  
      bpplclients
    55.  
      bppldelete
    56.  
      bpplinclude
    57.  
      bpplinfo
    58.  
      bppllist
    59.  
      bpplsched
    60.  
      bpplschedrep
    61.  
      bpplschedwin
    62.  
      bppolicynew
    63.  
      bpps
    64.  
      bprd
    65.  
      bprecover
    66.  
      bprestore
    67.  
      bpretlevel
    68.  
      bpschedule
    69.  
      bpschedulerep
    70.  
      bpsetconfig
    71.  
      bpstsinfo
    72.  
      bpstuadd
    73.  
      bpstudel
    74.  
      bpstulist
    75.  
      bpsturep
    76.  
      bptestbpcd
    77.  
      bptestnetconn
    78.  
      bptpcinfo
    79.  
      bpup
    80.  
      bpverify
    81.  
      cat_convert
    82.  
      cat_export
    83.  
      cat_import
    84.  
      configurePorts
    85.  
      configureTPCerts
    86.  
      create_nbdb
    87.  
      csconfig cldinstance
    88.  
      csconfig cldprovider
    89.  
      csconfig meter
    90.  
      csconfig throttle
    91.  
      duplicatetrace
    92.  
      importtrace
    93.  
      jbpSA
    94.  
      jnbSA
    95.  
      ltid
    96.  
      manageClientCerts
    97.  
      mklogdir
    98.  
      nbauditreport
    99.  
      nbcatsync
    100.  
      NBCC
    101.  
      NBCCR
    102.  
      nbcertcmd
    103.  
      nbcertupdater
    104.  
      nbcldutil
    105.  
      nbcloudrestore
    106.  
      nbcomponentupdate
    107.  
      nbcplogs
    108.  
      nbdb_admin
    109.  
      nbdb_backup
    110.  
      nbdb_move
    111.  
      nbdb_ping
    112.  
      nbdb_restore
    113.  
      nbdb_unload
    114.  
      nbdbms_start_server
    115.  
      nbdbms_start_stop
    116.  
      nbdc
    117.  
      nbdecommission
    118.  
      nbdelete
    119.  
      nbdeployutil
    120.  
      nbdevconfig
    121.  
      nbdevquery
    122.  
      nbdiscover
    123.  
      nbdna
    124.  
      nbemm
    125.  
      nbemmcmd
    126.  
      nbfindfile
    127.  
      nbfirescan
    128.  
      nbftadm
    129.  
      nbftconfig
    130.  
      nbgetconfig
    131.  
      nbhba
    132.  
      nbholdutil
    133.  
      nbhostidentity
    134.  
      nbhostmgmt
    135.  
      nbhypervtool
    136.  
      nbinstallcmd
    137.  
      nbjm
    138.  
      nbkmsutil
    139.  
      nboraadm
    140.  
      nborair
    141.  
      nbpem
    142.  
      nbpemreq
    143.  
      nbperfchk
    144.  
      nbplupgrade
    145.  
      nbrb
    146.  
      nbrbutil
    147.  
      nbregopsc
    148.  
      nbreplicate
    149.  
      nbrepo
    150.  
      nbrestorevm
    151.  
      nbseccmd
    152.  
      nbsetconfig
    153.  
      nbsnapimport
    154.  
      nbsnapreplicate
    155.  
      nbsqladm
    156.  
      nbstl
    157.  
      nbstlutil
    158.  
      nbstop
    159.  
      nbsu
    160.  
      nbsvrgrp
    161.  
      resilient_clients
    162.  
      restoretrace
    163.  
      stopltid
    164.  
      tl4d
    165.  
      tl8d
    166.  
      tl8cd
    167.  
      tldd
    168.  
      tldcd
    169.  
      tlhd
    170.  
      tlhcd
    171.  
      tlmd
    172.  
      tpautoconf
    173.  
      tpclean
    174.  
      tpconfig
    175.  
      tpext
    176.  
      tpreq
    177.  
      tpunmount
    178.  
      verifytrace
    179.  
      vltadm
    180.  
      vltcontainers
    181.  
      vlteject
    182.  
      vltinject
    183.  
      vltoffsitemedia
    184.  
      vltopmenu
    185.  
      vltrun
    186.  
      vmadd
    187.  
      vmchange
    188.  
      vmcheckxxx
    189.  
      vmd
    190.  
      vmdelete
    191.  
      vmoprcmd
    192.  
      vmphyinv
    193.  
      vmpool
    194.  
      vmquery
    195.  
      vmrule
    196.  
      vmupdate
    197.  
      vnetd
    198.  
      vssat
    199.  
      vwcp_manage
    200.  
      vxlogcfg
    201.  
      vxlogmgr
    202.  
      vxlogview
    203.  
      W2KOption

Name

nbrestorevm — restore VMware or Hyper-V virtual machines

SYNOPSIS

For VSphere Restore:

nbrestorevm -vmw -C vm_client [-S master_server] [-O] [-R rename_file] [-L progress_log [-en]] [-k "keyword phrase"] [-s mm/dd/yyyy [hh:mm:ss]] [-e mm/dd/yyyy [hh:mm:ss]] [-w [hh:mm:ss]] [-vmtm vm_transport_mode] [-vmserver vm_server] [-vmproxy vm_proxy] [-vmpo] [-vmtd] [-vmfd] [-vmbz] [-vmvmxd] [-vmkeephv] [-vmid] [-vmInstanceId] [-vmsn] [-vmrb] [-vcd] [-vcdred] [-vcdovw] [-vcdrte] [-vcdtemplate] [-vcdlfree] [-vcdremv] [-vmst]

For VMware Selective VMDK Restore:

nbrestorevm -vmw -C vm_client -S master_server -s mm/dd/yyyy hh:mm:ss -e mm/dd/yyyyhh:mm:ss | -backupid value -restorespecout filename

nbrestorevm [ - validate] -restorespec filename

nbrestorevm -restorespec filename [-L progress_log] [-w [hh:mm:ss]]

For Hyper-V VM Restore:

nbrestorevm {-vmhv | -vmhvnew | -vmhvstage | -vmncf} -C vm_client [-S master_server] [-O] [-R rename_file] [-L progress_log [-en]] [-k "keyword phrase"] [-s mm/dd/yyyy [hh:mm:ss]] [-e mm/dd/yyyy [hh:mm:ss]] [-w [hh:mm:ss]] [-vmtm vm_transport_mode] [-vmserver vm_server]

For BMR VM Conversion:

nbrestorevm -bmr -vmw -C vm_client [-S master_server] [-O] -vmserver vm_server -vmproxy vm_proxy -veconfig config_filepath [-config bmr_config_name] [-vmpo] [-vmsn] [-systemOnly]

For VMware Instant Recovery:

nbrestorevm -vmw -ir_activate -C vm_client -temp_location temp_location_for_writes [-S master_server] [-vmpo] [-vmInstanceId] [-vmsn] [-vmkeephv] [-vmid] [-vmnewdiskuuid] [-vmserver vm_server] [-vmproxy vm_proxy] [-s mm/dd/yyyy [hh:mm:ss]] [-e mm/dd/yyyy [hh:mm:ss]] [-R rename_file] [-disk_media_server media_server] [-vmst]

nbrestorevm -ir_listvm

nbrestorevm -ir_deactivate ir_identifier [-force]

nbrestorevm -ir_done ir_identifier

nbrestorevm -ir_reactivate ir_identifier [-force]

nbrestorevm -ir_reactivate_all ir_identifier -vmhost vm_host -media_server media_server_activate_vm [-force]

On UNIX systems, the directory path to this command is /usr/openv/netbackup/bin/

On Windows systems, the directory path to this command is install_path\NetBackup\bin\

DESCRIPTION

The nbrestorevm command restores VMware virtual machines (-vmw option) or Hyper-V virtual machines (-vmhv option). You can run nbrestorevm on a client to restore VMs only if you specify the client as a peer of the master server for the purpose of specific VM restoration. This restriction also applies to media servers if the media server is installed on different machine than the master server.

This command covers a wide range of functionality:

  • The -vmw option restores a VMware virtual machine.

  • The -vmhv, -vmhvnew, -vmhvstage, and -vmncf options restore a Hyper-V virtual machine.

  • The -bmr -vmw option creates a VMware virtual machine from a client backup.

  • The -restorespec option restores one or more virtual machine disks into a new VM.

  • The -ir_activate option starts the instant recovery of a specified virtual machine. A set of related instant recovery options (-ir_listvm, -ir_deactivate, -ir_done, -ir_reactivate, and -ir_reactivate_all) perform other functions on the instant recovery of a virtual machine.

You can run this command on the master server and on all clients.

OPTIONS

Several of the options are common to all restores (VSphere, Hyper-V, BMR VM conversion, and IR) and others are specific to a subset of these restores. All options that begin "-ir" are Instant Recovery only (for example, -ir_list). Options that begin "-vcd" are VSphere only (for example, -vcdred). Other options that apply to only a subset of functions, are noted in the option description.

-backupid value

The ID of the backup image to use to create the parameters file to restore a VMware virtual machine disk or disks, in clientname_backuptime format. The backuptime is the decimal number of seconds since January 1, 1970.

Use this option with the -restorespecout option. Do not combine it with the -s or -e option.

-bmr

Contacts the BMR server to carry out tasks related to virtual machine creation from client backup.

-C vm_client

The name of the virtual machine as identified in the backup. For example, if the policy backed up the virtual machine by its host name, specify that host name.

To restore to a different location, use the -vmserver and -R options.

-config bmr_config_name

Specifies the BMR configuration name. The default name is current. Applies only to the BMR VM conversion.

-disk_media_server media_server

Specifies which media server performs the Instant Recovery.

This option is useful if NetBackup storage is configured over several media servers, such as for load balancing. Without the -disk_media_server option, the Instant Recovery job may select any of the available media servers to do the restore. If only one of the media servers is configured for Instant Recovery, specify that server with the -disk_media_server option.

-force

Suppresses the confirmation prompts.

-ir_activate

Starts the Instant Recovery of the specified virtual machine. For VMware, the command mounts the backup image as an NFS datastore. The virtual machine is instantly recovered when the virtual machine data is accessible on the VM host.

-ir_deactivate ir_identifier [-force]

Deletes the specified restored virtual machine from the ESX host and releases the NetBackup media server resources. The -force option suppresses the confirmation prompts.

-ir_done ir_identifier

Completes the virtual machine instant recovery job after the data is migrated. It removes the NetBackup storage and releases the media server resources. The NetBackup storage is the datastore that is mounted on the ESX host.

-ir_listvm

Lists details about the virtual machines that are activated by instant recovery.

-ir_reactivate ir_identifier [-force]

Reactivates a restored virtual machine by remounting the NetBackup NFS datastore. It also registers the restored virtual machines on the ESX host from the temporary datastore on the ESX host.

ir_identifier is the virtual machine's numeric identifier from the -ir_listvm output.

The -force option suppresses the confirmation prompts.

-ir_reactivate_all

Restarts an interrupted instant recovery job for all virtual machines on the ESX host and NetBackup media server combination.

-L progress_log

Specifies the name of an existing file in which to write progress information. This option applies to vSphere restore and Hyper-V restore.

Only default paths are allowed for this option and Veritas recommends using the default paths. If you cannot use the NetBackup default path in your setup, you should add custom paths to the NetBackup configuration. The following are the default paths:

UNIX systems: /usr/openv/netbackup/logs/user_ops/proglog

Windows systems: install_path\NetBackup\logs\user_ops\proglog

For more information on how to add a custom path, see the "BPCD_WHITELIST_PATH option for NetBackup servers and clients" topic in the NetBackup Administrator's Guide, Volume I.

-media_server media_server_activate_vm

Specifies the media server on which the NFS datastores that contain the backup images were mounted when you reactivate virtual machines. This option is used only with the -ir_reactivate_all function.

-O

Overwrites the VMs and associated resources if they already exist with the same name. The resources are entities such as virtual machine disk format files (VMDKs) that explicitly belong to the existing VM. If -O is specified, the VMware server is requested to remove the VM before the VM is restored. If not specified, the restore may fail. This option is used with the VClient restore, the Hyper-V restore, and the BMR VM conversion.

-R rename_file

Specifies an absolute directory path to a rename file, which is used to restore a VMware virtual machine. The rename file indicates that the restore is to be redirected to an alternate location and specifies details about the alternate client location. For VMware, the rename file can include any of the following entries:

change /first_vmdk_path to /new_first_vmdk_path 
change /second_vmdk_path to /new_second_vmdk_path 
...
change /n'th_vmdk_path to /new_nth_vmdk_path 
change vmname to NEW_VM_NAME 
change esxhost to NEW_ESX_HOST 
change datacenter to NEW_DATACENTER 
change folder to NEW_FOLDER 
change resourcepool to NEW_RESOURCEPOOL 
change datastore to NEW_DATASTORE 
change network to NEW_NETWORK
change organization to NEW_ORGANIZATION
change orgvdc to NEW_ORGVDC
change vcdserver to NEW_VCDSERVER
change vcdvapp to NEW_VCDVAPP
change vcdvapptemplate to NEW_VCDVAPPTEMPLATE
change vcdvmname to NEW_VCDVMNAME
change vcdcatalog to NEW_VCDCATALOG

Instant Recovery uses the following subset of this list:

change vmname to NEW_VM_NAME
change esxhost to NEW_ESX_HOST
change resourcepool to NEW_RESOURCEPOOL
change network to NEW_NETWORK

The following are notes regarding these entries:

  • Enter the change line exactly as it appears in this list, except for the variable at the end (shown in all caps).

  • Each change line must end with a carriage return. If the rename_file contains only one entry, make sure that the end of the line contains a carriage return.

  • If the rename file has no contents, the restore uses default values from the backup image.

  • Use change datastore to NEW_DATASTORE to identify the target datastore when you restore from backups that are not made with Replication Director.

  • The rename file must be in UTF-8 character encoding.

With NetBackup 7.7.2 and later, only default paths are allowed for this option and Veritas recommends to use the default paths. If you cannot use the NetBackup default path in your setup, you should add custom paths to the NetBackup configuration.

For more information on how to add a custom path, see the "BPCD_WHITELIST_PATH option for NetBackup servers and clients" topic in the NetBackup Administrator's Guide, Volume I.

-restorespec filename

Creates a new virtual machine and restores the NetBackup client and disks that you specify in the filename to the new VM. The filename is a text file that uses the JavaScript Object Notation (JSON) format.

The text file must be in UTF-8 character encoding.

You can use the -restorespecout option to create the JSON-formatted text file. You can edit the text file so that it contains only the virtual machine disks that you want to restore.

The following is an example of the restore parameters that the -restorespec option requires:

{
  "ClientType": "VMware",
  "ClientName": "VM-client-name",
  "RestoreType": "SelectiveDiskRestore",
  "BackupImageSelection": {
    "MasterServer": "Master-server-name",
    "StartDate": "mm/dd/yy hh:mm:ss",
    "EndDate": "mm/dd/yy hh:mm:ss",
    "BackupId": "clientname_timestamp"
  },
  "VMwareRestoreParameters": {
    "vCenterServer": "vCenter-name-for-restore",
    "VMwareRecoveryHost": "Recovery-host-name",
    "DefaultDiskProvisioning": "thin",
    "TransportMode": "san:hotadd:nbd",
    "VMwareVirtualMachineDestination": {
      "VMName": "Restore-vm-name",
      "AttachDisksToExistingVM": "No",
      "PowerOn": "No",
      "Datacenter": "Path-of-Datacenter-for-destination-vm",
      "ESX": "Hostname-of-the-ESX-host",
      "Folder": "Path-to-destination-VM-folder",
      "ResourcePool/Vapp": "Path-of-vApp-or-resource-pool-destination",
      "VmxDatastore": ""
    },
    "VMwareVirtualDiskDestination": [
      {
         "VirtualDisk" : "/DS1/BackedupVM/BackedupVM.vmdk",
         "OverwriteExistingDisk": "No",
         "Datastore": "[Datastore-name]",
         "Path": "",
         "Provisioning": "thin"
         "Controller": "scsi0-0"           },
      {
         "VirtualDisk": "/DS2/BackedupVM/BackedupVM_1.vmdk",
         "OverwriteExistingDisk": "No",
         "Datastore": "",
         "Path": "[datastore_name] MyVm/MyVM_1.vmdk",
         "Provisioning": "eagerzeroed"
         "Controller": "scsi0-1"           }
    ]
    "VMwareAdvancedRestoreOptions": {
      "DeleteRestoredVMOnError": "No",
      "VMShutdownWaitSeconds": 900
    }
  }
}

The following itemized lists describe the five sections of the filename. The optional sections or optional fields that you do not want to use must be omitted from the filename.

First section (required): The opening section of the filename provides the required information about the client that contains the disks that you want to restore.

  • ClientType. The client type as configured in the backup policy. Required.

    For Vmware virtual machine disk restore, use VMware

  • ClientName. The client name as configured in the backup policy. Required.

  • RestoreType. The type of restore. Required.

    For Vmware virtual machine disk restore, use SelectiveDiskRestore.

Second section (optional): The BackupImageSelection section of the filename specifies the information required to identify the backup image to restore. If this section is not specified, NetBackup restores from the most recent backup. The following are the fields that describe the BackupImageSelection:

  • MasterServer. The fully-qualified domain name of the NetBackup master server to use to query the VM details. Optional.

    If not specified, the master server that is specified in the NetBackup configuration is used.

  • StartDate. The start date to look for backup images, in mm/dd/yy hh:mm:ss format. If more than one backup image exits in the date range, NetBackup selects the most recent backup. Optional.

    If not specified, the start date is 6 months earlier than the current date.

  • EndDate. The end date to look for backup images, in mm/dd/yy hh:mm:ss format. If more than one backup image exits in the date range, NetBackup selects the most recent backup. Optional.

    If not specified, NetBackup uses the current date.

  • BackupId. The ID of the backup image to use for the restore, in clientname_backuptime format. The backuptime is the decimal number of seconds since January 1, 1970. Optional.

    If not specified, NetBackup uses the most recent backup image. If you specify a StartDate, EndDate, and a valid BackupId, NetBackup restores from the BackupId image.

Third section (required): The VMwareRestoreParameters section of the filename specifies the VMware attributes of the virtual disk to be restored. All of the fields in this section are optional; however, the section is required because it also contains two required subsections. The following are the fields that describe the VMwareRestoreParameters:

  • vCenterServer. The host name of the destination vCenter for the restore, in the same format as specified in the NetBackup Virtual Server credentials. Optional.

    To restore to a standalone ESXi hypervisor when the backup was through a vCenter, the value of this field must be None.

  • VMwareRecoveryHost. The host that performs the restore. Optional.

    If not specified, NetBackup uses the backup host value from the backup image.

  • DefaultDiskProvisioning. The default disk provisioning for all of the disks to be created in the restore VM: thin, thick, eagerzeroed, or unknown. Optional.

    For each disk, you can override this default by specifying a different Provisioning value in the VMwareVirtualDiskDestination section of the filename.

    If neither DefaultDiskProvisioning or Provisioning are specified, NetBackup uses the provisioning as specified in the backup.

  • TransportMode. The transport mode combination to use for the restore as specified in lowercase, colon separated values: hotadd:nbd:nbdssl:san. The order of the specification is significant; NetBackup attempts each method in turn until the restore succeeds. If all methods fail, the restore fails. Optional.

    If not specified, NetBackup uses the transport mode combination that was used for the backup.

Fourth section (required): The VMwareVirtualMachineDestination section of the filename specifies the destination parameters for the restore. This section is subordinate to the VMwareRestoreParameters section. It contains the following fields:

  • VMName. The unique display name of the new virtual machine for the restored disk or disks. The nbrestorevm command adds a timestamp to the name of the original VM client when it populates this field. The timestamp is the decimal number of seconds since January 1, 1970. Required.

    NetBackup restores the virtual machine disks to a new VM. Therefore, if this name conflicts with an existing display name, the restore fails.

  • AttachDisksToExistingVM. Whether to restore the selected VMDKs to an existing VM or to a new VM, as follows:

    • If the value is Yes, the VM specified in the VMName field must exist in the target vCenter or ESX server. If it does not exist, the restore fails with status code 2820.

    • If the value is No, the VM specified in the VMName field must not exit in the target vCenter or ESX server. If it exists, the restore fails with status code 2820.

    The default value is No.

  • PowerOn. Whether to turn on the target VM after the restore, as follows:

    • If the value is Yes, the target VM is powered ON at the end of a successful restore.

    • If the value is No, the target VM is not turned on after the restore.

    If the restore is to an existing VM, the VM is turned off before the virtual disks are attached to it during the restore.

    The default value is No.

  • Datacenter. The name of the VMware Datacenter for the virtual disk, in pathname format. Optional.

    To restore to a standalone ESXi hypervisor when the backup was through a vCenter, the value of this field must be None.

    If not specified, NetBackup uses the value from the backup.

  • ESX. The name of the ESX host to which NetBackup should restore the virtual disk. Optional.

    If not specified, NetBackup uses the value from the backup.

  • Folder. The pathname of the VM folder to which NetBackup should restore the virtual disk. Optional.

    To restore to a standalone ESXi hypervisor when the backup was through a vCenter, the value of this field must be None.

    If not specified, NetBackup uses the value from the backup.

  • ResourcePool/Vapp. The pathname of the resource pool to which NetBackup should restore the virtual disk. If the restore is to a vApp, specify the path of the vApp. Optional.

    If not specified, NetBackup uses the value from the backup.

  • VmxDatastore. The name of the Datastore to which NetBackup should restore the .vmx configuration file and other VM configuration files. You may enclose the name in square brackets but do not have to. Optional.

    If not specified, NetBackup uses the value from the backup.

Fifth section (required): The VMwareVirtualDiskDestination section of the filename is an array that specifies the disks to restore and the restore parameters for those disks. This section is subordinate to the VMwareRestoreParameters section. It can contain one or more sets of the following fields, one set per virtual machine disk. A comma must separate fields in a set, and a comma must separate sets.

  • VirtualDisk. The full pathname of the virtual disk to restore. This path must match exactly the path of the .vmdk file when it was backed up. Required.

  • OverwriteExistingDisk. Whether to overwrite the existing virtual disk or disks on the target VM, as follows:

    • If the value is Yes, overwrite the original virtual disk and retain the disk UUID.

    • If the value is No, restore the virtual disk to the target VM as a new disk. VMware assigns a new UUID to the disk.

    The default value is No.

  • Datastore. The name of the Datastore that is the destination for the restore. You may enclose the name in square brackets but do not have to. (VMware generates the Datastore pathname using the naming conventions for the VM.) Optional.

    For a restore of virtual disks to a datastore cluster, specify the name of the datastore cluster in this field.

    If not specified, NetBackup uses the value that is specified in the Path field. If neither Datastore or Path are specified, NetBackup uses the Datastore from the backup image.

  • Path. The full pathname to the restore destination for the virtual disk, in the following format:

    [datastore_name] MyVM/MyVM.vmdk

    Optional.

    If you specify a Path and it is not available or a disk already exists at that path, the restore fails. If neither Datastore or Path are specified, NetBackup uses the Datastore from the backup image.

  • Provisioning. The disk provisioning for this specific disk: thin, thick, eagerzeroed, or unknown. Optional.

    If not specified, the NetBackup uses the DefaultDiskProvisioning value.

  • Controller

    The virtual disk controller to which the disk is attached in the original VM. Optional

    This field is informational only to help you determine which virtual disk or disks to restore. The value is not used during a restore.

Sixth section (optional). The VMwareAdvancedRestoreOptions section of the file specifies parameters to restore to an existing VM. This section is subordinate to the VMwareRestoreParameters section.

  • DeleteRestoredVMOnError. Whether to delete the temporary VM if the disk attach operation fails, as follows:

    • If the value is Yes, delete the temporary VM.

    • If the value is No, do not delete the temporary VM. If the disks are not successfully attached to the target VM, you can access the data on the temporary VM.

    The default value is No. Optional.

  • VMShutdownWaitSeconds. For restores to an existing VM, the restore process shuts down the target virtual machine before it attaches the disk or disks. The duration of the shutdown operation depends on the VMware workload. Use this parameter to specify how long the restore process should wait for shutdown before giving up on restore.

    The default value is 900 seconds (15 minutes). Optional.

-restorespecout filename

Specifies the pathname of the file in which nbrestorevm writes the parameters of the individual virtual machine disk or disks that you want to restore. By default, nbrestorevm creates the file in the current working directory. To specify the backup image from which to obtain the parameters, use the -backupid option or the -s and -e options. If you specify the -s and -e options, NetBackup uses the most recent backup in that date range.

Edit the file so that it contains the appropriate information. Ensure that the VMName field contains the name for the new VM. Ensure that the VMwareVirtualDiskDestination section of the file contains only the virtual machine disk or disks that you want to restore. Use the edited file as the input file for the -restorespec option, which restores the virtual machine disk or disks that are identified in the file.

By default, nbrestorevm creates the file in the current working directory. To create the file in a different directory, specify a pathname for the filename. That path must be in the NetBackup whitelist of paths. For more information on how to add a custom path, see the "BPCD_WHITELIST_PATH option for NetBackup servers and clients" topic in the NetBackup Administrator's Guide, Volume I:

-S master_server

Specifies a different master server to restore a virtual machine from a backup that was made by that master.

-s mm/dd/yyyy [hh:mm:ss] -e mm/dd/yyyy [hh:mm:ss]

Limits the selectable backup images to those with timestamps that fall within the specified period. NetBackup selects the latest suitable backup image within the range. Specifies the start date (-s) and end date (-e) for the listing. The start date and end date signify the time range to search for a valid backup image. The latest valid backup image within the specified time range is used to perform restores. These options are used with all functions except the BMR VM conversion.

-temp_location temp_location

Specifies a temporary datastore on the VM host server where all writes occur until the virtual machine is restored. All writes occur on this datastore until Storage vMotion is complete or until you are finished with the virtual machine (such as for troubleshooting). This datastore must exist before you run nbrestorevm. This option can be used only with -ir_activate. This option is used only with Instant Recovery.

- validate -restorespec filename

Validates the virtual machine disk restore parameters in the filename. The -restorespec option is required, and it must follow the -validate option.

For a description of the filename, see the -restorespec option description.

-vcd

Restores a vCloud virtual machine. This option is required when you restore to the original location or to an alternate location in vCloud.

-vcdlfree

Restores a vCloud virtual machine by using the datastore with the largest available space. This option applies only to the restore operations that are not directed to the original location.

-vcdovw

Overwrites the existing vCloud vApp.

-vcdred

Redirects the vCloud restore.

-vcdremv

Removes the vApp if you use the -vcdtemplate option to save the vApp as a template.

-vcdrte

Restores a vCloud virtual machine to an existing vCloud vApp. This option is required when you restore to an existing vApp including an original location restore.

-vcdtemplate

Restores a vCloud virtual machine as a template.

-veconfig ve_config_filepath

Full (absolute) file path that contains the virtual environment details in param=value format. A veconfig file typically contains the following entries:

esxhost="bmresx.xyz.com"
name="Test_NBRestoreVM"
network="VM Network"
nbrestorediskformat="ThinVdisk"
toolsIsoPath="C:\B2V\windows_esx5.iso"
datacenter="/Test/XyzDatacenter"
folder="/Test/XyzDatacenter/vm"
resourcepool="/Test/XyzDatacenter/host/bmresx.xyz.com/Resources/resourcepoolname"
harddisk=0:"B2V_4TB"
harddisk=1:"storage1 (2)"
harddisk=2:"storage2 (1)"

The following are notes regarding these entries:

  • The folder, resourcepool, and diskformat fields are optional.

  • The VM conversion on a standalone esx server uses the following values:

    datacenter="ha-datacenter"
    resourcepool="/ha-datacenter/host/esx_host_name/Resources"
  • To create all VMDKs corresponding to disks on the same datastore, define the datastore name by using the entry datastore="datastoreName".

  • To create VMDKs on different datastores, populate the veconfig file as shown in the sample file above (harddisk=0...).

-vmbz

Disk format of the restored disk will be 'eager zero'

-vmfd

Restores the VMDK files as flat disks.

-vmhost vm_host

Specifies the VM host on which the virtual machines were mounted when you reactivate virtual machines.

-vmhv

Restores a Hyper-V virtual machine at the original location.

-vmhvnew

Restores a Hyper-V virtual machine to a new location.

-vmhvstage

Restores Hyper-V virtual machine files to a staging location.

-vmid

Restores the BIOS UUID of the virtual machine instead of creating a new one.

For VMware: Restores the BIOS UUID of the virtual machine instead of creating a new one.

For Hyper-V: Restores the GUID of the virtual machine instead of creating a new one.

Note:

For Hyper-V, when you restore to the original location or to a staging location, the virtual machine's original GUID is restored. This behavior is true even if the vmid option is omitted.

-vmInstanceId

Retains the Instance UUID of the original virtual machine (note that the Instance UUID is a vCenter specific unique identifier of a virtual machine). The virtual machine is restored with the same Instance UUID that it had when it was backed up.

If the restore of the virtual machine is to a standalone ESXi host, this option is ignored.

If a virtual machine with the same Instance UUID exists at the target restore location, NetBackup assigns a new UUID to the virtual machine.

-vmkeephv

Retains the hardware version upon recovery. This option applies only to VMware VM recovery.

-vmnewdiskuuid

Generate new virtual machine disk UUIDs during an instant recovery. Use this option with the - ir_activate option.

The VMs that activate with this option do not retain the new vmdk UUID during a subsequent - ir_reactivate operation. In such a scenario, the VMDKs revert to their UUIDs at the time of the backup.

-vmncf

Specifies that you do not want to restore the common files when you restore the Hyper-V virtual machine.

-vmpo

Automatically powers up the virtual machine after the restore operation.

-vmproxy VMware_access_host

Specifies the VMware access host. It overrides the default VMProxy used for backing up the virtual machines.

Storage lifecycle policies (SLPs) can use Auto Image Replication to replicate a virtual machine backup image to another NetBackup domain. To restore the virtual machine from the replicated image, you must include the -vmproxy option. Use the -vmproxy option to specify the backup host (access host) that is in the domain where the virtual machine was replicated.

-vmrb

Removes any mounted removable devices such as cd-rom or dvd-rom images.

-vmserver VMServer

Specifies a different target location for the restore operation (for example, ESX server or vCenter). It overrides the default VM server used for backing up the virtual machines. To restore to the same vCenter where the virtual machine originally resided, omit this option.

-vmsn

Strips the network interface of the virtual machine.

-vmst

Strips the VMware tags from the restore.

-vmtd

Disk format of the restored disk will be 'thin'.

-vmtm vm_transport_mode

Specifies the VMware transport mode. An example of the format of vm_transport_mode is san:hotadd:nbd:nbdssl.

-vmvmxd

Allows the VMware VMDK files to be restored to the same datastore where the VMX file is specified. A rename file that assigns a different vmdk file path overrides this option.

-vmw

Restores a VMware virtual machine.

-w [hh:mm:ss]

Causes NetBackup to wait for a completion status from the server before it returns you to the system prompt.

The required date and time values format in NetBackup commands varies according to your locale. The /usr/openv/msg/.conf file (UNIX) and the install_path\VERITAS\msg\LC.CONF file (Windows) contain information such as the date-time format for each supported locale. The files contain specific instructions on how to add or modify the list of supported locales and formats.

See the "About specifying the locale of the NetBackup installation" topic in the NetBackup Administrator's Guide, Volume II.

You can optionally specify a wait time in hours, minutes, and seconds. The maximum wait time you can specify is 23:59:59. If the wait time expires before the restore is complete, the command exits with a timeout status. The restore, however, still completes on the server.

If you specify 0 or do not specify a time, the wait time is indefinite for the completion status.

EXAMPLES

VSphere Examples

Example 1 - Restore the specified virtual machine from its latest backup image. If a VM with the same name already exists, this command fails.

# nbrestorevm -vmw -C client1

To overwrite an existing VM with its latest backup image, execute the following command:

# nbrestorevm -vmw -C client1 -O -S master_server

Example 2 - Restore a VM to an alternate location that rename_file specifies. The latest available backup image is selected from the range between start_time and end_time. The VM is powered on after the restore operation and is overwritten at the alternate location if it already exists.

# nbrestorevm -vmw -S server1 -C client1 -R rename_file -s start_time 
-e end_time  -vmpo -O

Example 3 - Restore a virtual machine to the original vApp in vCloud Director.

# nbrestorevm -vmw -S server1 -vcd -C vm_client -vmserver vm_server 
-vmproxy vm_proxy -vcdrte

To restore multiple virtual machines into the original vApp, run this nbrestorevm command for each virtual machine.

Example 4 - Restore multiple virtual machines into a vApp template

Run the command in Example 3 to restore each of the virtual machines into a non-template vApp, but do not restore the last virtual machine.

To restore the last virtual machine and copy all the restored virtual machines into a vApp template, run the following command:

# nbrestorevm -vmw -S server1 -vcd -C vm_client -vmserver vm_server 
-vmproxy vm_proxy -R rename_file -vcdtemplate -vcdremv -vcdlfree

-R rename_file is the full path to a text file that contains the following entry ending in a carriage return:

change vcdvapp to vApp_template_file

The -vcdremv option removes the non-template vApp into which you restored the virtual machines. The -vcdlfree option selects the datastore that has the largest available space. The nbrestorevm command in this example (with the rename file) creates a vApp template and copies the restored virtual machines into that template. No further virtual machines can be added to the template.

Example 5 - Restore a VM to an alternate location that rename_file specifies. The latest available backup image is selected from the range between start_time andend_time. The operation powers on the VM after the restore operation and overwrites the VM at the alternate location if it already exists.

nbrestorevm -vmhvnew -S srvr1 -C client1 -R rename_file -s start_time 
-e end_time -O

Example 6 - Restore VM files from the latest backup to the staging location.

# nbrestorevm -vmhvstage -C vm_client -R rename_file

BMR Example

Example 7 - Perform a BMR VM conversion of a client configuration to a VM server and power on the converted VM:

# nbrestorevm -bmr -vmw -C client1 -vmserver VmServer1 
-vmproxy d86-12.xyz.com -veconfig C:\B2V\veconfig.txt -O -vmpo

Instant Recovery Examples

Example 8 - Perform a set of nbrestorevm commands in a typical sequence of Instant Recovery operations.

Initiate Instant Recovery by activating the virtual machine. Required parameters are shown. Other optional parameters are shown in Synopsis.

VMware example:

# nbrestorevm -vmw -ir_activate -C client1 -temp_location temploc1

List details about the activated virtual machine.

# nbrestorevm -ir_listvm

Deactivate or delete virtual machine whose ir_identifier is 26.

# nbrestorevm -ir_deactivate 26

Complete the VM instant recovery job for ir_identifier 14 after the data is migrated.

# nbrestorevm -ir_done 14

Reactivate VM with ir_identifier 11 or reactivate all virtual machines that are interrupted during recovery.

# nbrestorevm -ir_reactivate 11 -force

or

# nbrestorevm -ir_reactivate_all -vmhost host1 -media_server msvm2 -force

SEE ALSO

See bprestore.