CN103617097A - File recovery method and file recovery device - Google Patents

File recovery method and file recovery device Download PDF

Info

Publication number
CN103617097A
CN103617097A CN201310582886.0A CN201310582886A CN103617097A CN 103617097 A CN103617097 A CN 103617097A CN 201310582886 A CN201310582886 A CN 201310582886A CN 103617097 A CN103617097 A CN 103617097A
Authority
CN
China
Prior art keywords
file
information
data block
time point
assignment record
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.)
Granted
Application number
CN201310582886.0A
Other languages
Chinese (zh)
Other versions
CN103617097B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310582886.0A priority Critical patent/CN103617097B/en
Publication of CN103617097A publication Critical patent/CN103617097A/en
Application granted granted Critical
Publication of CN103617097B publication Critical patent/CN103617097B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a file recovery method and a file recovery device which are mainly applied to an ROW (redirect-on-write) file system used for managing and storing files. The method includes when detecting that metadata of a first file are damaged, writing content of the first file corresponding to a system snapshot of a first point-in-time into the file system corresponding to a second point-in-time to form a second file; updating the second file according to distribution record information of the first file. The first point-in-time is earlier than the second point-in-time which refers to the point-in-time of metadata damage, and the distribution record information refers to distribution records, for the first file, written in the file system between the first point-in-time and the second point-in-time. By the file recovery method and the file recovery device, files can be quickly and accurately recovered through the internal-snapshotting technology and the distribution record information of the file system.

Description

