At some point you might need to restore a virtual disk from the backup data that you gathered as described in Changed Block Tracking on Virtual Disks. The essential procedure is as follows:
Procedure
- Power off the virtual machine, if powered on.
- Using VirtualMachineConfigInfo that corresponds to the last known good state of the guest operating system, re-create the virtual machine as described in Using the VirtualMachineConfigInfo.
- Completely reload the base virtual disk using the full backup that started the most recent series of incremental backups.
- Create a snapshot. This is mandatory for SAN mode restore.
A restore snapshot is forbidden when restoring to the parent (backing) disk on a VVol datastore.
- For SAN mode restore, disable changed block tracking. SAN writes are not possible with it enabled
- Sequentially restore the incremental backup data. You can do this either forwards or backwards. If you work forwards, the restore might write some sectors more than once. If you work backwards, you must keep track of which sectors were restored so as to avoid restoring them again from older data.
- From your backup records, get the change ID of the incremental backup to be restored. Your software must also store the changed-block information, so it knows which sectors of virtual disk to restore. Once you start restoring virtual disk, the change tracking mechanism will misreport.
- Restore only changed areas to the virtual disks referred to by the snapshot. This ensures that you do not write the data to the redo log created by the snapshot. When restoring a thin provisioned (sparse) disk, avoid writing zeroes to the unallocated blocks.
- Repeat steps a and b as necessary by applying incremental backup data sets in order.
- If applicable (SAN mode) revert to the base virtual disk, thus eliminating the snapshot.