Data backup method and apparatus, data recovery method and apparatus, device, and storage medium

By identifying the chain relationship between storage images and storage disks, the storage image data is backed up only once and associated with the storage disk data, solving the problems of large storage space consumption and slow recovery speed in traditional backup modes, and achieving efficient backup and recovery.

WO2025002024A1PCT designated stage expired Publication Date: 2025-01-02EISOO SOFTWARE

Patent Information

Application Number
PCT/CN2024/100846
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-30
Filing Date
2024-06-24
Publication Date
2025-01-02

AI Technical Summary

Technical Problem

Traditional desktop cloud virtual machine full-machine backup and recovery mode results in backup data occupying a large amount of storage space, and the recovered virtual machine is completely separated from the template virtual machine, which reduces the backup and recovery speed and performance.

Method used

By identifying the chain relationship between storage images and storage disks, storage image data is backed up only once, and storage disk data is associated, thus achieving separate backup and recovery while maintaining the association relationship of virtual machines.

Benefits of technology

Significantly reduces the storage space occupied by backup data, improves backup and recovery speed, and ensures that the restored virtual machine maintains the association with the template virtual machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024100846_02012025_PF_FP_ABST
    Figure CN2024100846_02012025_PF_FP_ABST
Patent Text Reader

Abstract

A data backup method and apparatus, a data recovery method and apparatus, a device, and a storage medium. The data backup method comprises: acquiring a chain relationship between a storage mirror and a storage disk (S110); backing up storage mirror data and storage disk data on the basis of the chain relationship (S120), wherein the storage mirror data is data in the storage mirror, and the storage disk data is data in the storage disk; acquiring mirror backup information and disk backup information (S130); and determining an association relationship among the mirror backup information, the disk backup information, the storage mirror data and the storage disk data, and performing backup storage on the association relationship (S140).
Need to check novelty before this filing date? Find Prior Art

Description

Data backup method, data recovery method, device, equipment and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on June 30, 2023, with application number 202310789178.8, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present disclosure relate to the technical field of data disaster recovery, for example, to a data backup method, a data recovery method, an apparatus, a device, and a storage medium. Background Art

[0003] In recent years, desktop cloud has been widely used at home and abroad, significantly reducing office desktop management costs while ensuring data management is secure and compliant.

[0004] Similar to the data backup requirements of traditional office desktop computers, the virtual machines (VMs) in the desktop cloud that actually host desktops also require effective disaster recovery management to ensure the effective protection of data on users' desktops. Currently, vendors generally adopt the traditional business VM data backup and recovery model for protecting the entire VM data in desktop cloud. This model backs up the entire VM data through full and incremental backups, and performs a one-time complete restore when needed, achieving universal data backup and recovery capabilities.

[0005] However, there is an important difference between desktop cloud virtual machines and traditional business virtual machines: traditional business virtual machines, especially those used to carry critical business, generally have independent virtual disks that do not rely on other virtual disks to ensure business performance; while desktop clouds generally use linked cloning from template virtual machines to improve the convenience of operation and maintenance management and reduce storage space usage.

[0006] In this scenario, where requirements differ from traditional disaster recovery models, continuing to use traditional virtual machine backup and recovery will lead to three major problems: backup data takes up a large amount of backup storage space; the restored desktop cloud virtual machine is completely separated from the template virtual machine; and the backup and recovery speed is reduced, which degrades recovery performance.

[0007] Summary of the Invention

[0008] The embodiments of the present disclosure provide a data backup method, a data recovery method, an apparatus, a device, and a storage medium, which can reduce the storage space occupied by backup data and improve the backup and recovery speed.

[0009] In a first aspect, an embodiment of the present disclosure provides a data backup method, comprising: obtaining a chain relationship between a storage image and a storage disk; wherein the storage image is located in a first virtual machine and the storage disk is located in a second virtual machine; backing up the storage image data and the storage disk data based on the chain relationship; wherein the storage image data is the data in the storage image; the storage disk data is the data in the storage disk; obtaining image backup information and disk backup information; determining an association relationship among the image backup information, the disk backup information, the storage image data and the storage disk data, and backing up and storing the association relationship.