File restoration methods and device
Technical field
The present invention relates to technical field of memory, relate in particular to a kind of file restoration methods and device.
Background technology
At present, storage system is mostly by RAID(Redundant Arrays of Inexpensive Disks, disk array) the backup means such as redundancy backup, remote copy, snapshot strengthen the reliability of system.When these backup means all lost efficacy, if documentary metadata is damaged, it is the metadata that system snapping technique carrys out recovery file that system adopts inner snapshot conventionally.
System snapping technique refers to that system at set intervals to file backup once, when documentary metadata is damaged and when other backup means all lost efficacy, by the data reading in system snapshot being come and writing in current file system and recover this document, thus the metadata of recovery this document.But, if the last system shines soon the metadata of file and damages during this period of time, system was carried out modification to the data in file, now the metadata of file changes, utilize so system snapshot restore metadata be not up-to-date metadata, therefore, system snapping technique can not recover whole metadata, still likely cause file part metadata to be lost, thereby cause loss of data corresponding to this part metadata of this document.
Summary of the invention
technical matters
In view of this, the soluble technical matters of the present invention is to damage and when all backup means cannot recover when the metadata of file, how fast quick-recovery this document.
solution
In order to solve the problems of the technologies described above, according to one embodiment of the invention, provide a kind of file restoration methods, be applied to write and be redirected ROW type file system, described file system is for management and storage file, and the method comprises:
When the metadata of the first file being detected and damage, the content of described the first file corresponding to the system snapshot of very first time point is write to the file system that the second time point is corresponding, form the second file,
Wherein, described very first time point is before described the second time point, and described the second time point is the time point that described metadata is damaged;
According to the assignment record information of described the first file, upgrade described the second file,
Wherein, described assignment record information is to put and between described the second time point, write the assignment record for described the first file in described file system in the described very first time.
For above-mentioned file restoration methods, in a kind of possible implementation, described according to the assignment record information of described the first file, upgrade described the second file, comprising:
According to the identification information of described system snapshot, search described assignment record information;
According to the assignment record information finding, upgrade described the second file.
For above-mentioned file restoration methods, in a kind of possible implementation, described assignment record information comprises piece virtual address information, length information, affiliated file identification information and the offset information of described each data block in described the first file of each data block in described the first file.
For above-mentioned file restoration methods, in a kind of possible implementation, described according to the identification information of described system snapshot, search described assignment record information, comprising:
According to the identification information of described system snapshot, search piece virtual address information, length information, affiliated file identification information and the offset information of described each data block in described the first file of each data block in described the first file;
According to the assignment record information finding, upgrade described the second file, comprising:
According to the piece virtual address information of each data block of described the first file, read the content of data block corresponding to described virtual address information;
The content of the offset information according to the length information of described each data block, each data block in described the first file and each data block reading, upgrades described the second file.
In order to solve the problems of the technologies described above, according to another embodiment of the present invention, provide a kind of file recovery device, be applied to write and be redirected ROW type file system, described file system is for management and storage file, and this device comprises:
Writing module, for when the metadata of the first file being detected and damage, writes by the content of described the first file corresponding to the system snapshot of the very first time point file system that the second time point is corresponding, forms the second file,
Wherein, described very first time point is before described the second time point, and described the second time point is the time point that described metadata is damaged;
Update module, is connected with said write module, for according to the assignment record information of described the first file, upgrades described the second file,
Wherein, described assignment record information is to put and between described the second time point, write the assignment record for described the first file in described file system in the described very first time.
For above-mentioned file recovery device, in a kind of possible implementation, described according to the assignment record information of described the first file, upgrade described the second file, comprising:
Search unit, for according to the identification information of described system snapshot, search described assignment record information;
Updating block, is connected with the described unit of searching, and the assignment record information finding for searching unit described in basis, upgrades described the second file.
For above-mentioned file recovery device, in a kind of possible implementation, described assignment record information comprises piece virtual address information, length information, affiliated file identification information and the offset information of described each data block in described the first file of each data block in described the first file.
For above-mentioned file recovery device, in a kind of possible implementation, piece virtual address information, length information, affiliated file identification information and the offset information of described each data block in described the first file of each data block in described the first file, for according to the identification information of described system snapshot, searched in the described unit of searching;
Described updating block is for according to the piece virtual address information of each data block of described the first file, reads the content of data block corresponding to described virtual address information; And for the content in the offset information of described the first file and each data block of reading according to the length information of described each data block, each data block, upgrade described the second file.
beneficial effect
File restoration methods and the device of the embodiment of the present invention, when the metadata damage of the first file being detected, the content of being put to the first file described in corresponding system snapshot the very first time writes the file system that the second time point is corresponding, form the second file, wherein, described very first time point is nearest time point corresponding to system snapshot before described the second time point, and described the second time point is that described metadata is damaged corresponding time point; According to the assignment record information of described the first file, upgrade described the second file, wherein, described assignment record information is to put and between described the second time point, write the assignment record for described the first file in described file system in the described very first time.Like this, file restoration methods and device that the embodiment of the present invention provides, by the assignment record information of inner snapping technique and file system, recovery file fast and accurately just.
According to below with reference to accompanying drawing to detailed description of illustrative embodiments, it is clear that further feature of the present invention and aspect will become.
Accompanying drawing explanation
The accompanying drawing that is included in instructions and forms a part for instructions shows exemplary embodiment of the present invention, feature and aspect together with instructions, and for explaining principle of the present invention.
Fig. 1 illustrates the process flow diagram of file restoration methods according to an embodiment of the invention;
Fig. 2 illustrates the process flow diagram of file restoration methods according to another embodiment of the present invention;
Fig. 3 is the schematic diagram of affair mechanism flow process;
Fig. 4 is the structural representation of the first file of very first time point;
Fig. 5 is the structural representation of the first file of the second time point;
Fig. 6 illustrates the structured flowchart of file recovery device according to an embodiment of the invention;
Fig. 7 illustrates the structured flowchart of file recovery device according to another embodiment of the present invention;
Fig. 8 illustrates according to the structured flowchart of the file recovery device of further embodiment of this invention.
Embodiment
Below with reference to accompanying drawing, describe various exemplary embodiments of the present invention, feature and aspect in detail.The identical same or analogous element of Reference numeral presentation function in accompanying drawing.Although the various aspects of embodiment shown in the drawings, unless otherwise indicated, needn't draw accompanying drawing in proportion.
Here special-purpose word " exemplary " means " as example, embodiment or illustrative ".Here as " exemplary " illustrated any embodiment, needn't be interpreted as being better than or being better than other embodiment.
In addition, for better explanation the present invention, in embodiment below, provided numerous details.It will be appreciated by those skilled in the art that and there is no some detail, the present invention can implement equally.In some instances, the method for knowing for those skilled in the art, means, element and circuit are not described in detail, so that highlight purport of the present invention.
embodiment 1
Fig. 1 illustrates the process flow diagram of file restoration methods according to an embodiment of the invention, and the method is mainly used in ROW(Redirect On Write, writes redirected) type file system, described file system is for management and storage file.As shown in Figure 1, the method mainly can comprise the following steps:
Step S100, when the metadata of the first file being detected and damage, the content of described the first file corresponding to the system snapshot of very first time point is write to the file system that the second time point is corresponding, form the second file,
Wherein, described very first time point is before described the second time point, and described the second time point is the time point that described metadata is damaged;
Step S110, according to the assignment record information of described the first file, upgrade described the second file,
Wherein, described assignment record information is to put and between described the second time point, write the assignment record for described the first file in described file system in the described very first time.
Particularly, the application's scheme is based on ROW type file system, writing of this document system is completely again to write, when revising the content of a data block, content in buffer zone to this data block is modified, and the content of the data block after modification is completed is write on disk in a new blank block more again.
For above-mentioned steps S100, file system for example can be done primary system snapshot to system in two hours every a predetermined time, and this action is sightless for user, can preserve for example 12 system snapshots of some in this document system.System snapshot is the read-only copy of file system or volume, mainly can comprise the metadata information of All Files in file system.System snapshot almost can create immediately, and does not take other disk spaces in storage pool at first.File system or volume are stamped after system snapshot, can be not deleted even if the data on its file do not have to be modified before deleted at this system snapshot yet, therefore, when file system or roll up documentary metadata while damaging, can utilize this not have deleted data to carry out the metadata of recovery system, thus recovery file.Wherein, the metadata of file refers to the information of being in charge of file data.Such as file size, data block size is stored in which data block etc. on disk.User can visit by the metadata of file the data of file.
While having the metadata damage of certain file in file system, can utilize said system snapshot to carry out the metadata of recovery file.For example, when the metadata at the some files of some time points (calling the second time point in the following text) (calling the first file in the following text) is damaged, file system can write the file system that the second time point is corresponding by the content of the first file in the system snapshot of very first time point, forms the second file.Wherein, the described very first time is o'clock before the second time point.The second file recovering is the first file at the state of very first time point, and the metadata now recovering that is to say that the first file is at the state of very first time point.Preferably, described very first time point is for before the second time point, puts nearest time point from the very first time.
For above-mentioned steps S110, in file system, the corresponding consistency point of each system snapshot is time point.The system snapping technique of utilization can recover the first file at the state of very first time point.If but in the very first time o'clock between the second time point, file system had modification to the first file, the first file is different with the state of putting in the very first time at the state of the second time point, and the metadata of the first file that these two time points are corresponding is also different.Now system snapping technique can not recover the whole metadata of the first file.
Therefore, at the system snapping technique of utilization, can recover the first file after the state of very first time point, the application's technical scheme can, according to the assignment record information of the first file, be upgraded the content of described the second file.Wherein, described assignment record information is to put and between described the second time point, write the assignment record for described the first file in described file system in the described very first time.The content of described the second file is upgraded, mainly can be comprised and revise the data of the second file, the data of deleting the second file and increase data in the second file.
The file restoration methods of the embodiment of the present invention, when the metadata damage of the first file being detected, the content of being put to the first file described in corresponding system snapshot the very first time writes the file system that the second time point is corresponding, form the second file, wherein, described very first time point is nearest time point corresponding to system snapshot before described the second time point, and described the second time point is that described metadata is damaged corresponding time point; According to the assignment record information of described the first file, upgrade described the second file, wherein, described assignment record information is to put and between described the second time point, write the assignment record for described the first file in described file system in the described very first time.Like this, the file restoration methods that the embodiment of the present invention provides, by the assignment record information of system snapping technique and file system, recovery file fast and accurately just.
embodiment 2
Fig. 2 illustrates the process flow diagram of file restoration methods according to another embodiment of the present invention.The step that in Fig. 2, label is identical with Fig. 1 has identical function, for simplicity's sake, omits the detailed description to these steps.
As shown in Figure 2, the key distinction of the file restoration methods of the present embodiment and the file restoration methods of a upper embodiment is, step S110 specifically can comprise the following steps:
Step S1101, according to the identification information of described system snapshot, search described assignment record information;
The assignment record information that step S1102, basis find, upgrades described the second file.
Particularly, utilize system snapping technique by the recovering state of the first file after the state of very first time point, for the state during to the second time point by the recovering state of the first file, can search the identification information of the system snapshot of very first time point.In a kind of possible implementation, this identification information can be a transaction number.
In file system, a lot of operations need to be upgraded a plurality of different metadata conventionally, for example create file operation and need to revise following these metadata: the one, create a new node (inode), insert in the node tree (inode tree) of this document system; The 2nd, increase a directory entry, insert in file system directories tree; The 3rd, revise the metadata in divider, distribute one section of disk space.In these three steps, arbitrary step is made mistakes, and the operation that creates file just can not be successful.Being equivalent to these three steps was not all performed.Therefore can be affairs by the Operation Definition that creates file.
In file system, the data volume that Single document operation relates to still issues frequent less, and the data of the file operation issuing continuously have certain locality, so in order to guarantee the performance of file system, file system tends to do buffer memory and the merging of service data, so file system is conventionally carrying out lower wall after one group of transactional cache merging.
In order to adapt to this feature of file system, affair mechanism is considered two stage flow scheme design, as shown in Figure 3.In the stage one, affairs are associated with all operations that file system produces, and form a transaction set, and file system is a transaction number of this transaction set distribution.When transaction set associated data is abundant or duration during long enough, transaction set will be closed i.e. no longer associated new file system operation.Then enter subordinate phase, this stage mainly realizes the integral body of associated service data is submitted to divider.In submission process, guarantee atomicity and the consistance of service data, guarantee that related service data all runs succeeded, if there is an execution unsuccessful, related operation all will not carried out.
For above-mentioned steps S1101, after transaction set can and merge one group of service data buffer memory of file system, lower wall is in due course.In lower wall, virtual unit layer can distribute virtual address space to each transaction set, and assignment information is recorded in an object of file system, forms assignment record information.Therefore, according to the identification information of system snapshot, be transaction number, just can find very first time o'clock between the second time point corresponding to the assignment record information of the first file.
In a kind of possible implementation, the assignment record information of the first file comprises piece virtual address information, length information, affiliated file identification information and the offset information of each data block in the first file of each data block in the first file.
Above-mentioned steps S1101 specifically can comprise according to the identification information of described system snapshot, searches piece virtual address information, length information, affiliated file identification information and the offset information of described each data block in described the first file of each data block in described the first file.
In a kind of possible implementation, above-mentioned steps S1102 specifically can comprise: according to the piece virtual address information of each data block of described the first file, read the content of data block corresponding to described virtual address information; And according to the length information of described each data block, each data block the content of the offset information in described the first file and each data block of reading, upgrade described the second file.
Upgrade described the second file, mainly can comprise and revise the data of the second file, the data of deleting the second file and increase data in the second file.For example, a certain data block of revised file, first reads the content of this data block in buffer zone and modifies, then by a Blank data block of the content writing in files of amended data block.At this moment, file system can be modified to the metadata of this data block in file, so that user can have access to this data block of file by described metadata.Generate assignment record information simultaneously, comprise piece virtual address information, length information, affiliated file identification information and the offset information of this data block in described file of this data block.And for example, during a certain data block of deleted file, file system can be revised the metadata of this data block, in a kind of possible implementation, is entirely write the content of the metadata of this data block as 0.Generate assignment record information simultaneously, comprise piece virtual address information, length information, affiliated file identification information and the offset information of this data block in described file of this data block.Like this, user just cannot arrive this data block by metadata access, has realized this data block and has deleted from file.And for example, increase a certain data block in file, by a Blank data block of the content writing in files of this data block.At this moment, file system also can increase the metadata of this data block, so that user can have access to this data block of file by described metadata.Generate assignment record information simultaneously, comprise piece virtual address information, length information, affiliated file identification information and the offset information of this data block in described file of this data block.
Fig. 4 is the structural representation of the first file of very first time point.Fig. 5 is the structural representation of the first file of the second time point.As shown in Figure 4, at very first time point, the content of the first file comprises data block D1, data block D2, data block D3, utilizes the metadata of the first file can visit data piece D1, data block D2, data block D3.The content of putting corresponding system snapshot in the very first time is with the same in Fig. 4.But o'clock between the second time point, user has revised the metadata of the first file, makes the first file increase data block D4, utilizes the metadata of the first file can have access to data block D4 in the very first time, now, the content of the first file as shown in Figure 5.At the second time point, the metadata of the first file is damaged, and from the nearest system snapshot time of the second time point be very first time point.Therefore, by the system snapshot that the very first time puts, the first file can be returned to the state of very first time point, return to state as shown in Figure 4.But, by the metadata of this recovery, can not have access to data block D4, therefore, need to utilize the assignment record information in file system to recover the access to data block, the metadata of the first file while recovering the second time point.At this moment, can put the identification information of corresponding system snapshot by the inquiry very first time, i.e. transaction number, search from very first time o'clock to the second time point for the assignment record information of data block D4.According to the piece virtual address information of the data block D4 in above-mentioned assignment record information, content corresponding to piece virtual address information of read block D4, then the offset information at the first file according to the length information in the assignment record information of data block D4 and data block D4, the content of data block D4 is written in the second file of described file system, now, the second file at this moment is just equivalent to the first file and returns to state as shown in Figure 5.The content of data block D4 is write in the process of the second file, file system can recover the metadata corresponding to data block D4.If o'clock to the second time point, user also has other operation to the first file, also can carry out according to similar method the recovery of corresponding metadata from the very first time.
The file restoration methods of the embodiment of the present invention, the file restoration methods of the embodiment of the present invention, when the metadata damage of the first file being detected, the content of being put to the first file described in corresponding system snapshot the very first time writes the file system that the second time point is corresponding, form the second file, wherein, described very first time point is nearest time point corresponding to system snapshot before described the second time point, and described the second time point is that described metadata is damaged corresponding time point; According to the piece virtual address information in the assignment record information in the assignment record information of described the first file, length information, and offset information, upgrade described the second file, wherein, described assignment record information is to put and between described the second time point, write the assignment record for described the first file in described file system in the described very first time.Like this, the file restoration methods that the embodiment of the present invention provides, by the assignment record information of system snapping technique and file system, recovery file fast and accurately just.
embodiment 3
Fig. 6 illustrates the structured flowchart of file recovery device according to an embodiment of the invention.As shown in Figure 6, this document recovery device 60 mainly can comprise writing module 61 and update module 62.Writing module 61 is mainly used in when the metadata damage of the first file being detected, the content of described the first file corresponding to the system snapshot of very first time point is write to the file system that the second time point is corresponding, form the second file, wherein, described very first time point is before described the second time point, and described the second time point is the time point that described metadata is damaged.Update module 62 is connected with writing module 61, be mainly used in the assignment record information according to described the first file, upgrade described the second file, wherein, described assignment record information is to put and between described the second time point, write the assignment record for described the first file in described file system in the described very first time.
The file recovery device 60 of the embodiment of the present invention can be used in the file restoration methods of carrying out above-described embodiment 1, and the idiographic flow of this document restoration methods is referring to the concrete elaboration of embodiment 1.
The file recovery device of the embodiment of the present invention, writing module is for when the metadata damage of the first file being detected, the content of being put to the first file described in corresponding system snapshot the very first time writes the file system that the second time point is corresponding, form the second file, wherein, described very first time point is nearest time point corresponding to system snapshot before described the second time point, and described the second time point is that described metadata is damaged corresponding time point; Update module is used for according to the assignment record information of described the first file, upgrade described the second file, wherein, described assignment record information is to put and between described the second time point, write the assignment record for described the first file in described file system in the described very first time.Like this, the file recovery device that the embodiment of the present invention provides, by the assignment record information of system snapping technique and file system, recovery file fast and accurately just.
embodiment 4
Fig. 7 illustrates the structured flowchart of file recovery device according to another embodiment of the present invention.The assembly that in Fig. 7, label is identical with Fig. 6 has identical function, for simplicity's sake, omits the detailed description to these assemblies.
As shown in Figure 7, file recovery device shown in Fig. 7 70 is with the key distinction of the file recovery device 60 shown in Fig. 6, and update module 62 mainly can comprise searches unit 621 and updating block 622.Search unit 621 and be mainly used according to the identification information of described system snapshot, search described assignment record information; Updating block 622 with search unit 621 and be connected, main according to described in search the assignment record information that unit 621 finds, upgrade described the second file.
In a kind of possible implementation, described assignment record information comprises piece virtual address information, length information, affiliated file identification information and the offset information of described each data block in described the first file of each data block in described the first file.
In a kind of possible implementation, search unit 621 specifically for according to the identification information of described system snapshot, search piece virtual address information, length information, affiliated file identification information and the offset information of described each data block in described the first file of each data block in described the first file; Updating block 622 is for according to the piece virtual address information of each data block of described the first file, reads the content of data block corresponding to described virtual address information; And for the content in the offset information of described the first file and each data block of reading according to the length information of described each data block, each data block, upgrade described the second file.
The file recovery device 70 of the embodiment of the present invention can be used in the file restoration methods of carrying out above-described embodiment 2, and the idiographic flow of this document restoration methods is referring to the concrete elaboration of embodiment 2.
The file recovery device of the embodiment of the present invention, writing module is for when the metadata damage of the first file being detected, the content of being put to the first file described in corresponding system snapshot the very first time writes the file system that the second time point is corresponding, form the second file, wherein, described very first time point is nearest time point corresponding to system snapshot before described the second time point, and described the second time point is that described metadata is damaged corresponding time point; Update module is used for according to the assignment record information of described the first file, upgrade described the second file, wherein, described assignment record information is to put and between described the second time point, write the assignment record for described the first file in described file system in the described very first time.Like this, the file recovery device that the embodiment of the present invention provides, by the assignment record information of system snapping technique and file system, recovery file fast and accurately just.
embodiment 5
Fig. 8 illustrates according to the structured flowchart of the file recovery device of further embodiment of this invention.File recovery device 800 can be host server, personal computer PC or portable portable computer or the terminal etc. that possess computing power.The specific embodiment of the invention does not limit the specific implementation of computing node.
File recovery device 800 comprises processor (processor) 810, communication interface (Communications Interface) 820, storer (memory) 830 and bus 840.Wherein, processor 810, communication interface 820 and storer 830 complete mutual communication by bus 840.
Communication interface 820 is for communicating by letter with the network equipment, and wherein the network equipment comprises such as Virtual Machine Manager center, shares storage etc.
Processor 810 is for executive routine.Processor 810 may be a central processor CPU, or application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or is configured to implement one or more integrated circuit of the embodiment of the present invention.
Storer 830 is for storing documents.Storer 830 may comprise high-speed RAM storer, also may also comprise nonvolatile memory (non-volatile memory), for example at least one magnetic disk memory.Storer 830 can be also memory array.Storer 830 also may be by piecemeal, and described can become virtual volume by certain principle combinations.
In a kind of possible embodiment, said procedure can be the program code that comprises computer-managed instruction.This program is used for writing redirected ROW type file system, and described file system is for management and storage file, and this program specifically can be used for:
When the metadata of the first file being detected and damage, the content of described the first file corresponding to the system snapshot of very first time point is write to the file system that the second time point is corresponding, form the second file,
Wherein, described very first time point is before described the second time point, and described the second time point is the time point that described metadata is damaged;
According to the assignment record information of described the first file, upgrade described the second file,
Wherein, described assignment record information is to put and between described the second time point, write the assignment record for described the first file in described file system in the described very first time.
In a kind of possible implementation, described according to the assignment record information of described the first file, upgrade described the second file, comprising:
According to the identification information of described system snapshot, search described assignment record information;
According to the assignment record information finding, upgrade described the second file.
In a kind of possible implementation, described assignment record information comprises piece virtual address information, length information, affiliated file identification information and the offset information of described each data block in described the first file of each data block in described the first file.
In a kind of possible implementation, described according to the identification information of described system snapshot, search described assignment record information, comprising:
According to the identification information of described system snapshot, search piece virtual address information, length information, affiliated file identification information and the offset information of described each data block in described the first file of each data block in described the first file;
According to the assignment record information finding, upgrade described the second file, comprising:
According to the piece virtual address information of each data block of described the first file, read the content of data block corresponding to described virtual address information;
The content of the offset information according to the length information of described each data block, each data block in described the first file and each data block reading, upgrades described the second file.
Those of ordinary skills can recognize, each exemplary cell and algorithm steps in embodiment described herein can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions realize with hardware or form of software actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can realize described function for specific application choice diverse ways, but this realization should not thought and exceeds scope of the present invention.
If the form of computer software of usining realizes described function and as production marketing independently or while using, can think to a certain extent that all or part of (part for example prior art being contributed) of technical scheme of the present invention is with the form embodiment of computer software product.This computer software product is stored in the non-volatile memory medium of embodied on computer readable conventionally, comprises that some instructions are used so that computer equipment (can be personal computer, server or the network equipment etc.) is carried out all or part of step of various embodiments of the present invention method.And aforesaid storage medium comprises the various media that can be program code stored such as USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited to this, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion by the described protection domain with claim.

