For multiple VMs with business associations, they can be added to a consistency group to perform consistency group snapshots for the entire group. This ensures that the agentless backup data of multiple virtual machines is generated at the same point in time.
4.6.1Creating a Consistency Group
1.Only VMs whose storage location is on a virtual storage volume are allowed to be added to a consistency group. VMs in the same consistency group must be located on the same virtual storage volume.You can query whether the storage location of a virtual machine is virtual storage through the following two OpenAPIs: VM Configuration Details and Storage List.
SCP OpenAPI:GET /janus/20250725/storages
When the value of data.type is vs, the storage is a virtual storage. Record the storage ID: data.id.
SCP OpenAPI:GET /janus/20250725/servers/{server_id}
When data.storage_location is equal to the storage ID of the virtual storage, it indicates that the virtual machine’s storage location is on virtual storage.
2. Call the OpenAPI for creating a consistency group to create a consistency group:
SCP OpenAPI:POST /janus/20180725/consistency-groups
4.6.2Backup of VMs in a Consistency Group
- The mapping between consistency groups and virtual machines can be queried via the following OpenAPI:
SCP OpenAPI: GET /janus/20180725/consistency-groups/summary
data.id indicates the consistency group ID, and data.servers indicates the information of VMs in the consistency group.
- OpenAPI for creating a consistency group snapshot:
SCP OpenAPI: POST /janus/20180725/consistency-groups/{group_id}/snapshots
After the consistency group snapshot is created, you can filter and query the created snapshot by snapshot name.OpenAPI for querying the consistency group snapshot list:
SCP OpenAPI: GET /janus/20180725/consistency-groups/{group_id}/snapshots
data.name indicates the snapshot name. Use the snapshot name to locate the created snapshot.
- After the snapshot is created, the virtual machines in the consistency group share the same snapshot ID. The rest of the backup process is consistent with the normal VM backup process.
- The consistency group snapshot can be deleted only after all virtual machines in the consistency group have been backed up.OpenAPI for deleting a consistency group snapshot:
SCP OpenAPI: DELETE /janus/20180725/consistency-groups/{group_id}/snapshots/{snap_id}
4.6.3Recovery of VMs in a Consistency Group
The restoration procedure for virtual machines in a consistency group is identical to that for ordinary virtual machines.