Use this vmcli command to restore backups
of your VMs, VM templates, or vApps.
Syntax
The vmcli -f restore command
uses this syntax:
vmcli -f restore [-c tsm_mode] -I restoreObjectListFile -d datacenternodename -o datamovernodename [-s tsmserverhostname] [-n vmclinodename] [-p tsmserverport] [-vmrestoretype (noninstant | instantrestore | instantaccess | mount | vmcleanup | vmfullcleanup | mountcleanup)]
![Linux operating systems](./../common/images/nglinux.gif)
You must issue the
vmcli -f restore command
as tdpvmware user, and not as root.
Parameters
The vmcli
-f restore command requires that the VE_VCENTER_NODE_NAME is
set correctly in the vmcliprofile. You cannot overwrite this parameter
with a command-line entry.
The data mover system
(the vStorage Backup Server where the Tivoli® Storage
Manager backup-archive
client is installed) must not set the ASNODENAME option.
- -c tsm_mode
- Specify the mode in which Tivoli Storage
Manager restores
up the virtual environment. The value is set in the VE_TSM_MODE parameter
in the vmcliprofile. You can choose from one
of the following modes:
- VSPHERE
- Specify this value when Tivoli Storage
Manager restores
individual VMs from a vCenter.
- VCloud
- Specify this value when Tivoli Storage
Manager restores vApps from
a vCloud director.
If the mode is not set in the vmcliprofile,
the VSPHERE mode is used with the vmcli command.
- -I restoreObjectListFile
- Specify the file that contains the list of VMs or vApps to
restore. Each line can contain only one VM identifier (vSphere mode)
or one restore specification for a vApp (vCloud
mode).
- The restoreObjectListFile uses the following
keyword in vSphere mode and vCloud mode:
- backupid
- Each line must begin with the backupid.
The syntax is backupid:your_backup_ID.
Specify the Tivoli Storage
Manager Object
ID for a specific VM backup (vSphere mode) or vApp backup
(vCloud mode). Locate the Object ID by using the vmcli -f
inquire_detail command. This keyword is required for a restore
operation.
- The restoreObjectListFile uses the following
keywords in vSphere mode only:
- vmname
- In vSphere mode, specify the name of the VM that was originally
backed up. If this keyword is not specified, the name vmname is
used for the restore.
Restriction: Restrictions: When you
specify a keyword in the
restoreObjectListFile,
Data Protection for VMware does
not differentiate between a colon (:) used as a keyword separator
or a colon that is used in a keyword value. Therefore, use caution
when you specify keyword values. In addition,
Data Protection for VMware support
for VM restore operations is limited to VM names and VMware
datacenter names
that contain English 7-bit ASCII characters only. VM names and
datacenter names
that use other language characters are not currently supported. Additional
character restrictions are listed in
Troubleshooting.
The
restore process does not create a snapshot of template VMs in the
same manner that a snapshot is created for regular VMs. As a result,
VMware VDDK advanced transports (SAN, HotAdd mode), change block tracking
(CBT), and incremental backups are not available.
- vmname
- In vSphere mode, specify the name that you want the restored VM
to be named. This keyword is the second entry. Existing VMs are not
overwritten. Therefore, either rename the VM (by using this keyword)
or delete the original VM before you issue the vmcli -f restore command.
- -vmdk=cnfg
- In vSphere mode, specify that the virtual machine configuration
information is restored. The configuration information is always restored
when the entire virtual machine is restored. However, by default the
configuration is not restored when you restore only selected disks
with the vmdk=disk label option.
- Ordinarily, restoring configuration information to an existing
virtual machine fails because the restored configuration information
conflicts with the existing virtual machine configuration information.
Use this option if the existing configuration file for a virtual machine
on the ESX server was deleted, and you want to use the backed up configuration
to re-create it.
- For example, this entry in restoreObjectListFile restores
all VMDKs for virtual machine VM1 and keeps the same name:
backupid:26801107 vmname:VM1:-vmdk=cnfg
- vmdk=disk label
- In vSphere mode, specify the disk label of the virtual disks to
include in the restore operation. You specify this option only if
you want to partially restore virtual machine data by restoring only
specific disks.
- For example, this entry in restoreObjectListFile restores
only the VMDK named Hard Disk 1 as a new virtual machine:
backupid:26801107 vmanme:myvm:vmdk=Hard Disk 1::vmname:newname
- -vmdk=disk label
- In vSphere mode, specify the disk label of one or more virtual
disks to exclude from the restore operation.
- For example, this entry in restoreObjectListFile restores
all VMDKs except the one named Hard Disk 1 as a new virtual machine:
backupid:26801107 vmanme:myvm:-vmdk=Hard Disk 4::vmname:newname
This
entry restores VMDKs for the virtual machine as a new virtual machine
without configuration information:backupid:26801107 vmname:oldvmname:-vmdk=cnfg::vmname:newname
- newdatacentername
- In vSphere mode, when you want the restore destination to be a
different datacenter,
specify the name of that datacenter with
this keyword.
- newesxhostname
- In vSphere mode, when you want the restore destination to be a
different ESX host, specify the name of that ESX host with this keyword.
- newdatastoreurl
- In vSphere mode, specify the name (not the URL) of the VMware datastore where
the VM is to be restored. For example, a datastore name
such as datastore1 is supported. A datastore URL
such as sanfs://vmfs_uuid:4d90pa2d-e9ju45ab-065d-00101a7f1a1d/ is
not supported.
- vmtempdatastore
- In vSphere mode, when you want to issue an instant restore operation,
specify a temporary datastore on
the ESX host. This temporary datastore contains
the configuration information and data of the VM that is created during
the operation.
- vmautostartvm
- In vSphere mode, when a VM is created for instant access (vmrestoretype
instantaccess), specify whether to automatically start
the VM:
- YES
- The VM created for instant access is automatically started.
- NO
- The VM created for instant access is not automatically started.
It must be manually started by the user. This value is the default.
- vmdiskprovision
- In vSphere mode, specify the type of provisioning for the VM disk
that is restored during an instant restore process (vmrestoretype
instant):
- THICK
- The disk is created with thick provisioning. This value is the
default.
- THIN
- The disk is created with thin provisioning.
An example restoreObjectListFile in
vSphere mode is provided here:# restore of VM "678912345" named "vmName6" to new vmname "vm6newName" to datacenter
"DataCenter2" to ESX esxhostname:esxHost1Name to new datastore "datastore2"
backupid:678912345 vmname:vmName6::vmname:vm6newName newdatacentername:DataCenter2
newesxhostname:esxHost1Name newdatastoreurl:datastore2 vmtempdatastore:datastore2temp
vmdiskprovision:thin
Each restore specification must be on
a single line. However, for the sake of page formatting, the restore
specification in this example is on multiple lines.
- The restoreObjectListFile uses
the following keywords in vSphere mode for mount operations:
- vmostype
- Specify
the type of operating system for the backed up VM.
- AUTOMATIC
- The operating system of the backed up VM is automatically detected.
This value is the default.
- LINUX
- The operating system of the backed up VM is Linux.
- WINDOWS
- The operating system of the backed up VM is Windows.
- exportfs
- Exports the mounted
file system to the location specified by the value of the exportparameter.
- YES
- The mounted file system is exported.
- NO
- The mounted file system is not exported. This value is the default.
- exportparameter
- The
location where the file system is exported.
IP or machine name
The IP address or name of the machine that mounts the exported
file system.
user name
The user name that is allowed to access Windows Share. It is the
user's responsibility to be aware of which users and groups have access
to their shared files.
- mountpoint mount point path
- Specify the path
of the mount point.
The default value is /mnt/vmname.
The default value is D:\tsmvemount\vmname.
- mounttag string
- This string is text that you enter to make the mount point name
easier to identify when you search on the local file system. Specify
this string as part of the mount path.
The full path to a disk is /mount
root/tag/vmname/snapshot
date and time/file system number.
For example:/mnt/tickel-4711/VM1/2013-12-12-12:12:12/disk1
The full path to a disk is mount
root\tag\vmname\snapshot
date and time\file system number.
For example:C:\Users\Admin\tickel-4711\VM1\2013-12-12-12:12:12\disk1
An example restoreObjectListFile in vSphere
mode for mount operations is provided here:
![Linux operating systems](./../common/images/nglinux.gif)
backupid:1167852 vmname:VM-Lin4 mounttag:limor exportparameters:9.123.456.78
exportfs:yes vmostype:linux mountpoint:/tmp/tsm-mounts
![Windows operating systems](./../common/images/ngwin.gif)
backupid:1167850 vmname:VM-Name3 mounttag:limor exportparameters:WinUser1
exportfs:yes vmostype:windows mountpoint:C:\temp\mnt
- The restoreObjectListFile uses the
following keywords in vCloud mode only:
- vappname
- In vCloud mode, specify the restore spec for one vApp.
This keyword is specified after the backupid keyword.
The vappname value is consisted of this triplet
entry:
org=organization name,orgvdc=organization vDC node
name,vapp=vApp name
For
example, the following restoreObjectListFile entry
restores vApp named
"vApp1" from organization "Mainz_org" and organization virtual datacenter "MZ_Silver"
to a new vApp named
"vApp1_restore":vappname "vApp1_restore"
backupid:47110815 vappname:org=Mainz_org,orgvdc=MZ_Silver,vapp=vApp1
vappname_new:vApp1_restore
- org=organization,orgvdc=organization
vdc,vapp=name of vApp backup
- In vCloud mode, use this triplet to specify the following information:
- org
- The name of the organization to which the vApp belongs.
- orgvdc
- The name of the organization vDC to
which the vApp belongs.
- vapp
- The name of the vApp that
was originally backed up.
- vappname_new
- In vCloud mode, specify the new name for vApp to
be restored. Existing vApps are
not overwritten. As a result, use the vappname_new keyword
to rename the restore vApp or
delete the original vApp before
you start the restore operation. If this keyword is not specified,
the vappname value is used for the restore.
- An example restoreObjectListFile is provided
here:
# restore of VM "678912345" named "vmName6" to new vmname "vm6newName" to datacenter
"DataCenter2" to ESX esxhostname:esxHost1Name to new datastore "datastore2"
backupid:678912345 vmname:vmName6::vmname:vm6newName newdatacentername:DataCenter2
newesxhostname:esxHost1Name newdatastoreurl:datastore2 vmtempdatastore:datastore2temp
vmdiskprovision:thin
Each restore specification must be on
a single line. However, for the sake of page formatting, the restore
specification in this example is on multiple lines. Tip: To make sure that correct information is specified in the
restoreObjectListFile,
you can issue the
inquire_detail command.
Inquire_detail provides current configuration
information about the backup environment.
- -d datacenternodename | providervDCnodename
- When the VE_TSM_MODE parameter specifies VSPHERE,
specify the datacenter node name.
- When the VE_TSM_MODE parameter specifies VCloud,
specify the provider vDC node
name.
- -o datamovernodename
- Specify the data mover node name.
This name is for the Tivoli Storage
Manager backup-archive
client node that is installed on the vStorage Backup Server. This
node performs the data movement.
- [-s tsmserverhostname]
- Specify the host name or IP address of the Tivoli Storage
Manager server.
If this parameter is not specified, the value in the profile is used.
- [-n vmclinodename]
- Specify the VMCLI node name.
This name is the node that connects the Data Protection for VMware command-line
interface to the Tivoli Storage
Manager server and
the data mover node.
If this parameter is not specified, the value in the profile is used.
- [-p tsmserverport]
- Specify the port of the Tivoli Storage
Manager server.
- If this parameter is not specified in the Data Protection for VMware command-line
interface and not specified in the
profile, the default port (1500) is used.
- If this parameter is not specified in the Data Protection for VMware command-line
interface but is specified in the
profile, the value in the profile is used.
[-vmrestoretype (noninstant | instantrestore | instantaccess | mount | vmcleanup | vmfullcleanup | mountcleanup)]
In a vSphere environment, specify this option to switch between
the following operations: existing restore, instant access, or instant
restore. Instant access and instant restore capability is supported
only for VMware VMs that are hosted on VMware ESXi 5.1 servers, or
later versions. The vmrestoretype parameter
uses the following keywords: - noninstant
- A full VM restore is issued.
- instantrestore
- The VM is started during the restore process.
- instantaccess
- The VM might be started but it is not restored.
- mount
- The volumes of the VM defined in the input file are mounted in
read-only mode on the data mover. On Linux, all the volumes of the
VM are mounted as a Network File System (NFS). On Windows, all the
volumes of the VM are mounted as a Common Internet File System (CIFS).
- vmcleanup
- Components that are no longer needed are cleaned up.
- vmfullcleanup
- The VM and all its components are cleaned up, regardless of the
current state.
- mountcleanup
- All mounted volumes of the selected VM are cleaned up. This cleanup
task includes removing file systems that were exposed for the restore
operation and the file shares (CIFS, NFS).
Restriction: When an instant
restore or instant access operation that is issued from the
Tivoli Storage
Manager backup-archive
client (
dsmc) is followed by an instant restore
or instant access operation that is issued from the
Data Protection for VMware command-line
interface (
vmcli)
or
Data Protection for VMware vSphere GUI, the TDPVMwareMount service
must be restarted. This situation applies only when the
Data Protection for VMware command-line
interface accesses the
Tivoli Storage
Manager server with
a node name different from the one used by the backup-archive client.
This restriction applies to any order of operations between the two
products.
Restart the service by going to . Look for service name Tivoli Storage Manager recovery agent in
the Services window. The path to the Services window
might vary depending on your operating system.
The service does
not have to be restarted when the VMware datacenter name is specified
with the asnodename option in the dsm.opt file.