Claims (8)

1. a file restoration methods, is applied to write and is redirected ROW type file system, and described file system for management and storage file, is characterized in that, comprising:
When the metadata of the first file being detected and damage, the content of described the first file corresponding to the system snapshot of very first time point is write to the file system that the second time point is corresponding, form the second file,
Wherein, described very first time point is before described the second time point, and described the second time point is the time point that described metadata is damaged;
According to the assignment record information of described the first file, upgrade described the second file,
Wherein, described assignment record information is to put and between described the second time point, write the assignment record for described the first file in described file system in the described very first time.
2. file restoration methods according to claim 1, is characterized in that, described according to the assignment record information of described the first file, upgrades described the second file, comprising:
According to the identification information of described system snapshot, search described assignment record information;
According to the assignment record information finding, upgrade described the second file.
3. file restoration methods according to claim 1 and 2, it is characterized in that, described assignment record information comprises piece virtual address information, length information, affiliated file identification information and the offset information of described each data block in described the first file of each data block in described the first file.
4. file restoration methods according to claim 3, is characterized in that,
Described according to the identification information of described system snapshot, search described assignment record information, comprising:
According to the identification information of described system snapshot, search piece virtual address information, length information, affiliated file identification information and the offset information of described each data block in described the first file of each data block in described the first file;
According to the assignment record information finding, upgrade described the second file, comprising:
According to the piece virtual address information of each data block of described the first file, read the content of data block corresponding to described virtual address information;
The content of the offset information according to the length information of described each data block, each data block in described the first file and each data block reading, upgrades described the second file.
5. a file recovery device, is applied to write and is redirected ROW type file system, and described file system for management and storage file, is characterized in that, comprising:
Writing module, for when the metadata of the first file being detected and damage, writes by the content of described the first file corresponding to the system snapshot of the very first time point file system that the second time point is corresponding, forms the second file,
Wherein, described very first time point is before described the second time point, and described the second time point is the time point that described metadata is damaged;
Update module, is connected with said write module, for according to the assignment record information of described the first file, upgrades described the second file,
Wherein, described assignment record information is to put and between described the second time point, write the assignment record for described the first file in described file system in the described very first time.
6. file recovery device according to claim 5, is characterized in that, described according to the assignment record information of described the first file, upgrades described the second file, comprising:
Search unit, for according to the identification information of described system snapshot, search described assignment record information;
Updating block, is connected with the described unit of searching, and the assignment record information finding for searching unit described in basis, upgrades described the second file.
7. according to the file recovery device described in claim 5 or 6, it is characterized in that, described assignment record information comprises piece virtual address information, length information, affiliated file identification information and the offset information of described each data block in described the first file of each data block in described the first file.
8. file recovery device according to claim 7, is characterized in that,
Piece virtual address information, length information, affiliated file identification information and the offset information of described each data block in described the first file of each data block in described the first file, for according to the identification information of described system snapshot, searched in the described unit of searching;
Described updating block is for according to the piece virtual address information of each data block of described the first file, reads the content of data block corresponding to described virtual address information; And for the content in the offset information of described the first file and each data block of reading according to the length information of described each data block, each data block, upgrade described the second file.
CN201310582886.0A 2013-11-19 2013-11-19 File access pattern method and device Active CN103617097B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310582886.0A CN103617097B (en) 2013-11-19 2013-11-19 File access pattern method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310582886.0A CN103617097B (en) 2013-11-19 2013-11-19 File access pattern method and device

