CN100429628C - Method for rebuilding directory structure and recovering data in NTFS volume - Google Patents

Method for rebuilding directory structure and recovering data in NTFS volume Download PDF

Info

Publication number
CN100429628C
CN100429628C CNB2006101222480A CN200610122248A CN100429628C CN 100429628 C CN100429628 C CN 100429628C CN B2006101222480 A CNB2006101222480 A CN B2006101222480A CN 200610122248 A CN200610122248 A CN 200610122248A CN 100429628 C CN100429628 C CN 100429628C
Authority
CN
China
Prior art keywords
file
mft
data
information
list item
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
CNB2006101222480A
Other languages
Chinese (zh)
Other versions
CN1959649A (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.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Zhuhai Kingsoft Software 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 Zhuhai Kingsoft Software Co Ltd filed Critical Zhuhai Kingsoft Software Co Ltd
Priority to CNB2006101222480A priority Critical patent/CN100429628C/en
Publication of CN1959649A publication Critical patent/CN1959649A/en
Application granted granted Critical
Publication of CN100429628C publication Critical patent/CN100429628C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

A method for rebuilding up catalogue and for restoring data in NTFS volume includes file scanning course as positioning SMFT data, making ergodic on file of MFT, obtaining father catalogue and rebuilding path of said file, transferring to B or F and entering file restoration course as selecting out a table item by making ergodic on file information table, setting up file on path assigned by user, writing in file data on newly set up file according to file size and file position, judging whether file table is the last table item or not and ending process if it is or otherwise returning back to selecting step.

Description

The method of rebuilding directory structure and restore data in the NTFS volume
Technical field
The present invention relates to computer application field, relate in particular to a kind of method of recovering data in the disk.
Background technology
When a NTFS subregion is caused file to lose by reasons such as virus, hacker's destruction, mistake format manipulation, software improper uses, during the subregion inaccessible, can the recovery file data be not enough often, also must be able to reappear the bibliographic structure of these files, and recover the filename of these files before losing, such as in the software a lot of data files being arranged, they have the fixed schedule structure, if these TOC levels and filename are destroyed, even recovered the file in all these software catalogs, this software still can not normally move.
Summary of the invention
The present invention has overcome shortcoming of the prior art, and a kind of method that file data and document directory structure are together recovered is provided.
In order to solve the problems of the technologies described above, be achieved through the following technical solutions:
The method of rebuilding directory structure and restore data is characterized in that in the NTFS volume, and it comprises that file scan and file recover two processes, and the file scan process comprises the steps:
A, $MFT data field, location, and parameter x=1 is set;
B, from the $MFT file, take out the MFT of x file;
C, from the MFT of x file, obtain the parent directory information of x file, and upwards visit the MFT of x all catalogues of file upper strata, rebulid the path of x file simultaneously according to the directory name of x all catalogues of file upper strata;
D, in the file information table that comprises include file data attribute that NTFS volume scans, file path, file size, the various temporal informations of file etc., increase the record of x file described in the step b;
E, to judge whether to arrive $MFT last, if not, then parameter x is added 1 and turn to step b, if then turn to step f;
F, ends file scanning process enter file rejuvenation; File recovers module and comprises the steps:
I. traversal is taken out a list item from the file information table that above-mentioned file scan process is set up;
II. set up file according to the file type information in the list item of I step taking-up in the specified path of user;
III. document size information in the list item that takes out according to I step and the memory location of file in disk write file data to the file of firm foundation;
IV. judge that whether the list item that takes out according to I step is the last list item in the above-mentioned file information table, if enter step V, otherwise returns step I;
V. finish.
The inventive method does not rely on original file system, directly the sector of disk is scanned, in conjunction with the special sign that some particular file types had, judge the particular location of this document in disk, type information according to this positional information and file rebulids file again, and this method can be used as other effectively replenishing according to the file system recovery data method.
Description of drawings
Fig. 1 is a file scanning process process flow diagram in the inventive method;
Fig. 2 is a file rejuvenation process flow diagram in the inventive method.
Embodiment
Introduce the process and the principle of work of the inventive method below with reference to Fig. 1 and Fig. 2.
The method of rebuilding directory structure and restore data mainly comprises two processes, file scan process and file rejuvenation in a kind of NTFS volume.The file scan process mainly is traversal disk De $MFT (MFT file), by the various attribute informations among the scanning MFT, obtain the information such as data attribute, file path, file size, various times of file of all files, and these information are recorded in the newly-built file information table; File rejuvenation mainly is to utilize above-mentioned file information table, rebulids file, recovery file.
The file scan process is as shown in Figure 1:
A. Ding Wei $MFT data field; The NTFS volume is different with the FAT volume, in NTFS volume, a Ge $MFT file is arranged, deposited in this document the MFT of All Files (file) in the volume (Master File Table, MFT), and corresponding one by one, promptly each file (file) all has the MFT reference number of self.Multiple attribute information is arranged in the attribute list of MFT, as, 10$STANDARD_INFORMATION (standard information); 20$ATTRIBUTE_LIST (attribute list); 30$FILE_NAME (filename); 40$VOLUME_VERSION (volume version); 50$SECURITY Descriptor (security descriptor); 60$VOLUME_NAME (file label); 70$VOLUME_INFORMATION (volume information); 80$DATA (data); 90$INDEX_ROOT (index root) etc.
B. travel through file MFT; Guarantee the file full recovery in the disk.
C. from this document MFT, obtain parent directory information, and upwards visit all catalogues on it, rebulid the path of this document simultaneously according to the directory name of all catalogues on it; It in this method the MFT reference number that can obtain this document parent directory by 30 attributes among the visit MFT; Can obtain the absolute path of each file (file) by this step, so that guarantee in the follow-up restore data process that the bibliographic structure of file is constant.
D. in the file information table that comprises include file data attribute that NTFS volume scans, file path, file size, the various temporal informations of file etc., increase the record of this document; Above-mentioned various information also is to obtain by each the corresponding attribute among the visit MFT.
E. it is last to judge whether to have arrived $MFT, and not being changes b, is to change f;
F. the ends file scanning process enters file rejuvenation;
File rejuvenation is as shown in Figure 2:
1. traversal is taken out a list item in the file information table that above-mentioned file scan process is set up; The corresponding file (file) of each list item wherein contains the fileinfo of the file data attribute, file path, file size, the various temporal informations of file etc. of this document (file).
2. set up file according to file type information in the table in the specified path of user;
3. according to document size information and the memory location of file in disk in the table file of firm foundation is write file data;
4. judge that whether the file table is the last list item in the above-mentioned file information table, if enter step 5, otherwise returns step 1;
5. finish.
Above step is the unrestricted technical scheme of the present invention in order to explanation only.Any modification or partial replacement that does not break away from spirit and scope of the invention all should be encompassed in the middle of the claim scope of the present invention.

Claims (2)

1, the method for rebuilding directory structure and restore data in the NTFS volume is characterized in that, it comprises that file scan and file recover two processes, and the file scan process comprises the steps:
A. Ding Wei $MFT data field, and parameter x=1 is set;
B. from the $MFT file, take out the MFT of x file;
C. from the MFT of x file, obtain the parent directory information of x file, and upwards visit the MFT of x all catalogues of file upper strata, rebulid the path of x file simultaneously according to the directory name of x all catalogues of file upper strata;
D. in the file information table that comprises include file data attribute that NTFS volume scans, file path, file size, the various temporal informations of file etc., increase the record of x file described in the step b;
E. it is last to judge whether to have arrived $MFT, if not, then parameter x is added 1 and turn to step b, if then turn to step f;
F. the ends file scanning process enters file rejuvenation;
File recovers module and comprises the steps:
I. traversal is taken out a list item from the file information table that above-mentioned file scan process is set up;
II. set up file according to the file type information in the list item of I step taking-up in the specified path of user;
III. document size information in the list item that takes out according to I step and the memory location of file in disk write file data to the file of firm foundation;
IV. judge that whether the list item that takes out according to I step is the last list item in the above-mentioned file information table, if enter step V, otherwise returns step I;
V. finish.
2, the method for rebuilding directory structure and restore data in the NTFS volume according to claim 1 is characterized in that the file data attribute information in the described steps d obtains by the 80H attribute of the institute of MFT described in traversal step b respective file.
CNB2006101222480A 2006-09-19 2006-09-19 Method for rebuilding directory structure and recovering data in NTFS volume Active CN100429628C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006101222480A CN100429628C (en) 2006-09-19 2006-09-19 Method for rebuilding directory structure and recovering data in NTFS volume

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006101222480A CN100429628C (en) 2006-09-19 2006-09-19 Method for rebuilding directory structure and recovering data in NTFS volume

Publications (2)

Publication Number Publication Date
CN1959649A CN1959649A (en) 2007-05-09
CN100429628C true CN100429628C (en) 2008-10-29

Family

ID=38071352

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006101222480A Active CN100429628C (en) 2006-09-19 2006-09-19 Method for rebuilding directory structure and recovering data in NTFS volume

Country Status (1)

Country Link
CN (1) CN100429628C (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102254048B (en) * 2011-08-24 2012-10-03 深圳市万兴软件有限公司 Data recovering method and system
CN102346771B (en) * 2011-09-22 2013-07-03 奇智软件(北京)有限公司 Information expression method and device
CN102289524B (en) * 2011-09-26 2013-01-30 深圳市万兴软件有限公司 Data recovery method and system
CN102289526B (en) * 2011-09-29 2013-07-31 深圳万兴信息科技股份有限公司 HFS+file system data recovery method and device
CN103713971B (en) * 2014-01-02 2016-05-25 浪潮(北京)电子信息产业有限公司 The management devices of recovery file path structure and method after a kind of calamity
CN105607960B (en) 2015-10-26 2018-12-07 成都华为技术有限公司 File system directory tree restorative procedure and device
CN106055990B (en) * 2016-05-30 2018-11-27 厦门市美亚柏科信息股份有限公司 A kind of thorough breaking method of data of new technology file system and device
CN108021472B (en) * 2017-11-28 2021-02-02 厦门市美亚柏科信息股份有限公司 Format recovery method of ReFS file system and storage medium
CN109326307B (en) * 2018-09-07 2020-12-11 江苏菲利斯通信息科技有限公司 Optical disk stream recording method
CN110781160B (en) * 2019-10-15 2021-07-27 北亚企安科技(北京)有限公司 Data recovery method based on VMware virtualization file system damage
CN111125298A (en) * 2019-12-23 2020-05-08 深圳市斯博科技有限公司 Method, equipment and storage medium for reconstructing NTFS file directory tree
CN113312007B (en) * 2021-06-29 2023-02-03 成都易我科技开发有限责任公司 Method and device for counting directory and file sizes in NTFS (New technology File System)

Also Published As

Publication number Publication date
CN1959649A (en) 2007-05-09

Similar Documents

Publication Publication Date Title
CN100429628C (en) Method for rebuilding directory structure and recovering data in NTFS volume
CN100446000C (en) Method for re-setting up catalogue structure and restoring data in FAI volume
CN1477522B (en) Method and system for management of image document
US20060179085A1 (en) Method, system and computer program product for backing up and recovering a database
CN101403988B (en) File back-up system and method of computer system
US8606759B2 (en) Apparatus, system and method for recovering meta data using fragmentary information
CN104166605B (en) Data backup method and system based on incremental data files
CN102567140A (en) Bile system backup using change journal
CN105339907A (en) Synchronous mirroring in non-volatile memory systems
CN102541691B (en) Log check point recovery method applied to memory data base OLTP (online transaction processing)
CN102981931A (en) Backup method and device for virtual machine
CN103473277A (en) Snapshot method and device for file systems
CN112099989A (en) Disaster recovery, migration and recovery method for Kubernetes cloud native application
CN109828951B (en) Method and system for storing snapshot by combining Kubernetes and Ceph
CN103617277A (en) Method for restoring data table content deleted mistakenly
CN100437504C (en) Hard disc data backup system and method
CN104461773A (en) Backup deduplication method of virtual machine
CN104899114A (en) Continuous time data protection method on solid state drive
CN102693233B (en) A kind of method and device realizing c bookmart
CN108255638A (en) A kind of snapshot rollback method and device
CN106104515A (en) Utilize File system design and the fault recovery method of nonvolatile memory
CN106155832A (en) Method, device and the Android device that a kind of data are recovered
CN106096447A (en) A kind of document protection method and device
CN103593447A (en) Data processing method and device applied to database table
CN107562898A (en) A kind of method that recycle bin is created based on KUX operating systems

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP01 Change in the name or title of a patent holder

Address after: Jinshan computer Building No. 8 Jingshan Hill Road, Lane 519015 Zhuhai Jida Lianshan Guangdong city of Zhuhai Province

Patentee after: Zhuhai Kingsoft Software Co.,Ltd.

Address before: Jinshan computer Building No. 8 Jingshan Hill Road, Lane 519015 Zhuhai Jida Lianshan Guangdong city of Zhuhai Province

Patentee before: Zhuhai Kingsoft Software Co.,Ltd.

ASS Succession or assignment of patent right

Owner name: KINGSOFT CORPORATION LIMITED

Free format text: FORMER OWNER: ZHUHAI KINGSOFT SOFTWARE CO., LTD.

Effective date: 20140903

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 519015 ZHUHAI, GUANGDONG PROVINCE TO: 100085 HAIDIAN, BEIJING

TR01 Transfer of patent right

Effective date of registration: 20140903

Address after: Kingsoft No. 33 building, 100085 Beijing city Haidian District Xiaoying Road

Patentee after: BEIJING KINGSOFT INTERNET SECURITY SOFTWARE Co.,Ltd.

Address before: Jinshan computer Building No. 8 Jingshan Hill Road, Lane 519015 Zhuhai Jida Lianshan Guangdong city of Zhuhai Province

Patentee before: Zhuhai Kingsoft Software Co.,Ltd.

EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20070509

Assignee: Zhuhai Kingsoft Software Co.,Ltd.

Assignor: BEIJING KINGSOFT INTERNET SECURITY SOFTWARE Co.,Ltd.

Contract record no.: 2014990000778

Denomination of invention: Method for rebuilding directory structure and recovering data in NTFS volume

Granted publication date: 20081029

License type: Common License

Record date: 20140926

LICC Enforcement, change and cancellation of record of contracts on the licence for exploitation of a patent or utility model