[0010] In a second aspect, an embodiment of the present disclosure provides a data recovery method, comprising: obtaining an association relationship among mirror backup information, disk backup information, stored mirror data, and stored disk data; recovering the stored mirror data according to the association relationship; and recovering the stored disk data according to the association relationship.

[0011] In the third aspect, an embodiment of the present disclosure also provides a data backup device, including: a chain relationship acquisition module, configured to obtain the chain relationship between the storage image and the storage disk; wherein the storage image is located in the first virtual machine and the storage disk is located in the second virtual machine; a backup module, configured to back up the storage image data and the storage disk data based on the chain relationship; wherein the storage image data is the data in the storage image; the storage disk data is the data in the storage disk; a backup information acquisition module, configured to obtain image backup information and disk backup information; an association relationship storage module, configured to determine the association relationship between the image backup information, the disk backup information, the storage image data and the storage disk data, and back up and store the association relationship.

[0012] In a fourth aspect, an embodiment of the present disclosure also provides a data recovery device, including: an association relationship acquisition module, configured to obtain the association relationship between image backup information, disk backup information, stored image data, and stored disk data; a storage image data recovery module, configured to recover the stored image data based on the association relationship; and a storage disk data recovery module, configured to recover the stored disk data based on the association relationship.

[0013] In a fifth aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:

[0014] one or more processors;

[0015] a storage device configured to store one or more programs,

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the data backup method as described in the embodiment of the present disclosure or the data recovery method as described in the embodiment of the present disclosure.

[0017] In a sixth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to execute the data backup method as described in an embodiment of the present disclosure or the data recovery method as described in an embodiment of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.

[0019] FIG1 is a flow chart of a data backup method provided in an embodiment of the present application;

[0020] FIG2 is a schematic diagram showing the chain relationship between the storage mirror and the storage disk according to an embodiment of the present application;

[0021] FIG3 is a schematic diagram of RAW format storage mirror data backup provided by an embodiment of the present application;

[0022] FIG4 is a schematic diagram of a QCOW2 format image data backup according to an embodiment of the present application;

[0023] FIG5 is a flow chart of another data backup method provided in an embodiment of the present application;

[0024] FIG6 is a flow chart of a data recovery method provided in an embodiment of the present application;

[0025] FIG7 is a flowchart of another data recovery method provided in an embodiment of the present application;

[0026] FIG8 is a schematic diagram of the data backup and data recovery deployment effect provided by an embodiment of the present application;

[0027] FIG9 is a schematic structural diagram of a data backup device provided in an embodiment of the present application;

[0028] FIG10 is a schematic structural diagram of a data recovery device provided in an embodiment of the present application;

[0029] FIG11 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] The following describes embodiments of the present disclosure with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only.

[0031] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown.

[0032] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0033] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0034] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0035] The data involved in this disclosure (including the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0036] FIG1 is a flow chart of a data backup method provided in an embodiment of the present application. This embodiment is applicable to data backup situations. The method can be executed by a data backup and recovery device and includes the following steps:

[0037] S110: Obtain a chain relationship between the storage image and the storage disk.

[0038] In some embodiments, the storage image is located in the first virtual machine, and the storage disk is located in the second virtual machine. The storage image can be a base image, and the storage disk can be a user disk. The first virtual machine can be a template virtual machine, and the second virtual machine can be a desktop cloud virtual machine. In this embodiment, multiple desktop cloud virtual machines can be created on the template virtual machine. Figure 2 is a schematic diagram of the chain relationship effect between the storage image and the storage disk provided in an embodiment of the present application. As shown in Figure 2, each second virtual machine will find the corresponding first virtual machine through the chain relationship, that is, one template virtual machine can correspond to multiple desktop cloud virtual machines.

[0039] It should be noted that the chain relationship, that is, the disk chain, can be used to identify whether the storage images corresponding to multiple storage disks belong to the same storage image, that is, it can be used to identify whether the template virtual machines corresponding to multiple desktop cloud virtual machines belong to the same template virtual machine.

