Restoring VMware datastores
You can restore a datastore or datastores by using the instant_restore command. This command, restores a datastore or datastores and their associated virtual machines that were included in the snapshot backup at a specific point in time. You can restore from network-attached storage (NAS) or storage area network (SAN) storage systems. This type of restore is referred to as an instant restore.
About this task
Procedure
To restore a datastore, enter the following command:
- restoreObjectListFile
Where the restoreObjectListFile specifies an input text file that contains a list of datastores to restore. This file must have one datastore identifier per line. The identifier can be the URL or name of the datastore.
For example, datastoreurl:ds:///vmfs/volumes/50ade558-4fa9960d-db2c-e41f136af7c8/ or datastorename:Datastore1.
- -B backup_ID
- You can specify the backup to restore by entering the -B option followed by the backup ID. This option is not mandatory and if not specified the most recent snapshot backup is restored.
- List all the datastores in the input text file.
- To exclude a virtual machine from the datastore, on
a new line specify an exclamation ! character. This
character must be followed by the universal unique identifier (UUID)
and value for the virtual machine. The UUID and its value are separated
by a colon.
For example, !vminstanceuuid:6a2drae7-02d4-c4be-6g5-c44a1deseb78.
During an instant restore, the datastore is assigned a new URL when writeable snapshots are restored and the datastore backup was attached previously to any ESX host.
A writeable snapshot can exist on SAN Volume Controller, DS8000®, and Storwize® family storage systems. A writeable snapshot can also exist on a XIV® system when the profile USE_WRITABLE_SNAPSHOTS parameter is set to yes.
If the URL is changed, Tivoli Storage FlashCopy Manager for VMware outputs the original URL from the backup and the new URL for each datastore after a datastore is restored.
For example, the datastore named Datastore1 contains one virtual machine named VM1. After the backup snapshot of Datastore1, an extra virtual machine VM2 is added to the datastore. To restore the datastore named Datastore1, the input file must specify Datastore1 as the datastore to restore and must exclude the virtual machine named VM2.
Example
vmcli -f instant_restore -I restoreObjectListFile
The datastores to
restore are defined in the restoreObjectListFile file.
The following example shows a restoreObjectListFile file
that identifies three datastores and
excludes two virtual machines to restore.#List of datastores that should be instant restored
datastoreurl:ds:///vmfs/volumes/50ade558-4fa9960d-db2c-e41f136af7c8/
datastoreurl:ds:///vmfs/volumes/47ade579-4fa9887d-db2c-k89f158ff67b3/
datastorename:Datastore1
#List of VMs that are currently contained in the listed datastores
#but which will not be part of the instant restore.
#these VMs are maybe not part of the backup or they should be excluded from the restore
!vminstanceuuid:8a2d7ae7-02dd-c4be-63g5-c44a1desfb75
!vminstanceuuid:6a2drae7-02d4-c4be-6g5-c44a1deseb78
vminstanceuuid:ba2dga57-02d5-c43e-63g5-c44a1desf34:on
The following sample shows what is displayed when a datastore is assigned a new URL. The output for each parameter is displayed on one line.
#PARAM DSURL_CHANGED=YES
#PARAM datastoreurl:ds:///vmfs/volumes/50adfa95-208599ce-b7a4-e41f136af7c8
::newdatastoreurl:ds:///vmfs/volumes/58fdfae4-308de4ce-f45r-441ft364fdk5
#PARAM datastoreurl:ds:///vmfs/volumes/74ewfa95-208599ce-b7a4-e41f136af7s31
::newdatastoreurl:ds:///vmfs/volumes/12adae4-308de4ce-f45r-441ft364fds2
The
parameter DSURL_CHANGED is set to YES. In this
sample, two datastore URLs
are changed from the original URLs at backup time.The following format is used to identify when a URL is changed: #PARAM datastoreurl:datastore URL from backup time::newdatastoreurl:new datastore URL after an instant restore.