Publications (2)

Publication Number Publication Date
CN103617097A true CN103617097A (en) 2014-03-05
CN103617097B CN103617097B (en) 2017-07-07

Family

ID=50167800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310582886.0A Active CN103617097B (en) 2013-11-19 2013-11-19 File access pattern method and device

Country Status (1)

Country Link
CN (1) CN103617097B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844491A (en) * 2016-12-26 2017-06-13 中国石油天然气集团公司 A kind of write-in of ephemeral data, read method and write-in, reading device
CN106844094A (en) * 2016-12-23 2017-06-13 华为技术有限公司 A kind of Ile repair method and device
CN106919470A (en) * 2015-12-25 2017-07-04 中兴通讯股份有限公司 A kind of data reconstruction method and device
CN108351821A (en) * 2016-02-01 2018-07-31 华为技术有限公司 Data reconstruction method and storage device
CN108958968A (en) * 2017-05-17 2018-12-07 中兴通讯股份有限公司 A kind of document handling method and device
CN109857596A (en) * 2019-03-07 2019-06-07 张倩 Time consistency backup method, equipment, system, device and storage medium
CN110275863A (en) * 2019-06-26 2019-09-24 北京达佳互联信息技术有限公司 File moving method, device and storage medium
CN110795389A (en) * 2019-10-28 2020-02-14 深信服科技股份有限公司 Storage snapshot based copying method, user equipment, storage medium and device
CN110807000A (en) * 2019-10-25 2020-02-18 北京达佳互联信息技术有限公司 File repair method and device, electronic equipment and storage medium
CN111581013A (en) * 2020-03-18 2020-08-25 宁波送变电建设有限公司永耀科技分公司 System information backup and reconstruction method based on metadata and shadow files

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030159007A1 (en) * 2002-02-15 2003-08-21 International Business Machines Corporation Deferred copy-on-write of a snapshot
CN101149694A (en) * 2007-11-02 2008-03-26 西安三茗科技有限责任公司 Method for incremental backup and whole roll recovery method based on block-stage
CN100478946C (en) * 2004-02-12 2009-04-15 国际商业机器公司 Method and apparatus for file system snapshot persistence
CN101436207A (en) * 2008-12-16 2009-05-20 浪潮通信信息系统有限公司 Data restoring and synchronizing method based on log snapshot
CN103221925A (en) * 2012-11-23 2013-07-24 华为技术有限公司 Data processing method and storage equipment
CN103389928A (en) * 2013-08-14 2013-11-13 陈谦 Computer data backup and recovery method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030159007A1 (en) * 2002-02-15 2003-08-21 International Business Machines Corporation Deferred copy-on-write of a snapshot
CN100478946C (en) * 2004-02-12 2009-04-15 国际商业机器公司 Method and apparatus for file system snapshot persistence
CN101149694A (en) * 2007-11-02 2008-03-26 西安三茗科技有限责任公司 Method for incremental backup and whole roll recovery method based on block-stage
CN101436207A (en) * 2008-12-16 2009-05-20 浪潮通信信息系统有限公司 Data restoring and synchronizing method based on log snapshot
CN103221925A (en) * 2012-11-23 2013-07-24 华为技术有限公司 Data processing method and storage equipment
CN103389928A (en) * 2013-08-14 2013-11-13 陈谦 Computer data backup and recovery method

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106919470A (en) * 2015-12-25 2017-07-04 中兴通讯股份有限公司 A kind of data reconstruction method and device
CN108351821A (en) * 2016-02-01 2018-07-31 华为技术有限公司 Data reconstruction method and storage device
CN108351821B (en) * 2016-02-01 2022-03-29 华为技术有限公司 Data recovery method and storage device
CN106844094A (en) * 2016-12-23 2017-06-13 华为技术有限公司 A kind of Ile repair method and device
CN106844094B (en) * 2016-12-23 2021-01-29 华为技术有限公司 File repair method and device
CN106844491B (en) * 2016-12-26 2020-07-10 中国石油天然气集团公司 Temporary data writing and reading method and device
CN106844491A (en) * 2016-12-26 2017-06-13 中国石油天然气集团公司 A kind of write-in of ephemeral data, read method and write-in, reading device
CN108958968A (en) * 2017-05-17 2018-12-07 中兴通讯股份有限公司 A kind of document handling method and device
CN108958968B (en) * 2017-05-17 2023-12-22 中兴通讯股份有限公司 File processing method and device
CN109857596B (en) * 2019-03-07 2021-04-06 张倩 Time consistency backup method, equipment, system, device and storage medium
CN109857596A (en) * 2019-03-07 2019-06-07 张倩 Time consistency backup method, equipment, system, device and storage medium
CN110275863B (en) * 2019-06-26 2022-03-25 北京达佳互联信息技术有限公司 File moving method and device and storage medium
CN110275863A (en) * 2019-06-26 2019-09-24 北京达佳互联信息技术有限公司 File moving method, device and storage medium
CN110807000A (en) * 2019-10-25 2020-02-18 北京达佳互联信息技术有限公司 File repair method and device, electronic equipment and storage medium
CN110807000B (en) * 2019-10-25 2022-06-10 北京达佳互联信息技术有限公司 File repair method and device, electronic equipment and storage medium
CN110795389A (en) * 2019-10-28 2020-02-14 深信服科技股份有限公司 Storage snapshot based copying method, user equipment, storage medium and device
CN110795389B (en) * 2019-10-28 2022-09-30 深信服科技股份有限公司 Storage snapshot based copying method, user equipment, storage medium and device
CN111581013A (en) * 2020-03-18 2020-08-25 宁波送变电建设有限公司永耀科技分公司 System information backup and reconstruction method based on metadata and shadow files