[0040] S120: Back up the storage mirror data and the storage disk data based on the chain relationship.

[0041] In some embodiments, the storage mirror data is data in the storage mirror; and the storage disk data is data in the storage disk. In this embodiment, if the storage mirror data corresponding to multiple storage disk data are identified as the same storage mirror data through a chain relationship, only the storage mirror data is backed up once, and the multiple storage disk data are backed up.

[0042] Optionally, the storage mirror data and the storage disk data are backed up based on the chain relationship, including: if the chain relationship between the storage mirror and the storage disk is a one-to-many relationship, when the storage mirror data has not been backed up, the storage mirror data and the storage disk data are backed up in sequence; when the storage mirror data has been backed up, the storage disk data is directly backed up.

[0043] In this embodiment, the image backup information can be obtained before backing up the storage image data or after backing up the storage image data. In this embodiment, if the chain relationship between the storage image and the storage disk is a one-to-many relationship, that is, if the storage image data corresponding to multiple storage disk data are identified as the same storage image data through the chain relationship, when it is detected through the image backup information that the storage image data has not been backed up, the storage image data and the storage disk data are backed up in sequence; when it is detected through the image backup information that the storage image data has been backed up, the storage disk data is directly backed up.

[0044] Exemplarily, the stored image data may be data in the raw image format (RAW Image Format) or data in the QCOW2 (QEMU copy-on-write 2) image format, etc. In this embodiment, the format of the image (disk) may be set according to actual conditions. FIG3 is a schematic diagram of a backup of image data stored in RAW format provided in an embodiment of the present application. FIG4 is a schematic diagram of a backup of image data stored in QCOW2 format provided in an embodiment of the present application. For images stored in RAW format, the data in the image stored in RAW format may be directly read and the all-zero data blocks may be filtered, and only non-all-zero data may be backed up, that is, the backed-up RAW format storage image data is non-all-zero data; for images stored in QCOW2 format, the data in the valid data blocks may be directly read and backed up, that is, the backed-up QCOW2 format storage image data is valid data.

[0045] Optionally, backing up the storage disk data includes: generating a snapshot of the storage disk data to obtain snapshot data; and backing up the snapshot data.

[0046] In this embodiment, since the storage disk data is constantly changing, a snapshot can be generated for the desktop cloud virtual machine through the desktop cloud management platform or the desktop cloud virtualization base to obtain the snapshot data, read and back up the snapshot data.

[0047] In this embodiment, for a QCOW2 format storage disk, the valid data distribution (full backup) or changed data distribution (incremental backup) of the storage disk can be directly read, and internal snapshot and external snapshot formats are supported; the valid data distribution and changed data distribution read here do not include the data distribution of the storage mirror.

[0048] This embodiment aims at the scenario of local reading and writing of RAW / QCOW2 format virtual disks, and realizes an on-demand separation backup mode of the storage image and the storage disk by obtaining the chain relationship between the storage image and the storage disk based on the chain relationship.

[0049] S130: Obtain image backup information and disk backup information.

[0050] Optionally, the image backup information includes an image identification (ID) and an image path, and the disk backup information includes a disk ID and a disk path.

[0051] In some embodiments, the image backup information also includes virtual configuration information of the first virtual machine, and the disk backup information also includes virtual configuration information of the second virtual machine. The image backup information can also be understood as descriptive information storing image data, that is, metadata storing image data, and the disk backup information can also be understood as descriptive information storing disk data, that is, metadata storing disk data. The virtual configuration information includes hardware resource configuration information such as the virtual machine's central processing unit (CPU), memory, and disk, as well as software resource configuration information of the operating system type.

[0052] S140: Determine the association relationship among the image backup information, the disk backup information, the stored image data, and the stored disk data, and back up and store the association relationship.

[0053] In this embodiment, the association relationship between the mirror backup information, disk backup information, stored mirror data and stored disk data can be determined, and the mirror backup information, disk backup information, stored mirror data and stored disk data can be associated and backed up and stored according to the association relationship, that is, the associated backup and storage of metadata (mirror backup information and disk backup information) and disk data (storage mirror data and storage disk data) are completed according to the association relationship.

