Method for backing up different stored virtual machine data

Through iSCSI service and domain name mapping technology, snapshots of virtual machines are mapped directly to the backup agent and copied to the backup server, solving the problem of large storage space and low efficiency in data backup of Huawei cloud virtual machine, and achieving efficient data protection.

CN120407286APending Publication Date: 2025-08-01NANJING UNARY INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510493454.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing Huawei cloud virtual machine data backup method has the problem of backup taking up a large storage space and low efficiency, especially when creating disk snapshots, which have a long time and increased storage space requirements.

Method used

Using iSCSI service deployment and domain name mapping technology, through iSCSI, snapshots of virtual machines are mapped to the backup agent and written valid data to the backup server, avoiding creating additional snapshot disks and directly copying the data to the backup server.

Benefits of technology

Reduces storage space pressure, improves backup efficiency, reduces operation and maintenance costs, and achieves efficient data protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407286A_ABST
    Figure CN120407286A_ABST
Patent Text Reader

Abstract

The invention discloses a method for backing up different stored virtual machine data, which belongs to the technical field of data backup, and comprises the following steps of: deploying iSCSI (Internet Small Computer System Interface) service; configuring domain name mapping; the backup agent obtains parameters of the virtual machine needing to be backed up and creates a snapshot for a disk; mapping the created snapshot to a backup agent through the iSCSI, and writing effective data in the snapshot into a backup server; according to the method for backing up different stored virtual machine data, data protection of the Huawei cloud virtual machine can be achieved only through simple configuration on storage, a snapshot disk does not need to be created for a disk snapshot, the pressure of the storage space is relieved, the overall backup efficiency is improved, and the operation and maintenance cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data backup, and in particular relates to a method for backing up virtual machine data stored in different ways. Background Art

[0002] As cloud computing technology matures, more and more users, from large state-owned enterprises to small and medium-sized enterprises, are choosing to deploy services using virtual machines (VMs) instead of traditional servers, and are using various cloud platforms to support VM management. Huawei Cloud Stack, with its ready-to-use, easy-to-manage, elastic scalability, high performance, stability, and security, has gained widespread adoption in domestic private cloud deployments.

[0003] Based on Huawei Cloud's storage type, virtual machines (VMs) can be categorized as distributed storage VMs and centralized storage VMs. A common backup solution for these two types of storage is to take a snapshot of the VM's disk, create a snapshot disk from the snapshot, and then copy the valid data on the snapshot disk. However, this solution has significant drawbacks. First, it consumes a large amount of storage space, requiring disk snapshots and the creation of snapshot disks. Second, data backup takes a long time, as creating a snapshot disk from a snapshot takes a long time, especially for larger disks. Therefore, a new method for backing up VM data across different storage systems is needed to address these issues. Summary of the Invention

[0004] The purpose of the present invention is to provide a method for backing up virtual machine data stored in different storages, so as to solve the problems of large storage space occupied by backup and low backup efficiency in Huawei cloud data protection.

[0005] To achieve the above object, the present invention provides the following technical solution: a method for backing up virtual machine data stored in different locations, comprising: Deploy iSCSI services; Configure domain name mapping; The backup agent obtains the parameters of the virtual machine to be backed up and creates a snapshot of the disk; Map the created snapshot to the backup proxy through iSCSI and write the valid data in the snapshot to the backup server.

[0006] Preferably, the deployment of iSCSI service includes: when the virtual machine type is a distributed cluster, selecting a node that assumes a storage role and starting the iSCSI service as the iSCSI server; deploying a corresponding iSCSI client on the backup proxy to connect it to the server.

[0007] Preferably, selecting a node to assume a storage role and enabling an iSCSI service as an iSCSI server includes: Select a server with a storage role in the distributed storage cluster, enable its iSCSI service and configure the iSCSI IP to be the iSCSI server side; The deployment of the corresponding iSCSI client on the backup agent to connect it to the server side includes: installing the iSCSI client on the backup agent and establishing a mapping with the configured iSCSI IP to achieve the connection between the iSCSI server side and the iSCSI client.

