Both OpenAPIs and SFVDDK are used to back up VMs on SCP and HCI through third-party backup apps.
The general workflow for performing VM backups is as follows:
- Prerequisites
Enable or reset the CBT feature for the VM. If incremental backups are required, CBT can be used to quickly obtain the data blocks that have changed between a previous snapshot and the latest one. This allows the backup app to read and back up only the changed data blocks, significantly improving backup efficiency.
- Execution
(1)Create a VM snapshot.
(2)Query snapshot details to obtain VM configuration information at the snapshot point, as well as the CheckPointID of the current snapshot.
Create VM backup resources. Backup resources must be periodically updated (recommended interval: 1-2 minutes) to prevent expiration. Note: Expired backup resources will be automatically deleted from SCP and HCI, and the corresponding backup will be terminated, which prevents the third-party backup data from accessing virtual disk data.
(3)Query the CBT bitmap to obtain changed data blocks between the specified CheckPointID and the latest snapshot. These data blocks need to be backed up. Set the checkpoint value to 0 (CheckPointID=0) during the full backup, so that the valid data blocks can be returned.
(4)Read changed data from all VM disks on SCP and HCI and store it in the third-party backup app.The general processing workflow for each transport mode is as follows:
(A) NBDSSL (including NBD) transport mode: The third-party backup app calls SFVDDK to read changed data from the VM disk based on the CBT bitmap and stores it in the third-party backup storage.
(B) HotAdd transport mode:
a. Select a backup proxy VM that can access the business VM disk:
i. Query the list of datastores where the business VM disk resides.
ii. Obtain the list of HCI hosts that can access the datastores.
iii. Select an HCI host from the list and select the backup proxy VM running on this host (this VM can access the business VM disk).
b. Start the backup proxy VM. Note: The business VM disk can be hot-added to the backup proxy VM only when the backup proxy VM is running; if the backup proxy VM is powered off, the already hot-added disk will be automatically deleted.
c. Hot-add the disk: Call the CreateVM disks API to hot-add a linked clone of the business VM disk snapshot to the backup proxy VM. Note: 1 The maximum number of disks that can be hot-added to a backup proxy VM at the same time is limited by the maximum number of disks that can be added to a VM. 2 Only one HotAdd disk task can exist at a time for a backup proxy VM. To back up multiple disks simultaneously, please add all disks at once. Otherwise, the HotAdd disk task will fail due to task race conditions.
d. Read data: In the Guest OS of the backup proxy VM, the third-party backup app reads changed data directly from the hot-added disk (i.e., the business VM disk snapshot) based on the CBT bitmap and transmits data to the third-party backup storage.
e. Delete the hot-added disk: Call the VM disks action API to remove the hot-added disk from the backup proxy VM.
f. Power off the backup proxy VM: If the backup proxy VM has no other backup or recovery tasks to perform, power it off to reduce cluster resource usage (this step is optional).
(5)Delete VM backup resources.
(6)Delete the VM snapshot.
Note: When the third-party backup app is no longer in use, it is recommended to disable the CBT feature for the VM to minimize impacts on I/O performance.