[0054] This embodiment obtains a chain relationship between a storage image and a storage disk; wherein, the storage image is located in a first virtual machine, and the storage disk is located in a second virtual machine; the storage image data and the storage disk data are backed up based on the chain relationship; wherein, the storage image data is the data in the storage image; the storage disk data is the data in the storage disk; image backup information and disk backup information are obtained; the association relationship among the image backup information, the disk backup information, the storage image data and the storage disk data is determined, and the association relationship is backed up and stored. By backing up the storage image data and the storage disk data based on the chain relationship, and backing up and storing the association relationship among the image backup information, the disk backup information, the storage image data and the storage disk data, the storage space occupied by the backup data can be reduced, and the backup efficiency of the virtual machine can be effectively improved.

[0055] FIG5 is a flow chart of another data backup method provided in an embodiment of the present application, comprising the following steps:

[0056] S501: Identify the chain relationship between the storage image and the storage disk.

[0057] In this embodiment, before initiating a desktop cloud virtual machine backup, relevant virtual machine information, including first and second virtual machine information, is retrieved from the desktop cloud management platform or desktop cloud virtualization base. Based on this information, the chain relationship between the storage image and the storage disk can be analyzed and identified, and the image backup information and disk backup information can also be determined.

[0058] S502. If the chain relationship between the storage mirror and the storage disk is a one-to-many relationship, determine whether the storage mirror data is backed up. If the storage mirror data is not backed up, execute S503 and S504 in sequence. If the storage mirror data is backed up, execute S504 directly.

[0059] S503: Back up the stored image data.

[0060] S504: Back up the storage disk data.

[0061] S505: Determine the association relationship among the image backup information, the disk backup information, the stored image data, and the stored disk data, and back up and store the association relationship.

[0062] FIG6 is a flow chart of a data recovery method provided in an embodiment of the present application. The data recovery method provided in an embodiment of the present application includes the following steps:

[0063] S610: Obtain associations among image backup information, disk backup information, stored image data, and stored disk data.

[0064] S620: Restore the stored mirror data according to the association relationship.

[0065] In this embodiment, the mirror image backup information and the stored mirror image data may be obtained according to the association relationship, and the stored mirror image data may be restored based on the mirror image backup information.

[0066] Optionally, the stored mirror data is restored according to the association relationship, including: obtaining the mirror backup information and the stored mirror data according to the association relationship; wherein the mirror backup information also includes virtual configuration information of the first virtual machine; if it is determined according to the mirror backup information that the first virtual machine has not been restored, creating a third virtual machine according to the virtual configuration information of the first virtual machine; and restoring the stored mirror data to the third virtual machine.

[0067] In this embodiment, the backed-up image backup information and the stored image data can be extracted based on the association relationship, and the first virtual machine identifier (first virtual machine ID) in the image backup information can be used to determine whether the first virtual machine has been restored. If the first virtual machine has been restored, that is, if the first virtual machine already exists, the stored disk data is directly restored to improve the recovery speed. If the first virtual machine has not been restored, that is, if the first virtual machine does not exist, a third virtual machine is created based on the virtual configuration information of the first virtual machine, and the stored image data is restored to the storage image in the third virtual machine (that is, the virtual disk of the third virtual machine). At this time, the desktop cloud virtual machine recovery (that is, storage disk data recovery) operation based on the same storage image is temporarily frozen until the third virtual machine is restored. Among them, the third virtual machine is the same as the first virtual machine.

[0068] S630: Restore the storage disk data according to the association relationship.

[0069] In this embodiment, the disk backup information and the stored disk data may be obtained according to the association relationship, and the stored disk data may be restored based on the disk backup information.

[0070] Optionally, the stored disk data is restored according to the association relationship, including: obtaining the disk backup information and the stored disk data according to the association relationship; wherein the disk backup information also includes virtual configuration information of the second virtual machine; creating a fourth virtual machine based on the virtual configuration information of the third virtual machine and the second virtual machine; and restoring the stored disk data to the fourth virtual machine.