[0008] Preferably, mapping the created snapshot to the backup agent through iSCSI includes: Obtaining the IQN of the backup agent and calling the distributed storage interface to create an iSCSI initiator, calling the distributed storage interface to create a host and bind the iSCSI initiator, and calling the distributed storage interface to map the created snapshot to the host; Writing the valid data in the snapshot to the backup server includes: calling the storage interface to obtain the valid data of the snapshot, and the backup agent writing the valid data of the snapshot to the medium on the backup server through the underlying streaming read and write interface.

[0009] Preferably, the deployment of the iSCSI service includes: when the virtual machine type is in a centralized cluster, creating a logical port, configuring the corresponding IP address, and using this as the iSCSI server side; installing the iSCSI client on the backup agent to connect it to the server side.

[0010] Preferably, creating a logical port designated as a data role and configuring the corresponding IP address includes: creating a logical port on the centralized storage management page, setting the role of the logical port to data, configuring the IP and subnet, and selecting the main port; The installation of the iSCSI client on the backup agent to connect it to the server side includes: installing the iSCSI client on the backup agent and establishing a mapping with the IP of the created logical port to achieve the connection between the iSCSI server side and the client.

[0011] Preferably, mapping the created snapshot to the backup agent through iSCSI includes: obtaining the IQN of the iSCSI of the backup agent and calling the centralized storage interface to create an iSCSI initiator through the IQN, calling the centralized storage interface to create a host and bind the iSCSI initiator, calling the centralized storage interface to create a host group and add the host to the host group, create a lun group and a mapping view, add the host group and the lun group to the mapping view, and add the snapshot to the created lun group.

[0012] Preferably, writing the valid data in the snapshot to the backup server includes: calling the storage interface to obtain the valid data of the snapshot, and the backup agent writing the snapshot data to the medium on the backup server through the underlying streaming read-write interface.

[0013] Preferably, configuring the domain name mapping includes: configuring the interface domain name and IP in the hosts of the agent; Preferably, the backup agent obtains the parameters of the virtual machine to be backed up and creates a snapshot of the disk, including: Calling the compute interface to query the details of the virtual machine to be backed up, including the virtual machine ID, specifications, image information, disk information, network information, and the project it belongs to; Calling the volume interface to create a snapshot of the virtual machine's disk and finding the corresponding snapshot in the storage.

[0014] The method for backing up virtual machine data of different storages uses the virtual machine data protection method under Huawei Cloud Stack. Only through simple configuration on the storage, data protection for Huawei Cloud virtual machines can be achieved. There is no need to create a snapshot disk for the disk snapshot, which not only reduces the storage space pressure but also improves the overall backup efficiency and reduces the operation and maintenance cost. Description of the Drawings

[0015] Figure 1 It is a schematic diagram of the method for backing up Huawei Cloud virtual machine data in the iSCSI mode of the present invention. Detailed Embodiments

[0016] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0017] The present invention provides a method for backing up virtual machine data of different storages as shown in the figure. By backing up virtual machine data of different storages under Huawei Cloud Stack in the iSCSI mode, it includes storage, backup agent service, and backup server. Among them, the backup server is an independent machine, which can be a physical machine or a virtual machine, and calls Huawei Cloud Stack for api interaction and performs operations such as cloud platform authentication. The specific steps are as follows: Step 1: Enable and configure the iSCSI service in the storage, install the iSCSI application on the backup agent machine, and link to the iSCSI service on the storage; Step 2: Configure the domain name mapping in advance. To access the resources of the cloud management platform, the hosts file needs to be modified to configure the mapping of the domain name and the interface IP. Step 3: The backup proxy obtains the id, specification information, network information, image information, disk information, etc. of the virtual machine to be backed up through the cloud platform API interface, calls the cloud platform interface to create a snapshot of the virtual machine's disk, and maps the snapshot to the proxy through iSCSI.

