The SFVDDK APIs used to initialize and exit SFVDDK and back up and recover virtual disks are important and described as follows.
API for Initializing or Exiting SFVDDK
Call the API to initialize or exit SFVDDK in the main thread.
sfdisklib_init: Initialize SFVDDK.
sfdisklib_exit: Exit SFVDDK.
API for Backing Up Virtual Disks
After the backup resources are created by calling the management plane open APIs and SFVDDK is initialized by calling the initialization API, you can call the following SFVDDK APIs to back up virtual disks.
sfdisklib_list_transport_modes: Obtain the data transfer modes (NBD and NBDSSL) supported by SFVDDK.
(Optional) sfdisklib_cleanup: Clean up residual virtual disk connections.
sfdisklib_connect: Connect to the specified VM.
sfdisklib_open: Open the specified disk of the VM in read-only mode for backup.
sfdisklib_get_transport_mode: Obtain the data transfer mode for disk backup.
sfdisklib_read: Read data from the specified offset on the disk.
sfdisklib_close: Disconnect the disk.
sfdisklib_disconnect: Disconnect the VM.
(Optional) sfdisklib_cleanup: Clean up residual VM connections.
API for Recovering Virtual Disks
After the VMs and backup resources are created by calling the management plane open APIs and SFVDDK is initialized by calling the initialization API, you can call the following SFVDDK APIs to recover virtual disks.
sfdisklib_list_transport_modes: Obtain the data transfer modes (NBD and NBDSSL) supported by SFVDDK.
(Optional) sfdisklib_cleanup: Clean up residual virtual disk connections.
sfdisklib_connect: Connect to the specified VM.
sfdisklib_open: Open the specified disk of the VM in read-write mode for recovery.
sfdisklib_get_transport_mode: Obtain the data transfer mode for disk backup.
sfdisklib_write: Write data to the specified offset on the disk.
sfdisklib_close: Disconnect the disk.
sfdisklib_disconnect: Disconnect the VM.
(Optional) sfdisklib_cleanup: Clean up residual VM connections.