[0071] In this embodiment, the backup disk backup information and the storage disk data can be extracted based on the association relationship. The desktop cloud management platform interface is called to create a fourth virtual machine based on the virtual configuration information of the third virtual machine and the second virtual machine. An empty storage disk associated with the storage image is automatically generated. The backup storage disk data is written to the empty storage disk in the fourth virtual machine. The fourth virtual machine is identical to the second virtual machine.

[0072] In this embodiment, the recovery requirements of the storage image and the storage disk are identified based on the association relationship during backup, and the storage image and the storage disk are recovered separately as required; after data recovery, the association relationship between the storage image and the storage disk of the virtual machine virtual disk is maintained.

[0073] This embodiment obtains the association relationship between the mirror backup information, the disk backup information, the stored mirror data and the stored disk data; restores the stored mirror data according to the association relationship; and restores the stored disk data according to the association relationship. By restoring the stored mirror data and the stored disk data based on the association relationship, the amount of restored data can be reduced and the recovery speed can be improved.

[0074] FIG7 is a flowchart of another data recovery method provided in an embodiment of the present application, comprising the following steps:

[0075] S701: Obtain associations among image backup information, disk backup information, stored image data, and stored disk data.

[0076] S702: Obtain mirror backup information and store mirror data according to the association relationship; obtain disk backup information and store disk data according to the association relationship.

[0077] S703: Determine whether the storage image exists. If not, execute S704; if not, execute S705. S704: Create a third virtual machine based on the virtual configuration information of the first virtual machine included in the image backup information, and restore the storage image data to the third virtual machine.

[0078] S705: Create a fourth virtual machine based on the third virtual machine and the virtual configuration information of the second virtual machine included in the disk backup information.

[0079] It should be noted that, when the storage image exists, the fourth virtual machine can be created directly based on the virtual machine corresponding to the storage image and the virtual configuration information of the second virtual machine included in the disk backup information.

[0080] S706: Restore the storage disk data to the fourth virtual machine.

[0081] This application realizes the separate backup and recovery of storage images and data on storage disks by identifying the chain relationship between storage images and storage disks, thereby significantly reducing the storage space occupied by virtual machine backup data and effectively improving the backup and recovery efficiency of virtual machines.

[0082] This application has the following positive effects in the desktop cloud data protection scenario:

[0083] Reduce the backup storage space occupied by backup data: Separate the backup storage image data from the storage disk data. Under the premise that the storage image data remains unchanged, only back up the storage image data once; associate the storage disk data with the storage image data to achieve a logical link relationship;

[0084] After data recovery, the relationship between the desktop cloud VM and the template VM is maintained: When restoring data, the relationship between the restored storage disk data and the existing storage image data is automatically established and associated based on the relationship between the storage image data and the storage disk data at the time of backup. At the same time, an association with the template VM is also established at the VM level, ensuring that the relationship between the restored desktop cloud VM and the template VM remains unchanged.

[0085] Improved backup and recovery speed: During backup, the chain relationship between the storage image and the storage disk is identified, and the storage image data is only read and backed up once, eliminating multiple reads and improving backup speed. During recovery, based on actual conditions, the backup data is not read multiple times and written to the storage image. Only the storage disk data is restored and associated with the storage image in a timely manner, which also reduces the amount of data to be restored and improves recovery performance.

[0086] Figure 8 is an illustrative diagram of the data backup and data recovery deployment provided by an embodiment of the present disclosure. As shown in Figure 8, the backup agent needs to be deployed on all compute nodes in the desktop cloud virtualization base, backing up and restoring storage image data and storage disk data by reading and writing to the local virtual disk. The backup data is stored in the backup console.