Also Published As

Publication number Publication date
CN103617097B (en) 2017-07-07

Similar Documents

Publication Publication Date Title
CN103617097A (en) File recovery method and file recovery device
US20190163591A1 (en) Remote Data Replication Method and System
US11301379B2 (en) Access request processing method and apparatus, and computer device
US9183236B2 (en) Low level object version tracking using non-volatile memory write generations
US10176190B2 (en) Data integrity and loss resistance in high performance and high capacity storage deduplication
CN103064765B (en) Data reconstruction method, device and cluster storage system
CN105493043A (en) System and method for virtual machine conversion
WO2013074914A1 (en) Method of and system for merging, storing and retrieving incremental backup data
CN103262043A (en) Method and system of performing a granular restore of a database from a differential backup
JP2007012058A (en) File system for storing transaction records in flash-like media
CN102667703A (en) System and method for optimized reclamation processing in a virtual tape library system
US20220129420A1 (en) Method for facilitating recovery from crash of solid-state storage device, method of data synchronization, computer system, and solid-state storage device
CN103996412A (en) Power-fail protection method applied to intelligent-card nonvolatile memories
CN103617277A (en) Method for restoring data table content deleted mistakenly
EP3147797B1 (en) Data management method, node and system for database cluster
CN103547992A (en) System and method for maintaining consistent points in file systems using a prime dependency list
CN103473298A (en) Data archiving method and device and storage system
CN103678608A (en) Log management method and device
CN104268097A (en) Metadata processing method and system
US11055184B2 (en) In-place garbage collection of a sharded, replicated distributed state machine based on supersedable operations
US8595271B1 (en) Systems and methods for performing file system checks
KR101541532B1 (en) Method and apparatus for data consistency control of storage class memory
KR100987320B1 (en) Data processing apparatus and Data procssing method, using FAT file system capable of fast file recovery
US10452496B2 (en) System and method for managing storage transaction requests
US7865472B1 (en) Methods and systems for restoring file systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant