CN112860486B - Method and device for creating data copy - Google Patents

Method and device for creating data copy Download PDF

Info

Publication number
CN112860486B
CN112860486B CN202110149931.8A CN202110149931A CN112860486B CN 112860486 B CN112860486 B CN 112860486B CN 202110149931 A CN202110149931 A CN 202110149931A CN 112860486 B CN112860486 B CN 112860486B
Authority
CN
China
Prior art keywords
data
copy
data block
bitmap
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110149931.8A
Other languages
Chinese (zh)
Other versions
CN112860486A (en
Inventor
陈元强
吴健辉
李文祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Mulangyun Technology Co ltd
Original Assignee
Shenzhen Mulangyun Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Mulangyun Technology Co ltd filed Critical Shenzhen Mulangyun Technology Co ltd
Priority to CN202110149931.8A priority Critical patent/CN112860486B/en
Publication of CN112860486A publication Critical patent/CN112860486A/en
Application granted granted Critical
Publication of CN112860486B publication Critical patent/CN112860486B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/065Replication mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device

Abstract

The invention discloses a method and a device for creating a data copy. Wherein the method comprises the following steps: receiving a data copy creation request; in response to the data copy creation request, determining a type of copy mode to be employed to create the data copy, wherein the type of copy mode includes at least one of: a fast copy mode and an incremental copy mode; and creating the data copy based on the type of the copy mode. The invention solves the technical problem of overlarge storage space consumption in the prior art and has the beneficial effect of saving the storage space.

Description

Method and device for creating data copy
Technical Field
The invention relates to the field of data storage, in particular to a method and a device for creating a data copy.
Background
When creating copies of data using a conventional file system, a file system such as XFS requires that all data of a file be completely cloned and rewritten through. When the file size is up, it is very slow and it takes up the same data space as it was. In this way, it is not acceptable, both in time and space.
In order to solve the problems existing in the traditional file system for creating the data copy, a scheme for deleting the storage created copy repeatedly is provided. The relation between the data fragment and the data fingerprint is recorded in a deduplication module of the deduplication storage. The description for a file is made up of metadata and data blocks. Metadata consists of inodes (file inodes) and bitmaps (data block index sets of current files). When creating a copy of a file, it is simplest to copy a piece of metadata.
In real business, as a base for a backup system, the disks of many virtual machines of a customer are on the upper TB (terabyte) level. When a file size reaches 1TB, the entire metadata space is also occupied. As a base of a backup system, many upper-layer businesses rely on the technology of fast replication, especially incremental backup, and require that a copy of data be used as a reference. Frequent copying of such metadata can place a great strain on the hard disk IO as well as a great consumption of storage space. Thus, such a design is also unacceptable as a backup system underlay.
In order to solve the above problem, a solution for creating a copy by using the Cephrbd module volume cloning function is also proposed. The Cephrbd module provides a volume snapshot-based cloning method that snapshots a specified volume and then quickly generates a new volume based on the snapshot. However, the original snapshot may not be deleted. When deletion is required, the clone rolls have to be unhooked from the reel. Furthermore, none of the operations are store-automated.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for creating a data copy, which are used for at least solving the technical problem of overlarge storage space consumption in the prior art.
According to an aspect of an embodiment of the present invention, there is provided a method of creating a copy of data, including: receiving a data copy creation request; in response to the data copy creation request, determining a type of copy mode to be employed to create the data copy, wherein the type of copy mode includes at least one of: a fast copy mode and an incremental copy mode; and creating the data copy based on the type of the copy mode.
According to another aspect of the embodiment of the present invention, there is also provided a method of creating a copy of data, the method including: creating a data block reference set as the data block reference set of the data copy under the condition that the original file has the original data copy; the data block reference set points to a data block reference set at the tail of a copy chain of the latest data copy of the original file and points to a data block which is newly added by the file corresponding to the data copy relative to the file corresponding to the latest received data copy; the data copy is created based on the set of data block references.
According to another aspect of the embodiment of the present invention, there is also provided a method of creating a copy of data, the method including: copying a data block reference set in the latest data copy of the original file to be used as the data block reference set of the data copy under the condition that the original file has the original data copy; the data block reference set points to the data block reference set of the original file and points to the data block which is newly added relative to the original file by the file corresponding to the data copy; the data copy is created based on the set of data block references.
According to another aspect of the embodiment of the present invention, there is also provided a method for data backup, including: receiving a data backup request; a method of creating a copy of data as claimed in any preceding claim, performed in response to the data backup request.
According to another aspect of the embodiment of the present invention, there is also provided a method for recovering data, including: receiving a data recovery request; in response to the data recovery request, creating a data copy according to the method of creating a data copy as described above is performed for data recovery.
In the embodiment of the invention, the technical problem of overlarge storage space consumption in the prior art is solved by adopting a fast copy mode or an incremental copy mode, and the method has the beneficial effect of saving the data storage space.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a undue limitation. In the drawings:
FIG. 1A is a schematic diagram of a file data structure according to an embodiment of the present disclosure;
FIG. 1B is a schematic diagram of octopus-based read-write data according to an embodiment of the present disclosure;
FIG. 2 is a flow diagram of a method of data backup according to an embodiment of the present disclosure;
FIG. 3 is a flow diagram of a method of data recovery according to an embodiment of the present disclosure;
FIG. 4 is a flow diagram of a method of creating a copy of data based on an original file according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a data structure in the process of creating a copy of data based on an original file according to an embodiment of the present disclosure;
FIG. 6 is a flow diagram of a method of creating a copy of data in a fast copy mode according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a data structure during creation of a data copy in a fast copy mode, according to an embodiment of the present disclosure;
FIG. 8 is a flow diagram of a method of creating a copy of data in a pattern of incremental copies according to an embodiment of the present disclosure;
FIG. 9 is a schematic diagram of a data structure during creation of a data copy in an incremental copy mode in accordance with an embodiment of the present disclosure;
FIG. 10 is a flow diagram of a schematic diagram of a data structure in the process of creating a data copy in a pattern of incremental copies according to an embodiment of the present disclosure, a method of creating a data copy according to an embodiment of the present disclosure;
Detailed Description
In order that those skilled in the art will better understand the present invention, a detailed description of embodiments of the present invention will be provided below, with reference to the accompanying drawings, wherein it is apparent that the described embodiments are only some, but not all, embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Embodiment 1
When external data is written to a specified directory, it is written to the octopus storage via vfs (virtual File System ), where octopus is a data storage system developed by the wood wave cloud.
In octopus, as shown in fig. 1A, a file is composed of three parts, i.e., inode (file inode), bitMap (data block reference set), and datablock (real data block), respectively. bitMap is a set of pointers to the actual data blocks, and datalock is the actual stored data blocks.
FIG. 1B is a schematic diagram of octopus-based read-write data, according to an embodiment of the present disclosure. As shown in fig. 1B, after receiving a request to read and write data, the file system calls vfs to read data from or write data to the octopus based on the request to read and write data.
Embodiment 2
FIG. 2 is a flow diagram of a method of creating a copy of data, as shown in FIG. 2, according to an embodiment of the present disclosure, the method comprising the steps of:
in step S201, a data backup request is received.
Step S202, judging the backup type.
Backup types include full and incremental backups. The full-volume backup is to backup all defined sets of the data objects, and the incremental backup is to backup the files which are increased or modified compared with the previous backup after the full-volume backup or the previous incremental backup.
In the case where the backup type is the full-size backup, step S203 is performed, and in the case where the backup type is the incremental backup, step S205 is performed.
Step S203, full back-up.
Step S204, a disk file is generated.
After the disk file is generated, the flow is ended.
Step S205, incremental backup.
In the case where the backup type is incremental, data backup is prepared in the incremental mode.
In step S206, a disk copy is created for incremental backup.
When incremental backup is performed, the data of the last backup and the data of the current increment are needed to be combined together to form a new backup record. Thus, a copy of the data is created based on the last successfully backed up disk. The particular backup program generates a quick copy or incremental copy as needed.
Step S207, judging a copy mode.
The copy modes include a fast copy mode and an incremental copy mode. Step S208 is executed if the copy mode is the fast copy mode, and step S209 is executed if the copy mode is the incremental copy mode.
Step S208, incremental backup is performed in a fast copy mode.
Step S209, performing incremental backup in the incremental copy mode.
Embodiment 3
FIG. 3 is a flow chart of a method of data recovery, as shown in FIG. 3, according to an embodiment of the present disclosure, the method comprising the steps of:
in step S302, data is restored.
A data recovery request is received.
Step S304, creating a data copy to an nfs server (nfs server) export directory.
When data recovery is performed, nfs of the backup system only develops a specified path based on security considerations. In this way, only one quick copy needs to be created to the nfs server export directory and the backed up data content is also avoided from being modified.
In step S305, a recovery form is determined.
Step S306 is executed if the resume form is data write back, and step S307 is executed if the resume form is mount migration.
In step S306, the data is written back.
Creating a blank disk with the same size as the data copy in the user production storage, and copying all data in the data copy to the blank disk just created through nfs. After the data is successfully written back, the virtual machine is connected with the new disk, and the power supply of the virtual machine is turned on.
Step S307, mount migration.
The virtualized platform accesses the replica data through nfs and then starts the virtual machine. In the running process of the virtual machine, a user clicks and migrates, by the virtualization platform, the copy data back to the user's production storage without closing the virtual machine.
Embodiment 4
FIG. 4 is a flow diagram of a method of creating a copy of data based on an original file according to an embodiment of the present disclosure.
The original file a, as shown in fig. 5 (a), is composed of inode a, bitMapA, and datablock associated with bitMapA.
As shown in fig. 4, the method of creating the data copy b based on the original file a includes the steps of:
step S401, copy inode a, and modify file name related information to form inode b.
In step S402, a bitMap B is created pointing to bitMap A and an inode B pointing to bitMap B, thereby forming a data copy B. The structure of the data copy b is shown in fig. 5 (c).
In step S403, a bitMap AA is created to point to bitMap a, and the record in the inode a pointing to bitMap a is modified to point to bitMap AA, and the resulting data structure is shown in (b) of fig. 5. Wherein, the dataBlock pointed by the bitMap AA and the bitMap AA are both empty. The adoption of the structure is to enable the bitMap A not to be directly referenced by an inode, so that the subsequent processing of the data copy is convenient.
The data copy b created directly on the basis of the original file a is also referred to as an original data copy.
Embodiment 5
Fast copy mode
FIG. 6 is a flow diagram of a method of creating a copy of data in a fast copy mode, according to an embodiment of the present disclosure. In this embodiment, a fast copy mode is employed to create a copy of the data.
By the fast copy mode, creation of a copy of data can be accomplished on the order of seconds. To achieve a second level for data copy creation, metadata of the copy file should be reduced as much as possible. Creating a data copy for a new file, directly copying a file index node (inode) of the file, and generating a new delta data block reference (bitMap). This bitMap points directly to the bitMap of the original file. The whole data volume is tens of KB after being constant, so that the purpose of creating a copy in the second level is achieved.
The method of creating a first data copy of an original file, whether in the fast copy mode or the incremental copy mode, is performed as described in the embodiment of fig. 4, and thus the creation of a data copy in the fast copy mode described herein is performed on the basis of the data copy b of the original file.
As shown in fig. 6, the method for creating a data copy using the fast copy mode includes the steps of:
in step S601, inode b is copied and information such as a file name is modified to form inode c.
In step S602, bitMapC is created to point to bitMapB, and inode c points to bitMapC to form a data copy c, as shown in (b) of fig. 7.
In step S603, a record in which bitMapB points to bitMapB and inode b points to bitMapB is created to point to bitMapB, so that bitMapB is not directly referenced by inode b, as shown in (a) of fig. 7. Such a structure facilitates subsequent copy processing.
Through the above steps, a replica chain, such as a replica chain of the data replica c, is formed: bitMap C- > bitMap B- > bitMap A. The duplicate chains may be shortened by the length of the chains, as the case may be.
In this embodiment, when creating the data copy c, the data copy b is both the original data copy and the latest data copy of the original file. After the creation of the data copy c, the data copy c becomes the latest data copy the next time a new data copy is created.
Embodiment 6
Incremental copy mode
Fast replication is fast and occupies little space, but correspondingly complicates referencing between data, which can be positively correlated by the length of the chain of replicas and the number of times the file is replicated. Such a configuration has a certain influence on the read data. When better read performance requirements for the data are desired, incremental copies may be selected for creation. The incremental copy is characterized in that the copy creation speed is moderate, the capacity occupied by metadata is not large, and the reference relation among metadata is also quite clear.
The method of creating a first data copy of an original file, whether in the fast copy mode or the incremental copy mode, is performed as described in the embodiment of fig. 4, and thus the creation of a data copy in the incremental copy mode described herein is performed on the basis of the data copy b of the original file.
When creating incremental copies based on the original file, the principle and the quick copy are not different, and all are performed as described in the embodiment of fig. 4. Incremental copies differ from fast copies in that new copies of data are created again based on the copies of data. Thus, described herein is a process for creating replica file c using incremental replica mode after creating data replica b based on the method of FIG. 4. As shown in fig. 8, the method comprises the following steps:
step S802, copy inode b and modify file name related information to form inode c.
In step S804, the bitMap B is copied, the rename name is bitMap C, and the inode C is pointed to bitMap C, thereby forming a data copy C.
The data copy file b and the data copy file c are directly based on the bitMap A at the same time, and the length of a copy chain is fixed to be 2. In this process, a diffraction of the data structure is shown in fig. 9.
Embodiment 7
Merging chains of data copies
In the incremental copy mode, as the incremental data increases, the size of the bitMap B itself may also be large, so that it is also not consumed to copy the bitMap B.
In the fast copy mode, the created copy, because only the inode file is copied and the new increment reference bitMap is created, the data volume is only tens of KB, the time required for the process of creating the data copy is very short, and the occupied space is very at least. But creating copies multiple times, the reference relationships of fast copies can be very complex and can have an impact on read performance as the copy chain grows longer. And the complex reference relationship is not suitable for the remote copy function and the data cloud function on the business.
Therefore, the disclosure further proposes a technical solution for merging data copy chains, and the specific data structure refers to fig. 10.
When one quick copy needs to be clouded and needs to be copied in different places, or the length of a snapshot chain of the quick copy reaches a set value, the quick copy can be converted into an incremental copy mode.
When the size of the increment reference bitMap pointed by the increment copy directly exceeds half of the most basic bitMap, the increment copy is triggered to be combined into a full-quantity copy in consideration of the memory use and the read performance influence of the subsequent copy chain. When the merging operation is triggered, the set chain referenced by the recorded data blocks of the data copy is merged into a new bitMap, so that the copy file is converted into a non-data copy state, namely, a full-quantity copy mode is adopted when a new copy is created.
Further optimizing, the sum of the bitMap sizes of the incremental references in the copy chain can be directly calculated, if the sum reaches half of the basic bitMap, the state of converting into the incremental copy is skipped, and the state of converting into the non-data copy is directly converted, namely, when a new copy is created, a full-quantity copy mode is adopted.
Embodiment 8
The embodiment provides a data backup method, which comprises the following steps: receiving a data backup request; in response to the data backup request, the method of creating a copy of data in any of the above embodiments is performed.
The embodiment also provides a data recovery method, which comprises the following steps: receiving a data recovery request; in response to the data recovery request, the method for creating a data copy in any of the above embodiments is performed to create a data copy for data recovery.
For example, there are two general schemes for virtual machine data recovery in a backup system, namely, first, creating a data copy, then reading data from the data copy and writing the data to a user's production environment, and finally creating a virtual machine. Both schemes employ the method of creating a copy of data described above.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present invention. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules involved are not necessarily required for the present invention.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus a necessary general purpose hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
Embodiment 9
The embodiment provides an apparatus for creating a data copy, the apparatus comprising: a receiving module configured to receive a data copy creation request; a determination module configured to determine, in response to the data copy creation request, a type of copy mode to be employed to create the data copy, wherein the type of copy mode includes at least one of: a fast copy mode and an incremental copy mode; and the creation module is configured to create the data copy based on the type of the copy mode.
In addition, the device for creating the data copy can also realize all the methods for creating the data copy.
Embodiment 10
The present embodiment provides another apparatus for creating a copy, where the original file has a copy of the original data, the apparatus being configured to: a Bitmap creation module configured to create a set of data block references as a set of data block references for the data copy; the pointing module is configured to point the data block reference set to the data block reference set at the tail of the copy chain of the latest data copy of the original file and point to the data block of the file corresponding to the data copy which is newly added relative to the file corresponding to the latest received data copy; a fast copy creation module is configured to create the data copy based on the set of data block references.
In addition, the apparatus for creating a copy of data can also implement all of the methods for creating a copy of data in the fast copy mode described above.
Embodiment 11
The present embodiment provides another apparatus for creating a copy, where the original file has an original data copy, the apparatus includes: a copying module configured to copy a set of data block references in a latest data copy of an original file as the set of data block references of the data copy; the pointer module is configured to point the data block reference set to the data block reference set of the original file and point to the data block of the file corresponding to the data copy, which is newly added relative to the original file; an incremental copy creation module configured to create the data copy based on the set of data block references.
In addition, the apparatus for creating a copy of data can also implement all of the methods for creating a copy of data in incremental copy mode described above.
Embodiment 12
The embodiment provides a device for data backup, which comprises: a write request receiving module configured to receive a data backup request; and the data backup module is configured to respond to the data backup request and execute any method for creating the data copy.
Embodiment 13
The embodiment provides a device for recovering data, which comprises: a recovery request receiving module configured to receive a data recovery request; and the data recovery module is configured to respond to the data recovery request, execute any method for creating the data copy to create the data copy and create the data copy to the export directory.
Embodiment 14
The embodiment provides a computer device, which is characterized by comprising a processor, a memory and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program for the method for creating the data copy.
Embodiment 15
The present embodiment provides a readable storage medium storing a computer program, wherein the computer program is used for any one of the above methods for creating a data copy when executed by a processor.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Embodiments of the present disclosure also provide the following configurations:
1. a method of creating a copy of data, comprising:
receiving a data copy creation request;
in response to the data copy creation request, determining a type of copy mode to be employed to create the data copy, wherein the type of copy mode includes at least one of: a fast copy mode and an incremental copy mode;
and creating the data copy based on the type of the copy mode.
2. The method of item 1, wherein creating the copy of the data based on the type of copy pattern comprises:
when the copy mode is the fast copy mode and an original file has an original data copy, creating a data block reference set for the data copy, and pointing the created data block reference set to a data block reference set at the tail of a copy chain of the latest data copy of the original file and to a data block newly added by a file corresponding to the data copy relative to the file corresponding to the latest data copy so as to create the data copy; when the copy mode is the incremental copy mode and an original file has an original data copy, copying a data block reference set in the latest data copy of the original file to serve as a data block reference set of the data copy, and pointing the data block reference set to the data block reference set of the original file and to a data block which is newly added relative to the original file by a file corresponding to the data copy so as to create the data copy;
And under the condition that the copy mode is the quick copy mode or the increment copy mode and only an original file exists and an original data copy of the original file does not exist, creating a data block reference set for the data copy, and pointing the data block reference set to the data block reference set of the original file and pointing to a data block of a file corresponding to the data copy, which is newly added relative to the original file.
3. The method of item 2, wherein the replica chain includes a plurality of data block reference sets formed into a chain, each of the plurality of data block reference sets other than the data block reference set located at the chain head of the chain as the original file pointing to a previous data block reference set in the chain and also pointing to a data block that is newly added relative to the file to which the previous data block reference set corresponds.
4. The method of item 2, wherein creating the copy of the data based on the type of copy pattern further comprises:
copying a file index node in the latest data copy under the condition that the original file has an original data copy, and modifying the file name and the file path of the file index node to be used as the file index node of the data copy;
And in the case that the original file does not have the original data copy, copying a file index node in the original file, and modifying the file name and the file path of the file index node to serve as the file index node of the data copy.
5. The method of item 2, wherein creating a set of data block references for the data copy and pointing the set of data block references to the set of data block references of the original file and to the data block of the file corresponding to the data copy that is newly added relative to the original file comprises:
creating a bitMapB, setting a bitMap B to point to a bitMap A and a new incremental data block, and setting an inode B to point to the bitMap B;
wherein,
the original file consists of an inode a, a bit Map A and a data block associated with the bit Map A, wherein the inode a and the bit Map A are respectively a file index node and a data block reference set of the original file;
and the inode b and the bitMapB are respectively a file index node and a data block reference set of a file corresponding to the data copy.
6. The method of item 5, wherein after setting inode B to point to bitMap B, the method further comprises:
Creating a bitMap AA, pointing the bitMap AA to a bitMap A, and setting an inode a to point to the bitMap AA.
7. The method of item 2, wherein creating a set of data block references for the data copy and directing the set of data block references to a data block reference set located at a chain end of a copy chain of a latest data copy of the original file and to a data block newly added to a file corresponding to the data copy relative to the file corresponding to the latest data copy comprises:
creating a bitMapC, setting the bitMapC to point to bitMapB and a new incremental data block, and setting inode c to point to bitMapC;
the inode b and the bitMapB are file index nodes and data block reference sets of the latest data copy, and the inode c and the bitMapC are file index nodes and data block reference sets of the data copy.
8. The method of item 7, wherein after setting inode c to point to bitMapC, the method further comprises: creating a bitMapBB, pointing the bitMapBB to the bitmapbs, and setting an inode b to point to the bitmapbs.
9. The method of item 2, wherein copying the set of data block references in the latest data copy of the original file as the set of data block references for the data copy, and pointing the set of data block references to the set of data block references for the original file and to the data block newly added by the file corresponding to the data copy relative to the original file comprises:
Copying the bitMap B and renaming the bitMap B as a bitMap C;
directing inode C to bitMap C, and directing bitMap C to bitMap A and the newly added data block;
wherein,
the original file consists of an inode a, a bit Map A and a data block associated with the bit Map A, wherein the inode a and the bit Map A are respectively a file index node and a data block reference set of the original file;
the inode b and the bitMapB are file inodes and data block reference sets of the latest data copy, and the inode c and the bitMapC are file inodes and data block reference sets of the data copy.
10. The method of any of claims 1-9, wherein, in the event that the replica mode is the fast replica mode, after creating the data replica, the method further comprises:
closing the created data copy;
when the length of the copy chain of the created data copy is larger than or equal to a first preset value, the incremental copy mode is adopted to create a new data copy instead of the quick copy mode.
11. The method of any of claims 1-9, wherein, in the event that the copy mode is the incremental copy mode, after creating the copy of data, the method further comprises:
And merging the multiple data block reference sets in the copy chain into a new data block reference set when the data block reference set in the latest data copy is larger than or equal to a second preset value, and creating a new data copy by adopting a full-volume copy mode.
12. The method of any of claims 1-9, wherein, in the event that the replica mode is the fast replica mode, after creating the data replica, the method further comprises: and calculating the sum of the sizes of all the data block reference sets in the copy chain, and if the sum is equal to or larger than a third preset value, creating a new data copy by adopting a full-volume copy mode.
13. The method of item 11 or 12, wherein the second preset value and the third preset value are half the size of a most basic set of data block references.
14. A method of creating a copy of data, wherein the method comprises: in the case where the original file has a copy of the original data:
creating a set of data block references as a set of data block references for the data copy;
the data block reference set points to a data block reference set at the tail of a copy chain of the latest data copy of the original file and points to a data block which is newly added by the file corresponding to the data copy relative to the file corresponding to the latest received data copy;
The data copy is created based on the set of data block references.
15. The method of item 14, wherein the replica chain includes a plurality of data block reference sets formed into a chain, each of the plurality of data block reference sets other than the data block reference set located at the chain head of the chain as the original file pointing to a previous data block reference set in the chain and also pointing to a data block that is newly added relative to the file to which the previous data block reference set corresponds.
16. The method of item 14, wherein the method further comprises: and under the condition that the original file does not have an original data copy, creating a data block reference set for the data copy, and pointing the data block reference set to the data block reference set of the original file and pointing to a data block of a file corresponding to the data copy, which is newly added relative to the original file.
17. The method of item 14, wherein the method further comprises: copying the file index node in the latest data copy, and modifying the file name and the file path of the file index node as the file index node of the data copy.
18. The method of item 14, wherein creating a set of data block references for the data copy and pointing the set of data block references to the set of data block references of the original file and to the data block of the file to which the data copy corresponds that is newly added relative to the original file comprises:
creating a bitMapB, setting a bitMap B to point to a bitMap A and a new incremental data block, and setting an inode B to point to the bitMap B;
wherein,
the original file consists of an inode a, a bit Map A and a data block associated with the bit Map A, wherein the inode a and the bit Map A are respectively a file index node and a data block reference set of the original file;
and the inode b and the bitMapB are respectively a file index node and a data block reference set of a file corresponding to the data copy.
19. The method of item 18, wherein after setting inode B to point to bitMap B, the method further comprises:
creating a bitMap AA, pointing the bitMap AA to a bitMap A, and setting an inode a to point to the bitMap AA.
20. The method of item 14, wherein creating a set of data block references as the set of data block references for the data copy, pointing the set of data block references to the set of data block references located at the end of the copy chain of the most recent data copy of the original file and to the data block newly added for the file corresponding to the data copy relative to the file corresponding to the most received data copy comprises:
Creating a bitMapC, setting the bitMapC to point to bitMapB and a new incremental data block, and setting inode c to point to bitMapC;
the inode b and the bitMapB are file index nodes and data block reference sets of the latest data copy, and the inode c and the bitMapC are file index nodes and data block reference sets of the data copy.
21. The method of item 20, wherein after setting inode c to point to bitMapC, the method further comprises: creating a bitMapBB, pointing the bitMapBB to the bitmapbs, and setting an inode b to point to the bitmapbs.
22. The method of any of claims 14 to 21, wherein after creating the copy of data, the method further comprises:
closing the created data copy;
when the length of the copy chain of the created data copy is larger than or equal to a first preset value, an incremental copy mode is adopted to create a new data copy instead of a quick copy mode.
23. The method of any of claims 14 to 21, wherein after creating the copy of data, the method further comprises: and calculating the sum of the sizes of all the data block reference sets in the copy chain, and if the sum is equal to or larger than a third preset value, creating a new data copy by adopting a full-volume copy mode.
24. The method of item 23, wherein the third preset value is half the size of the most basic set of data block references.
25. A method of creating a copy of data, wherein the method comprises: in the case where a copy of the original data exists for the original file,
copying a data block reference set in the latest data copy of the original file to be used as the data block reference set of the data copy;
the data block reference set points to the data block reference set of the original file and points to the data block which is newly added relative to the original file by the file corresponding to the data copy;
the data copy is created based on the set of data block references.
26. The method of item 25, wherein the method further comprises: and under the condition that the original file does not have an original data copy, creating a data block reference set for the data copy, and pointing the data block reference set to the data block reference set of the original file and pointing to a data block of a file corresponding to the data copy, which is newly added relative to the original file.
27. The method of item 25, wherein the method further comprises: copying the file index node in the latest data copy, and modifying the file name and the file path of the file index node as the file index node of the data copy.
28. The method of item 25, wherein creating a set of data block references for the data copy and pointing the set of data block references to the set of data block references of the original file and to the data block of the file to which the data copy corresponds that is newly added relative to the original file comprises:
creating a bitMapB, setting a bitMap B to point to a bitMap A and a new incremental data block, and setting an inode B to point to the bitMap B;
wherein,
the original file consists of an inode a, a bit Map A and a data block associated with the bit Map A, wherein the inode a and the bit Map A are respectively a file index node and a data block reference set of the original file;
and the inode b and the bitMapB are respectively a file index node and a data block reference set of a file corresponding to the data copy.
29. The method of item 28, wherein after setting inode B to point to bitMap B, the method further comprises: creating a bitMap AA, pointing the bitMap AA to a bitMap A, and setting an inode a to point to the bitMap AA.
30. The method of item 25, wherein copying the set of data block references in the latest data copy of the original file as the set of data block references for the data copy and pointing the set of data block references to the set of data block references for the original file and to the data block newly added by the file corresponding to the data copy relative to the original file comprises:
Copying the bitMap B and renaming the bitMap B as a bitMap C;
directing inode C to bitMap C, and directing bitMap C to bitMap A and the newly added data block;
wherein,
the original file consists of an inode a, a bit Map A and a data block associated with the bit Map A, wherein the inode a and the bit Map A are respectively a file index node and a data block reference set of the original file;
the inode b and the bitMapB are file inodes and data block reference sets of the latest data copy, and the inode c and the bitMapC are file inodes and data block reference sets of the data copy.
31. The method of any of claims 25 to 30, wherein after creating the copy of data, the method further comprises:
and merging the multiple data block reference sets in the copy chain into a new data block reference set when the data block reference set in the latest data copy is larger than or equal to a second preset value, and creating a new data copy by adopting a full-volume copy mode.
32. The method of item 31, wherein the second preset value is half the size of the most basic set of data block references.
33. A method of data backup, comprising:
Receiving a data backup request;
in response to the data backup request, performing the method of creating a data copy as described in any one of items 1 to 32 to create a data copy for data backup.
34. A method of data recovery, comprising:
receiving a data recovery request;
in response to the data recovery request, the method of creating a copy of data according to any one of items 1 to 32 is performed to create a copy of data for data recovery.
35. An apparatus for creating a copy of data, comprising:
a receiving module configured to receive a data copy creation request;
a determination module configured to determine, in response to the data copy creation request, a type of copy mode to be employed to create the data copy, wherein the type of copy mode includes at least one of: a fast copy mode and an incremental copy mode;
and the creation module is configured to create the data copy based on the type of the copy mode.
36. An apparatus for creating a copy of data, wherein in the event that an original file exists with an original copy of data, the apparatus comprises:
a Bitmap creation module configured to create a set of data block references as a set of data block references for the data copy;
The pointing module is configured to point the data block reference set to the data block reference set at the tail of the copy chain of the latest data copy of the original file and point to the data block of the file corresponding to the data copy which is newly added relative to the file corresponding to the latest received data copy;
a fast copy creation module is configured to create the data copy based on the set of data block references.
37. An apparatus for creating a copy of data, wherein in the event that the original file has an original copy of data, the apparatus comprises:
a copying module configured to copy a set of data block references in a latest data copy of an original file as the set of data block references of the data copy;
the pointer module is configured to point the data block reference set to the data block reference set of the original file and point to the data block of the file corresponding to the data copy, which is newly added relative to the original file;
an incremental copy creation module configured to create the data copy based on the set of data block references.
38. An apparatus for data backup, comprising:
a write request receiving module configured to receive a data backup request;
A data backup module configured to perform the method of creating a data copy of any one of items 1 to 32 to create a data copy for data backup in response to the data backup request.
39. An apparatus for data recovery, comprising:
a recovery request receiving module configured to receive a data recovery request;
a data recovery module configured to perform the method of creating a data copy according to any one of items 1 to 32 to create a data copy for data recovery in response to the data recovery request.
40. A computer device comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the processor executing the computer program for implementing the method of any one of items 1-32.
41. A readable storage medium storing a computer program, wherein the computer program is for implementing the method of any one of items 1-32 when executed by a processor.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (40)

1. A method of creating a copy of data, comprising:
receiving a data copy creation request;
in response to the data copy creation request, determining a type of copy mode to be employed to create the data copy, wherein the type of copy mode includes at least one of: a fast copy mode and an incremental copy mode;
creating the data copy based on the type of copy mode;
wherein creating the copy of the data based on the type of copy schema comprises:
when the copy mode is the fast copy mode and an original file has an original data copy, creating a data block reference set for the data copy, and pointing the created data block reference set to a data block reference set at the tail of a copy chain of the latest data copy of the original file and to a data block newly added by a file corresponding to the data copy relative to the file corresponding to the latest data copy so as to create the data copy;
when the copy mode is the incremental copy mode and an original file has an original data copy, copying a data block reference set in the latest data copy of the original file to serve as a data block reference set of the data copy, and pointing the data block reference set to the data block reference set of the original file and to a data block which is newly added relative to the original file by a file corresponding to the data copy so as to create the data copy;
And under the condition that the copy mode is the quick copy mode or the increment copy mode and only an original file exists and an original data copy of the original file does not exist, creating a data block reference set for the data copy, and pointing the data block reference set to the data block reference set of the original file and pointing to a data block of a file corresponding to the data copy, which is newly added relative to the original file.
2. The method of claim 1, wherein the replica chain includes a plurality of data block reference sets formed into a chain, each of the plurality of data block reference sets other than the data block reference set located at the chain head of the chain as the original file pointing to a previous data block reference set in the chain and also pointing to a data block that is newly added relative to the file to which the previous data block reference set corresponds.
3. The method of claim 1, wherein creating the copy of the data based on the type of copy pattern further comprises:
copying a file index node in the latest data copy under the condition that the original file has an original data copy, and modifying the file name and the file path of the file index node to be used as the file index node of the data copy;
And in the case that the original file does not have the original data copy, copying a file index node in the original file, and modifying the file name and the file path of the file index node to serve as the file index node of the data copy.
4. The method of claim 1, wherein creating a set of data block references for the data copy and pointing the set of data block references to the set of data block references of the original file and to the data block of the file to which the data copy corresponds that is newly added relative to the original file comprises:
creating a bitMap B, setting the bitMap B to point to the bitMap A and a new incremental data block, and setting the inode B to point to the bitMap B;
wherein,
the original file consists of an inode a, a bit Map A and a data block associated with the bit Map A, wherein the inode a and the bit Map A are respectively a file index node and a data block reference set of the original file;
and the inode B and the bitMap B are respectively a file index node and a data block reference set of the file corresponding to the data copy.
5. The method of claim 4, wherein after setting inode B to point to bitMap B, the method further comprises:
Creating a bitMap AA, and pointing the bitMap AA to a bitMap A; and is also provided with
And setting an inode a to point to the bitMap AA.
6. The method of claim 4, wherein creating a set of data block references for the data copy and pointing the set of data block references to a data block reference set located at a chain end of a copy chain of a latest data copy of the original file and pointing to a data block newly added by a file corresponding to the data copy relative to a file corresponding to the latest data copy comprises:
creating a bitMap C, setting the bitMap C as a data block pointing to the bitMap B and a new increment, and setting an inode C as a data block pointing to the bitMap C;
the inode B and the bitMap B are file index nodes and data block reference sets of the latest data copy, and the inode C and the bitMap C are file index nodes and data block reference sets of the data copy.
7. The method of claim 6, wherein after setting inode C to point to bitMap C, the method further comprises: creating a bitMap BB, pointing the bitMap BB to a bitMap B, and setting an inode B to point to the bitMap BB.
8. The method of claim 4, wherein copying a set of data block references in a most recent data copy of the original file as a set of data block references for the data copy and pointing the set of data block references to the set of data block references for the original file and to a data block of a file corresponding to the data copy that is newly added relative to the original file comprises:
Copying the bitMap B and renaming the bitMap B as a bitMap C;
directing inode C to bitMap C, and directing bitMap C to bitMap A and the newly added data block;
wherein,
the original file consists of an inode a, a bit Map A and a data block associated with the bit Map A, wherein the inode a and the bit Map A are respectively a file index node and a data block reference set of the original file;
the inode B and the bitMap B are file index nodes and data block reference sets of the latest data copy, and the inode C and the bitMap C are file index nodes and data block reference sets of the data copy.
9. The method of any of claims 1 to 8, wherein, in the event that the copy mode is the fast copy mode, after creating the copy of data, the method further comprises:
closing the created data copy;
when the length of the copy chain of the created data copy is larger than or equal to a first preset value, the incremental copy mode is adopted to create a new data copy instead of the quick copy mode.
10. The method of claim 2, wherein, in the event that the copy mode is the incremental copy mode, after creating the copy of data, the method further comprises:
And merging the multiple data block reference sets in the copy chain into a new data block reference set when the data block reference set in the latest data copy is larger than or equal to a second preset value, and creating a new data copy by adopting a full-volume copy mode.
11. The method of claim 10, wherein, in the event that the replica mode is the fast replica mode, after creating the data replica, the method further comprises: and calculating the sum of the sizes of all the data block reference sets in the copy chain, and if the sum is equal to or larger than a third preset value, creating a new data copy by adopting a full-volume copy mode.
12. The method of claim 11, wherein the second preset value and the third preset value are half the size of a most basic set of data block references.
13. A method of creating a copy of data, wherein the method comprises: in the case where the original file has a copy of the original data:
creating a set of data block references as a set of data block references for the data copy;
the data block reference set points to a data block reference set positioned at the tail of a copy chain of the latest data copy of the original file and points to a data block which is newly added by the file corresponding to the data copy relative to the file corresponding to the latest received data copy;
Creating the data copy based on the set of data block references;
the original data copy refers to a data copy b obtained through the following steps:
step S401, copying the inode a and modifying the file name related information to form an inode b; step S402, creating a bit map B pointing to the bit map A and an index B pointing to the bit map B, thereby forming a data copy B; step S403, creating a bitMap AA pointing to a bitMap A, and modifying the record pointing to the bitMap A in the inode a to point to the bitMap AA; wherein, the data blocks pointed by the bitMap AA and the bitMap AA are empty; the original file a consists of an inode a, a bitMapA and a data block associated with the bitMapA.
14. The method of claim 13, wherein the replica chain includes a plurality of data block reference sets formed into a chain, each of the plurality of data block reference sets other than the data block reference set located at the chain head of the chain as the original file pointing to a previous data block reference set in the chain and also pointing to a data block that is newly added relative to the file to which the previous data block reference set corresponds.
15. The method of claim 13, wherein the method further comprises: and under the condition that the original file does not have an original data copy, creating a data block reference set for the data copy, and pointing the data block reference set to the data block reference set of the original file and pointing to a data block of a file corresponding to the data copy, which is newly added relative to the original file.
16. The method of claim 13, wherein the method further comprises: copying the file index node in the latest data copy, and modifying the file name and the file path of the file index node as the file index node of the data copy.
17. The method of claim 13, wherein creating a set of data block references for the data copy and pointing the set of data block references to the set of data block references of the original file and to the data block of the file to which the data copy corresponds that is newly added relative to the original file comprises:
creating a bitMap B, setting the bitMap B to point to the bitMap A and a new incremental data block, and setting the inode B to point to the bitMap B;
wherein,
the original file consists of an inode a, a bit Map A and a data block associated with the bit Map A, wherein the inode a and the bit Map A are respectively a file index node and a data block reference set of the original file;
and the inode B and the bitMap B are respectively a file index node and a data block reference set of the file corresponding to the data copy.
18. The method of claim 17, wherein after setting inode B to point to bitMap B, the method further comprises:
Creating a bitMap AA, and pointing the bitMap AA to a bitMap A; and is also provided with
And setting an inode a to point to the bitMap AA.
19. The method of claim 13, wherein creating a set of data block references as the set of data block references for the data copy, pointing the set of data block references to the set of data block references located at the end of the copy chain of the latest data copy of the original file and to the data block newly added for the file corresponding to the data copy relative to the file corresponding to the latest received data copy comprises:
creating a bitMap C, setting the bitMap C as a data block pointing to the bitMap B and a new increment, and setting an inode C as a data block pointing to the bitMap C;
the inode B and the bitMap B are file index nodes and data block reference sets of the latest data copy, and the inode C and the bitMap C are file index nodes and data block reference sets of the data copy.
20. The method of claim 19, wherein after setting inode C to point to bitMap C, the method further comprises: creating a bitMap BB, pointing the bitMap BB to a bitMap B, and setting an inode B to point to the bitMap BB.
21. The method of any of claims 13 to 20, wherein after creating the copy of data, the method further comprises:
closing the created data copy;
when the length of the copy chain of the created data copy is larger than or equal to a first preset value, an incremental copy mode is adopted to create a new data copy instead of a quick copy mode.
22. The method of any of claims 13 to 20, wherein after creating the copy of data, the method further comprises: and calculating the sum of the sizes of all the data block reference sets in the copy chain, and if the sum is equal to or larger than a third preset value, creating a new data copy by adopting a full-volume copy mode.
23. The method of claim 22, wherein the third preset value is half a size of a most basic set of data block references.
24. A method of creating a copy of data, wherein the method comprises: in the case where a copy of the original data exists for the original file,
copying a data block reference set in the latest data copy of the original file to be used as the data block reference set of the data copy;
the data block reference set points to the data block reference set of the original file and points to the data block which is newly added relative to the original file by the file corresponding to the data copy;
Creating the data copy based on the set of data block references;
the original data copy refers to a data copy b obtained through the following steps:
step S401, copying the inode a and modifying the file name related information to form an inode b;
step S402, creating a bit map B pointing to the bit map A and an inode B pointing to the bit map B, thereby forming a data copy B; step S403, creating a bitMap AA pointing to a bitMap A, and modifying the record pointing to the bitMap A in the inode a to point to the bitMap AA; wherein, the data blocks pointed by the bitMap AA and the bitMap AA are empty; the original file a consists of an inode a, a bitMapA and a data block associated with the bitMapA.
25. The method of claim 24, wherein the method further comprises: and under the condition that the original file does not have an original data copy, creating a data block reference set for the data copy, and pointing the data block reference set to the data block reference set of the original file and pointing to a data block of a file corresponding to the data copy, which is newly added relative to the original file.
26. The method of claim 24, wherein the method further comprises: copying the file index node in the latest data copy, and modifying the file name and the file path of the file index node as the file index node of the data copy.
27. The method of claim 24, wherein creating a set of data block references for the data copy and pointing the set of data block references to the set of data block references of the original file and to the data block of the file to which the data copy corresponds that is newly added relative to the original file comprises:
creating a bitMap B, setting the bitMap B to point to the bitMap A and a new incremental data block, and setting the inode B to point to the bitMap B;
wherein,
the original file consists of an inode a, a bit Map A and a data block associated with the bit Map A, wherein the inode a and the bit Map A are respectively a file index node and a data block reference set of the original file;
and the inode B and the bitMap B are respectively a file index node and a data block reference set of the file corresponding to the data copy.
28. The method of claim 27, wherein after setting inode B to point to bitMap B, the method further comprises: creating a bitMap AA, pointing the bitMap AA to a bitMap A, and setting an inode a to point to the bitMap AA.
29. The method of claim 24, wherein copying a set of data block references in a most recent data copy of the original file as a set of data block references for the data copy and pointing the set of data block references to the set of data block references for the original file and to a data block of a file corresponding to the data copy that is newly added relative to the original file comprises:
Copying the bitMap B and renaming the bitMap B as a bitMap C;
directing inode C to bitMap C, and directing bitMap C to bitMap A and the newly added data block;
wherein,
the original file consists of an inode a, a bit Map A and a data block associated with the bit Map A, wherein the inode a and the bit Map A are respectively a file index node and a data block reference set of the original file;
the inode B and the bitMap B are file index nodes and data block reference sets of the latest data copy, and the inode C and the bitMap C are file index nodes and data block reference sets of the data copy.
30. The method of any of claims 24 to 29, wherein after creating the copy of data, the method further comprises:
and merging a plurality of data block reference sets in a copy chain into a new data block reference set when the data block reference set in the latest data copy is larger than or equal to a second preset value, and creating a new data copy by adopting a full-volume copy mode.
31. The method of claim 30, wherein the second preset value is half a size of a most basic set of data block references.
32. A method of data backup, comprising:
Receiving a data backup request;
in response to the data backup request, performing the method of creating a data copy as claimed in any one of claims 1 to 31 to create a data copy for data backup.
33. A method of data recovery, comprising:
receiving a data recovery request;
in response to the data recovery request, performing the method of creating a data copy according to any one of claims 1 to 31 to create a data copy for data recovery.
34. An apparatus for creating a copy of data, comprising:
a receiving module configured to receive a data copy creation request;
a determination module configured to determine, in response to the data copy creation request, a type of copy mode to be employed to create the data copy, wherein the type of copy mode includes at least one of: a fast copy mode and an incremental copy mode;
a creation module configured to create the data copy based on a type of the copy mode;
wherein the creation module is further configured to:
when the copy mode is the fast copy mode and an original file has an original data copy, creating a data block reference set for the data copy, and pointing the created data block reference set to a data block reference set at the tail of a copy chain of the latest data copy of the original file and to a data block newly added by a file corresponding to the data copy relative to the file corresponding to the latest data copy so as to create the data copy;
When the copy mode is the incremental copy mode and an original file has an original data copy, copying a data block reference set in the latest data copy of the original file to serve as a data block reference set of the data copy, and pointing the data block reference set to the data block reference set of the original file and to a data block which is newly added relative to the original file by a file corresponding to the data copy so as to create the data copy;
and under the condition that the copy mode is the quick copy mode or the increment copy mode and only an original file exists and an original data copy of the original file does not exist, creating a data block reference set for the data copy, and pointing the data block reference set to the data block reference set of the original file and pointing to a data block of a file corresponding to the data copy, which is newly added relative to the original file.
35. An apparatus for creating a copy of data, wherein in the event that an original file exists with an original copy of data, the apparatus comprises:
a Bitmap creation module configured to create a set of data block references as a set of data block references for the data copy;
The pointing module is configured to point the data block reference set to the data block reference set at the tail of the copy chain of the latest data copy of the original file and point to the data block of the file corresponding to the data copy which is newly added relative to the file corresponding to the latest received data copy;
a fast copy creation module configured to create the data copy based on the set of data block references;
the original data copy refers to a data copy b obtained through the following steps:
step S401, copying the inode a and modifying the file name related information to form an inode b; step S402, creating a bit map B pointing to the bit map A and an index B pointing to the bit map B, thereby forming a data copy B; step S403, creating a bit map AA pointing to a bit map A, and modifying the record pointing to the bit map A in the inode a to point to the bit map A; wherein, the data blocks pointed by the bitMap AA and the bitMap AA are empty; the original file a consists of an inode a, a bitMapA and a data block associated with the bitMapA.
36. An apparatus for creating a copy of data, wherein in the event that an original file exists with an original copy of data, the apparatus comprises:
A copying module configured to copy a set of data block references in a latest data copy of an original file as the set of data block references of the data copy;
the pointer module is configured to point the data block reference set to the data block reference set of the original file and point to the data block of the file corresponding to the data copy, which is newly added relative to the original file;
an incremental copy creation module configured to create the data copy based on the set of data block references;
the original data copy refers to a data copy b obtained through the following steps:
step S401, copying the inode a and modifying the file name related information to form an inode b; step S402, creating a bit map B pointing to the bit map A and an index B pointing to the bit map B, thereby forming a data copy B; step S403, creating a bitMap AA pointing to a bitMap A, and modifying the record pointing to the bitMap A in the inode a to point to the bitMap AA; wherein, the data blocks pointed by the bitMap AA and the bitMap AA are empty; the original file a consists of an inode a, a bitMapA and a data block associated with the bitMapA.
37. An apparatus for data backup, comprising:
A write request receiving module configured to receive a data backup request;
a data backup module configured to perform the method of creating a data copy as claimed in any one of claims 1 to 31 to create a data copy for data backup in response to the data backup request.
38. An apparatus for data recovery, comprising:
a recovery request receiving module configured to receive a data recovery request;
a data recovery module configured to perform the method of creating a data copy according to any one of claims 1 to 31 to create a data copy for data recovery in response to the data recovery request.
39. A computer device comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the processor executing the computer program for implementing the method of any one of claims 1-31.
40. A readable storage medium storing a computer program, wherein the computer program is for implementing the method of any one of claims 1-31 when executed by a processor.
CN202110149931.8A 2021-02-03 2021-02-03 Method and device for creating data copy Active CN112860486B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110149931.8A CN112860486B (en) 2021-02-03 2021-02-03 Method and device for creating data copy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110149931.8A CN112860486B (en) 2021-02-03 2021-02-03 Method and device for creating data copy

Publications (2)

Publication Number Publication Date
CN112860486A CN112860486A (en) 2021-05-28
CN112860486B true CN112860486B (en) 2024-01-12

Family

ID=75987676

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110149931.8A Active CN112860486B (en) 2021-02-03 2021-02-03 Method and device for creating data copy

Country Status (1)

Country Link
CN (1) CN112860486B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8117160B1 (en) * 2008-09-30 2012-02-14 Emc Corporation Methods and apparatus for creating point in time copies in a file system using reference counts
US9152628B1 (en) * 2008-09-23 2015-10-06 Emc Corporation Creating copies of space-reduced files in a file server having a redundant data elimination store
CN109359087A (en) * 2018-06-15 2019-02-19 深圳市木浪云数据有限公司 Instant file index and searching method, apparatus and system
CN110362425A (en) * 2019-06-05 2019-10-22 黄疆 Based on the data copy guard method and system for writing copy
US10853186B1 (en) * 2017-10-13 2020-12-01 EMC IP Holding Company LLC Content indexed integrated copy data by integrating elastic search and storage system snapshot differential data

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6934822B2 (en) * 2002-08-06 2005-08-23 Emc Corporation Organization of multiple snapshot copies in a data storage system
US9772907B2 (en) * 2013-09-13 2017-09-26 Vmware, Inc. Incremental backups using retired snapshots
US10380072B2 (en) * 2014-03-17 2019-08-13 Commvault Systems, Inc. Managing deletions from a deduplication database
US9904598B2 (en) * 2015-04-21 2018-02-27 Commvault Systems, Inc. Content-independent and database management system-independent synthetic full backup of a database based on snapshot technology
US20200401489A1 (en) * 2019-06-24 2020-12-24 Commvault Systems, Inc. Content indexing of files in virtual disk block-level backup copies
CN115480704A (en) * 2022-09-21 2022-12-16 曙光信息产业(北京)有限公司 Method, device and equipment for constructing data block group migration mapping table and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9152628B1 (en) * 2008-09-23 2015-10-06 Emc Corporation Creating copies of space-reduced files in a file server having a redundant data elimination store
US8117160B1 (en) * 2008-09-30 2012-02-14 Emc Corporation Methods and apparatus for creating point in time copies in a file system using reference counts
US10853186B1 (en) * 2017-10-13 2020-12-01 EMC IP Holding Company LLC Content indexed integrated copy data by integrating elastic search and storage system snapshot differential data
CN109359087A (en) * 2018-06-15 2019-02-19 深圳市木浪云数据有限公司 Instant file index and searching method, apparatus and system
CN110362425A (en) * 2019-06-05 2019-10-22 黄疆 Based on the data copy guard method and system for writing copy

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Characterization of Incremental Data Changes for Efficient Data Protection;Hyong Shim等;《2013 USENIX Annual Technical Conference》;第157-168页 *
一种基于增量存储的多副本文件版本控制方法;王栋;边根庆;李睿尧;;物联网技术(第09期);第73-75页 *
云端数据完整性验证和数据恢复机制研究;游历;《中国优秀硕士学位论文全文数据库 信息科技辑》(第1期);I138-50 *
重复数据删除技术;敖莉等;《软件学报》;第10卷(第5期);第916-929页 *

Also Published As

Publication number Publication date
CN112860486A (en) 2021-05-28

Similar Documents

Publication Publication Date Title
CN111316245B (en) Restoring databases using fully hydrated backups
EP2494456B1 (en) Backup using metadata virtual hard drive and differential virtual hard drive
AU700681B2 (en) A method of operating a computer system
US7284104B1 (en) Volume-based incremental backup and recovery of files
CN103605588B (en) A kind of disk backup method of virtue machine
KR100689762B1 (en) A database system and method for storing a plurality of database components in main memory thereof
JP4419884B2 (en) Data replication apparatus, method, program, and storage system
US11093387B1 (en) Garbage collection based on transmission object models
CN109144416B (en) Method and device for querying data
CN103262043A (en) Method and system of performing a granular restore of a database from a differential backup
US11847028B2 (en) Efficient export of snapshot changes in a storage system
CN104360914A (en) Incremental snapshot method and device
CN104765794A (en) Database partitioning method and device
CN115098299B (en) Backup method, disaster recovery method, device and equipment of virtual machine
CN107506466B (en) Small file storage method and system
CN112800019A (en) Data backup method and system based on Hadoop distributed file system
US7631020B1 (en) Method and system of generating a proxy for a database
CN103838645A (en) Remote difference synthesis backup method based on Hash
CN112860486B (en) Method and device for creating data copy
CN112912853B (en) Anytime point copy to the cloud
CN109325005B (en) Data processing method and electronic equipment
CN114026545A (en) Snapshot for arbitrary point in time replication
CN114924914B (en) Disk partition table information backup and recovery method and system
CN115658391A (en) Backup recovery method of WAL mechanism based on QianBase MPP database
TWI536161B (en) Backup method, recovery method and computer, computer program product and computer readable recording medium thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211027

Address after: 518103 514, building 1, hengtaiyu building, Tangwei community, Fenghuang street, Guangming District, Shenzhen, Guangdong

Applicant after: Shenzhen mulangyun Technology Co.,Ltd.

Address before: No.405, Phoenix building, No.15, Keji North 1st Road, Nanshan District, Shenzhen, Guangdong 518052

Applicant before: SHENZHEN MULANG CLOUD DATA Co.,Ltd.

GR01 Patent grant
GR01 Patent grant