[0087] For example, during implementation, 100 desktop cloud virtual machines (DesktopVM{X}, where X ranges from 1 to 100) used by users can be backed up and restored. These desktop cloud virtual machines are created and deployed using linked clone mode based on a first virtual machine (also known as a template virtual machine) TemplateVM. The template virtual machine includes a system disk TemplateVM-1 in QCOW2 format, with a storage capacity of 100 gigabytes (GB) and an actual usable capacity of 20GB. The desktop cloud virtual machine's system disk DesktopVM{X}-1 is linked to TemplateVM-1.

[0088] During implementation, the average actual capacity used by each desktop cloud VM before the first backup was 5GB, and the average data capacity changed before each subsequent backup was 5GB. As shown in Table 1, compared with traditional full-machine backups, this application significantly reduces the amount of data used in the first backup (full backup), effectively improving backup performance. Subsequent incremental backups showed no difference, as both methods only back up the amount of data that changed.

[0089] Table 1 Example of three backup data volumes

[0090] As shown in Table 2, when restoring the data from the first backup, the total amount of data restored using this application is significantly reduced compared to traditional full-machine restores. More importantly, the desktop cloud VM restored using this application maintains a link (i.e., a chain relationship) with the template VM (i.e., the storage image), without being reduced to a fully cloned VM.

[0091] Table 2 Example of restored data volume

[0092] FIG9 is a schematic diagram of the structure of a data backup device provided by an embodiment of the present disclosure. As shown in FIG9 , the device includes: a chain relationship acquisition module 910 , a backup module 920 , a backup information acquisition module 930 , and an association relationship storage module 940 ;

[0093] A chain relationship acquisition module 910 is configured to acquire a chain relationship between a storage image and a storage disk; wherein the storage image is located in the first virtual machine and the storage disk is located in the second virtual machine;

[0094] The backup module 920 is configured to back up the storage mirror data and the storage disk data based on the chain relationship; wherein the storage mirror data is the data in the storage mirror; and the storage disk data is the data in the storage disk;

[0095] A backup information acquisition module 930 is configured to acquire image backup information and disk backup information;

[0096] The association relationship storage module 940 is configured to determine the association relationship among the image backup information, the disk backup information, the stored image data and the stored disk data, and back up and store the association relationship.

[0097] This embodiment obtains the chain relationship between the storage image and the storage disk through a chain relationship acquisition module; wherein, the storage image is located in the first virtual machine, and the storage disk is located in the second virtual machine; the storage image data and the storage disk data are backed up based on the chain relationship through the backup module; wherein, the storage image data is the data in the storage image; the storage disk data is the data in the storage disk; the image backup information and the disk backup information are obtained through the backup information acquisition module; the association relationship between the image backup information, the disk backup information, the storage image data and the storage disk data is determined through the association relationship storage module, and the association relationship is backed up and stored. By backing up the storage image data and the storage disk data based on the chain relationship, and backing up and storing the association relationship between the image backup information, the disk backup information, the storage image data and the storage disk data, the storage space occupied by the backup data can be reduced, and the backup efficiency of the virtual machine can be effectively improved.

[0098] Optionally, the backup module 920 is configured to back up the storage mirror data and the storage disk data based on the chain relationship in the following manner: if the chain relationship between the storage mirror and the storage disk is a one-to-many relationship, when the storage mirror data is not backed up, the storage mirror data and the storage disk data are backed up in sequence; when the storage mirror data has been backed up, the storage disk data is directly backed up.

[0099] Optionally, the image backup information includes an image identifier and an image path, and the disk backup information includes a disk identifier and a disk path.

[0100] Optionally, the backup module 920 is further configured to: generate a snapshot of the storage disk data to obtain snapshot data; and back up the snapshot data.

[0101] The data backup device provided by the embodiments of the present disclosure can execute the data backup method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0102] FIG10 is a schematic diagram of the structure of a data recovery device provided by an embodiment of the present disclosure. As shown in FIG10 , the device includes: an association relationship acquisition module 1010 , a storage image data recovery module 1020 , and a storage disk data recovery module 1030 ;

[0103] The association relationship acquisition module 1010 is configured to acquire the association relationship between the image backup information, the disk backup information, the stored image data, and the stored disk data;

