Data recovery method and apparatus, and device
By analyzing the valid data from multiple snapshots using a fusion device, a fused snapshot or candidate data set is generated, solving the problem of losing the latest data during data recovery and enabling effective recovery and flexible application of the data set.
Patent Information
- Application Number
- PCT/CN2025/114441
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-14
- Filing Date
- 2025-08-13
- Publication Date
- 2026-02-19
AI Technical Summary
Existing technologies, when used for data recovery, may result in the loss of recently updated data due to the use of the most recent snapshot, and cannot effectively preserve updated data that has not been infected by viruses.
The system acquires valid data from multiple snapshots using a fusion device. Based on audit information and availability verification, it determines the latest versions of related and unrelated data, generates a fusion snapshot or candidate data set, and restores the data set.
The recovered dataset retains the latest, uninfected data, supporting application operation and improving the flexibility and efficiency of data recovery.
Smart Images

Figure CN2025114441_19022026_PF_FP_ABST
Abstract
Description
A data recovery method, device and equipment
[0001] Cross-reference to Related Applications
[0002] This application claims priority to the Chinese Patent Application No. 202411118364.X, filed on August 14, 2024, and entitled "A data recovery method, device and equipment", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] The present application relates to the field of communication technology, and in particular to a data recovery method, device and equipment. BACKGROUND
[0004] Snapshot is a data protection method. Snapshot is a static image created for a data set. Snapshot records the state of the data set, not the complete copy of the data set. Therefore, the storage space occupied by the snapshot is smaller. Due to this characteristic of snapshot, snapshot is widely used.
[0005] A snapshot is created periodically for a data set in order to recover the data set when there is data loss or damage in the data set. When the data set needs to be recovered, if there is encrypted data or virus-infected data in the snapshot created last time, the snapshot created last time will not be used, and the snapshot created earlier in time will be used to recover the data set, which will result in the loss of recently updated data in the recovered data set. SUMMARY
[0006] The data recovery method, device and equipment provided by the embodiments of the present application are used to ensure that the recovered data retains more recently updated data.
[0007] In a first aspect, the embodiments of the present application further provide a data recovery method, which is executed by a fusion device. In the method, the fusion device acquires a plurality of snapshots to be fused, wherein each snapshot is created for a data set, and the creation time of different snapshots is different. After acquiring the plurality of snapshots, the fusion device acquires valid data of the plurality of snapshots, wherein the valid data in each snapshot is the data in the data set recorded in each snapshot that is not infected by a virus. The fusion device performs data recovery on the data set based on the valid data in the plurality of snapshots.
[0008] By the method, the fusion device can extract valid data in the multiple snapshots to restore the data set, and the valid data in the multiple snapshots includes uninfected and updated data. In this way, the restored data set includes the most recently updated and uninfected data, and the restored data set is not only a set of valid data, but also retains the most updated data as much as possible.
[0009] In a possible implementation, when the fusion device restores the data set based on the valid data in the multiple snapshots, the fusion device can directly obtain a candidate data set by fusing the valid data in the multiple snapshots, and restore the data set by using the candidate data set. The fusion device can also obtain a fusion snapshot based on the valid data in the multiple snapshots, and obtain the fusion snapshot when the data set needs to be restored, and restore the data set based on the fusion snapshot.
[0010] By the method, the way of restoring the data set based on the valid data in the multiple snapshots is flexible and suitable for different application scenarios, and the existence of the fusion snapshot facilitates subsequent viewing of the data set at a historical moment based on the fusion snapshot.
[0011] In a possible implementation, the data set includes at least one group of associated data, and each group of associated data includes multiple data that exist in association.
[0012] When the fusion device obtains the fusion snapshot based on the valid data in the multiple snapshots, for any group of associated data, such as a first group of associated data, the fusion device can determine at least one first candidate snapshot, and the at least one first candidate snapshot is a snapshot in which the first group of associated data is valid data. The fusion device determines a first snapshot from the at least one first candidate snapshot, and the first snapshot is a snapshot in the at least one first candidate snapshot that is closest in creation time to a current time. The fusion device determines a latest version of the first group of associated data from the first snapshot, and the latest version of the first group of associated data is the first group of associated data recorded in the first snapshot. The fusion device can obtain the fusion snapshot based on the latest version of the first group of associated data, and can also restore the data set based on the latest version of the first group of associated data.
[0013] By the method, the latest version of the at least one group of associated data is used when the data set is restored, so that the latest and valid associated data is retained in the restored data set.
[0014] In a possible implementation, when determining the latest version of the first set of associated data, the fusion device can further determine at least one first candidate snapshot from the plurality of snapshots that satisfies a first available condition, the first available condition being that a data set recorded by the first candidate snapshot supports running of the first application; the fusion device determines the latest version of the first set of associated data from the at least one first candidate snapshot; that is, determines a first snapshot from the at least one first candidate snapshot, and obtains the latest version of the first set of associated data from the first snapshot.
[0015] By the foregoing method, the latest version of the first set of associated data is not only valid data, but also available data, that is, supports running of the first application, and ensures that the recovered data set can also support running of the first application.
[0016] In a possible implementation, the data set includes non-associated data, the non-associated data being data in the data set other than the at least one set of associated data.
[0017] When obtaining the fusion snapshot based on valid data in the plurality of snapshots, for any non-associated data in the non-associated data, such as first non-associated data, the fusion device determines at least one second candidate snapshot, the at least one second candidate snapshot being a snapshot from the plurality of snapshots in which the first non-associated data is valid data; the fusion device determines a second snapshot from the at least one second candidate snapshot, the second snapshot being a snapshot from the at least one second candidate snapshot that is closest in creation time to a current time. The fusion device obtains, from the second snapshot, a latest version of the first non-associated data, the latest version of the first non-associated data being the first non-associated data recorded in the second snapshot; the fusion device can obtain the fusion snapshot according to the latest version of the first non-associated data, and can also recover the data set according to the latest version of the first non-associated data.
[0018] By the foregoing method, when recovering the data set, the latest version of the non-associated data is used, and the latest and valid non-associated data is retained in the recovered data set.
[0019] In a possible implementation, when determining the latest version of the first non-associated data, the fusion device determines at least one second candidate snapshot from the plurality of snapshots that satisfies a second available condition, the second available condition being that a data set recorded by the at least one second candidate snapshot supports running of a second application; the fusion device determines the latest version of the first non-associated data from the at least one second candidate snapshot, that is, determines a second snapshot from the at least one second candidate snapshot, and obtains the latest version of the first non-associated data from the second snapshot.
[0020] Through the method, the latest version of the first non-associated data is not only valid data, but also available data, that is, supporting the running of the second application program, and ensuring that the recovered data set can also support the running of the second application program.
[0021] In a possible implementation, the fusion device obtains audit information, the audit information describing operation information on data in the data set; and the fusion device determines the at least one group of associated data based on the audit information.
[0022] Through the method, the fusion device can analyze the change rule of each data from the audit information, and then accurately obtain the at least one group of associated data.
[0023] In a possible implementation, the fusion device determines the at least one group of associated data based on the audit information and an associated data list. The associated data list records one or more groups of associated data.
[0024] Through the method, the fusion device can more accurately determine all associated data possibly included in the data set.
[0025] In a possible implementation, the fusion device obtains, based on the valid data in the plurality of snapshots, before the fusion snapshot, for any snapshot in the plurality of snapshots, the valid data in the snapshot by detecting the data set recorded by the snapshot.
[0026] Through the method, the fusion device can perform virus detection on the data set recorded by the snapshot to extract valid data therefrom, and the data included in the recovered data set is valid data.
[0027] In a possible implementation, the fusion device obtains, based on the valid data in the plurality of snapshots, the latest version of the non-associated data and the latest version of the at least one group of associated data from the valid data in the plurality of snapshots when recovering the data set, to construct a candidate data set; and recovers the data set by using the candidate data set.
[0028] Through the method, the candidate data set contains the latest version of the non-associated data and the latest version of the at least one group of associated data, and the data set recovered by using the candidate data set also contains the latest non-associated data and associated data, thereby avoiding losing a large amount of recently updated data when recovering the data set.
[0029] In a possible implementation, the fusion device obtains, based on the valid data in the plurality of snapshots, the fusion snapshot by creating a snapshot of the candidate data set to obtain the fusion snapshot.
[0030] Through the method, the existence of the fusion snapshot can timely restore the data set when subsequent data set recovery is required, improve the efficiency of data recovery, and also facilitate the query of the state of the data set at the historical moment by using the fusion snapshot.
[0031] In a second aspect, the embodiments of the present application further provide a fusion device, which has the functions of implementing the behaviors in the method embodiments of the first aspect, and the beneficial effects can be referred to the description of the first aspect and will not be repeated here. The functions can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. In one possible design, the structure of the fusion device includes an acquisition module and a recovery module, and optionally further includes a detection module, which can perform the corresponding functions in the method embodiments of the first aspect, and the specific implementation can be referred to the detailed description in the method embodiments, which will not be repeated here.
[0032] In a third aspect, the present application further provides a computing device, which includes a processor and a memory, and can further include a communication interface. The processor executes computer program instructions in the memory to perform the method provided by the first aspect or any possible implementation manner of the first aspect. The memory is coupled with the processor, and stores computer program instructions and data necessary for determining the data deduplication process. The communication interface is used for communication with other devices, such as transmitting multiple snapshots, the recovered data set, the fusion snapshot, etc.
[0033] In a fourth aspect, the present application further provides a computing device, which includes an external device and a processor, and optionally further includes a memory and a communication interface. The processor cooperates with the external device to perform the method provided by the first aspect or any possible implementation manner of the first aspect. Or the external device performs the method provided by the first aspect or any possible implementation manner of the first aspect. The memory is coupled with the processor, and stores some computer program instructions and data necessary for determining the data recovery process. The communication interface is used for communication with other devices.
[0034] In a fifth aspect, the present application provides a computing device system, which includes at least one computing device. Each computing device includes a memory and a processor. The processor of the at least one computing device is configured to access computer program instructions in the memory to perform the method provided by the first aspect or any possible implementation manner of the first aspect.
[0035] In a sixth aspect, the present application provides a computer readable storage medium, which, when executed by a computing device, causes the computing device to perform the method provided in the first aspect or any possible implementation of the first aspect. The storage medium includes, but is not limited to, a volatile memory, such as a random access memory, a non-volatile memory, such as a flash memory, a hard disk drive (HDD), and a solid state drive (SSD).
[0036] In a seventh aspect, the present application provides a computing device program product, which includes computer program instructions, when executed by a computing device, causes the computing device to perform the method provided in the first aspect or any possible implementation of the first aspect. The computer program product can be a software package, which can be downloaded and executed on the computing device in the case that the method provided in the first aspect or any possible implementation of the first aspect is needed.
[0037] In an eighth aspect, the present application further provides a computer chip, which is connected with a memory and used to read and execute computer program instructions stored in the memory to perform the method in the first aspect and each possible implementation of the first aspect.
[0038] The technical effects achieved by the second aspect to the eighth aspect can refer to the description of the technical effects achieved by the corresponding design scheme in the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0039] FIG. 1 is a structural schematic diagram of a data recovery system provided by the present application;
[0040] FIG. 2 is a schematic diagram of a data recovery method provided by an embodiment of the present application;
[0041] FIG. 3 is a schematic diagram of a snapshot query interface provided by the present application;
[0042] FIG. 4 is a schematic diagram of a data recovery interface provided by the present application;
[0043] FIG. 5 is a structural schematic diagram of a server provided by the present application;
[0044] FIG. 6 is a structural schematic diagram of a computing device provided by the present application;
[0045] FIG. 7 is a structural schematic diagram of a computing device provided by the present application;
[0046] FIG. 8 is a structural schematic diagram of a fusion device provided by the present application. DETAILED DESCRIPTION
[0047] Before introducing the data recovery method, device and equipment provided by the embodiments of the present application, some concepts involved in the embodiments of the present application are described first:
[0048] (1), file system.
[0049] The file system is a structured data storage and organization form. The file system organizes data by using the concept of "file", and data for the same purpose is composed into different types of files according to the structure required by different application programs. Different suffixes are usually used to represent different types, and a convenient-to-remember name, i.e. "file name", is configured for each file. When the number of files is large, these files are grouped according to a certain division method, and each group of files is placed in the same directory (or folder). Moreover, the directory can have a next-level directory (called subdirectory or subfolder) under it, and all files and directories form a tree structure. This tree structure has a special name: file system (file system). There are many types of file systems, such as FAT / FAT32 / NTFS of Windows, EXT2 / EXT3 / EXT4 / XFS / BtrFS of Linux, etc. In order to facilitate searching, the names of these directories, subdirectories and files are concatenated by special characters (such as "\" in Windows / DOS and " / " in Unix-like systems) from the root node to the file itself, and such a string of characters is called a file path, such as " / etc / systemd / system.conf" in Linux or "C:\Windows\System32\taskmgr.exe" in Windows. The path is the unique identifier of a specific file. For example, D:\data\file.exe in Windows is a file path, which indicates the file.exe file in the data directory under the D partition.
[0050] The file system is built on a block device, and the file system not only records the file path, but also records which blocks constitute a file and which blocks record directory / subdirectory information.
[0051] (2), object storage.
[0052] Object storage uses a flat address space to store data, in which there is no hierarchy of directories and files. An object can include user data, associated metadata (such as size, date, owner, etc.), and other attributes of the data (such as access characteristics, etc.). Each object has a unique identification (ID), which is referred to as an object ID. The object ID is generated using a special algorithm (such as a hash value of the data), which ensures that the ID of each object is unique. In object storage, objects are stored in buckets, and when the storage space in a bucket is insufficient, a new bucket can be created.
[0053] Two main management services are involved in object storage, namely a metadata service and a storage service. The storage service is mainly used to manage a plurality of hard disks that store data, and the storage service can be deployed on one or more nodes. The metadata service is used to manage metadata of data. The metadata service can be deployed on the same node as the storage service, or can be deployed on different nodes.
[0054] (3) snapshot, merged snapshot.
[0055] A snapshot refers to a completely available copy of a specified data set (the data set can be referred to as a data volume), which is a static image of the source data at a certain time point. The snapshot is generally a "virtual" copy of the source data. The snapshot only saves the state of the data set at a certain time point, and a version of the data set can be formed based on the snapshot, which is the data set at the time point. The snapshot is related to the time point, and the data set formed based on the snapshot is also the data set at the time point. In another expression, the data set formed based on the snapshot is consistent with the data set at a certain time point in the past, and the time point is the time point of the snapshot.
[0056] The snapshot records data in the form of a "static image", and the data recorded by the snapshot is the data in the data set formed based on the snapshot.
[0057] In the embodiments of the present application, a snapshot is created for a file system as an example. In order to distinguish the file system to which the snapshot is directed and the file system formed based on the snapshot, the file system to which the snapshot is directed is referred to as an original file system, and the file system formed based on the snapshot is referred to as a cloned file system. Then, restoring the original file system by using the snapshot means replacing the files in the original file system by the files in the cloned file system or replacing the original file system by the cloned file system.
[0058] In the embodiments of the present application, the concept of "merged snapshot" is introduced, which is a new snapshot formed based on a plurality of snapshots, and the merged snapshot merges the effective data in the plurality of snapshots.
[0059] (4) Audit information.
[0060] In the embodiments of the present application, the data in the storage device is accessed (such as user-triggered operations of adding, deleting, searching, modifying, etc. on the data), and the storage device also spontaneously operates the data stored therein. The audit information describes the operation information of the data in the storage device. The audit information includes the following parts or all of them:
[0061] Access information of the data, user to which the data belongs, application program to which the data belongs.
[0062] The access information of the data describes the operations of adding, deleting, searching, modifying, etc. performed on the data, and the access information of the data includes the time of performing the operation on the data, the type of the operation, the content of performing the operation on the data, etc.
[0063] The data in the storage device can include some data that is exclusively owned by a user, such as data created by the user in the storage device through operating the user-side computing device, and data generated by an application program supporting the user's business during the running process. For this kind of data, the user to which the data belongs can be recorded.
[0064] The data in the storage device can also include some data that is generated by an application program running on the storage device, or data transmitted to the storage device by an application program deployed in a remote end. For this kind of data, the application program to which the data belongs can be recorded.
[0065] The above is only an example of the information content that the audit information can include, and the embodiments of the present application do not limit the information content that the audit information includes. Any information describing the operation information of the data in the storage device can be used as the audit information.
[0066] If the data in the storage device is organized in files, then the audit information of the storage device includes: access information of the files, user to which the files belong, and application program to which the files belong.
[0067] (5) Associated data, unassociated data, associated file, unassociated file.
[0068] First, the version of the data is explained. After the data is created, the data changes with the operations of adding (such as adding data in the data), deleting (such as deleting data in the data or deleting the data), modifying (such as modifying the data or modifying the name of the file or object to which the data belongs, or moving the position of the data), etc. performed on the data. Each time the data changes (such as each time an operation is performed on the data), the changed data can be referred to as a version of the data or a version of the data. The version of the data changes with the operation performed on the data.
[0069] The version of data is combined with the snapshot, and one snapshot records one version of data. If snapshots are created at different time points for the same data, one snapshot is one version of data, and different snapshots are different versions of data. The version of data can be marked by using the snapshot.
[0070] The associated data refers to a plurality of data that are associated with each other. The "association" between the plurality of data is reflected in that there is a dependency relationship between the plurality of data, and the dependency relationship can be manifested as follows: the change of one data causes the change of another data. Due to the dependency relationship between the associated data, the versions of the plurality of data that are associated with each other need to be consistent, otherwise the plurality of data is invalid or cannot support the business.
[0071] It should be noted that the number of data is divided according to the organization form of the data in the storage device, for example, the data in the storage device is organized in the form of a file, and one data is one file. For another example, the data in the storage device is organized in the form of an object, and one data is one object.
[0072] Two kinds of associated data are listed here:
[0073] Example 1: For the data table in the database, there are often a plurality of data tables that are associated with each other, and in the plurality of data tables, one data table points to another data table. When one of the data tables changes, the other data table also needs to be adjusted accordingly. That is, the versions of the plurality of data tables need to be consistent, otherwise the plurality of data tables may have errors.
[0074] Example 2: For the configuration data of the application program, there are some configuration data that are associated with each other, and in the plurality of configuration data, one configuration data changes, and another configuration data changes accordingly. The versions of the plurality of configuration data need to be consistent, otherwise the application program cannot generate work and cannot support the business.
[0075] For convenience of description, the plurality of data that are associated with each other is referred to as a group of associated data. For example, the first group of associated data and the first group of associated files mentioned in the present application. It should be noted that the first group of associated data represents any group of associated data in at least one group of associated data, and the "first group" of the first group of associated data does not represent the sorting position of the associated data. Similarly, the first group of associated files only represents any group of associated files. In the embodiments of the present application, whether the plurality of data belongs to the associated data can be determined based on part or all of the following information.
[0076] Information I: associated data list (such as associated file list, associated object file list). The associated data list is constructed according to the experience of the operation and maintenance personnel, and at least one group of associated data is recorded in the associated data list.
[0077] Information II, audit information. By analyzing the audit information, it is determined whether there is an association between multiple data, and then the associated data is obtained.
[0078] In contrast to the associated data, there is no associated data, i.e. non-associated data, such as the first non-associated data and the first non-associated file mentioned in the present application. The first non-associated data represents any non-associated data. The non-associated data is relatively "independent", and the change of the non-associated data will not affect other data.
[0079] If the data in the storage device is organized in the form of files, the files in the storage device include associated files and / or non-associated files. If the data in the storage device is organized in the form of objects, the objects in the storage device include associated objects and / or non-associated objects.
[0080] As shown in FIG. 1, an architecture schematic diagram of a data recovery system provided by an embodiment of the present application is shown, which includes a storage device 110 and a fusion device 120.
[0081] The storage device 110 has a storage function. The data on the storage device 110 is organized in a certain structure. The embodiment of the present application does not limit the organization manner of the data on the storage device 110. For example, the data on the storage device 110 is organized in the form of files, and the storage device 110 is deployed with a file system. For another example, the data on the storage device 110 is organized in the form of objects, and the storage device 110 is deployed with an object system.
[0082] Regardless of the organization manner of the data in the storage device 110, the data stored on the storage device 110 can form a data set, and the file system and the object system are a specific presentation form of the data set.
[0083] The storage device 110 can not only store the data set, but also create a snapshot of the stored data set and store the snapshot. In the embodiment of the present application, the storage space of the storage device 110 divided for storing the snapshot is referred to as a snapshot resource pool. The storage device 110 can pre-allocate a storage space as a snapshot storage pool. The storage device 110 stores each snapshot in the snapshot resource pool after creating the snapshot. If the storage space in the snapshot resource pool is full or the unoccupied storage space (which can also be referred to as free storage space) in the snapshot resource pool is less than a set value, the storage device 110 can expand the snapshot resource pool, i.e. increase the storage space in the snapshot resource pool. The storage device 110 can also delete part of the snapshots in the snapshot resource pool to release the storage space in the snapshot resource pool, such as deleting the first stored snapshot in the snapshot resource pool.
[0084] The storage device 110 can restore the stored data based on the snapshots in the snapshot resource pool. Taking the storage device 110 storing data in a file as an example, the storage device 110 can form a cloned file system based on one snapshot in the snapshot resource pool, and the snapshot is the state of the original file system at a time point, and the time point is the time point of the snapshot. The cloned file system is the original file system at the time point of the snapshot, that is, the cloned file system is consistent with the original file system at the time point of the snapshot. The storage device 110 restores the original file system by using the cloned file system.
[0085] When the storage device 110 stores data in an object, the storage device 110 restores data based on the data in a similar manner, and the difference is that the storage device 110 stores data in different forms.
[0086] The embodiments of the present application do not limit the specific form of the storage device 110. The storage device 110 can be a computing device with a storage function, and the computing device includes a plurality of hard disks. The storage device 110 can be a computing device cluster, and a file system or an object system is distributed in a plurality of computing devices in the computing device cluster. The storage device 110 can also be a storage system, and the storage system can be a centralized storage system or a distributed storage system.
[0087] The fusion device 120 can obtain a plurality of snapshots in the storage device 110, and fuse the plurality of snapshots into one fused snapshot. The fusion device 120 can also store the fused snapshot in the snapshot resource pool. The fusion device 120 can analyze and process the plurality of snapshots in the storage device 110, analyze the effective data in the plurality of snapshots, and restore the data set by using the effective data in the plurality of snapshots. The fusion device 120 has the following functions or all the functions:
[0088] Function 1, audit information analysis.
[0089] The fusion device 120 can collect the operation information of the data in the storage device 110, and then obtain the audit information of the storage device 110. The fusion device 120 can also obtain the audit information recorded by the storage device 110 from the storage device 110.
[0090] After obtaining the audit information, the fusion device 120 analyzes the audit information to parse at least one set of associated data in the data in the storage device 110 from the audit information.
[0091] Since the audit information is accumulated and changed along with the operation process of the data in the storage device 110, the analysis of the audit information can be performed in a cycle, such as the fusion device 120 analyzes the audit information in real time, or the fusion device 120 analyzes the audit information periodically. Through the analysis of the audit information, the associated data existing in the storage device 110 can be known, and the preparation for the subsequent snapshot fusion is made
[0092] Function two, snapshot detection.
[0093] The fusion device 120 can detect whether there is virus data (i.e. data infected by a virus) in the snapshot. After the snapshot detection of the snapshot, the fusion device 120 will mark valid data in the snapshot, and the valid data is data not infected by a virus.
[0094] In the embodiment of the present application, the data infected by a virus can be encrypted data, that is, the virus program encrypts the data. It can also be garbled data, that is, the virus program edits the data to become garbled data different from the original data. The specific way of data infected by a virus is not limited in the embodiment of the present application, and any way that the original data cannot be obtained after the operation of the data can be regarded as being infected by a virus. Snapshot detection is a pre-operation before snapshot fusion, and through snapshot detection, the safety of multiple snapshots participating in fusion can be ensured, and then the safety of the subsequent obtained fusion snapshot is ensured, that is, there is no encrypted data, and there is no virus data.
[0095] Function three, data recovery.
[0096] After the fusion device 120 obtains the valid data in multiple snapshots, the fusion device 120 can use the valid data in the multiple snapshots to recover the data set. There are many ways for the fusion device 120 to use the valid data in the multiple snapshots to recover the data set, two of which are listed here:
[0097] Recovery mode one, the fusion device 120 fuses the valid data in multiple snapshots into a candidate data set, and uses the candidate data set to replace the data set.
[0098] For the valid data in the multiple snapshots, the analysis result (i.e. whether there is associated data and the determined associated data) of the analysis of the audit information and / or the associated data list is used to determine whether the valid data of the multiple snapshots has associated data, and to determine which data is associated data.
[0099] For any set of associated data, taking the first set of associated data as an example, the fusion device 120 determines the latest version of the first set of associated data from the valid data in the plurality of snapshots, the latest version of the first set of associated data being the first set of associated data recorded in the first snapshot, the first snapshot being the first candidate snapshot with the creation time closest to the current time among the first candidate snapshots, wherein the first candidate snapshot is a snapshot in the plurality of snapshots in which the first set of associated data is valid data.
[0100] In addition, the first candidate snapshot determined by the fusion device 120 can also satisfy a first available condition, the first available condition being that the data set recorded in the first candidate snapshot supports the running of the first application. That is, the first candidate snapshot passes the availability verification.
[0101] For any non-associated data, taking the first non-associated data as an example, the fusion device 120 determines the latest version of the first non-associated data from the valid data, the latest version of the first non-associated data being the second non-associated data recorded in the second snapshot, the second snapshot being the second candidate snapshot with the creation time closest to the current time among the second candidate snapshots, wherein the second candidate snapshot is a snapshot in the plurality of snapshots in which the first non-associated data is valid data.
[0102] In addition, the second candidate snapshot determined by the fusion device 120 can also satisfy a second available condition, the first available condition being that the data set recorded in the second candidate snapshot supports the running of the second application. That is, the second candidate snapshot passes the availability verification.
[0103] After obtaining the latest versions of the sets of associated data and the latest version of the non-associated data, the fusion device 120 fuses the latest versions of the sets of associated data and the non-associated data into a candidate data set, and uses the candidate data set to restore the data set. When the fusion device 120 uses the candidate data set to restore the data set, the fusion device 120 can replace the data set with the candidate data set. The fusion device 120 can also only restore the target data in the data set that needs to be restored, that is, the fusion device 120 only restores the target data and does not process the data in the data set other than the target data. In this case, the fusion device 120 can extract the latest version of the target data from the valid data in the plurality of snapshots, and replace the target data in the data set with the latest version of the target data.
[0104] The second restoration mode is that the fusion device 120 generates a fusion snapshot based on the valid data in the plurality of snapshots, and restores the data set based on the fusion snapshot.
[0105] When the fusion device 120 fuses the multiple snapshots to obtain the fused snapshot, the fusion device 120 extracts valid data in each snapshot in the multiple snapshots. The fusion device 120 obtains the latest version of each group of associated data and the latest version of the non-associated data in the manner that the latest version of each group of associated data and the latest version of the non-associated data are obtained from the valid data in the multiple snapshots, which can be referred to the foregoing description and will not be repeated here.
[0106] After the fusion device 120 obtains the latest version of each group of associated data and the latest version of the non-associated data, the fusion device 120 generates the fused snapshot according to the latest version of each group of associated data and the latest version of the non-associated data. When the fused snapshot is generated, the latest version of each group of associated data and the latest version of the non-associated data can be fused into a candidate data set, and the candidate data set is created as a snapshot, which is the fused snapshot. When the fusion device 120 determines that the data set needs to be restored, the fusion device 120 can restore the data set based on the fused snapshot. The fusion device 120 generates a candidate data set based on the fused snapshot, and uses the candidate data set to restore the data set. The manner in which the candidate data set is used to restore the data set can be referred to the foregoing description and will not be repeated here.
[0107] It is worth noting that, from the description of the first restoring manner and the second restoring manner, it can be seen that the second restoring manner is to add the operation of generating the fused snapshot based on the first restoring manner. The existence of the fused snapshot can provide the fusion device 120 with an execution opportunity of data restoration. For example, the fusion device 120 performs the operation of generating the fused snapshot when data restoration is not needed, and stores the fused snapshot. Subsequently, if data restoration is needed, the fusion device 120 can extract the fused snapshot and perform data restoration based on the fused snapshot. That is, the second restoring manner can improve the flexibility of data restoration to a certain extent, and improve the efficiency of data restoration. In addition, the existence of the fused snapshot can also be a kind of “record” of the data set, which facilitates the query of the state of the data set at a certain time period or time point in the past through the fused snapshot. Moreover, the fused snapshot can also be used as a snapshot to continue to be fused with the snapshots created subsequently.
[0108] During the fusion of the multiple snapshots, the fusion device 120 performs different operations on different data, which can not only record the latest version of each group of associated data in the fused snapshot, ensure that the association of each group of associated data will not be destroyed, and ensure that the latest version is valid, but also ensure that the latest version of the non-associated data can be recorded in the fused snapshot. The effectiveness of the fused snapshot is ensured as a whole.
[0109] It should be noted that, in relation to the "data recovery" function, in actual application, the fusion device 120 can not have complete data recovery function, but only have part of the data recovery function. For example, the fusion device 120 can only have snapshot fusion function, that is, the fusion device 120 can generate a fusion snapshot based on valid data in multiple snapshots, after generating the fusion snapshot, the data set can be recovered based on the fusion snapshot, but the fusion snapshot is stored in the snapshot resource pool of the storage device 110. The storage device 110 can extract the fusion snapshot from the snapshot resource pool, and recover the data set based on the fusion snapshot.
[0110] Function four, snapshot availability verification.
[0111] The snapshot availability verification is mainly verification of the fusion snapshot or multiple snapshots to be fused. The availability verification is used to verify whether the data formed by the snapshot (such as the fusion snapshot or the snapshot to be fused) can support the business or can support the running of the application program.
[0112] After obtaining the fusion snapshot, the fusion device 120 constructs a data application environment, which is an application environment that needs to use the data recovered based on the fusion snapshot. The data application environment can be understood as an application program (such as the first application program and the second application program mentioned in the embodiments of the present application) that uses the data recovered based on the fusion snapshot.
[0113] The embodiments of the present application do not limit the specific form of the fusion device 120. The fusion device 120 can be a hardware device, such as a computing device, a computing device cluster, or a chip, a processor, etc. in a computing device. For example, the fusion device 120 is an external device (such as an acceleration card or an offload card) of the computing device, and the fusion device 120 can perform snapshot fusion on the snapshots in the connected computing device. The fusion device 120 can also be a software device, and the fusion device 120 can be a container or a virtual machine, etc. computing instance deployed on one or more computing devices. For example, the computing instance where the fusion device 120 is located carries a snapshot fusion service, and the storage device 110 can request to obtain the snapshot fusion service from the fusion device 120. The fusion device 120 can also be an application program deployed on a computing device. For example, the fusion device 120 is software for implementing snapshot fusion, and the software can periodically fuse the snapshots stored in the computing device where the software is located.
[0114] In the embodiment of the present application, the fusion device 120 acquires a plurality of snapshots to be fused, acquires valid data in the plurality of snapshots, recovers a data set based on the valid data in the plurality of snapshots, wherein the valid data of each snapshot is data recorded by the snapshot and not infected by a virus, and the recovered data set obtained by using the valid data in the plurality of snapshots to recover the data set contains more recently updated and valid data.
[0115] The following describes a snapshot fusion method provided by the embodiment of the present application in combination with FIG. 2, which is described by taking the data in the storage device 110 organized in files as an example. The snapshot fusion manner when the data in the storage device 110 is organized in objects or other data structures is similar to the snapshot fusion manner when the data in the storage device 110 is organized in files, and the embodiment of the present application will not be described herein.
[0116] Step 200: The fusion device 120 analyzes the audit information to determine at least one group of associated files in the storage device 110.
[0117] The embodiment of the present application does not limit the acquisition manner of the audit information. For example, the fusion device 120 has a monitoring right of the data in the storage device 110, and the fusion device 120 can record and store the audit information in the process of the data in the storage device 110 being operated. For another example, the storage device 110 is internally deployed with an audit software, the audit software monitors the operation of the data in the storage device 110, records and stores the audit information, and the fusion device 120 has an access right of the audit information and can acquire the audit information.
[0118] After the fusion device 120 acquires the audit information, the fusion device 120 analyzes the audit information. The analysis of the fusion device 120 on the audit information is to analyze the associativity between the files in the storage device 110, and to determine at least one group of associated files in the storage device.
[0119] For example, the fusion device 120 pays attention to the case that the operation of a file in the audit information causes the operation of other files, that is, when the operation of adding, deleting, modifying, etc. is performed on a file, other files also need to be adjusted accordingly, and then there is an association between the file and other files. The fusion device 120 pays attention to the case that the operation of other files fails when an error occurs in a file in the audit information, that is, when the data in a file is incorrect or damaged, the operation of adding, deleting, modifying, etc. on other files will fail, and then there is an association between the file and other files. In addition, the fusion device 120 can also pay attention to the change of the file in the audit information, such as the change of the location of the file in the file system (such as the file being moved from one directory to another directory), and the change of the file name of the file. The fusion device 120 can determine the change of each file in the associated file through the change of the file, so that the file in the associated file can be located in different cloned file systems in the subsequent process, especially for the file that has changed.
[0120] In fact, the process of analyzing the audit information by the fusion device 120 is more complex, and the above is only an example of some analysis operations that may occur in the process of analyzing the audit information.
[0121] In addition, the fusion device 120 will also perform filtering, aggregation and other preprocessing on the audit information in the process of analyzing the audit information. For example, the fusion device 120 can delete invalid information in the audit information, such as information about the revocation operation of the file, or some repeated information in the audit information. For another example, the fusion device 120 can cluster the audit information by file granularity, and aggregate the information about the same file in the audit information.
[0122] The audit information describes the operation information of the file in the storage device 110. With the operation of the file in the storage device 110, the audit information will change dynamically, and the analysis of the audit information by the fusion device 120 can be performed in a loop. The fusion device 120 can periodically analyze the audit information, or analyze the audit information when detecting that new information is added to the audit information or the added information reaches a set amount.
[0123] Step 201: The fusion device 120 receives a snapshot fusion instruction, which is used to indicate the fusion of multiple snapshots.
[0124] There are many sources of the snapshot fusion instruction, and the following lists several cases in which the fusion device 120 obtains the snapshot fusion instruction:
[0125] Case one: The user triggers the snapshot fusion instruction.
[0126] Example 1: facing the user, the fusion device 120 can provide a snapshot fusion interface, through which the user sends a snapshot fusion instruction to the fusion device 120.
[0127] The snapshot fusion interface refers to the function provided by the fusion device 120 to the user, that is, the fusion device 120 has the ability to provide snapshot fusion to the user, and the embodiment of the present application does not limit the specific form of the snapshot fusion interface. The snapshot fusion interface can be embodied as a preset instruction format, and the instruction conforming to the instruction format is the snapshot fusion instruction, which can be sent by the user to the fusion device 120 through the computing device deployed on the user side. The snapshot fusion interface can also be embodied as a visual user interface, in which the user can trigger the snapshot fusion instruction by operation.
[0128] As shown in FIG. 3, the snapshot fusion interface provided by the embodiment of the present application, in which the user can view the created snapshots and the time points of each snapshot. The snapshot fusion interface provides two snapshot fusion options, the first snapshot fusion option is the default snapshot fusion option, which indicates that the multiple snapshots created recently and the number of snapshots equal to the default value will be fused. The second snapshot fusion option is the user-defined snapshot fusion option, which indicates that the multiple snapshots selected by the user will be fused.
[0129] When the user clicks the default snapshot fusion option, the snapshot fusion instruction is triggered, which indicates that the multiple snapshots will be fused, wherein the multiple snapshots are the multiple snapshots created recently and the number of snapshots equal to the default value.
[0130] When the user clicks the user-defined snapshot fusion option, the snapshot fusion instruction is triggered, which indicates that the multiple snapshots will be fused, wherein the multiple snapshots are the multiple snapshots selected by the user.
[0131] Example 2: facing the user, the fusion device 120 can provide a data recovery interface, through which the user sends a data recovery instruction to the fusion device 120, which is used to instruct multiple snapshots to recover the file system.
[0132] The fusion device 120 splits the data recovery instruction into two instructions, one of which is a snapshot fusion instruction, which indicates that multiple snapshots will be fused, and the multiple snapshots can be the multiple snapshots created recently and the number of snapshots equal to the set value. One is a snapshot recovery instruction, which indicates that the data is recovered based on the fused snapshot.
[0133] Similar to the snapshot fusion interface, embodiments of the present application do not limit the specific form of the data recovery interface. The specific form of the data recovery interface is similar to the specific form of the snapshot fusion interface, and specific reference can be made to the foregoing description, which will not be repeated here.
[0134] As described in FIG. 4, the snapshot viewing interface provided by embodiments of the present application, in which the user can view the created snapshots and the time points of each snapshot. The snapshot viewing interface provides a data recovery option. In addition, the data recovery option also allows setting the number of snapshots, that is, allows configuring the specific value of the set value.
[0135] When the user clicks the data recovery option, a data recovery instruction is triggered, which is used to instruct multiple snapshots to recover data, the number of the multiple snapshots being equal to the set value.
[0136] Case two, the storage device 110 sends a snapshot fusion instruction to the fusion device 120.
[0137] The storage device 110 can periodically create snapshots for the deployed file system, or can create snapshots for the deployed file system under the trigger of the user.
[0138] The storage device 110 can arrange the snapshots in the snapshot resource pool, such as deleting multiple snapshots, and store the fusion snapshot formed based on the multiple snapshots. In this case, the storage device 110 can send a snapshot fusion instruction to the fusion device 120, which can carry the multiple snapshots or the identification of the multiple snapshots. The identification of the snapshot is information configured by the storage device 110 for uniquely identifying the snapshot, and the identification of the snapshot is identifiable by the storage device 110 and the fusion device 120.
[0139] The storage device 110 can also restore the file system (i.e., the original file system) under the trigger of the user. For example, the storage device 110 receives an instruction triggered by the user, instructing to restore the file system. After receiving the instruction triggered by the user, the storage device 110 can send a snapshot fusion instruction to the fusion device 120, instructing the fusion device 120 to fuse multiple snapshots. The snapshot fusion instruction can carry the multiple snapshots or the identification of the multiple snapshots. The storage device 110 obtains the fusion snapshot generated by the fusion device 120 by sending the snapshot fusion instruction, and restores the file system based on the fusion snapshot.
[0140] The storage device 110 can also determine by itself that the file system needs to be recovered, for example, during the running of the storage device 110, file access operations always fail, such as the failure frequency is greater than a frequency threshold value, or the number of failures is greater than a number threshold value. When the storage device 110 determines that the file system needs to be recovered, the storage device 110 can send a snapshot fusion instruction to the fusion device 120, instructing the fusion device 120 to fuse a plurality of snapshots to obtain a fusion snapshot generated by the fusion device 120, and recover the file system based on the fusion snapshot.
[0141] Case three, the storage device 110 sends a data recovery instruction to the fusion device 120.
[0142] When the storage device 110 determines that the file system needs to be recovered, the storage device 110 can send a data recovery instruction to the fusion device 120. The data recovery instruction is used to instruct the recovery of the file system. The scenario in which the storage device 110 determines that the file system needs to be recovered can be referred to the related description of case two, and will not be described here.
[0143] The fusion device 120 splits the data recovery instruction into two instructions, one of which is a snapshot fusion instruction, which instructs the fusion of a plurality of snapshots. The plurality of snapshots can be a plurality of snapshots created recently, and the number of snapshots is equal to a set value. One is a snapshot recovery instruction, which instructs the recovery of data based on the fusion snapshot.
[0144] Case four, the fusion device 120 generates a snapshot fusion instruction by itself.
[0145] The fusion device 120 can actively fuse the snapshots in the snapshot resource pool, for example, the fusion device 120 can periodically access the snapshot resource pool, and when it is determined that the number of newly created snapshots in the snapshot resource pool reaches a set value, the fusion device 120 generates a snapshot fusion instruction by itself, and fuses a plurality of snapshots. The plurality of snapshots are the newly created snapshots. That is, the fusion device 120 can fuse a plurality of snapshots whose time points are close and the number of snapshots is equal to the set value.
[0146] The above only lists a few cases in which the fusion device 120 receives a snapshot fusion instruction. The snapshot fusion instruction received by the fusion device 120 does not carry a plurality of snapshots to be fused (such as only carrying the identification of a plurality of snapshots), and the fusion device 120 can perform step 202. If the snapshot fusion instruction received by the fusion device 120 carries a plurality of snapshots to be fused, the fusion device 120 can directly perform step 203.
[0147] Step 202: The fusion device 120 accesses the snapshot resource pool and obtains a plurality of snapshots to be fused from the snapshot resource pool.
[0148] The fusion device 120 has access permission of the snapshot resource pool, and the fusion device 120 acquires the plurality of snapshots to be fused from the snapshot resource pool after receiving the snapshot fusion instruction.
[0149] For example, the storage device 110 and the fusion device 120 are deployed in different computing devices, the storage device 110 sets the snapshot resource pool in the memory, and the fusion device 120 can access the snapshot resource pool in an RDMA manner. For another example, the storage device 110 and the fusion device 120 are deployed in the same computing device, the snapshot resource pool is set in the memory of the computing device, and the fusion device 120 can acquire the plurality of snapshots to be fused from the memory in a DMA manner.
[0150] Step 203: The fusion device 120 detects the plurality of snapshots to be fused, and determines valid files in the plurality of snapshots.
[0151] After acquiring the plurality of snapshots to be fused, the fusion device 120 detects any snapshot, determines whether there is a file infected by a virus in the snapshot, and the files in the snapshot except the file infected by the virus are valid files in the snapshot. Of course, the snapshot can also record a virus file, and the virus file refers to a file carrying a virus, and the valid files in the snapshot refer to the files in the snapshot except the file infected by the virus and the virus file.
[0152] The process of detecting the snapshot by the fusion device 120 is introduced below.
[0153] Step 1: Forming a clone file system based on the snapshot. The present application does not limit the execution subject of the step 1, and the step 1 can be executed by the storage device 110, that is, the fusion device 120 can request the storage device 110 to form a clone file system based on the snapshot first, and acquire the clone file system from the storage device 110. The step 1 can also be executed by the fusion device 120, that is, the fusion device 120 directly forms a clone file system based on the snapshot first.
[0154] Step 2: The fusion device 120 detects each file in the clone file system, and determines whether there is a file infected by a virus and whether there is a virus file.
[0155] Step 3: The fusion device 120 labels valid files in the clone file system. In the step 3, the fusion device 120 can label the files except the virus file and the file infected by the virus as valid files. The fusion device 120 can also label the virus file and the file infected by the virus as invalid files, and then the files except the invalid files are valid files.
[0156] Step 204: For any snapshot to be merged, the merging device 120 performs availability verification on the snapshot, which is an optional step. The merging device 120 can perform the step or skip the step and directly perform step 205.
[0157] For any snapshot to be merged, after obtaining the cloned file system formed based on the snapshot, the merging device 120 can construct an application environment of the cloned file system, simulate various operations that need to be performed on the original file system in the application environment, and detect whether the cloned file system can normally perform the various operations in the application environment.
[0158] As described above in the description of the data application environment, in step 204, the merging device 120 can run an application program that needs to use the cloned file system or files therein. The present embodiment does not limit the number and types of the application program. Any application program that needs to use the cloned file system or files therein during running is applicable to the present embodiment. Such an application program uses the cloned file system or files therein during running and performs various operations on the cloned file system or files therein. If such an application program can normally use the cloned file system or files therein and normally perform various operations without operation failure, it is indicated that the cloned file system formed based on the snapshot is available and can support running of the application program or be used in the application environment. If such an application program cannot normally use the cloned file system or files therein and there is operation failure, it is indicated that the cloned file system formed based on the snapshot is not available and cannot support running of the application program or be used in the application environment.
[0159] Taking a database management software as an example, in step 204, the merging device 120 can mount the cloned file system on a host and run the database management software on the host. The database management software performs operations on data in the cloned file system, such as adding, deleting, searching, modifying, merging, compressing, and the like. If the database management software runs normally and each operation is performed normally, it is indicated that the cloned file system is available, otherwise, the cloned file system is not available.
[0160] When the application environment of the cloned file system is constructed, the first application program is run, and the available files in the snapshot are the files in the snapshot that support running of the first application program. When the application environment of the cloned file system is constructed, the second application program is run, and the available files in the snapshot are the files in the snapshot that support running of the second application program.
[0161] Step 203 verifies the files in the snapshot from a data perspective to determine the valid files in the snapshot. Step 204 verifies the files in the snapshot from an application perspective to determine the usability of the files in the snapshot. These two preliminary operations can effectively ensure the validity and usability of the subsequent merged snapshot, that is, ensure that the files in the merged snapshot are valid and usable.
[0162] Step 205: The fusion device 120 merges the multiple snapshots to obtain a merged snapshot. If steps 203 and 204 have been executed, the multiple snapshots in step 205 are snapshots containing valid files and that have passed availability verification. In this case, the valid files in the snapshot are also usable files because they have passed availability verification, meaning they can support the operation of the application (such as the first application or the second application). If step 203 has been executed, the multiple snapshots in step 205 are snapshots containing valid files.
[0163] The process of step 205 performed by the fusion device 120 is described below:
[0164] Step 2051: The fusion device 120 determines the valid files in the cloned file system formed based on each snapshot. That is, the fusion device 120 can determine the files in each cloned file system that are not infected by the virus.
[0165] From the perspective of file association, files are divided into associated files and non-associated files. For associated files, the fusion device 120 can determine at least one set of associated files existing in the storage system based on the analysis and / or the list of associated files in step 200.
[0166] Method 1: The fusion device 120 analyzes the audit information to determine at least one set of associated files within the storage device 110. For details on the implementation, please refer to the relevant description in step 200; it will not be repeated here.
[0167] Method 2: The fusion device 120 determines at least one set of associated files within the storage device 110 based on the associated file list. If the analysis based on audit information fails to obtain the at least one set of associated files, or if step 200 is not executed, the fusion device 120 can determine at least one set of associated files within the storage device 110 based on the associated file list. That is, the at least one set of associated files is a group of files recorded in the associated file list and included in the file system.
[0168] Method 3: The fusion device 120 determines at least one set of associated files within the storage device 110 based on audit information and a list of associated files.
[0169] For convenience of description, in this mode, at least one set of associated files determined by the fusion device 120 based on the audit information is referred to as at least one first candidate set of associated files, and one first candidate set of associated files is a set of associated files. At least one set of associated files determined by the fusion device 120 based on the associated file list is referred to as at least one second candidate set of associated files, and one second candidate set of associated files is a set of associated files. For any first candidate set of associated files and any second candidate set of associated files, there can be two states as follows:
[0170] (1) There are the same files in the first candidate set of associated files and the second candidate set of key files.
[0171] In this case, it is indicated that the first candidate set of associated files and the second candidate set of key files both contain one or more files, and a set of associated files can be determined based on the first candidate set of associated files and the second candidate set of key files. The set of associated files includes all files in the first candidate set of associated files and the second candidate set of key files.
[0172] For example, the first candidate set of associated files includes file A and file B, and the second candidate set of key files includes file B and file C. Therefore, there is the same file B in the first candidate set of associated files and the second candidate set of key files. It can be determined that there is an association relationship among file A, file B and file C, that is, file A, file B and file C form a set of associated files.
[0173] (2) There are no same files in the first candidate set of associated files and the second candidate set of key files.
[0174] In this case, it is indicated that the files included in the first candidate set of associated files and the second candidate set of key files are different. Then, the first candidate set of associated files can be used as a set of associated files, and the second candidate set of associated files can also be used as a set of associated files.
[0175] Files other than associated files are non-associated files. For example, the data in the associated files is structured data, such as a data table, etc.; and the data in the non-associated files is unstructured data, such as pictures, audio and video, PDF documents, and WORD documents.
[0176] For any set of associated files, for convenience of description, the any set of associated files is referred to as a first set of associated files. The fusion device 120 can perform steps 2052-2053. For any non-associated file, for convenience of description, the any non-associated file is referred to as a first non-associated file. The fusion device 120 performs step 2054.
[0177] Step 2052: The fusion device 120 determines a first candidate snapshot. The first candidate snapshot is a snapshot in which the first set of associated files are valid files in the plurality of snapshots. That is, the first set of associated files exist in the cloned file system formed based on the first candidate snapshot, and the first set of associated files belong to valid files. Embodiments of the present application do not limit the number of the first candidate snapshot, which can be one or multiple.
[0178] For the same set of associated files, the first set of associated files can exist in multiple cloned file systems, and the first set of associated files in each cloned file system is a version of the first set of associated files.
[0179] For example, currently, four snapshots to be fused are snapshot A, snapshot B, snapshot C, and snapshot D; and the cloned file systems formed based on the four snapshots are cloned file system A, cloned file system B, cloned file system C, and cloned file system D, respectively. A set of associated files includes three files, namely file 1, file 2, and file 3, and the first set of associated files is identified as file 1-2-3.
[0180] The file 1-2-3 exists in the cloned file system A, and the file 1-2-3 belongs to valid files. The file 1-2-3 in the cloned file system is a version of the file 1-2-3, which is identified as file 1-2-3
Ver-A
[0181] The file 1-2-3 exists in the cloned file system B, and the file 1-2-3 belongs to valid files. The file 1-2-3 in the cloned file system is a version of the file 1-2-3, which is identified as file 1-2-3
Ver-B
[0182] The file 1-2-3 exists in the cloned file system C, but the file 1-2-3 does not belong to valid files (for example, part or all of the file 1-2-3 is encrypted or infected by a virus), and the file 1-2-3 in the cloned file system C is not located. The snapshot C based on which the cloned file system C is formed is not the first candidate snapshot.
[0183] The file 1-2-3 exists in the cloned file system D, and the file 1-2-3 belongs to valid files. The file 1-2-3 in the cloned file system is a version of the file 1-2-3, which is identified as file 1-2-3
Ver-D
[0184] Step 2053: The fusion device 120 determines the latest version of the first set of associated files. The latest version of the first set of associated files is the first set of associated files recorded in the first snapshot, which is the first candidate snapshot whose time point is closest to the current time among the first candidate snapshots determined in step 2501. The first set of associated files recorded in the first candidate snapshot is essentially the first set of associated files contained in the cloned file system formed based on the first candidate snapshot.
[0185] Still taking snapshot A, snapshot B, snapshot C, snapshot D and file 1-2-3 as an example, three first candidate snapshots are determined in step 2052, which are snapshot A, snapshot B and snapshot D. The time point of snapshot D among the three snapshots is closest to the current time point, so file 1-2-3
Ver-D
[0186] Steps 2052-2053 are performed for each set of associated files, and the latest version of each set of associated files is determined through steps 2052-2053.
[0187] It should be noted that if the fusion device 120 performs step 204 and runs the first application in the application environment for building the cloned file system, when determining the first candidate snapshot, the first candidate snapshot that meets the first available condition needs to be determined. The first available condition is that the cloned file system recorded in the first candidate snapshot supports the running of the first application.
[0188] Step 2054: The fusion device 120 determines the latest version of the non-associated file.
[0189] Step 2054 can also be divided into two steps. First, the fusion device 120 determines the second candidate snapshot. The second candidate snapshot is the snapshot in which the first non-associated file belongs to the valid file among the plurality of snapshots. The fusion device 120 can determine one second candidate snapshot, or determine a plurality of second candidate snapshots. Then, the fusion device 120 determines the latest version of the first non-associated file from the second candidate snapshot. The latest version of the first non-associated file is the first non-associated file recorded in the second snapshot, which is the second candidate snapshot whose time point is closest to the current time among the determined second candidate snapshots. The first non-associated file recorded in the second candidate snapshot is essentially the first non-associated file contained in the cloned file system formed based on the second candidate snapshot.
[0190] Still taking snapshot A, snapshot B, snapshot C, snapshot D as an example, the non-associated file is identified as file 4.
[0191] The file 4 exists in the clone file system A, and the file 4 is a valid file. The file 4 in the clone file system is a version of the file 4, which is identified as file 4
Ver-A
[0192] The file 4 exists in the clone file system B, and the file 4 is a valid file. The file 4 in the clone file system is a version of the file 4, which is identified as file 4
Ver-B
[0193] The file 4 exists in the clone file system C, and the file 4 is a valid file. The file 4 in the clone file system is a version of the file 4, which is identified as file 4
Ver-C
[0194] The file 1-2-3 exists in the clone file system D, and the file 1-2-3 is not a valid file. The file 4 in the clone file system D is not located. The snapshot D on which the clone file system D is based is not the second candidate snapshot.
[0195] The snapshot A, the snapshot B, and the snapshot C are the second candidate snapshots. The time point of the snapshot C in the three snapshots is closest to the current time point. Therefore, the file 4
Ver-C
[0196] The step 2054 is performed for each non-associated file. The latest version of each non-associated file is determined through the step 2054.
[0197] It should be noted that, if the fusion device 120 performs the step 204, and the second application program is run in the application environment in which the clone file system is constructed, the second application program can be the same as the first application program, or can be different from the second application program. When the second candidate snapshot is determined, a first candidate snapshot that satisfies a second available condition needs to be determined. The second available condition is that the clone file system recorded by the second candidate snapshot supports the running of the second application program.
[0198] The step 2055: The fusion device 120 constructs a file system based on the latest version of each group of associated files and the latest version of each non-associated file. For the convenience of description, the file system is referred to as a candidate file system.
[0199] The fusion device 120 organizes the latest version of each group of associated files and the latest version of each non-associated file to form a candidate file system. For any group of associated files, the location of the latest version of the group of associated files in the candidate file system is consistent with the location of the latest version of the group of associated files in the cloned file system to which the group of associated files belongs. For any non-associated file, the location of the latest version of the non-associated file in the candidate file system is consistent with the location of the latest version of the non-associated file in the cloned file system to which the non-associated file belongs.
[0200] Still taking snapshot A, snapshot B, snapshot C, snapshot D, file 1-2-3, and file 4 as examples, in the cloned file system A, file 1-2-3 is located in directory 1-1, in the cloned file system B, file 1-2-3 is located in directory 1-2, and in the cloned file system D, file 1-2-3 is located in directory 1-2, that is, during the period from creating snapshot A to creating snapshot D, the location of file 1-2-3 in the original file system has changed. The location of the latest version of file 1-2-3 in the candidate file system needs to be consistent with the location of file 1-2-3 in the cloned file system D, that is, it needs to be located in directory 1-2.
[0201] In the cloned file system A, file 4 is located in directory 1-2, in the cloned file system B, file 4 is located in directory 1-2, in the cloned file system C, file 4 is located in directory 1-2, and in the cloned file system D, file 4 is located in directory 1-1, that is, during the period from creating snapshot A to creating snapshot D, the location of file 4 in the original file system has changed. The location of the latest version of file 4 in the candidate file system needs to be consistent with the location of file 4 in the cloned file system C, that is, it needs to be located in directory 1-2.
[0202] Step 2056: The fusion device 120 creates a snapshot for the candidate file system, and the snapshot is a fusion snapshot, and the candidate file system is a cloned file system formed based on the fusion snapshot.
[0203] Step 206: The fusion device 120 performs availability verification on the fusion snapshot. The fusion device 120 performs availability verification on the fusion snapshot in a manner similar to that of the fusion device 120 performing availability verification on the snapshot, and details can be referred to the related description of step 204, which will not be repeated here.
[0204] After the availability verification of the fusion snapshot is passed, the fusion snapshot is obtained, and the processing manner of the fusion device 120 on the fusion snapshot is related to the manner in which the fusion device 120 receives the snapshot fusion instruction.
[0205] Case one, the user triggers the snapshot fusion instruction.
[0206] After the fusion device 120 acquires the fusion snapshot, if the user directly triggers the snapshot fusion instruction, the fusion device 120 can show the user the fusion snapshot, for example, the fusion device 120 can prompt the user that the snapshot fusion is completed in the snapshot fusion interface, and show the fusion snapshot. For another example, the fusion device 120 can notify the user that the snapshot fusion is completed through a short message, an email, an in-application information reminder, and the like, and inform the user of a website for viewing the fusion snapshot.
[0207] If the user triggers the data recovery instruction, since the fusion device 120 has generated the candidate file system in the process of acquiring the fusion snapshot, the fusion device 120 can recover the file system (that is, the original file system) by using the candidate file system, for example, replace the file system by using the candidate file system, or replace a target file in the original file system that needs to be recovered by a target file in the candidate file system. After the fusion device 120 acquires the fusion snapshot, the fusion device 120 can show the user the fusion snapshot and / or the candidate file system, for example, the fusion device 120 can prompt the user that the data recovery is completed in the snapshot viewing interface, and show the fusion snapshot and / or the candidate file system. For another example, the fusion device 120 can notify the user that the data recovery is completed through a short message, an email, an in-application information reminder, and the like, and inform the user of a website for viewing the fusion snapshot and / or the candidate file system.
[0208] If the fusion device 120 does not obtain the fusion snapshot, the fusion device 120 can notify the user that the snapshot fusion fails or the data recovery fails, and inform the user of a reason for the failure, for example, all the snapshots to be fused are invalid, or the fusion snapshot fails the availability verification.
[0209] Case two, the storage device 110 sends a snapshot fusion instruction to the fusion device 120.
[0210] After the fusion device 120 acquires the fusion snapshot, the fusion device 120 can send the fusion snapshot to the storage device 110, or store the fusion snapshot to a snapshot resource pool and inform the storage device 110 that the snapshot fusion is completed.
[0211] If the fusion device 120 does not obtain the fusion snapshot, the fusion device 120 can notify the storage device 110 that the snapshot fusion fails, and inform the user of a reason for the snapshot fusion failure, for example, all the snapshots to be fused are invalid, or the fusion snapshot fails the availability verification. The storage device 110 can reinitiate the snapshot fusion instruction to instruct the fusion device 120 to fuse other selected snapshots.
[0212] Case three, the storage device 110 sends a data recovery instruction to the fusion device 120.
[0213] Since the fusion device 120 has generated the candidate file system in the process of obtaining the fusion snapshot, the fusion device 120 can restore the file system (i.e., the original file system) by using the candidate file system, for example, by replacing the file system with the candidate file system, or by replacing the target file in the original file system that needs to be restored with the target file in the candidate file system.
[0214] After obtaining the fusion snapshot, the fusion device 120 can store the fusion snapshot in the snapshot resource pool of the storage device 110. Optionally, the fusion device 120 can also notify the storage device 110 that the fusion snapshot has been stored in the storage resource pool.
[0215] Case four: The fusion device 120 generates the snapshot fusion instruction by itself.
[0216] After obtaining the fusion snapshot, the fusion device 120 stores the fusion snapshot in the snapshot resource pool, and can also delete the multiple snapshots in the snapshot resource pool on which the fusion snapshot is based.
[0217] If the fusion device 120 does not obtain the fusion snapshot, the fusion device 120 can reacquire multiple snapshots (which can be different or partially different from the previously acquired multiple snapshots) from the snapshot resource pool, and obtain the fusion snapshot based on the acquired multiple snapshots.
[0218] It should be noted that in the foregoing description, the fusion device 120 generates the fusion snapshot and then restores the file system is taken as an example for description. In actual application, the fusion snapshot can be restored after step 2055 is executed, i.e., after step 2025 is executed, the candidate file system is obtained, and the candidate file system is used to restore the file system. For example, when the fusion device 120 determines that the file system needs to be restored, such as when the received fingerprint is a data recovery instruction, the fusion device 120 can obtain the candidate file system and restore the file system by using the candidate file system after step 2055 is executed. The fusion device 120 can execute step 2056 and step 206, or can not execute step 2056 and step 206. If the fusion device 120 generates the fusion snapshot (i.e., step 2056 is executed), the fusion snapshot can be saved as a record of the candidate file system, and the fusion snapshot can be used to restore the file system when the file system needs to be restored again in the future. In addition, the fusion snapshot is also convenient for viewing the historically existing file system (i.e., the candidate file system). Moreover, after the fusion snapshot is generated, a new snapshot is created, and the fusion snapshot can also be used as a to-be-fused snapshot to continue fusion with the new snapshot to generate a new fusion snapshot.
[0219] The following is a snapshot fusion method provided by the embodiment of the present application. The scene is introduced as follows:
[0220] Scenario one, data recovery in the storage device.
[0221] As shown in FIG. 5, it is a structural schematic diagram of a storage device. The storage device 110 and the fusion device 120 are both deployed in the storage device. As shown in FIG. 5, the storage device 130 at least includes a processor 132, a memory 133, a network card 134 and a hard disk 135. The processor 132, the memory 133, the network card 134 and the hard disk 135 are connected through a bus.
[0222] The processor 132 can be a central processing unit (CPU) or other specific integrated circuits. The processor 201 can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 132 is the main processing core inside the storage device, processes data access requests from the outside, accesses data in the storage device 130, such as writing data into the storage device 130 (such as the hard disk 135 or the memory 133) or reading data from the storage device 130, and can also maintain the data stored in the storage device 130, such as updating the metadata of the data, completing the persistence of the data, backing up the data, etc.
[0223] The memory 133 refers to an internal memory that exchanges data directly with the processor. The memory 133 can be a dynamic random access memory (DRAM). In addition to the DRAM, the memory 133 can also be other random access memories, such as a static random access memory (SRAM), etc. In addition, the memory 133 can also be a read only memory (ROM). For the read only memory, for example, it can be a programmable read only memory (PROM), an erasable programmable read only memory (EPROM), etc. The memory 202 can also be a FLASH medium, a hard disk drive (HDD), or a solid state disk (SSD), etc.
[0224] The network card 134 can be used to communicate with devices other than the storage device 130, and receive data access requests from the outside.
[0225] The hard disk 135 is used to provide storage resources, such as storing data. It can be a magnetic disk or other types of storage media, such as a solid state disk or a shingled magnetic recording hard disk, etc. Based on the plurality of hard disks 135, a plurality of storage pools can be formed.
[0226] For example, the storage device 130 has a file system deployed thereon, and the files in the file system are stored in the hard disk 135 in the storage device 130. The processor 132 in the storage device 130 can create a snapshot for the file system and store the snapshot in a snapshot resource pool, which can be located in the memory 133 or the hard disk 135. The processor 132 in the storage device 130 also has the function of the fusion device 120, and after receiving a snapshot fusion instruction or a data recovery instruction triggered by a user through the network card 134, the processor 132 can access the snapshot storage pool, obtain a plurality of snapshots from the snapshot storage pool, and perform steps 202-206 in the embodiment shown in FIG. 2 or perform steps 202-205 (i.e., not perform step 2025 and step 206). After performing step 2025, the processor 132 recovers the file system deployed on the storage device 130 by using the candidate file system (in the case of receiving a data recovery instruction triggered by a user). The processor 132 can perform step 2025 (optionally, also perform step 206) or not perform step 2025 and step 206.
[0227] In the case of receiving a snapshot fusion instruction triggered by a user, the processor 132 stores the fusion snapshot in the snapshot resource pool after obtaining the fusion snapshot, and can transmit the fusion snapshot to the user (in the case of receiving a snapshot fusion instruction or a data recovery instruction triggered by a user). When the file system needs to be recovered later, the processor 132 can also recover the file system deployed on the storage device 130 by using the candidate file system (in the case of receiving a data recovery instruction triggered by a user).
[0228] The processor 132 can also determine when to perform data recovery on the file system deployed on the storage device 130 by itself, such as detecting that the number of failures of performing operations on files in the file system exceeds a threshold. When the processor 132 determines that the file system needs to be recovered, the processor 132 performs steps 202-205 in the embodiment shown in FIG. 2. The processor 132 can perform step 2025 (optionally, also perform step 206) or not perform step 2025 and step 206.
[0229] Scenario two, supporting the snapshot fusion function of the computing device in the form of an external device.
[0230] As shown in FIG. 6, a structural schematic diagram of a computing device 140 provided by an embodiment of the present application is shown, the computing device 140 comprising an I / O interface 141, a processor 142, a memory 143, and an external device 144. The I / O interface 141, the processor 142, the memory 143, and the external device 144 can be connected through a system bus, which can be a peripheral component interconnect express (PCIe) bus, or a compute express link (CXL) bus, a universal serial bus (USB) protocol bus, or other protocol bus.
[0231] FIG. 6 exemplarily shows one of the connection manners, in which the external device 144 can be directly plugged into a card slot on a mainboard of the computing device 140, and exchange data with the processor 142 through a PCIe bus 340.
[0232] The I / O interface 141 is configured to communicate with devices outside the computing device 140. For example, the I / O interface 141 can receive a data access request, a snapshot fusion instruction, or a data recovery instruction sent by a device outside the computing device 140, or feed back a fused snapshot, a file in an original file system, or a file in a candidate file system to the device outside the computing device 140.
[0233] The processor 142 is the operation core and control core of the computing device 140. The specific type of the processor 142 is the same as that of the processor 132, and details are as described above.
[0234] The memory 143 is usually used to store computer program instructions. The memory 143 can also be used to temporarily store data. The specific type of the memory 143 is the same as that of the memory 133, and details are as described above.
[0235] The processor 142 is connected to the memory 143 through a double data rate (DDR) bus or other types of buses. The memory 143 is understood as the memory of the computing device 140.
[0236] Although not shown, the computing device 140 also includes persistent storage, or there is storage that the computing device 140 can access remotely, whether persistent storage or remotely accessed storage, that can expand the storage of the computing device 140, whether persistent storage or remotely accessed storage, for storing data, such as files in a file system. The storage that the computing device 140 can access remotely can be storage that is connected to the computing device 140 over a network, and that is external to the computing device 140. The storage can be volatile memory, such as RAM, DRAM, SCM, SRAM. It can also be non-volatile memory, such as ROM, flash memory, HDD, SSD, SCM, etc.
[0237] The persistent storage included in the computing device 140 can be connected to the computing device 140 through a system bus. The persistent storage can be non-volatile memory, such as ROM, flash memory, HDD, SSD, etc.
[0238] Inside the computing device 140, the processor 142 in the computing device 140 can access the persistent storage, and store the accessed data in the memory 143. In some cases, such as when the external device 144 offloads part of the functions of the processor 142, the external device 144 can access the persistent storage, obtain the data stored in the persistent storage, and store the accessed data in the memory 143 or in the external device 144; the external device 144 can also access the memory 143, and obtain the data in the memory 143.
[0239] In the embodiments of the present application, the computing device 140 has the functions of the storage device 110 and the fusion device 120, and can perform the steps performed by the storage device 110 and the fusion device 120 in the embodiments shown in FIG. 2.
[0240] Inside the computing device 140, the processor 142 can perform all the steps performed by the storage device 110 in the embodiments shown in FIG. 2 by invoking the computer program instructions in the memory 143. The external device 144 performs all the steps performed by the fusion device 120 in the embodiments shown in FIG. 2.
[0241] In FIG. 6, the external device 144 is connected to the computing device 140, and the external device 144 can serve as the external device of the computing device 140; the external device 144 can also be deployed inside the computing device 140, such as being located on the motherboard or backplane of the computing device 140. FIG. 6 is a schematic diagram of the external device 144 deployed inside the computing device 140.
[0242] The external device 144 can be a module with data processing function attached to the computing device 140, and undertake part of the functions of the computing device 140 (the processor 142). That is, part of the functions of the computing device 140 are offloaded to the external device 144, and the external device 144 processes data and performs part of the tasks instead of the computing device 140 (such as the processor 142 in the computing device 140) to reduce the pressure of the processor 142 in the computing device 140 and release the computing power of the processor 142.
[0243] In the embodiments of the present application, the external device 144 can undertake the function of snapshot fusion. The external device 144 includes a processing module 1441 and a memory 1442, although not shown, the external device 144 can also include a power supply circuit. The processing module can be a data processing unit (DPU), and the processing module 1441 can also be other general-purpose processors, DSPs, ASICs, FPGAs or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processing module 1441 is connected with the memory 1442 through a system bus, which can be a PCIe-based line, or a CXL, USB protocol or other protocol bus. The memory 1442 provides storage space for the processing module 1441 to store data, and the specific type and function of the memory 1442 are similar to those of the memory 143, and specific reference can be made to the foregoing description, which will not be repeated here.
[0244] The processing module 1441 is the main arithmetic unit of the external device 144, and the processing module 1441 undertakes the main function of the external device 144. For example, the processing module 1441 can be used to undertake the function offloaded by the processor 142 to the external device 144.
[0245] In the embodiments of the present application, the specific form of the external device 144 in the computing device 140 is not limited, and the external device 144 can be deployed in the computing device 140 in the form of an offload card or an acceleration card. The external device 144 can also be a smart network card, which can not only undertake the function offloaded by the processor 142, but also has the function of a network card, that is, the external device 144 can complete the processing of data packets based on network protocols, such as implementing data encapsulation, transmission, etc., and data transmission with devices other than the computing device 140 (that is, the external device 144 implements the function of the I / O interface mentioned above).
[0246] For example, in the case of a file system deployed on the computing device 140, the files in the file system within the computing device 140 are stored in the persistent storage of the computing device 140. The processor 142 within the computing device 140 can create a snapshot for the file system and store the snapshot in a snapshot resource pool, which can be located in the memory 143 or the persistent storage. The processor 142 within the computing device 140 has the function of the storage apparatus 110, and after receiving a snapshot fusion instruction or a data recovery instruction triggered by a user, the processor 142 can transmit the snapshot fusion instruction formed by splitting the received snapshot fusion instruction or data recovery instruction to the external device 144. After receiving the snapshot fusion instruction, the external device 144 accesses the snapshot storage pool, obtains a plurality of snapshots from the snapshot storage pool, executes steps 202-206 in the embodiment shown in FIG. 2, and stores the fusion snapshot in the snapshot resource pool after obtaining the fusion snapshot. The processor 142 obtains the fusion snapshot from the snapshot resource pool, forms a target cloned file system based on the fusion snapshot, and recovers the file system deployed on the computing device 140 by using the candidate file system (in the case of receiving a data recovery instruction triggered by a user).
[0247] The processor 142 can also decide to obtain a fusion snapshot or start a data recovery process by itself. In this case, the processor 142 generates a snapshot fusion instruction by itself, transmits the snapshot fusion instruction generated by itself to the external device 144, and the external device 144 accesses the snapshot storage pool after receiving the snapshot fusion instruction, obtains a plurality of snapshots from the snapshot storage pool, executes steps 202-206 in the embodiment shown in FIG. 2, and stores the fusion snapshot in the snapshot resource pool after obtaining the fusion snapshot. The processor 142 obtains the fusion snapshot from the snapshot resource pool, forms a target cloned file system based on the fusion snapshot, and recovers the file system deployed on the computing device 140 by using the candidate file system.
[0248] The foregoing description is only an example in which the external device has a snapshot fusion function. In actual applications, the external device 144 can have a data recovery function. After receiving the data recovery instruction transmitted by the processor 142, the external device 144 can execute steps 202-205 in the embodiment shown in FIG. 2 (i.e., steps 2025 and 206 can not be executed), and recover the file system after obtaining the candidate file system. The external device 144 can execute step 2025 (optionally, step 206 can also be executed), and store the fusion snapshot in the snapshot resource pool after obtaining the fusion snapshot. The external device 144 can also not execute steps 2025 and 206.
[0249] The external device 144 can also determine when to perform data recovery on the file system deployed on the computing device 140, such as detecting that the number of failures to perform operations on files in the file system exceeds a threshold. When the external device 144 determines that data recovery on the file system is needed, the external device 144 performs the steps 202-205 in the embodiment shown in FIG. 2. The processor 142 can or can not perform the step 2025 (and also the step 206).
[0250] Scenario three, a system including multiple computing devices supports data recovery functions.
[0251] The present application also provides a computing device system including at least one computing device 700 as shown in FIG. 7. The computing device 700 includes a bus 701, a processor 702, a communication interface 703, and a memory 704. The processor 702, the memory 704, and the communication interface 703 communicate through the bus 701. At least one computing device 700 in the computing device system communicates through a communication path.
[0252] The processor 702 can be a CPU, and can also be other general-purpose processors, DSPs, ASICs, FPGAs, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0253] The memory 704 can be a DRAM. In addition to the DRAM, the memory 704 can also be other random access memories, such as SRAM, etc. In addition, the memory 704 can also be a ROM. For read-only memories, for example, can be PROM, EPROM, etc. The memory 704 can also be a flash memory medium, a HDD or a SSD, etc.
[0254] The processor 702 executes computer program instructions stored in the memory 704 to perform part or all of the steps performed by the fusion device 120 in the method described in FIG. 2. The memory can also include software modules required by other running processes, such as an operating system. The operating system can be LINUX TM , UNIX TM , WINDOWS TM , etc.
[0255] At least one computing device 700 in the computing device system communicates with each other through a communication network, and each computing device 700 runs any one or more modules in the fusion device 800 as shown in FIG. 8.
[0256] Based on the same inventive concept as the method embodiments, the embodiments of the present application also provide a fusion device for performing the method performed by the fusion device 120 in the above method embodiments. As shown in FIG. 8, the fusion device 800 includes an acquisition module 801, a recovery module 802, and optionally, a detection module 803. Specifically, in the fusion device 800, the modules are connected through a communication channel. The fusion device 800 includes:
[0257] The acquisition module 801 is configured to acquire a plurality of snapshots to be fused, wherein each snapshot is created for a data set, and the creation times of different snapshots are different; and acquire valid data of the plurality of snapshots, wherein the valid data in each snapshot is data in the data set that is not infected by a virus and is recorded in each snapshot.
[0258] The recovery module 802 is configured to recover the data set based on the valid data in the plurality of snapshots.
[0259] As a possible implementation, when the recovery module 802 recovers the data set, the recovery module 802 obtains a fusion snapshot based on the valid data in the plurality of snapshots; and the recovery module 802 recovers the data set according to the fusion snapshot.
[0260] As a possible implementation, the data set includes at least one group of associated data, and each group of associated data includes a plurality of data that exist in association. When the recovery module 802 recovers the data set, for a first group of associated data in the at least one group of associated data, the recovery module 802 determines a latest version of the first group of associated data, the latest version of the first group of associated data being the first group of associated data recorded in a first snapshot, the first snapshot being a snapshot with a creation time closest to a current time among at least one first candidate snapshot, and the at least one first candidate snapshot being a snapshot in which the first group of associated data is valid data in the plurality of snapshots.
[0261] The recovery module 802 recovers the data set according to the latest version of the first group of associated data.
[0262] As a possible implementation, when the recovery module 802 determines the latest version of the first group of associated data, the recovery module 802 determines at least one first candidate snapshot that satisfies a first availability condition among the plurality of snapshots, the first availability condition being that the data set recorded in the first candidate snapshot supports the running of a first application; and the recovery module 802 determines the latest version of the first group of associated data from the at least one first candidate snapshot.
[0263] As a possible implementation, the data set includes non-associated data in addition to the at least one set of associated data, when the recovery module 802 recovers the data set, for first non-associated data in the non-associated data, the recovery module 802 determines a latest version of the first non-associated data, the latest version of the first non-associated data being the first non-associated data recorded in a second snapshot, the second snapshot being a snapshot closest to the current time among at least one second candidate snapshot, the at least one second candidate snapshot being a snapshot in which the first non-associated data is valid data among the plurality of snapshots. The recovery module 802 obtains the fusion snapshot according to the latest version of the first non-associated data.
[0264] As a possible implementation, when the recovery module 802 determines the latest version of the first non-associated data, the recovery module 802 determines at least one second candidate snapshot that satisfies a second available condition among the plurality of snapshots, the second available condition being that the data set recorded in the at least one second candidate snapshot supports running of the second application; and the recovery module 802 determines the latest version of the first non-associated data from the at least one second candidate snapshot.
[0265] As a possible implementation, the acquisition module 801 acquires audit information, the audit information describing operation information on data in the data set; and the recovery module 802 determines the at least one set of associated data based on the audit information.
[0266] As a possible implementation, the recovery module 802 determines the at least one set of associated data based on the audit information and the associated data list.
[0267] As a possible implementation, the detection module 803 detects, for any snapshot in the plurality of snapshots, data recorded in the snapshot to determine valid data in the snapshot.
[0268] As a possible implementation, the recovery module 802 obtains the latest version of the non-associated data and the latest version of the at least one set of associated data from the valid data in the plurality of snapshots to construct a candidate data set; and recovers the data set by using the candidate data set.
[0269] As a possible implementation, the recovery module 802 creates a snapshot from the candidate data set to obtain the fusion snapshot.
[0270] The division of the modules in the embodiments of the present application is illustrative, and is merely a logical function division. In actual implementation, another division manner can be used. In addition, the function modules in each embodiment of the present application can be integrated in one processor, or can be physically separated, or two or more modules can be integrated into one module. The integrated module can be implemented in the form of hardware or in the form of a software function module.
[0271] The integrated module, if implemented in the form of a software function module and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on such an understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing an end device (which can be a personal computer, a mobile phone, or a network device, etc.) or a processor to execute all or part of the steps of the method of the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0272] The descriptions of the corresponding flows of the above various figures each have their own emphasis. The parts not described in detail in a certain flow can be referred to the related descriptions of other flows.
[0273] In the above embodiments, all or part can be realized by software, hardware, firmware, or any combination thereof. When realized by software, all or part can be realized in the form of a computer program product. The computer program product includes computer program instructions, which, when loaded and executed on a computer, generate all or part of the flow or function described in the embodiment of the present application in FIG. 2.
[0274] The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, an SSD).
[0275] Obviously, many modifications and variations of the present application are possible in light of the above teachings. It is, therefore, to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.
Claims
1. A data recovery method, characterized by, The method comprises: obtaining a plurality of snapshots to be fused, wherein each snapshot is created for a data set, and different snapshots are created at different times; obtaining valid data of the plurality of snapshots, wherein the valid data in each snapshot is data in the data set recorded in the snapshot and not infected by a virus; restoring the data set based on the valid data in the plurality of snapshots.
2. The method of claim 1, wherein, The data restoration of the data set based on the valid data in the plurality of snapshots comprises: obtaining a fusion snapshot based on the valid data in the plurality of snapshots; and restoring the data set according to the fusion snapshot.
3. The method of claim 1 or 2, wherein, The data set comprises at least one group of associated data, and each group of associated data comprises a plurality of data that exist in association. For a first group of associated data in the at least one group of associated data (without a serial number), a latest version of the first group of associated data is determined, the latest version of the first group of associated data being the first group of associated data recorded in a first snapshot, the first snapshot being a snapshot that is closest to a current time among at least one first candidate snapshot, and the at least one first candidate snapshot being a snapshot in which the first group of associated data is valid data in the plurality of snapshots. The data set is restored according to the latest version of the first group of associated data.
4. The method of claim 3, wherein, The determination of the latest version of the first group of associated data comprises: determining the at least one first candidate snapshot that satisfies a first availability condition among the plurality of snapshots, the first availability condition being that the data set recorded in the first candidate snapshot supports the running of a first application; and determining the latest version of the first group of associated data from the at least one first candidate snapshot.
5. The method according to any one of claims 1 to 4, characterized in that, The data set comprises non-associated data, which is data in the data set other than the at least one group of associated data. For a first non-associated data in the non-associated data, a latest version of the first non-associated data is determined, the latest version of the first non-associated data being the first non-associated data recorded in a second snapshot, the second snapshot being a snapshot that is closest to a current time among at least one second candidate snapshot, and the at least one second candidate snapshot being a snapshot in which the first non-associated data is valid data in the plurality of snapshots. The fusion snapshot is obtained according to the latest version of the first non-associated data.
6. The method of claim 5, wherein, The determination of the latest version of the first non-associated data comprises: determining the at least one second candidate snapshot that satisfies a second availability condition among the plurality of snapshots, the second availability condition being that the data set recorded in the at least one second candidate snapshot supports the running of a second application; and determining the latest version of the first non-associated data from the at least one second candidate snapshot.
7. The method of claim 3 or 4, wherein, The method further comprises: obtaining audit information, the audit information describing operation information on data in the data set; and determining the at least one group of associated data based on the audit information.
8. The method of claim 7, wherein, The determining the at least one set of associated data based on the audit information comprises: The determining the at least one set of associated data based on the audit information and the associated data list.
9. The method according to any one of claims 1 to 8, characterized in that, Before the obtaining the fusion snapshot based on the valid data in the plurality of snapshots, the method further comprises: For any snapshot in the plurality of snapshots, detecting a data set recorded in the snapshot to determine valid data in the snapshot.
10. The method according to any one of claims 1 to 9, characterized in that, The restoring the data set based on the valid data in the plurality of snapshots comprises: Obtaining the latest version of the non-associated data and the latest version of the at least one set of associated data from the valid data in the plurality of snapshots to construct a candidate data set; Restoring the data set by using the candidate data set.
11. The method of claim 10, wherein, The obtaining the fusion snapshot based on the valid data in the plurality of snapshots comprises: Creating a snapshot of the candidate data set to obtain the fusion snapshot.
12. A fusion device, characterized by Comprise: The obtaining module is used for obtaining a plurality of snapshots to be fused, wherein each snapshot is created for a data set, and the creation times of different snapshots are different; and valid data of the plurality of snapshots is obtained, wherein the valid data in each snapshot is data that is not infected by a virus in a data set recorded in each snapshot; The restoring module is used for restoring the data set based on the valid data in the plurality of snapshots.
13. The apparatus of claim 12, wherein, The restoring module is used for: Obtaining a fusion snapshot based on the valid data in the plurality of snapshots; Restoring the data set according to the fusion snapshot.
14. The apparatus of claim 12 or 13, wherein, The data set comprises at least one set of associated data, and each set of associated data comprises a plurality of data that exist in association; and the restoring module is used for: For a first set of associated data in the at least one set of associated data, a latest version of the first set of associated data is determined, the latest version of the first set of associated data being the first set of associated data recorded in a first snapshot, the first snapshot being a snapshot that is closest to a current time in at least one first candidate snapshot, the at least one first candidate snapshot being a snapshot in which the first set of associated data is valid data in the plurality of snapshots; Restoring the data set according to the latest version of the first set of associated data.
15. The apparatus of claim 14, wherein, The restoring module is used for: Determining the at least one first candidate snapshot that satisfies a first available condition in the plurality of snapshots, the first available condition being that a data set recorded in the first candidate snapshot supports running of a first application program; Determining the latest version of the first set of associated data from the at least one first candidate snapshot.
16. The device of any one of claims 12 to 15, wherein, The data set comprises non-associated data, the non-associated data being data other than the at least one set of associated data in the data set; and the restoring module is used for: For the first non-associated data in the non-associated data, a latest version of the first non-associated data is determined, the latest version of the first non-associated data being the first non-associated data recorded in a second snapshot, the second snapshot being a snapshot with a creation time closest to a current time among at least one second candidate snapshot, the at least one second candidate snapshot being a snapshot in which the first non-associated data is valid data in the plurality of snapshots; The fusion snapshot is obtained according to the latest version of the first non-associated data.
17. The apparatus of claim 16, wherein, The recovery module is configured to: Determine the at least one second candidate snapshot in the plurality of snapshots that satisfies a second available condition, the second available condition being that a data set recorded in the at least one second candidate snapshot supports running of a second application; Determine the latest version of the first non-associated data from the at least one second candidate snapshot.
18. The apparatus of claim 14 or 15, wherein, The obtaining module is further configured to: obtain audit information, the audit information describing operation information on data in the data set; The recovery module is configured to determine the at least one group of associated data based on the audit information.
19. The apparatus of claim 18, wherein, The recovery module is configured to: Determine the at least one group of associated data based on the audit information and an associated data list.
20. The apparatus of any one of claims 12-19, wherein, The fusion device further includes a detection module, and the detection module is configured to: For any snapshot in the plurality of snapshots, detect a data set recorded in the snapshot to determine valid data in the snapshot.
21. The apparatus of any one of claims 12-20, wherein, The recovery module is configured to: Obtain the latest version of the non-associated data and the latest version of the at least one group of associated data from the valid data in the plurality of snapshots to construct a candidate data set; Restore the data set by using the candidate data set.
22. The apparatus of claim 21, wherein, The recovery module is configured to: Create a snapshot of the candidate data set to obtain the fusion snapshot.
23. A computing device, comprising: The computing device includes a processor and a memory; The memory is configured to store computer program instructions; The processor executes the computer program instructions in the memory to perform the method in any one of claims 1 to 11.
24. A computer-readable storage medium, characterized in that, The computer readable storage medium is executed by a computing device, and the computing device performs the method in any one of claims 1 to 11.
Citation Information
Patent Citations
Fusion snapshot realization method and fusion snapshot realization system
CN105260265A
Data recovery method and device, computing device cluster and storage medium
CN117708809A
Method and device for recovering data in storage device
CN118035997A
Data recovery method and device supporting data fusion
CN118051377A
Method and system for backing up data
US20050216536A1