Method, electronic device and computer program product for recovering data
By dividing metadata and assigning tasks to multiple backup storage devices during the data recovery process, the problem of long traditional data backup and recovery time is solved, and device utilization and user experience are improved.
Patent Information
- Application Number
- CN202010231436.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-27
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2040-03-27
AI Technical Summary
The traditional data backup and recovery process takes a long time, resulting in poor user experience and a waste of idle backup storage device resources.
By obtaining the metadata of the target data, dividing it into multiple parts, and allocating data recovery tasks from multiple backup storage devices, each device can complete the data recovery together, optimizing the data transfer rate and geographical location selection to shorten the recovery time.
Significantly shortens data recovery time, improves backup storage device utilization, and saves time and human resources.
Smart Images

Figure CN113448770B
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure generally relate to the field of computer networks, and more particularly to methods, electronic devices, and computer program products for recovering data. Background Art
[0002] When an abnormality or failure occurs in the system, users usually obtain backup data from a backup storage device. The traditional data backup strategy is to regularly back up the data in the user system to multiple backup storage devices. These backup storage devices can have different storage types, can be located in different geographical locations, and can have different storage bandwidths. Once an abnormality or failure occurs in the user system, the user can select a backup storage device from multiple backup storage devices and obtain backup data from the backup storage device. However, with the development of data information, the size of backup data is increasing. Therefore, the process of restoring data usually takes a long time. In addition, due to the long time to restore data, it is likely to bring a bad user experience. Summary of the invention
[0003] Embodiments of the present disclosure provide a method, an electronic device, and a computer program product for recovering data.
[0004] In a first aspect of the present disclosure, a method for recovering data is provided. The method may include obtaining metadata corresponding to target data to be recovered, the metadata including at least a first portion of metadata and a second portion of metadata. The first portion of metadata corresponds to a first group of data blocks in the target data, and the second portion of metadata corresponds to a second group of data blocks in the target data. The method may also include, based on the first portion of metadata, obtaining the first group of data blocks from a first backup storage device among multiple backup storage devices storing the target data. The method may further include, based on the second portion of metadata, obtaining the second group of data blocks from a second backup storage device among the multiple backup storage devices. In addition, the method may also include recovering the target data based at least on the first group of data blocks and the second group of data blocks.
[0005] In a second aspect of the present disclosure, an electronic device is provided. The device includes: at least one processing unit; at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, cause the device to perform an action, the action comprising: obtaining metadata corresponding to target data to be restored, the metadata at least including a first portion of metadata and a second portion of metadata, the first portion of metadata corresponding to a first group of data blocks in the target data, and the second portion of metadata corresponding to a second group of data blocks in the target data; based on the first portion of metadata, obtaining the first group of data blocks from a first backup storage device among multiple backup storage devices storing the target data; based on the second portion of metadata, obtaining the second group of data blocks from a second backup storage device among the multiple backup storage devices; and restoring the target data based at least on the first group of data blocks and the second group of data blocks.
[0006] In a third aspect of the present disclosure, a computer program product is provided. The computer program product is tangibly stored in a non-transient computer storage medium and includes machine executable instructions. The machine executable instructions, when executed by a device, cause the device to perform any step of the method described in the first aspect of the present disclosure.
[0007] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the present disclosure, nor is it intended to limit the scope of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components throughout the exemplary embodiments of the present disclosure.
[0009] Figure 1 A schematic diagram illustrating an example environment in which embodiments of the present disclosure can be implemented;
[0010] Figure 2 A flowchart of a process for restoring data according to an embodiment of the present disclosure is shown;
[0011] Figure 3 A flowchart of an exemplary process for obtaining a first set of data blocks according to an embodiment of the present disclosure is shown;
[0012] Figure 4 A flowchart showing an exemplary process for obtaining a second set of data blocks according to an embodiment of the present disclosure is shown;
[0013] Figure 5 A schematic diagram showing simultaneous data recovery from multiple backup storage devices according to an embodiment of the present disclosure; and
[0014] Figure 6 A schematic block diagram of an example device that may be used to implement embodiments of the present disclosure is shown.
[0015] In the various drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0016] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred 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 and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0017] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0018] As described above, in the traditional process of restoring backup data, the user is usually prompted to select one of multiple backup storage devices to perform data recovery. However, the process of restoring data may take several hours or even dozens of hours. At the same time, except for the backup storage device selected for data recovery, other backup storage devices are idle, and these idle backup storage devices do not perform daily data backup during the data recovery process, which also causes a waste of resources. How to reasonably use all available backup storage devices to perform data recovery is a problem that needs to be solved urgently.
[0019] In order to solve the above problems and improve user experience, the example embodiments of the present disclosure propose a mechanism for data recovery using at least two backup storage devices, and can more reasonably assign data recovery tasks to each backup storage device, thereby maximizing the utilization rate of each backup storage device and shortening the time used to recover data.
[0020] Figure 1A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. In the example environment 100, multiple backup devices 110, 120, 130, and 140 are shown. The backup storage devices 110-140 are backed up with data 160, and the backup storage devices 110-140 can provide part or all of the data 160 for the computing device 150. Figure 1 In the illustrated embodiment, computing device 150 retrieves different parts of data 160 from backup storage devices 110-140 to restore data 160. For computing device 150, data 160 is data to be restored, so data 160 is also referred to as "target data 160" in the embodiment of the present disclosure.
[0021] exist Figure 1 In the illustrated embodiment, the computing device 150 obtains different data portions from the backup storage devices 110 and 120, respectively, for use in restoring the data 160. For ease of description, the backup storage device 110 is also referred to as the first backup storage device 110, and the backup storage device 120 is also referred to as the second backup storage device 120. It should be understood that the above examples are merely illustrative of the present disclosure, rather than specific limitations of the present disclosure. In other embodiments according to the present disclosure, the computing device 150 may utilize any two or more of the backup devices 110-140 to restore the data 160.
[0022] like Figure 1 As shown, the target data 160 may include multiple data parts 162, 164, and 166, etc. Each data part may include a group of data blocks, such as one or more data blocks. For the convenience of description, the data part 162 is also referred to as the first group of data blocks 162, and the data part 164 is referred to as the second group of data blocks 164. Figure 1 In the embodiment of the present invention, the first backup storage device 110 and the second backup storage device 120 respectively undertake the task of restoring one of the copies of data. Therefore, the backup storage device 110 can provide the first group of data blocks 162 to the computing device 150, and at the same time, the second backup storage device 120 can provide the second group of data blocks 164 to the computing device 150. Afterwards, the computing device 150 can restore the data 160 based on at least the first group of data blocks 162 and the second group of data blocks 164. For example, the computing device 150 can also obtain the data portion 166 (also referred to as the third group of data blocks 166) from the backup storage device 130, so that the data 160 can be restored based on the first group of data blocks 162, the second group of data blocks 164 and the third group of data blocks 166, and so on.
[0023] In some embodiments, computing device 150 may include, but is not limited to, a personal computer, a server computer, a handheld or laptop device, a mobile device (such as a mobile phone, a personal digital assistant (PDA), a media player, etc.), a multiprocessor system, consumer electronics, a minicomputer, a mainframe computer, a distributed computing environment including any of the above systems or devices, etc.
[0024] exist Figure 1 In the embodiment, data recovery is completed in units of data blocks, and each data block has metadata indicating its related information. By acquiring metadata of the data to be recovered from the first backup storage device 110 and / or the second backup storage device 120, and dividing the metadata into two parts corresponding to the first backup storage device 110 and the second backup storage device 120, the first backup storage device 110 and the second backup storage device 120 can be used to jointly complete data recovery. In this way, data recovery no longer requires a long wait, thereby saving a lot of time and human resources.
[0025] It should be understood that Figure 1 The environment shown is merely exemplary and not specifically limiting of the present disclosure. Figure 1 The number and structure of components and the arrangement of the environment in the illustrated embodiments are examples for the purpose of description and are not intended to limit the present disclosure in any way.
[0026] Figure 2 FIG. 2 is a flowchart of a process 200 for recovering data according to an embodiment of the present disclosure. In some embodiments, the process 200 may be performed by Figure 1 As an example, the process 200 may be performed at a computing device 150 in Figure 1 The example environment 100 is shown as an example. Figure 2 The process 200 for recovering data according to an embodiment of the present disclosure is described. For ease of understanding, the specific situations mentioned in the following description are exemplary and are not intended to limit the protection scope of the present disclosure.
[0027] At 202, the computing device 150 may obtain metadata corresponding to the target data to be recovered, the metadata including at least a first portion of metadata and a second portion of metadata. As an example, the computing device may obtain metadata of the target data from one of the first backup storage device 110 and the second backup storage device 120, and divide the metadata into a first portion of metadata and a second portion of metadata. The first portion of metadata corresponds to a first group of data blocks 162 in the target data, and the second portion of metadata corresponds to a second group of data blocks 164 in the target data. In this way, the metadata is divided into multiple portions in the computing device 150, thereby creating conditions for multiple backup storage devices to jointly complete the data recovery task.
[0028] At 204, the computing device 150 may obtain the first group of data blocks 162 from the first backup storage device 110 of the plurality of backup storage devices storing the target data based on the first portion of metadata. In some embodiments, the computing device 150 may first select a backup storage device that meets specific requirements and assign the first portion of metadata as a task to the backup storage device, thereby obtaining the first group of data blocks 162.
[0029] Specifically, Figure 3 FIG. 1 is a flow chart showing an exemplary process 300 for obtaining a first set of data blocks 162 according to an embodiment of the present disclosure. In some embodiments, the process 300 may be performed by Figure 1 As an example, process 300 may be performed at a computing device 150 in Figure 1 The example environment 100 is shown as an example. Figure 3 The process 300 for obtaining the first set of data blocks 162 according to an embodiment of the present disclosure is described. For ease of understanding, the specific scenarios mentioned in the following description are exemplary and are not intended to limit the protection scope of the present disclosure.
[0030] At 302, computing device 150 may determine data transfer rates of multiple backup storage devices. As an example, computing device 150 may initiate specific instructions to measure the data transfer rates of the backup storage devices.
[0031] At 304, the computing device 150 may determine a backup storage device having a data transmission rate greater than a predetermined threshold rate from the plurality of backup storage devices to serve as the first backup storage device 110. In other words, the computing device 150 may select several backup storage devices having a higher data transmission rate from the plurality of backup storage devices based on the number of copies into which the metadata is divided. In this way, the rate of data recovery may be maximized.
[0032] At 306, the computing device 150 may obtain the first group of data blocks 162 corresponding to the first part of the metadata from the first backup storage device 110. In other words, when the computing device 150 assigns the transmission task of the data corresponding to the first part of the metadata to the first backup storage device 110, the first backup storage device 110 can complete a part of the data recovery task. If the computing device 150 divides the metadata of the data to be recovered into several or even more parts, several or even more backup storage devices with faster data transmission rates may also be selected from multiple backup storage devices. It should be understood that the number of the selected multiple backup storage devices does not necessarily have to be equal to the number of the metadata divided. When the number of backup storage devices is less than the number of the metadata divided, the backup storage device may complete the divided parts of the metadata in sequence.
[0033] It should also be understood that, in addition to the above-mentioned method of determining the data transmission rate, the computing device 150 may also select an alternative storage device by determining the distance of the geographical location, thereby obtaining the first group of data blocks 162. As an example, the computing device 150 may first determine the geographical locations of multiple backup storage devices, and then determine a backup storage device from the multiple backup storage devices whose distance to the system for recovering target data is greater than a predetermined threshold distance, as the first backup storage device 110, and finally the computing device 150 may obtain the first group of data blocks 162 corresponding to the first part of metadata from the first backup storage device 110.
[0034] Alternatively or additionally, each item of metadata corresponding to each data block in the metadata may be sequentially assigned an alternative storage device. As an example, if two alternative storage devices are selected, a first alternative storage device 110 and a second alternative storage device 120, the first item of metadata may be sequentially assigned to correspond to the first alternative storage device 110, the second item of metadata may be assigned to correspond to the second alternative storage device 120, the third item of metadata may be assigned to correspond to the first alternative storage device 110, the fourth item of metadata may be assigned to correspond to the second alternative storage device 120, and so on.
[0035] Back to Figure 2 At 206, the computing device 150 may obtain the second set of data blocks 164 from the second backup storage device 120 in the plurality of backup storage devices based on the second portion of metadata. In some embodiments, in order to further speed up the data recovery process, the computing device 150 instructs the backup storage device that has completed the corresponding data recovery task to continue to complete the tasks that other backup storage devices have not completed.
[0036] Specifically, Figure 4FIG. 4 is a flowchart of an exemplary process 400 for obtaining the second set of data blocks 164 according to an embodiment of the present disclosure, which illustrates a specific process of obtaining the second set of data blocks 164. In some embodiments, the process 400 may be performed by Figure 1 As an example, process 400 may be performed at a computing device 150 in Figure 1 The example environment 100 shown is implemented. Figure 4 The process 400 for obtaining the second set of data blocks 164 according to an embodiment of the present disclosure is described. For ease of understanding, the specific data mentioned in the following description are exemplary and are not intended to limit the protection scope of the present disclosure.
[0037] At 402, the computing device 150 may first determine whether the first backup storage device 110 has provided all the first group of data blocks 162. When it is determined that all the first group of data blocks 162 of the first backup storage device 110 have been obtained, the computing device 150 may determine the corresponding metadata of the unobtained data blocks in other data blocks such as the second group of data blocks 164. As an example, when the computing device 150 detects that a certain backup storage device has completed the assigned data recovery task, it may determine the uncompleted tasks of other backup storage devices at the time node, that is, the unobtained data blocks. Then, the computing device 150 determines the corresponding metadata based on the unobtained data blocks.
[0038] At 404, computing device 150 may obtain remaining data blocks corresponding to the corresponding metadata from first backup storage device 110 and second backup storage device 120. In other words, unfinished tasks of second backup storage device 120 may be assigned to first backup storage device 110 and second backup storage device 120, respectively.
[0039] At 406, the computing device 150 may determine the remaining data blocks obtained from one of the first backup storage device 110 and the second backup storage device 120 as part of the second group of data blocks 164 based on the determination that the remaining data blocks have been obtained. In other words, the first backup storage device 110 and the second backup storage device 120 may be allowed to compete with each other, and the remaining data blocks provided by the backup storage device that completes the task first among the first backup storage device 110 and the second backup storage device 120 may be used as the unobtained data blocks in the second group of data blocks 164 and become part of the second group of data blocks 164. In this way, each backup storage device may be further fully utilized, thereby further optimizing the efficiency of data recovery.
[0040] Back to Figure 2At 208, the computing device 150 may recover the target data based on at least the first group of data blocks 162 and the second group of data blocks 164. Since the first group of data blocks 162 and the second group of data blocks 164 are both obtained based on metadata, the first group of data blocks 162 and the second group of data blocks 164 may be directly used as the target data.
[0041] In this way, the data recovery task can be divided into several parts, and then the data recovery tasks can be allocated based on the performance of each backup storage device. Since each storage device is fully utilized, the efficiency of data recovery can be maximized.
[0042] In some embodiments, the process 200 may further include: if it is found that a data block in the first group of data blocks 162 is not correctly received, that is, the specific data block cannot be copied from the first backup storage device 110, the computing device 150 may determine the metadata of the data block, and based on the metadata of the data block, obtain the data block from the second backup storage device 120. In this way, when an individual data block cannot be recovered normally, or when data transmission is interrupted due to damage to an individual data block, it is not necessary to retransmit the entire data or a portion thereof, but only to obtain the data block from other backup storage devices, and restore the target data based on these obtained data blocks.
[0043] In order to more clearly describe the preferred embodiments of the present disclosure, Figure 5 FIG. 2 is a schematic diagram showing a method of simultaneously restoring data from multiple backup storage devices according to an embodiment of the present disclosure. Figure 5 As shown, backup storage devices 510, 512, and 514 are all used to back up target data. As an example, backup storage device 510 may be a storage device that is closer to the user system (e.g., in the same city as the user system), backup storage device 512 may be a storage device that is farther from the user system (e.g., in a different city from the user system), and backup storage device 514 may be a cloud storage device.
[0044] The computing device 150 completes the task of data backup by detecting and selecting the backup storage devices 510, 512, and 514. After the computing device 150 obtains the metadata of the target data from at least one of the backup storage devices 510, 512, and 514, the computing device 150 may divide the metadata into metadata 520, 522, and 524, and correspond them to the backup storage devices 510, 512, and 514, respectively. Thus, the backup storage device 510 may provide the computing device 150 with partial data 530 based on the metadata 520. The backup storage device 512 may provide the computing device 150 with partial data 532 based on the metadata 522. The backup storage device 514 may provide the computing device 150 with partial data 534 based on the metadata 524. The partial data 530, 532, and 534 may all be part of the data 160, for example, may respectively include one or more data blocks, and the number of data blocks included in each may be different. After receiving partial data 530 , 532 , and 534 , computing device 150 may restore data 160 based on partial data 530 , 532 , and 534 .
[0045] Through the above embodiments, the metadata of the target data can be first recovered from any alternative storage device, and then the data recovery task can be divided into several parts based on the metadata, and multiple backup storage devices can be instructed to complete one or more of the several parts respectively, so that multiple backup storage devices can jointly complete the data recovery task. In addition, in order to further speed up the data transmission speed and improve the data recovery speed, the embodiments of the present disclosure also preferably select backup storage devices with faster data transmission rates and closer geographical locations to the user system. Moreover, in order to make full use of each backup storage device, when a backup storage device completes the corresponding task, the unfinished tasks of other backup storage devices can also be assigned to the backup storage device, thereby further improving the work efficiency of the backup system.
[0046] Figure 6 A schematic block diagram of an example device 600 that can be used to implement an embodiment of the present disclosure is shown. As shown, the device 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 602 or loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0047] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0048] The various processes and processing described above, such as processes 200, 300, and / or 400, may be performed by the processing unit 601. For example, in some embodiments, the processes 200, 300, and / or 400 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the CPU 601, one or more actions of the processes 200, 300, and / or 400 described above may be performed.
[0049] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.
[0050] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, (but not limited to) an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.
[0051] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0052] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via 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., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0053] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0054] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0055] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0056] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0057] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for recovering data, comprising: Acquire metadata corresponding to target data to be restored, the metadata comprising at least a first portion of metadata and a second portion of metadata, the first portion of metadata corresponding to a first group of data blocks in the target data, and the second portion of metadata corresponding to a second group of data blocks in the target data; Based on the first portion of metadata, obtaining the first group of data blocks from a first backup storage device among a plurality of backup storage devices storing the target data; Based on the second portion of metadata, obtaining the second group of data blocks from a second backup storage device among the plurality of backup storage devices; Determining a remaining data block in the second group of data blocks that is not correctly received during the process of acquiring the second group of data blocks; identifying a subset of the second portion of metadata corresponding to the one remaining data block; Retrieving the one remaining data block from the first backup storage device based on the subset of the second portion of metadata; as well as The target data is recovered based on at least the first group of data blocks and the second group of data blocks, wherein the second group of data blocks includes the one remaining data block, and wherein the first group of data blocks and the second group of data blocks are directly used as the target data.
2. The method according to claim 1, wherein obtaining the first set of data blocks from the first backup storage device comprises: determining data transfer rates of multiple backup storage devices; Determine a backup storage device having a data transmission rate greater than a predetermined threshold rate from the plurality of backup storage devices to serve as the first backup storage device; as well as The first group of data blocks corresponding to the first portion of metadata is obtained from the first backup storage device.
3. The method according to claim 1, wherein obtaining the first set of data blocks from the first backup storage device comprises: Determine the geographic location of multiple backup storage devices; Determine a backup storage device from the plurality of backup storage devices, the distance between the backup storage device and the system for restoring the target data being greater than a predetermined threshold distance, so as to use the backup storage device as the first backup storage device; as well as The first group of data blocks corresponding to the first portion of metadata is obtained from the first backup storage device.
4. The method according to claim 1, wherein obtaining the second set of data blocks from the second backup storage device comprises: Determining corresponding metadata of unobtained data blocks in the second group of data blocks based on determining that the first group of data blocks of the first backup storage device has been acquired; Respectively acquiring remaining data blocks corresponding to the corresponding metadata from the first backup storage device and the second backup storage device; as well as According to determining that the remaining data blocks of one of the first backup storage device and the second backup storage device have been obtained, the obtained remaining data blocks are determined as a part of the second group of data blocks.
5. The method according to claim 1, further comprising: determining metadata of a data block in the first set of data blocks based on determining that the data block is not correctly received, Based on the metadata of the one data block, the one data block is obtained from the second backup storage device.
6. An electronic device comprising: at least one processing unit; at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the apparatus to perform actions comprising: Acquire metadata corresponding to target data to be restored, the metadata comprising at least a first portion of metadata and a second portion of metadata, the first portion of metadata corresponding to a first group of data blocks in the target data, and the second portion of metadata corresponding to a second group of data blocks in the target data; Based on the first portion of metadata, obtaining the first group of data blocks from a first backup storage device among a plurality of backup storage devices storing the target data; Based on the second portion of metadata, obtaining the second group of data blocks from a second backup storage device among the plurality of backup storage devices; Determining a remaining data block in the second group of data blocks that is not correctly received during the process of acquiring the second group of data blocks; identifying a subset of the second portion of metadata corresponding to the one remaining data block; Retrieving the one remaining data block from the first backup storage device based on the subset of the second portion of metadata; and The target data is recovered based on at least the first group of data blocks and the second group of data blocks, wherein the second group of data blocks includes the one remaining data block, and wherein the first group of data blocks and the second group of data blocks are directly used as the target data.
7. The device of claim 6, wherein obtaining the first set of data blocks from the first backup storage device comprises: determining data transfer rates of multiple backup storage devices; Determine a backup storage device having a data transmission rate greater than a predetermined threshold rate from the plurality of backup storage devices to serve as the first backup storage device; as well as The first group of data blocks corresponding to the first portion of metadata is obtained from the first backup storage device.
8. The device of claim 6, wherein obtaining the first set of data blocks from the first backup storage device comprises: Determine the geographic location of multiple backup storage devices; Determine a backup storage device from the plurality of backup storage devices, the distance between the backup storage device and the system for restoring the target data being greater than a predetermined threshold distance, so as to use the backup storage device as the first backup storage device; as well as The first group of data blocks corresponding to the first portion of metadata is obtained from the first backup storage device.
9. The device of claim 6, wherein obtaining the second set of data blocks from the second backup storage device comprises: Determining corresponding metadata of unobtained data blocks in the second group of data blocks based on determining that the first group of data blocks of the first backup storage device has been acquired; Respectively acquiring remaining data blocks corresponding to the corresponding metadata from the first backup storage device and the second backup storage device; as well as According to determining that the remaining data blocks of one of the first backup storage device and the second backup storage device have been obtained, the obtained remaining data blocks are determined as a part of the second group of data blocks.
10. The device of claim 6, wherein the actions further comprise: determining metadata of a data block in the first set of data blocks based on determining that the data block is not correctly received, Based on the metadata of the one data block, the one data block is obtained from the second backup storage device.
11. A computer program product tangibly stored in a non-transitory computer storage medium and comprising machine executable instructions which, when executed by a device, cause the device to perform the method according to any one of claims 1-5.
