CN109491961B - File system snapshot method and snapshot device - Google Patents

File system snapshot method and snapshot device Download PDF

Info

Publication number
CN109491961B
CN109491961B CN201811232303.0A CN201811232303A CN109491961B CN 109491961 B CN109491961 B CN 109491961B CN 201811232303 A CN201811232303 A CN 201811232303A CN 109491961 B CN109491961 B CN 109491961B
Authority
CN
China
Prior art keywords
data
snapshot
file
operation instruction
file system
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
CN201811232303.0A
Other languages
Chinese (zh)
Other versions
CN109491961A (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201811232303.0A priority Critical patent/CN109491961B/en
Publication of CN109491961A publication Critical patent/CN109491961A/en
Application granted granted Critical
Publication of CN109491961B publication Critical patent/CN109491961B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method for snapshotting a file system, which comprises the following steps: acquiring an operation instruction corresponding to a first file system, wherein the first file system is used for storing first file data; when the operation instruction is used for indicating that data in the first file data is not modified, determining that snapshot operation is not performed on the first file data; when the operation instruction is used for indicating to modify the data in the first file data, judging whether the operation instruction is a target operation instruction, wherein the target operation instruction is used for executing first rewriting operation on the first file data; and if so, determining to execute snapshot operation on the first file data. The embodiment of the application also provides corresponding snapshot equipment. According to the technical scheme, the operation instruction in the file system can be obtained, and whether snapshot operation is performed on the file data or not is determined according to the action of the operation instruction, so that unnecessary snapshot operation can be reduced, and the problem that the service performance of the file system and the utilization of a snapshot space are influenced by the unnecessary snapshot operation is solved.

Description

File system snapshot method and snapshot device
Technical Field
The present application relates to the field of data protection technologies, and in particular, to a method for snapshotting a file system and a snapshot device.
Background
With the rapid development of society, under the background of current big data, cloud computing and artificial intelligence, the amount of data needing to be stored is also increased at a doubled speed, which also puts new requirements and challenges on backup protection of data, and snapshots play an important role as an important data protection means in the field.
At present, snapshot technologies including copy-on-write, redirect-on-write, incremental snapshot, and persistent data protection have been developed more and more, but most of snapshots are implemented on a block device layer at present, and there are few snapshot technology applications for Network Attached Storage (NAS) services and file systems. In the block device layer snapshot technology, when a new file is written, the block device layer cannot distinguish whether file data exists before the current storage position, and many original useless data are subjected to snapshot copy.
Disclosure of Invention
The embodiment of the application provides a method and a snapshot device for snapshot of a file system, which can obtain an operation instruction corresponding to the file system, and determine whether to perform snapshot operation on file data of the file system according to the action of the operation instruction, so that unnecessary snapshot operation can be reduced, and the problem that the redundant snapshot operation affects the service performance of the file system and the utilization of a snapshot space is solved.
In order to achieve the above purpose, the embodiments of the present application provide the following technical solutions:
a first aspect of the present application provides a method for making a snapshot of a file system, where the method may include: acquiring an operation instruction corresponding to a first file system, wherein the first file system is used for storing first file data; when the operation instruction is used for indicating that data in the first file data is not modified, determining that snapshot operation is not performed on the first file data; when the operation instruction is used for indicating to modify the data in the first file data, judging whether the operation instruction is a target operation instruction, wherein the target operation instruction is used for executing first rewriting operation on the first file data; and if so, determining to execute the snapshot operation on the first file data.
Optionally, with reference to the first aspect, in a first possible implementation manner, the instructing, without modifying data in the first file data, the operating instruction includes: the operation instruction is used for indicating that second file data is created in the file system or indicating that data is added in the first file data.
Optionally, with reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner, before the obtaining the operation instruction corresponding to the first file system, the method further includes: and creating a second file system corresponding to the first file system, wherein the second file system is used for executing the snapshot operation.
Optionally, with reference to the second possible implementation manner of the first aspect, in a third possible implementation manner, the determining whether the operation instruction is a target operation instruction includes: judging whether snapshot data corresponding to the first file data exists in the second file system; if not, determining that the operation instruction is the target operation instruction.
Optionally, with reference to the first aspect, the first or third any possible implementation manner of the first aspect, in a fourth possible implementation manner, the determining to execute the snapshot operation on the first file data includes: and generating snapshot data corresponding to the first file data in the second file system.
A second aspect of the present application provides a snapshot device having functionality to implement the method of the first aspect or any one of the possible implementation manners of the first aspect. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
A third aspect of the present application provides a snapshot apparatus, including: a processor and a memory; the memory is configured to store computer-executable instructions, and when the snapshot apparatus runs, the processor executes the computer-executable instructions stored in the memory, so as to enable the snapshot apparatus to perform the method for making a snapshot of a file system according to the first aspect or any one of the possible implementations of the first aspect.
A fourth aspect of the present application provides a computer-readable storage medium, which stores instructions that, when executed on a computer, enable the computer to perform the method for making a snapshot of a file system of the first aspect or any one of the possible implementations of the first aspect.
A fifth aspect of the present application provides a computer program product containing instructions that, when executed on a computer, enable the computer to perform the method for making a snapshot of a file system of the first aspect or any one of the possible implementations of the first aspect.
A sixth aspect of the present application provides a chip system, where the chip system includes a processor, configured to support a snapshot device to implement the functions related to the first aspect or any one of the possible implementation manners of the first aspect. In one possible design, the system-on-chip further includes a memory for storing necessary program instructions and data for the snapshot device. The chip system may be constituted by a chip, or may include a chip and other discrete devices.
According to the embodiment of the application, the operation instruction corresponding to the file system can be obtained, whether snapshot operation is carried out on the file data of the file system is determined according to the action of the operation instruction, when the operation instruction is used for indicating that rewriting operation is not carried out on the original file data in the file system, snapshot operation is not carried out on the file data, and when the operation instruction is used for indicating that the first rewriting operation is carried out on the original file data in the file system, the snapshot operation is carried out on the file data, so that unnecessary snapshot operation can be reduced, and the problem that the redundant snapshot operation affects the service performance of the file system and the utilization of a snapshot space is solved.
Drawings
FIG. 1 is a schematic diagram of an embodiment of a method for making a snapshot of a file system in an embodiment of the present application;
FIG. 2 is a schematic diagram of another embodiment of a method for making a snapshot of a file system in an embodiment of the present application;
FIG. 3 is a schematic diagram of another embodiment of a method for making a snapshot of a file system in an embodiment of the present application;
FIG. 4 is a schematic diagram of another embodiment of a method for making a snapshot of a file system in an embodiment of the present application;
FIG. 5 is a schematic diagram of another embodiment of a method for making a snapshot of a file system in an embodiment of the present application;
FIG. 6 is a schematic diagram of an embodiment of a snapshot device in an embodiment of the present application;
fig. 7 is a schematic diagram of another embodiment of the snapshot device in the embodiment of the present application.
Detailed Description
Embodiments of the present application will now be described with reference to the accompanying drawings, and it is to be understood that the described embodiments are merely illustrative of some, but not all, embodiments of the present application. As can be known to those skilled in the art, with the evolution of the graph computation framework and the emergence of new application scenarios, the technical solution provided in the embodiments of the present application is also applicable to similar technical problems.
The embodiment of the application provides a method and equipment for snapshot of a file system, which can obtain an operation instruction corresponding to the file system and determine whether to perform snapshot operation on file data of the file system according to the action of the operation instruction, so that unnecessary snapshot operation can be reduced, and the problem that the service performance of the file system and the utilization of a snapshot space are influenced by the unnecessary snapshot operation is solved.
The terms "first," "second," and the like in the description and in the claims of the present application and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Moreover, the terms "comprises," "comprising," and any other variation 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 modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not expressly listed or inherent to such process, method, article, or apparatus. The naming or numbering of the steps appearing in the present application does not mean that the steps in the method flow have to be executed in the chronological/logical order indicated by the naming or numbering, and the named or numbered process steps may be executed in a modified order depending on the technical purpose to be achieved, as long as the same or similar technical effects are achieved. The division of the modules presented in this application is a logical division, and in practical applications, there may be another division, for example, multiple modules may be combined or integrated into another system, or some features may be omitted, or not executed, and in addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some interfaces, and the indirect coupling or communication connection between the modules may be in an electrical or other similar form, which is not limited in this application. The modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in a plurality of circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present disclosure.
The snapshot is a protection means for file data in the storage technology, and is a backup of the file data at a specific time point, and when the original file data is damaged, the snapshot data generated by the snapshot technology can be used for data recovery. The embodiment of the application adopts a snapshot type which is a copy-on-write type in a snapshot technology, and the snapshot technology can copy old data into a snapshot space before the old data is covered for the first time.
Fig. 1 is a schematic diagram of an embodiment of a method for making a snapshot of a file system in an embodiment of the present application.
As shown in fig. 1, an embodiment of a method for making a snapshot of a file system in an embodiment of the present application includes:
101. and acquiring an operation instruction corresponding to a first file system, wherein the first file system stores first file data.
In this embodiment, when an operation instruction is generated in the first file system, the snapshot device may obtain the operation instruction, and determine the role of the operation instruction, where the role of the operation instruction may be to instruct to modify data in the first file data or to instruct not to modify data in the first file data, and the snapshot device may determine the role of the operation instruction through the first file system.
102. When the operation instruction is used for indicating that data in the first file data is not modified, the snapshot operation is determined not to be executed on the first file data.
The operation instruction for not modifying the data in the first file data may include a case where one is to instruct creation of second file data in the first file system, the second file data and the first file data being independent of each other, and another is to add data in the first file data, and when the operation instruction is for not modifying the data in the first file data, the snapshot device does not perform a snapshot operation on the first file data.
103. And when the operation instruction is used for indicating to modify the data in the first file data, judging whether the operation instruction is a target operation instruction.
When the operation instruction is used to instruct to modify data in the first file data, the snapshot device may determine whether the operation instruction is a target operation instruction, where the target operation instruction is an operation instruction used to instruct to perform a first rewrite operation on the first file data, and a manner of determining whether the operation instruction is the target operation instruction may be to determine whether snapshot data corresponding to the first file data exists in a file system that performs a snapshot operation.
104. And if the operation instruction is a target operation instruction, determining to execute snapshot operation on the first file data.
If the operation instruction is a target operation instruction for instructing to execute a first rewriting operation on the first file data, the snapshot device executes a snapshot operation on the first file data.
In this embodiment, the snapshot device determines whether to perform a snapshot operation on the first file data in the first file system by performing a distinguishing judgment on the operation instruction in the first file system, so as to avoid an unnecessary snapshot operation, thereby reducing the influence of the unnecessary snapshot operation and the unnecessary snapshot data on the service performance and the snapshot space utilization of the file system.
Since the operation instruction in the first file system can be used to instruct to create the second file data in the first file system, or to instruct to add data to the first file data in the first file system, or to modify data in the first file data, the following three cases are described separately:
firstly, the operation instruction is used for indicating that second file data is created in the first file system.
Fig. 2 is a schematic diagram of another embodiment of a method for making a snapshot of a file system in an embodiment of the present application.
As shown in fig. 2, another embodiment of the method for making a snapshot of a file system in the embodiment of the present application includes:
201. and creating a second file system corresponding to the first file system.
In this embodiment, the snapshot device may create a second file system corresponding to the first file system according to the metadata information of the first file system and the disk data structure corresponding to the first file system type, where the second file system is used to perform a snapshot operation.
202. And acquiring an operation instruction corresponding to a first file system, wherein the first file system stores first file data.
Step 202 is similar to step 101, and the detailed description can refer to the related description in step 101, which is not repeated herein.
203. When the operation instruction is used for instructing to create the second file data in the first file system, the snapshot operation is determined not to be executed on the first file data.
The snapshot device identifies that the operation instruction is used for indicating that the snapshot device does not execute snapshot operation on the first file data when the second file data is created in the first file system.
In this embodiment, in the case that the operation instruction is used to instruct to create the second file data in the first file system, the snapshot device may avoid unnecessary snapshot operations, and reduce the influence on the service performance of the file system and the utilization of the snapshot space.
And secondly, the operation instruction is used for indicating that data is added in the first file data of the first file system.
Fig. 3 is a schematic diagram of another embodiment of a method for making a snapshot of a file system in an embodiment of the present application.
As shown in fig. 3, another embodiment of the method for making a snapshot of a file system in the embodiment of the present application includes:
301. and creating a second file system corresponding to the first file system.
302. And acquiring an operation instruction corresponding to a first file system, wherein the first file system stores first file data.
Steps 301 and 302 are similar to steps 201 and 202, and the detailed description may refer to the related description in steps 201 and 202, which is not repeated herein.
303. When the operation instruction is used for indicating to add data in the first file data, the snapshot operation is determined not to be executed on the first file data.
The snapshot device identifies that the operation instruction is used for indicating that the snapshot device does not execute snapshot operation on the first file data when data is added to the first file data.
In this embodiment, in the case that the operation instruction is used to instruct to add data to the first file data, the snapshot device may avoid performing redundant snapshot operations, and reduce the impact on the service performance of the file system and the utilization of the snapshot space.
And thirdly, the operation instruction is used for modifying the data in the first file data.
The case that the operation instruction is used to modify the data in the first file data can be further divided into two cases, one is that the operation instruction is used to perform a first-time rewrite operation on the first file data, and the other is that the operation instruction is used to perform a non-first-time rewrite operation on the first file data, and the two cases can be distinguished by determining whether snapshot data corresponding to the first file data exists in the second file system, and the following two cases are described separately:
the operation instruction is used for executing non-first-time rewriting operation on the first file data.
Fig. 4 is a schematic diagram of another embodiment of a method for making a snapshot of a file system in an embodiment of the present application.
As shown in fig. 4, another embodiment of the method for making a snapshot of a file system in the embodiment of the present application includes:
401. and creating a second file system corresponding to the first file system.
402. And acquiring an operation instruction corresponding to a first file system, wherein the first file system stores first file data.
Steps 401 and 402 are similar to steps 301 and 302, and the detailed description may refer to the related description in steps 301 and 302, which is not repeated herein.
403. When the operation instruction is used for indicating to modify the data in the first file data, judging whether snapshot data corresponding to the first file data exists in the second file system.
If the snapshot device judges that snapshot data corresponding to the first file data exists in the second file system, the operation instruction is used for executing non-first-time rewriting operation on the first file data; and if the snapshot device judges that the snapshot data corresponding to the first file data does not exist in the second file system, the operation instruction is used for executing the first rewriting operation on the first file data.
404. And if the snapshot data corresponding to the first file data exists in the second file system, determining that the snapshot operation is not executed on the first file data.
If the snapshot device determines that the snapshot data corresponding to the first file data exists in the second file system, it indicates that the operation instruction is used to perform the non-first-time overwriting operation on the first file data.
In this embodiment, when the operation instruction is used to perform a non-first-time rewrite operation on the first file data, the snapshot data corresponding to the first file data is already stored in the second file system, so that the snapshot device does not perform a snapshot operation on the first file data, thereby avoiding generation of redundant snapshot operations and snapshot data.
And (II) the operation instruction is used for executing first rewriting operation on the first file data.
Fig. 5 is a schematic diagram of another embodiment of a method for making a snapshot of a file system in an embodiment of the present application.
As shown in fig. 5, another embodiment of the method for making a snapshot of a file system in the embodiment of the present application includes:
501. and creating a second file system corresponding to the first file system.
502. And acquiring an operation instruction corresponding to a first file system, wherein the first file system stores first file data.
503. When the operation instruction is used for indicating to modify the data in the first file data, judging whether snapshot data corresponding to the first file data exists in the second file system.
Steps 501 to 503 are similar to steps 401 to 403, and the detailed description may refer to the related description in steps 401 to 403, which is not repeated herein.
504. And if the snapshot data corresponding to the first file data does not exist in the second file system, determining to execute snapshot operation on the first file data.
If the snapshot device determines that the snapshot data corresponding to the first file data does not exist in the second file system, it indicates that the operation instruction is used to perform a first rewriting operation on the first file data, and in this case, the snapshot device performs a snapshot operation on the first file data.
505. And copying the first file data to a cache space corresponding to the second file data, and marking the first file data as dirty data.
After determining that the snapshot operation is performed on the first file data, the snapshot device needs to copy the first file data to a corresponding cache space, mark the first file data as dirty data, and then perform subsequent operations.
506. And flushing the dirty data into the disk space corresponding to the second file system.
After the dirty data is generated in the cache, the dirty data is written into a disk from the cache, and the snapshot data corresponding to the first file data is generated after the flushing of the dirty data is completed.
In this embodiment, when the operation instruction is used to perform a first overwriting operation on the first file data, the snapshot device may perform a snapshot operation on the first file data, and when the first file data is damaged, data recovery may be performed through the snapshot data.
The above describes a method for snapshot of a file system in this embodiment, and a snapshot device in this embodiment is described below.
Fig. 6 is a schematic diagram of an embodiment of a snapshot apparatus in an embodiment of the present application.
As shown in fig. 6, an embodiment of the snapshot apparatus in the embodiment of the present application includes:
an obtaining unit 601, configured to obtain an operation instruction corresponding to a first file system, where the first file system is used to store first file data;
a first determining unit 602, configured to determine that a snapshot operation is not performed on the first file data when the operation instruction acquired by the acquiring unit 601 is used to indicate that data in the first file data is not modified;
a judging unit 603 configured to, when the operation instruction acquired by the acquiring unit 601 is used to instruct to modify data in the first file data, judge whether the operation instruction is a target operation instruction, where the target operation instruction is an operation instruction for performing a first rewrite operation on the first file data;
a second determining unit 604, configured to determine to perform the snapshot operation on the first file data when the judging unit 603 determines that the operation instruction is the target operation instruction.
An embodiment of the snapshot apparatus in the embodiment of the present application further includes:
the creating unit 605 is configured to create a second file system corresponding to the first file system before the obtaining unit 601 obtains the operation instruction corresponding to the first file system, where the second file system is used to perform the snapshot operation.
In this embodiment, the determining unit 603 may further include:
a determining module 6031, configured to determine whether snapshot data corresponding to the first file data exists in the second file system;
a determining module 6032, configured to determine that the operation instruction is the target operation instruction when the determining module 6031 determines that the snapshot data corresponding to the first file data does not exist in the second file system.
The second determining unit 604 may further include:
a generating module 6041, configured to generate snapshot data corresponding to the first file data in the second file system.
The snapshot device in the embodiment of the present application is described above from the perspective of the modular functional entity, and the snapshot device in the embodiment of the present application is described below from the perspective of the hardware processing.
Fig. 7 is a schematic diagram of another embodiment of the snapshot device in the embodiment of the present application.
As shown in fig. 7, another embodiment of the snapshot apparatus in the embodiment of the present application includes:
a processor 701, a memory 702, and a bus 703.
The processor 701 controls the operation of the snapshot device, and the processor 701 may also be referred to as a Central Processing Unit (CPU). The memory 702 may include both read-only memory and random access memory, and provides instructions and data to the processor 701. A portion of memory 702 may also include non-volatile random access memory (NVRAM). In a specific application, the components of the snapshot apparatus are coupled together through a bus system 703, where the bus system 703 may include a power bus, a control bus, a status signal bus, and the like, in addition to a data bus. For clarity of illustration, however, the various buses are labeled in the figure as bus system 703.
The memory 702 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof:
and (3) operating instructions: comprises various operation instructions for realizing various operations;
operating the system: including various system programs for implementing various basic services and for handling hardware-based tasks.
The processor 701 is configured to execute the steps executed by the snapshot apparatus in this embodiment by calling the operation instruction stored in the memory 702.
The method disclosed in the embodiments of the present application may be applied to the processor 701, or implemented by the processor 701. The processor 701 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 701. The processor 701 may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 702, and the processor 701 reads the information in the memory 702 and performs the steps of the above method in combination with the hardware thereof.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: ROM, RAM, magnetic or optical disks, and the like.
The method for snapshot of a file system and the snapshot device provided in the embodiments of the present application are described in detail above, and a specific example is applied in the present application to explain the principle and the embodiments of the present application, and the description of the above embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (8)

1. A method of snapshotting a file system, comprising:
acquiring an operation instruction corresponding to a first file system, wherein the first file system is used for storing first file data;
when the operation instruction is used for indicating that data in the first file data is not modified, determining that snapshot operation is not performed on the first file data;
when the operation instruction is used for indicating to modify the data in the first file data, judging whether the operation instruction is a target operation instruction, wherein the target operation instruction is used for executing first rewriting operation on the first file data;
if yes, determining to execute the snapshot operation on the first file data;
before the obtaining of the operation instruction corresponding to the first file system, the method further includes:
creating a second file system corresponding to the first file system, wherein the second file system is used for executing the snapshot operation;
when the operation instruction is used for indicating to modify the data in the first file data, judging whether snapshot data corresponding to the first file data exists in the second file system; if snapshot data corresponding to the first file data exists in the second file system, determining that the snapshot operation is not executed on the first file data;
wherein the operation instruction is used for indicating that data in the first file data is not modified, and comprises the following steps: the operation instruction is used for indicating that second file data is created in the file system or indicating that data is added in the first file data.
2. The method of claim 1, wherein the determining whether the operation instruction is a target operation instruction comprises:
judging whether snapshot data corresponding to the first file data exists in the second file system;
if not, determining that the operation instruction is the target operation instruction.
3. The method of any of claims 1 or 2, wherein the determining to perform the snapshot operation on the first file data comprises:
and generating snapshot data corresponding to the first file data in the second file system.
4. A snapshot apparatus, comprising:
the device comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring an operation instruction corresponding to a first file system, and the first file system is used for storing first file data;
a first determining unit, configured to determine that a snapshot operation is not performed on the first file data when the operation instruction acquired by the acquiring unit is used to indicate that data in the first file data is not modified;
a determining unit, configured to determine whether the operation instruction is a target operation instruction when the operation instruction acquired by the acquiring unit is used to instruct to modify data in the first file data, where the target operation instruction is used to perform a first rewriting operation on the first file data;
a second determining unit, configured to determine to execute the snapshot operation on the first file data when the determining unit determines that the operation instruction is the target operation instruction;
wherein the snapshot device further comprises:
a creating unit, configured to create a second file system corresponding to the first file system before the obtaining unit obtains the operation instruction, where the second file system is used to execute the snapshot operation;
when the operation instruction is used for indicating to modify the data in the first file data, judging whether snapshot data corresponding to the first file data exists in the second file system; if snapshot data corresponding to the first file data exists in the second file system, determining that the snapshot operation is not executed on the first file data;
wherein the operation instruction is used for indicating that data in the first file data is not modified, and comprises the following steps: the operation instruction is used for indicating that second file data is created in the file system or indicating that data is added in the first file data.
5. The snapshot device of claim 4, wherein the determination unit comprises:
the judging module is used for judging whether snapshot data corresponding to the first file data exists in the second file system;
a determining module, configured to determine that the operation instruction is the target operation instruction when the determining module determines that snapshot data corresponding to the first file data does not exist in the second file system.
6. The snapshot device of any one of claims 4 or 5, wherein the second determination unit comprises:
and the generating module is used for generating snapshot data corresponding to the first file data in the second file system.
7. A snapshot apparatus, comprising:
a storage unit and a processing unit, wherein,
the storage unit is used for storing computer operation instructions;
the processing unit is used for calling the computer operation instruction to execute the method of the file system snapshot according to any one of claims 1 to 3.
8. A computer-readable storage medium comprising computer-operational instructions that, when executed on a computer, cause the computer to perform a method of file system snapshot as claimed in any one of claims 1-3.
CN201811232303.0A 2018-10-22 2018-10-22 File system snapshot method and snapshot device Active CN109491961B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811232303.0A CN109491961B (en) 2018-10-22 2018-10-22 File system snapshot method and snapshot device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811232303.0A CN109491961B (en) 2018-10-22 2018-10-22 File system snapshot method and snapshot device

Publications (2)

Publication Number Publication Date
CN109491961A CN109491961A (en) 2019-03-19
CN109491961B true CN109491961B (en) 2022-02-18

Family

ID=65692298

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811232303.0A Active CN109491961B (en) 2018-10-22 2018-10-22 File system snapshot method and snapshot device

Country Status (1)

Country Link
CN (1) CN109491961B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110188114B (en) * 2019-05-27 2021-09-10 上海达梦数据库有限公司 Data operation optimization method, device, system, equipment and storage medium
CN114490192A (en) * 2021-11-03 2022-05-13 统信软件技术有限公司 File backup method and device and computing equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101241456A (en) * 2008-02-28 2008-08-13 华为技术有限公司 Data protection method, device and memory apparatus
CN101650679A (en) * 2009-07-27 2010-02-17 浪潮电子信息产业股份有限公司 Efficient snapshot technology based on disk IO read-write change
CN103365926A (en) * 2012-03-30 2013-10-23 伊姆西公司 Method and device for storing snapshot in file system
CN105260266A (en) * 2015-09-24 2016-01-20 浪潮(北京)电子信息产业有限公司 Snapshot volume writing method and dependent snapshot system
CN106155569A (en) * 2015-04-07 2016-11-23 北京中科同向信息技术有限公司 A kind of storage snapping technique based on mirror image
CN106547759A (en) * 2015-09-17 2017-03-29 伊姆西公司 Method and apparatus for selecting incremental backup mode

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101241456A (en) * 2008-02-28 2008-08-13 华为技术有限公司 Data protection method, device and memory apparatus
CN101650679A (en) * 2009-07-27 2010-02-17 浪潮电子信息产业股份有限公司 Efficient snapshot technology based on disk IO read-write change
CN103365926A (en) * 2012-03-30 2013-10-23 伊姆西公司 Method and device for storing snapshot in file system
CN106155569A (en) * 2015-04-07 2016-11-23 北京中科同向信息技术有限公司 A kind of storage snapping technique based on mirror image
CN106547759A (en) * 2015-09-17 2017-03-29 伊姆西公司 Method and apparatus for selecting incremental backup mode
CN105260266A (en) * 2015-09-24 2016-01-20 浪潮(北京)电子信息产业有限公司 Snapshot volume writing method and dependent snapshot system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"媒体共享文件系统优化设计";刘发明;《中国优秀硕士学位论文全文数据库 信息科技辑》;20140115;论文正文第3章 *

Also Published As

Publication number Publication date
CN109491961A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
JP6186374B2 (en) System and method for secure migration to a virtualized platform
US11093162B2 (en) Method and apparatus for deleting cascaded snapshot
US10884645B2 (en) Virtual machine hot migration method, host machine and storage medium
US9727273B1 (en) Scalable clusterwide de-duplication
CN108701048B (en) Data loading method and device
CN109445861B (en) System starting method, device, computer device and storage medium
US9354907B1 (en) Optimized restore of virtual machine and virtual disk data
JP2020526843A (en) Methods for dirty page tracking and full memory mirroring redundancy in fault-tolerant servers
CN104407938A (en) Recovery method for various granularities after mirror-image-level backup of virtual machine
US20180107605A1 (en) Computing apparatus and method with persistent memory
CN103970585A (en) Method and device for creating virtual machine
CN112015491B (en) Method, device and computer storage medium for realizing function jump
CN106777394B (en) Cluster file system
RU2580016C1 (en) Method for transfer of control between memory areas
CN104216793A (en) Application program backing up and restoring method and device
CN109491961B (en) File system snapshot method and snapshot device
US9003139B1 (en) Systems and methods for recovering virtual machines after disaster scenarios
JP6380958B2 (en) Method, system, computer program, and application deployment method for passive monitoring of virtual systems
US10514972B2 (en) Embedding forensic and triage data in memory dumps
CN104268089A (en) Information updating method, device and system
CN114780208B (en) Method, system, device and storage medium for verifying backup validity of multi-platform virtual machine
CN109324931B (en) Method for realizing vmware mount recovery in data de-duplication system
CN114996955A (en) Target range environment construction method and device for cloud-originated chaotic engineering experiment
CN112346913A (en) Data recovery method, device, equipment and storage medium
JP6007532B2 (en) Virtualization system, virtualization server, migration method, migration program

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
GR01 Patent grant
GR01 Patent grant