CN116185714A - Data recovery method, device, server and storage medium - Google Patents

Data recovery method, device, server and storage medium Download PDF

Info

Publication number
CN116185714A
CN116185714A CN202310159192.XA CN202310159192A CN116185714A CN 116185714 A CN116185714 A CN 116185714A CN 202310159192 A CN202310159192 A CN 202310159192A CN 116185714 A CN116185714 A CN 116185714A
Authority
CN
China
Prior art keywords
data
backup
differential
metadata
snapshot
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310159192.XA
Other languages
Chinese (zh)
Inventor
李志毅
罗文杰
蔡佳煌
莫俊彬
潘桂新
罗平明
陈广汉
李太德
莫忠蓁
卢列强
刘海锋
游梓巍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202310159192.XA priority Critical patent/CN116185714A/en
Publication of CN116185714A publication Critical patent/CN116185714A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides a data recovery method, a data recovery device, a server and a storage medium, and is applied to the technical field of computers. The method comprises the following steps: differential backup data is obtained, wherein the differential backup data comprises non-zero block area data and metadata in incremental data compared with blank snapshots; reading metadata of the differential backup data; determining that the target block device and the metadata do not have conflict snapshots; traversing the target block device and the differential backup data, carrying out zero resetting treatment on the non-differential blocks in the target block device, and writing the differential backup data into the differential blocks. The method improves the data recovery efficiency.

Description