[0104] A storage mirror data recovery module 1020 is configured to recover the storage mirror data according to the association relationship;

[0105] The storage disk data recovery module 1030 is configured to recover the storage disk data according to the association relationship.

[0106] This embodiment obtains the association relationship between the image backup information, the disk backup information, the storage image data and the storage disk data through the association relationship acquisition module; recovers the storage image data according to the association relationship through the storage image data recovery module; and recovers the storage disk data according to the association relationship through the storage disk data recovery module. By recovering the storage image data and the storage disk data based on the association relationship, the amount of recovered data can be reduced and the recovery speed can be improved.

[0107] Optionally, the storage mirror data recovery module 1020 is configured to recover the storage mirror data according to the association relationship in the following manner: obtaining the mirror backup information and the storage mirror data according to the association relationship; wherein the mirror backup information also includes virtual configuration information of the first virtual machine; if it is determined according to the mirror backup information that the first virtual machine has not been recovered, creating a third virtual machine according to the virtual configuration information of the first virtual machine; and restoring the storage mirror data to the third virtual machine.

[0108] Optionally, the storage disk data recovery module 1030 is configured to recover the storage disk data according to the association relationship in the following manner: obtaining the disk backup information and the storage disk data according to the association relationship; wherein the disk backup information also includes virtual configuration information of the second virtual machine; creating a fourth virtual machine based on the virtual configuration information of the third virtual machine and the second virtual machine; and restoring the storage disk data to the fourth virtual machine.

[0109] The data recovery device provided by the embodiments of the present disclosure can execute the data recovery method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0110] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as they can realize the corresponding functions; in addition, the names of the various functional units are only for the convenience of distinguishing them from each other.

[0111] FIG11 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. Referring to FIG11 , a schematic diagram of the structure of an electronic device (e.g., a terminal device or server in FIG11 ) 1100 suitable for implementing an embodiment of the present disclosure is shown below. The terminal device in the embodiment of the present disclosure may include mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), and fixed terminals such as digital televisions (TVs) and desktop computers. The electronic device shown in FIG11 is merely an example.

[0112] As shown in Figure 11, the electronic device 1100 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage device 1108 into a random access memory (RAM) 1103. Various programs and data required for the operation of the electronic device 1100 are also stored in the RAM 1103. The processing device 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.

[0113] Typically, the following devices may be connected to the I / O interface 1105: an input device 1106 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1107 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1108 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1109. The communication device 1109 may allow the electronic device 1100 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 11 shows an electronic device 1100 having various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0114] In one embodiment, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1109, or installed from the storage device 1108, or installed from the ROM 1102. When the computer program is executed by the processing device 1101, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0115] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0116] The electronic device provided by the embodiment of the present disclosure and the data backup method or data recovery method provided by the above embodiment belong to the same inventive concept. For technical details not described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0117] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the data backup method or the data recovery method provided in the above embodiment is implemented.

[0118] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may, for example, be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. Examples of computer-readable storage media may include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or convey a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including wires, optical cables, radio frequency (RF), or any suitable combination thereof.

[0119] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as the HyperText Transfer Protocol (HTTP), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), internets (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.

[0120] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0121] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device is caused to: obtain a chain relationship between a storage image and a storage disk; wherein the storage image is located in a first virtual machine and the storage disk is located in a second virtual machine; back up the storage image data and the storage disk data based on the chain relationship; wherein the storage image data is the data in the storage image; and the storage disk data is the data in the storage disk; obtain image backup information and disk backup information; determine the association relationship between the image backup information, the disk backup information, the storage image data, and the storage disk data, and back up and store the association relationship. Alternatively, obtain the association relationship between the image backup information, the disk backup information, the storage image data, and the storage disk data; restore the storage image data according to the association relationship; and restore the storage disk data according to the association relationship.

[0122] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0123] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0124] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."

[0125] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that may be used include: Field-Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Parts (ASSP), System on Chip (SOC), Complex Programmable Logic Device (CPLD), etc.

[0126] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include an electronic, magnetic, optical, electromagnetic, infrared or semiconductor system, device or equipment, or any suitable combination of the foregoing. Examples of machine-readable storage media can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

Claims

1. A data backup method, comprising: Acquire a chain relationship between a storage image and a storage disk; wherein the storage image is located in a first virtual machine, and the storage disk is located in a second virtual machine; The storage mirror data and the storage disk data are backed up based on the chain relationship; wherein the storage mirror data is the data in the storage mirror; and the storage disk data is the data in the storage disk; Get image backup information and disk backup information; Determine the association relationship among the image backup information, the disk backup information, the stored image data, and the stored disk data, and back up and store the association relationship.

2. The method according to claim 1, wherein: The chain relationship between the storage image and the storage disk is a one-to-many relationship, and the backing up of the storage image data and the storage disk data based on the chain relationship includes: In response to the storage mirror data not being backed up, backing up the storage mirror data and the storage disk data in sequence; In response to the storage mirror data having been backed up, the storage disk data is directly backed up.

3. The method according to claim 1, wherein: The image backup information includes an image identifier and an image path, and the disk backup information includes a disk identifier and a disk path.

4. The method according to claim 2, wherein: The backing up of the storage disk data includes: Generate a snapshot of the storage disk data to obtain snapshot data; Back up the snapshot data.

5. A data recovery method, comprising: Obtaining the association between image backup information, disk backup information, storage image data, and storage disk data; Restoring the stored image data according to the association relationship; The storage disk data is restored according to the association relationship.

6. The method according to claim 5, wherein: The restoring the storage mirror data according to the association relationship includes: Acquire the image backup information and the stored image data according to the association relationship; wherein the image backup information also includes virtual configuration information of the first virtual machine; In response to determining that the first virtual machine has not been restored according to the image backup information, Creating a third virtual machine based on virtual configuration information of a virtual machine; The storage image data is restored to the third virtual machine.

7. The method according to claim 6, wherein: The restoring of the storage disk data according to the association relationship includes: Acquire the disk backup information and the storage disk data according to the association relationship; wherein the disk backup information also includes virtual configuration information of the second virtual machine; Creating a fourth virtual machine based on the third virtual machine and the virtual configuration information of the second virtual machine; The storage disk data is restored to the fourth virtual machine.

8. A data backup device, comprising: A chain relationship acquisition module, configured to acquire a chain relationship between a storage image and a storage disk; wherein the storage image is located in the first virtual machine, and the storage disk is located in the second virtual machine; A backup module, configured to back up the storage mirror data and the storage disk data based on the chain relationship; wherein the storage mirror data is the data in the storage mirror; and the storage disk data is the data in the storage disk; A backup information acquisition module, configured to acquire image backup information and disk backup information; The association relationship storage module is configured to determine the association relationship among the image backup information, the disk backup information, the stored image data and the stored disk data, and back up and store the association relationship.

9. A data recovery device, comprising: An association relationship acquisition module, configured to acquire an association relationship between image backup information, disk backup information, stored image data, and stored disk data; A storage mirror data recovery module, configured to recover the storage mirror data according to the association relationship; The storage disk data recovery module is configured to recover the storage disk data according to the association relationship.

10. An electronic device, comprising: one or more processors; a storage device configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the data backup method according to any one of claims 1 to 4 or the data backup method according to any one of claims 5 to 7. A data recovery method as described above.

11. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the data backup method as claimed in any one of claims 1 to 4 or the data recovery method as claimed in any one of claims 5 to 7 when executed by a computer processor.

Citation Information

Patent Citations

  • Data recovery method, device and equipment and storage medium

    CN112416527A

  • Backup method, disaster recovery method, device and equipment of virtual machine

    CN115098299A

  • Data backup method and device, data recovery method and device, equipment and storage medium

    CN116820838A

  • Backing up a virtual machine using a snapshot with memory

    US10678651B1

  • Generic process for determining child to parent inheritance for fast provisioned or linked clone virtual machines

    US9189342B1

Cited By

  • Virtual machine backup method and device, computer equipment and readable storage medium

    CN120994460A