[0018] Step 4: Copy the valid data on the snapshot to the backup server for storage.

[0019] The specific steps for configuring the iSCSI service in Step 1 include: (1) Configure the iSCSI service: If the storage is a distributed storage, it is necessary to select the server with the role of storage on the distributed storage management page to enable the iSCSI service and configure the iSCSI IP as the iSCSI server; if the storage is a centralized storage, it is necessary to create a logical port with the role of data and configure the IP on the centralized storage management page as the iSCSI server. (2) Connect to the iSCSI service: After installing the iSCSI client on the proxy, connect to the iSCSI IP configured in (1) to realize the connection between the iSCSI server and the client.

[0020] The specific steps for pre-configuring the domain name mapping in Step 2 include: Configure the interface domain name and IP to be accessed in the hosts of the proxy, including interface domain names and IPs such as compute, volume, network, vpc, and ecs.

[0021] The specific steps for calling the cloud platform interface to snapshot the virtual machine's disk and map the snapshot to the proxy in Step 3 include: (1) Interface call: The backup proxy calls the compute interface of Huawei Cloud to query the details of the virtual machine to be backed up, including information such as the virtual machine id, virtual machine specification, virtual machine network, virtual machine image, and virtual machine disk; calls the volume interface of Huawei Cloud to create a snapshot of the virtual machine's disk and queries the snapshot details to find the corresponding snapshot information in the storage.

[0022] (2)Snapshot mapping to the proxy: If the virtual machine to be backed up is a virtual machine with distributed storage, an iSCSI initiator needs to be created using the IQN of the proxy, the distributed storage interface is called to create a host and add the created iSCSI initiator, and the snapshot in the storage is mapped to the created host. After completing the above steps, the snapshot is mapped to the proxy; if the virtual machine to be backed up is a virtual machine with centralized storage, an iSCSI initiator needs to be created using the IQN of the proxy, the centralized storage interface is called to create a host and add the created iSCSI initiator, a host group is created and the host is added to the host group, a lun group and a mapping view are created, the host group and the lun group are added to the mapping view, and the snapshot in the storage is added to the lun group. After completing the above steps, the snapshot is mapped to the proxy.

[0023] The specific steps of copying valid data in step 4 include: (1)The backup server has its own medium for storing the backed-up data.

[0024] (2)Call the storage interface to obtain the valid data of the snapshot, and the proxy copies the valid data of the mapped snapshot to the medium of the backup server.

[0025] Embodiment 1

[0026] In this embodiment, the virtual machine type is a virtual machine with distributed storage; the following steps are included: Step (1) Deploy the iSCSI service in advance. In the distributed cluster, select the node assuming the storage role and enable the iSCSI service as the iSCSI server; subsequently, deploy the corresponding iSCSI client on the backup proxy and establish a connection between the server and the client.

[0027] Step (2) Configure the domain name mapping in advance. To access the resources of the cloud management platform, the hosts file needs to be modified to configure the mapping of the domain name and the interface ip.

[0028] Step (3) The backup proxy calls the Huawei Cloud interface to obtain parameters such as the id, virtual machine specifications, virtual machine image information, disk information, and network information of the virtual machine to be backed up, and creates a snapshot of the disk.

[0029] Step (4) Map the created disk snapshot to the backup proxy through iSCSI, and write the valid data in the snapshot to the medium in the backup server through the underlying read and write interface.

[0030] The specific steps of enabling the iSCSI service and configuring the iSCSI connection in step (1) include: Select a server with a storage role in the distributed storage cluster, enable its iSCSI service and configure the iSCSI IP as the iSCSI server.

[0031] Install an iSCSI client on the backup agent and establish a mapping with the iSCSI IP configured in ① to achieve the connection between the iSCSI server and the client.

[0032] The specific steps for pre-configuring domain name mapping in step (2) include: Configure the interface domain names and IPs to be accessed in the hosts of the agent, including interface domain names and IPs such as compute, volume, network, vpc, and ecs.

[0033] The specific steps for calling the Huawei Cloud Stack interface include: Call the compute interface to query the details of the virtual machine to be backed up, including the virtual machine's id, specifications, image information, disk information, network information, the project it belongs to, etc.

[0034] Call the volume interface to create a snapshot of the virtual machine's disk and find the corresponding snapshot in the storage.

[0035] The specific steps for snapshot mapping and copying valid data in step (4) include: Obtain the IQN of the backup agent and call the distributed storage interface to create an iSCSI initiator, call the distributed storage interface to create a host and bind the iSCSI initiator, and call the distributed storage interface to map the disk snapshot created in step (3) to the host. The snapshot created through this step is mapped to the backup agent.

[0036] Call the storage interface to obtain the valid data of the snapshot, and the backup agent writes the snapshot valid data to the medium on the backup server through the underlying streaming read and write interface.

[0037] Embodiment 2

[0038] In this embodiment, the virtual machine type is a virtual machine with centralized storage; In step (1), deploy the iSCSI service in advance. In the centralized storage management interface, create a logical port and configure the corresponding IP address as the iSCSI server; then, install an iSCSI client on the backup agent and establish the connection between the server and the client.

[0039] In step (2), pre-configure the domain name mapping. To access the resources of the cloud management platform, it is necessary to modify the hosts file and configure the mapping of the domain name and the interface ip.

[0040] In step (3), the backup agent calls the Huawei Cloud interface to obtain parameters such as the id of the virtual machine to be backed up, the virtual machine specifications, the virtual machine image information, the disk information, the network information, etc., and create a snapshot of the disk.

[0041] Step (4) maps the created disk snapshot to the backup agent via iSCSI, and writes the valid data in the snapshot to the medium in the backup server through the underlying read-write interface.

[0042] The specific steps for setting up the iSCSI server and configuring the iSCSI connection in step (1) include: Create a logical port on the centralized storage management page, set the role of the logical port to data, configure the IP and subnet, and select the primary port.

[0043] Install the iSCSI client on the backup agent, and establish a mapping with the IP of the created logical port to achieve the connection between the iSCSI server and the client.

[0044] The specific steps for pre-configuring the domain name mapping in step (2) include: Configure the interface domain names and IPs to be accessed in the hosts of the agent, including interface domain names and IPs such as compute, volume, network, vpc, and ecs.

[0045] The specific steps for calling the Huawei Cloud Stack interface in step (3) include: Call the compute interface to query the details of the virtual machine to be backed up, including the virtual machine's id, specifications, image information, disk information, network information, the project it belongs to, etc.

[0046] Call the volume interface to create a snapshot of the virtual machine's disk and find the corresponding snapshot lun in the storage.

[0047] The specific steps for snapshot mapping and copying valid data in step (4) include: Obtain the IQN of the iSCSI of the backup agent, call the centralized storage interface to create an iSCSI initiator through the IQN, call the centralized storage interface to create a host and bind the iSCSI initiator, call the centralized storage interface to create a host group and add the host to the host group, create a lun group and a mapping view, add the host group and the lun group to the mapping view, and add the snapshot in step (3) to the created lun group. Through this step, the created snapshot is mapped to the backup agent.

[0048] Call the storage interface to obtain the valid data of the snapshot, and the backup agent writes the snapshot data to the medium on the backup server through the underlying streaming read-write interface.

[0049] The method for backing up virtual machine data in different storages uses the virtual machine data protection method under Huawei Cloud Stack. Through simple configuration on the storage, data protection for Huawei Cloud virtual machines can be achieved without creating snapshot disks for disk snapshots, which not only reduces the storage space pressure, but also improves the overall backup efficiency and reduces the operation and maintenance costs.

[0050] Finally, it should be noted that the above are only the preferred embodiments of the present invention and are not used to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for backing up virtual machine data of different storages, characterized in that: including deploying the iSCSI service; configuring domain name mapping; the backup agent obtains the parameters of the virtual machine to be backed up and creates a snapshot of the disk; map the created snapshot to the backup agent via iSCSI and write the valid data in the snapshot to the backup server.

2. The method for backing up virtual machine data stored differently according to claim 1, wherein: The deployment of the iSCSI service includes: when the virtual machine type is a distributed cluster, select the node assuming the storage role, enable the iSCSI service and use it as the iSCSI server; deploy the corresponding iSCSI client on the backup agent to connect it to the server.

3. A method for backing up virtual machine data stored differently according to claim 2, characterized in that: The selection of the node assuming the storage role, enabling the iSCSI service and using it as the iSCSI server includes: select a server with a storage role in the distributed storage cluster, enable its iSCSI service and configure the iSCSI IP to be used as the iSCSI server; The deployment of the corresponding iSCSI client on the backup agent to connect it to the server includes: install the iSCSI client on the backup agent and establish a mapping with the configured iSCSI IP to realize the connection between the iSCSI server and the iSCSI client.

4. A method for backing up virtual machine data stored in different storage according to claim 2, characterized in that: The mapping of the created snapshot to the backup agent via iSCSI includes: obtain the IQN of the backup agent, call the distributed storage interface to create an iSCSI initiator, call the distributed storage interface to create a host and bind the iSCSI initiator, and call the distributed storage interface to map the created snapshot to the host; The writing of the valid data in the snapshot to the backup server includes: call the storage interface to obtain the valid data of the snapshot, and the backup agent writes the valid data of the snapshot to the medium on the backup server through the underlying streaming read and write interface.

5. A method for backing up virtual machine data stored in different storages according to claim 1, characterized in that: The deployment of the iSCSI service includes: when the virtual machine type is a centralized cluster, create a logical port, configure the corresponding IP address and use it as the iSCSI server; install the iSCSI client on the backup agent to connect it to the server.

6. A method for backing up virtual machine data stored in different storage according to claim 5, characterized in that: The creation of a logical port, configuring the corresponding IP address and using it as the iSCSI server includes: create a logical port on the centralized storage management page, set the role of the logical port to data, configure the IP and subnet, and select the main port; The installation of the iSCSI client on the backup agent to connect it to the server includes: install the iSCSI client on the backup agent and establish a mapping with the IP of the created logical port to realize the connection between the iSCSI server and the client.

7. A method for backing up virtual machine data stored in different storages according to claim 5, characterized in that: The mapping of the created snapshot to the backup agent via iSCSI includes: obtain the IQN of the backup agent, call the centralized storage interface to create an iSCSI initiator, call the centralized storage interface to create a host and bind the iSCSI initiator, call the centralized storage interface to create a host group, add the host to the host group, create a lun group and a mapping view, add the host group and the lun group to the mapping view, and add the snapshot to the created lun group.

8. A method for backing up virtual machine data stored in different storage according to claim 5, characterized in that: Writing the valid data in the snapshot to the backup server includes: calling the storage interface to obtain the valid data of the snapshot, and the backup agent writing the snapshot data to the medium on the backup server through the underlying streaming read-write interface.

9. A method for backing up virtual machine data stored in different ways according to claim 2 or 5, characterized in that: Configuring the domain name mapping includes: configuring the interface domain name and IP in the hosts of the agent.

10. A method for backing up virtual machine data stored in different ways according to claim 2 or 5, characterized in that: The backup agent obtaining the parameters of the virtual machine to be backed up and creating a snapshot for the disk includes: calling the compute interface to query the details of the virtual machine to be backed up, including the id, specifications, image information, disk information, network information, and the project to which it belongs; calling the volume interface to create a snapshot for the disk of the virtual machine and finding the corresponding snapshot in the storage.