Data recovery method, device, server and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a data recovery method, apparatus, server, and storage medium.
Background
The 5G edge cloud carries computing storage traffic that customers sink to the edge, with high demands on high availability. Cloud disaster recovery is one of the essential links of a cloud computing system to achieve high availability.
In the prior art, when a service disaster occurs, a cloud hard disk is generally reconstructed by using backup data, then a cloud host is reconstructed by using the cloud hard disk as a system disk, or after the cloud host is reconstructed, services in the cloud host are reinstalled, the backup data are copied again, so that service data and service recovery are realized, and then the cloud host is rerun to provide services.
However, the data recovery method in the prior art has complicated recovery process, and requires a user to plan relevant configurations such as a cloud host network, and has high server operation and maintenance knowledge requirements for the user.
Disclosure of Invention
The application provides a data recovery method, a device, a server and a storage medium, which are used for solving the problem of complex recovery process of the data recovery method in the prior art.
In a first aspect, the present application provides a data recovery method, including:
differential backup data is obtained, wherein the differential backup data comprises non-zero block area data and metadata in incremental data compared with blank snapshots;
reading metadata in the differential backup data;
determining that the target block device and the metadata do not have conflict snapshots;
traversing the target block device and the differential backup data, carrying out zero resetting treatment on the non-differential blocks in the target block device, and writing the differential backup data into the differential blocks.
Optionally, after determining that the target block device does not have a conflict snapshot with the metadata, further comprising: and expanding and shrinking the target cloud hard disk according to the size information of the cloud hard disk in the metadata.
Optionally, after determining that the target block device does not have a conflict snapshot with the metadata, further comprising:
creating a pre-recovery snapshot;
accordingly, if an error occurs in the writing, the target block device is rolled back to the pre-recovery snapshot.
Optionally, before obtaining the differential backup data, the method further includes:
creating a pre-backup snapshot, wherein the pre-backup snapshot comprises non-zero block area data and corresponding offset and metadata;
and generating and storing differential backup data according to the non-zero block data, the corresponding offset and the metadata.
Optionally, before creating the pre-backup snapshot, the method further includes:
creating a backup task;
determining that the backup task does not have an associated task being executed;
and determining that an idle thread exists, and distributing the backup task to the idle thread.
Optionally, after assigning the backup task to the idle thread, the method further includes:
updating the state of the backup task to be in execution;
correspondingly, after generating and storing the differential backup data, the method further comprises the steps of:
updating the state of the backup task to be backup completion.
In a second aspect, the present application provides a data recovery apparatus, including:
the acquisition module is used for acquiring differential backup data, wherein the differential backup data is non-zero block area data in incremental data compared with a blank snapshot;
the reading module is used for reading the metadata of the differential backup data;
the determining module is used for determining that the conflict snapshot exists between the target block device and the metadata;
and the processing module is used for traversing the target block equipment and the differential backup data, carrying out zero resetting processing on the non-differential blocks in the target block equipment, and writing the backup data in the differential blocks.
In a third aspect, the present application provides a server comprising: a memory and a processor;
the memory is used for storing a computer program; the processor is configured to execute a computer program stored in the memory, and implement the data recovery method in the first aspect and any embodiment of the first aspect.
In a fourth aspect, the present application provides a computer readable storage medium having a computer program stored therein, which when executed by a processor, implements the data recovery method of the first aspect and any one of the embodiments of the first aspect.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the data recovery method of the first aspect and any one of the embodiments of the first aspect.
According to the data recovery method, the device, the server and the storage medium, conflict snapshots are not generated between the target block device and the metadata through obtaining the differential backup data and reading the metadata of the differential backup data, and because the differential backup data comprise non-zero block area data in incremental data compared with blank snapshots, when data recovery is carried out each time, the target block device and the differential backup data are traversed, non-differential blocks in the target block device are subjected to zero return processing, the differential backup data are written into the differential blocks, the data recovery process is simplified, and the data recovery efficiency is improved.
Drawings
For a clearer description of the present application or of the prior art, the drawings that are used in the description of the embodiments or of the prior art will be briefly described, it being apparent that the drawings in the description below are some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a scenario of data recovery according to an embodiment of the present application;
FIG. 2 is a flowchart of a data recovery method according to an embodiment of the present application;
FIG. 3 is a flowchart of another data recovery method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a data recovery device according to an embodiment of the present application;
fig. 5 is a schematic hardware structure of a server according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the present application will be clearly and completely described below with reference to the drawings in the present application, and it is apparent that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The word "if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination", depending on the context.
Furthermore, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context indicates otherwise.
It will be further understood that the terms "comprises," "comprising," "includes," and/or "including" specify the presence of stated features, steps, operations, elements, components, items, categories, and/or groups, but do not preclude the presence, presence or addition of one or more other features, steps, operations, elements, components, items, categories, and/or groups.
The terms "or" and/or "as used herein are to be construed as inclusive, or meaning any one or any combination. Thus, "A, B or C" or "A, B and/or C" means "any of the following: a, A is as follows; b, a step of preparing a composite material; c, performing operation; a and B; a and C; b and C; A. b and C). An exception to this definition will occur only when a combination of elements, functions, steps or operations are in some way inherently mutually exclusive.
The 5G edge cloud carries computing storage traffic that customers sink to the edge, with high demands on high availability. Cloud disaster recovery is one of the indispensable links of high availability of cloud computing systems. For example, cloud edge business cloud hard disks are backed up at key time points or at regular times according to user demands. When a service disaster occurs, the service node can be restored to a backup time point, or the service node can be backed up at a certain time point, and the service can be pulled up again in a certain area.
The following presents a brief introduction to the related concepts of 5G edge cloud technology, as may be appreciated in conjunction with the prior art.
The backup and restore service is a service for providing backup, timing backup, restore and the like for users, and backup data can be stored remotely and can be stored in a relational database for storing mapping relations between the backup data and a source cloud management/source cloud hard disk and the like.
A single backup service may interface with multiple edge nodes, each deployed with an edge cloud zone, i.e., multi-access edge computing (Multi-access Edge Computing, MEC), including infrastructure as a service (Infrastructure as a Service, iaaS) cloud platform, message exchange patterns (Message Exchange Pattern, MEP), user port functions (User Port Function, UPF), and so on.
The MEC includes an edge cloud self-service platform and a distributed storage cluster. The edge cloud self-service platform is a cloud platform for providing the capabilities of edge cloud host service (Elastic Compute Service, ECS), edge cloud hard disk service (Elastic Block Storage, EBS), virtual private cloud (Virtual Private cloud, VPC), MEP and the like for users, and further comprises a mirror image warehouse for storing a basic mirror image of the cloud host. The distributed storage cluster provides an underlying storage implementation used by cloud hosts, cloud hard disks and mirror images in an edge cloud area, and is specifically implemented by a storage pool of block devices. The ECS provides the user with the portal service for newly building and managing the cloud host, and the EBS provides the user with the portal service for newly building and managing the cloud hard disk. The MEP provides an edge cloud access collaboration service, is responsible for managing edge services, and takes charge of core interworking of 'cloud, network, edge, end and industry' in the MEC edge cloud, such as network functions for connecting an edge cloud platform and UPF.
Generally, cloud backup is performed according to a user request or timing, and backup contents include primary full-volume backup data, subsequent incremental backup data, and respective segment index metadata. When the data recovery is carried out according to the user request, the corresponding backup data is searched from the incremental backup data according to the segment index metadata information, and then the incremental data is written into the corresponding offset of the appointed cloud hard disk.
When data recovery is performed, the data is usually required to pass through a basic mirror image service of a cloud platform and be used as a proxy for transmitting backup data, namely, the data is imported into a mirror image warehouse of the cloud platform in a mirror image mode, and then a cloud host or a cloud hard disk is created by the mirror image. In the process, as the data is required to be transmitted to the cloud storage cluster after being subjected to the basic mirror image service, extra data transmission drop points and time delay are caused.
When the data recovery is carried out in the mode, the corresponding backup data is required to be searched from the incremental backup data, and the dependency on the historical backup data is strong, so that the data recovery process is complicated.
In view of the above problems, the present application proposes a data recovery method, apparatus, server, and storage medium. According to the method, differential backup data are obtained, metadata of the differential backup data are read, after it is determined that conflict snapshots do not exist between target block equipment and the metadata, the target block equipment and the differential backup data are traversed, non-differential blocks in the target block equipment are subjected to zero resetting, and the differential backup data are written into the differential blocks. Because the differential backup data comprises non-zero block data in the incremental data compared with the blank snapshot, when the data recovery is carried out, the searching of corresponding backup data from a plurality of incremental backup data is avoided, the data recovery process is simplified, and the data recovery efficiency is improved.
The technical scheme of the present application is described in detail below with specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Fig. 1 shows a schematic view of a scenario of data recovery according to an embodiment of the present application. As shown in fig. 1, a scheduling server communicates with a disaster recovery center and a client through a network, and the scheduling server obtains backup data from the disaster recovery center and performs data recovery operation on the client. The dispatching server and the disaster recovery center can be realized by independent servers or a server cluster formed by a plurality of servers.
In the present application, the data recovery method of the following embodiment is executed with the electronic device as an execution subject. In particular, the execution body may be a hardware device of the electronic apparatus, or a software application implementing the embodiments described below in the electronic apparatus, or a computer-readable storage medium on which the software application implementing the embodiments described below is installed, or code of the software application implementing the embodiments described below.
Fig. 2 shows a flowchart of a data recovery method according to an embodiment of the present application. As shown in fig. 2, with the electronic device as an execution body, the method of the present embodiment may include the following steps:
s201, differential backup data is obtained, wherein the differential backup data comprises non-zero block area data and metadata in incremental data compared with a blank snapshot.
In this embodiment, a blank snapshot may be understood as a snapshot in which all data is zero, where the differential backup data only backs up the data of the non-zero block area, and does not back up the data of the zero block area. When the differential backup data is adopted for data recovery, the searching of corresponding backup data from a plurality of incremental backup data can be avoided, and no dependence exists on historical backup data.
Metadata is data describing objects such as information resources or data that can be used to track changes in the resources during use. For example, the metadata may be a backup file initial snapshot and an end snapshot associated with the snapshot ID information, or may be source block device size information, cloud hard disk size information, and the like.
S202, reading metadata in the differential backup data.
S203, determining that the conflict snapshot exists between the target block device and the metadata.
In this embodiment, reading metadata may obtain snapshot ID information of backup or restore data, and if there is a conflict snapshot between the target block device and metadata, that is, there is the same snapshot ID information, it may be indicated that the differential backup data has been subjected to a restore operation or is being subjected to a restore operation.
S204, traversing the target block device and the differential backup data, carrying out zero resetting treatment on the non-differential blocks in the target block device, and writing the differential backup data into the differential blocks.
In this embodiment, the target block device may be a blank block device or a non-blank block device. And carrying out zero resetting treatment on the non-differential blocks, writing differential backup data into the differential blocks, and recovering the target block equipment into the data state of the differential backup data.
According to the data recovery method, the non-zero block area data in the incremental data of the corresponding blank snapshot is used as the differential backup data, after the fact that the conflict snapshot exists between the target block device and the metadata is determined, the non-differential block in the target block device is subjected to zero resetting, the differential backup data are written into the differential block, the fact that the corresponding backup data are searched from a plurality of the incremental backup data to achieve data recovery is avoided, the mirror image warehouse of each edge cloud platform is not needed, the data recovery process is simplified, and the data recovery efficiency is improved.
In an example, after step S203, the target cloud hard disk may be scaled according to the cloud hard disk size information in the metadata.
According to the method, the target cloud hard disk is expanded and contracted, so that data recovery of the cloud hard disk with any size can be realized, and data recovery errors caused by mismatching of the offset of the data in the non-zero block area of the backup data and the offset of the target cloud hard disk are avoided.
In one example, following step S203, a pre-restore snapshot may also be created; accordingly, if an error occurs in the writing, the target block device is rolled back to the pre-recovery snapshot.
Alternatively, the pre-restore snapshot may be used to undo the restore without deleting immediately after the data restore is complete.
According to the method, the data of the target block device can be restored to the data of the snapshot before restoration when the write backup data is in error by creating the snapshot before restoration, so that the problem caused by failure in data restoration is avoided.
Fig. 3 is a flowchart of another data recovery method according to an embodiment of the present application. As shown in fig. 3, with the electronic device as an execution body, the method of the present embodiment may include the following steps:
s301, creating a backup task.
In this embodiment, the backup task may be a backup task performed according to a user request, or may be a periodic backup task initiated according to a timing policy.
Optionally, the electronic device includes a scheduling module, a thread pool woker pool, and a parallel thread woker executing code. The scheduling module polls the backup task queue and distributes the backup tasks to woker pool, which maintains a limited number of woker execution tasks. The scheduling module can coordinate the task execution sequence, avoid executing a large number of backup or recovery tasks at the same time, reduce the input/output pressure of cloud storage and avoid affecting the normal operation of other businesses.
S302, determining that the backup task does not have an associated task being executed.
In this embodiment, the associated task may be a task associated with information of a block device, a cloud hard disk, and a cloud host of the backup task. If there is an associated task being executed, and the backup task continues to be executed, the data backup content is caused to have a repeated part, so that the reliability of the data backup system of the electronic device is reduced.
Optionally, if there is an associated task executing on the woker pool, the backup task is skipped and the scheduling module waits for the next poll.
S303, determining that idle threads exist, and distributing backup tasks to the idle threads.
In this embodiment, if there is an empty woker in the woker pool, the backup task is allocated to the woker.
S304, creating a snapshot before backup, wherein the snapshot before backup comprises non-zero block area data, corresponding offset and metadata.
In this embodiment, the non-zero block area data refers to non-zero block area data in delta data compared with the blank snapshot. The metadata may be size information of the cloud hard disk.
And S305, generating and storing differential backup data according to the non-zero block area data, the corresponding offset and the metadata.
In this embodiment, the differential backup data further includes backup metadata. The differential backup data may be stored to a remote store.
In one example, after step S303, the state of the backup task may also be updated to be in execution; correspondingly, after the differential backup data is generated and stored, the state of the backup task is updated to be that the backup is completed.
In this example, after the backup task is allocated to the idle woker, the backup task may be updated to be in execution, so that when other backup tasks determine whether there is an associated task, information comparison with the backup task is not missed. Optionally, after the differential backup data is stored, updating the state of the backup task to be backup completed.
Alternatively, after differential backup data storage, the pre-backup snapshot may be deleted.
S306, obtaining differential backup data, wherein the differential backup data comprises non-zero block area data and metadata in incremental data compared with a blank snapshot.
S307, reading metadata in the differential backup data.
S308, determining that the conflict snapshot exists between the target block device and the metadata.
S309, traversing the target block device and the differential backup data, carrying out zero resetting processing on the non-differential blocks in the target block device, and writing the differential backup data into the differential blocks.
Steps S306 to S309 are similar to the implementation of steps S201 to S204 in the embodiment of fig. 2, and are not described herein.
According to the method, the data backup tasks are scheduled, the backup tasks of the same source or target are limited by simultaneous operation, and the maximum number of simultaneous execution tasks is limited, so that the concurrent behavior of the tasks is controlled, the uniqueness of the backup operation of the same cloud resource in the same time is ensured, and the overall reliability of the backup system is improved. Similarly, this scheduling operation may also be used during the data recovery operation. According to the method, the backup data is kept relatively independent during the data recovery operation by backing up the data from zero differential backup data, namely backing up the non-zero block area data of the incremental data compared with the blank snapshot, so that the dependence on the historical backup data is avoided.
Fig. 4 shows a schematic structural diagram of a data recovery device 40 according to an embodiment of the present application, as shown in fig. 4, where the data recovery device 40 of the present embodiment is configured to implement operations corresponding to an electronic device in any of the above method embodiments, and the data recovery device 40 of the present embodiment includes:
the obtaining module 401 is configured to obtain differential backup data, where the differential backup data is non-zero block area data in incremental data compared with a blank snapshot;
a reading module 402, configured to read metadata of the differential backup data;
a determining module 403, configured to determine that there is no conflict snapshot between the target block device and the metadata;
and the processing module 404 is configured to traverse the target block device and the differential backup data, perform zero-resetting processing on the non-differential block in the target block device, and write the backup data in the differential block.
In an example, the processing module 404 is further configured to scale the target cloud hard disk according to the cloud hard disk size information in the metadata.
In one example, the processing module 404 is further configured to create a pre-restore snapshot; if the writing is wrong, the target block device is rolled back to the snapshot before recovery.
In one example, the processing module 404 is further configured to create a pre-backup snapshot, where the pre-backup snapshot includes non-zero block area data, and corresponding offset and metadata; and generating and storing differential backup data according to the non-zero block data, the corresponding offset and the metadata.
In one example, the processing module 404 is further configured to create a backup task; determining that the backup task does not have an associated task being executed; and determining that an idle thread exists, and distributing the backup task to the idle thread.
In one example, the processing module 404 is further configured to update the state of the backup task to be executing; after the differential backup data is generated and stored, the state of the backup task is updated to be backup completed.
The data processing device 40 provided in the embodiment of the present application may execute the above-mentioned method embodiment, and the specific implementation principle and technical effects of the method embodiment may be referred to the above-mentioned method embodiment, which is not described herein again.
Fig. 5 shows a schematic hardware structure of a server according to an embodiment of the present application. As shown in fig. 5, the server 50, configured to implement operations corresponding to the electronic device in any of the above method embodiments, the server 50 of this embodiment may include: memory 501, processor 502.
A memory 501 for storing a computer program. The Memory 501 may include a high-speed random access Memory (Random Access Memory, RAM), and may further include a Non-Volatile Memory (NVM), such as at least one magnetic disk Memory, and may also be a U-disk, a removable hard disk, a read-only Memory, a magnetic disk, or an optical disk.
A processor 502 for executing a computer program stored in a memory to implement the data recovery method in the above embodiment. Reference may be made in particular to the relevant description of the embodiments of the method described above. The processor 502 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
Alternatively, the memory 501 may be separate or integrated with the processor 502.
When memory 501 is a separate device from processor 502, server 50 may also include a bus. The bus is used to connect the memory 501 and the processor 502. The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or one type of bus.
The server 50 may also include a communication interface, which may be coupled to the processor 502 via a bus. The processor 502 may control the communication interface to perform the functions of receiving and transmitting signals.
The server 50 provided in this embodiment may be used to execute the data recovery method described above, and its implementation manner and technical effects are similar, and this embodiment will not be described herein again.
The present application also provides a computer readable storage medium having stored therein a computer program/instruction which when executed by a processor is adapted to carry out the methods provided by the various embodiments described above.
The computer readable storage medium may be a computer storage medium or a communication medium. Communication media includes any medium that facilitates transfer of a computer program from one place to another. Computer storage media can be any available media that can be accessed by a general purpose or special purpose computer. For example, a computer-readable storage medium is coupled to the processor such that the processor can read information from, and write information to, the computer-readable storage medium. In the alternative, the computer-readable storage medium may be integral to the processor. The processor and the computer readable storage medium may reside in an application specific integrated circuit (Application Specific Integrated Circuits, ASIC). In addition, the ASIC may reside in a user device. The processor and the computer-readable storage medium may also reside as discrete components in a communication device.
In particular, the computer readable storage medium may be implemented by any type or combination of volatile or non-volatile Memory devices, such as Static Random-Access Memory (SRAM), electrically erasable programmable Read-Only Memory (EEPROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic or optical disk. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The present application also provides a computer program product comprising a computer program/instructions stored in a computer readable storage medium. At least one processor of the device may read the computer program/instructions from a computer-readable storage medium, execution of the computer program/instructions by at least one processor causing the device to perform the methods provided by the various embodiments described above.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules is merely a logical function division, and there may be additional divisions of actual implementation, e.g., multiple modules may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
Wherein the individual modules may be physically separated, e.g. mounted in different locations of one device, or mounted on different devices, or distributed over a plurality of network elements, or distributed over a plurality of processors. The modules may also be integrated together, e.g. mounted in the same device, or integrated in a set of codes. The modules may exist in hardware, or may also exist in software, or may also be implemented in software plus hardware. The purpose of the embodiment scheme can be achieved by selecting part or all of the modules according to actual needs.
It should be understood that, although the steps in the flowcharts in the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the figures may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily occurring in sequence, but may be performed alternately or alternately with other steps or at least a portion of the other steps or stages.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region, and provide corresponding operation entries for the user to select authorization or rejection.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments may be modified or some or all of the technical features may be replaced with equivalents. Such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A method of data recovery, the method comprising:
obtaining differential backup data, wherein the differential backup data comprises non-zero block area data and metadata in incremental data compared with blank snapshots;
reading metadata in the differential backup data;
determining that a conflict snapshot does not exist between the target block device and the metadata;
traversing the target block device and the differential backup data, carrying out zero-resetting processing on the non-differential blocks in the target block device, and writing the differential backup data in the differential blocks.
2. The method of claim 1, wherein after determining that there is no conflicting snapshot of the target block device and the metadata, further comprising:
and expanding and shrinking the target cloud hard disk according to the size information of the cloud hard disk in the metadata.
3. The method of claim 1, wherein after determining that there is no conflicting snapshot of the target block device and the metadata, further comprising:
creating a pre-recovery snapshot;
accordingly, if the writing is wrong, rolling back the target block device to the snapshot before recovery.
4. A method according to any one of claims 1-3, wherein prior to said obtaining differential backup data, further comprising:
creating a pre-backup snapshot, wherein the pre-backup snapshot comprises non-zero block area data, corresponding offset and metadata;
and generating and storing differential backup data according to the non-zero block data, the corresponding offset and the metadata.
5. The method of claim 4, wherein prior to creating the pre-backup snapshot, further comprising:
creating a backup task;
determining that the backup task does not have an associated task being executed;
and determining that an idle thread exists, and distributing the backup task to the idle thread.
6. The method of claim 5, wherein after assigning the backup task to the idle thread, further comprising:
updating the state of the backup task to be in execution;
correspondingly, after generating and storing the differential backup data, the method further comprises the steps of:
updating the state of the backup task to be backup completion.
7. A data recovery apparatus, the apparatus comprising:
the acquisition module is used for acquiring differential backup data, wherein the differential backup data is non-zero block area data in incremental data compared with a blank snapshot;
the reading module is used for reading the metadata of the differential backup data;
a determining module, configured to determine that a conflict snapshot does not exist between the target block device and the metadata;
and the processing module is used for traversing the target block equipment and the differential backup data, carrying out zero resetting processing on the non-differential blocks in the target block equipment, and writing the backup data in the differential blocks.
8. A server, the server comprising: a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to execute the computer program stored in the memory, and implement the data recovery method according to any one of claims 1 to 6.
9. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program for implementing the data recovery method according to any of claims 1-6 when being executed by a processor.
10. A computer program product, characterized in that the computer program product comprises a computer program which, when executed by a processor, implements the data recovery method of any one of claims 1-6.
CN202310159192.XA 2023-02-20 2023-02-20 Data recovery method, device, server and storage medium Pending CN116185714A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310159192.XA CN116185714A (en) 2023-02-20 2023-02-20 Data recovery method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310159192.XA CN116185714A (en) 2023-02-20 2023-02-20 Data recovery method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN116185714A true CN116185714A (en) 2023-05-30

Family

ID=86441930

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310159192.XA Pending CN116185714A (en) 2023-02-20 2023-02-20 Data recovery method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN116185714A (en)

Similar Documents

Publication Publication Date Title
CN103092903A (en) Database Log Parallelization
US20220276990A1 (en) Light weight redundancy tool for performing transactions
US11243980B2 (en) Monotonic transactions in a multi-master database with loosely coupled nodes
US10423625B2 (en) Exactly-once semantics for streaming analytics in non-idempotent output operations
CN110121694B (en) Log management method, server and database system
CN116917880A (en) Distributed database remote backup
US8521682B2 (en) Transfer of data from transactional data sources to partitioned databases in restartable environments
WO2021082925A1 (en) Transaction processing method and apparatus
CN113760846A (en) Data processing method and device
US10409651B2 (en) Incremental workflow execution
CN111124751A (en) Data recovery method and system, data storage node and database management node
CN112596801A (en) Transaction processing method, device, equipment, storage medium and database
CN116303510A (en) Resource transfer transaction processing method, device, computer equipment and storage medium
CN116185714A (en) Data recovery method, device, server and storage medium
US20200142985A1 (en) Asynchronously publishing events to a message bus in an event-driven computing system
JP4571090B2 (en) Scheduler program, server system, scheduler device
US20210218827A1 (en) Methods, devices and systems for non-disruptive upgrades to a replicated state machine in a distributed computing environment
CN110309191A (en) The methods, devices and systems of storage service data
CN114547706A (en) Serial number generation method, computing device and storage medium
CN110419026B (en) In-memory search technique
JPH04199339A (en) Distributed transaction file control method for distributed processing system
KR100630213B1 (en) Method for processing write-ahead logging protocol using data buffer control blocks in data storage systems
CN114722261A (en) Resource processing method and device, electronic equipment and storage medium
CN114490767A (en) Data scanning method and device, electronic equipment, storage medium and program product
CN115629901A (en) Log playback method and device, data recovery method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination