CN109271341B - Mirror image disk file filtering method - Google Patents
Mirror image disk file filtering method Download PDFInfo
- Publication number
- CN109271341B CN109271341B CN201811010274.3A CN201811010274A CN109271341B CN 109271341 B CN109271341 B CN 109271341B CN 201811010274 A CN201811010274 A CN 201811010274A CN 109271341 B CN109271341 B CN 109271341B
- Authority
- CN
- China
- Prior art keywords
- file
- disk
- filtering
- mirror
- request
- 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
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method for filtering mirror disk files, which comprises the following steps: s1, mounting the mirror disk into the host system, and filtering the configuration filtering rule by the file system filter driver in the host system; s2, the mirror image disk file system driver in the host system sends the corresponding file whose file attribute accords with the filter rule to the application program in the host system for the application program to access. Unnecessary files and folders can be filtered out, so that the required files and folders can be quickly displayed, and the required files and folders can be quickly restored.
Description
Technical Field
The invention relates to the technical field of file filtering methods, in particular to a method for filtering a mirror disk file.
Background
Continuous Data Protection (CDP) is a method that can continuously capture or track any changes that occur to target data and recover to any previous point in time without affecting the operation of the main data.
When CDP protection hard disk is carried out, when the protected hard disk or partition has a fault, complete and effective data at the moment of the fault point can be provided through a CDP protection mechanism, and the mirror disk is mounted on the host system, so that all data (files and folders) at the moment of the fault point are seen in the host system, and then required data (files and folders) are selected from the data, and the process is very complicated. If the files and folders are not selected, a large number of unnecessary files and folders need to be restored, so that the storage space of the restoration destination is wasted, the restoration process cannot be completed quickly, and the efficiency is very low.
An effective solution to the problems in the related art has not been proposed yet.
Disclosure of Invention
Aiming at the technical problems in the related art, the invention provides a method for filtering mirror image disk files, which can filter out unnecessary files and folders, thereby quickly displaying the required files and folders and further quickly recovering the required files and folders.
In order to achieve the technical purpose, the technical scheme of the invention is realized as follows:
a mirror disk file filtering method comprises the following steps:
s1, mounting the mirror disk into the host system, and filtering the configuration filtering rule by the file system filter driver in the host system;
s2, the mirror image disk file system driver in the host system sends the corresponding file whose file attribute accords with the filter rule to the application program in the host system for the application program to access.
Further, the method also comprises the following steps:
s3, the application program initiates a reading request of a certain file;
s4, the file system in the host system generates an IO request according to the read request and sends the IO request to a file system filter driver, wherein the IO request comprises the file position and the file attribute of the file;
s5, the file system filter driver compares the file attribute with the filter rule, if the file attribute conforms to the filter rule, the file system filter driver sends the IO request to the mirror disk file system driver, the mirror disk file system driver sends the file in the mirror disk at the file location to the application program for the application program to access, if the file attribute does not conform to the filter rule, the file system filter driver rejects the IO request, and the application program cannot access the file requested to be read.
Further, the file attribute comprises one or more of a file name, a file creation time, a file modification time, a file type, and a file size.
Further, the filtering rules include one or more of file name, file creation time, file modification time, file type, and file size.
Further, the mirror disk is a CDP mirror disk.
Further, the form in which the file name conforms to the filter rule includes one or both of full conformance and wildcard conformance.
Further, the file types comprise one or more of doc, pdf, html, jpg, txt and ppt.
The invention has the beneficial effects that: the operation is simple, the mirror disk is mounted and the filtering rule is configured in the host system at the same time, and the step-by-step operation is not needed; the time for restoring the window is short, and the time for restoring the window is greatly reduced because unnecessary files and folders are filtered; the target storage restoring pressure is reduced, and because unnecessary files and folders are filtered out, the data volume needing to be restored is greatly reduced, and the target storage restoring pressure is reduced; the bandwidth pressure of the storage network is reduced, and the data volume needing to be recovered is greatly reduced due to the fact that unnecessary files and folders are filtered out, and the bandwidth pressure of the storage network is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a first flowchart of a method for filtering a mirror disk file according to an embodiment of the present invention;
FIG. 2 is a flowchart II of a method for filtering mirror disk files according to an embodiment of the present invention;
fig. 3 is a flowchart three of a mirror disk file filtering method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of CDP image protection according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present invention.
As shown in fig. 1 to 3, a method for filtering a mirror disk file according to an embodiment of the present invention includes the following steps:
s1, mounting the mirror disk into the host system, and filtering the configuration filtering rule by the file system filter driver in the host system;
s2, the mirror image disk file system driver in the host system sends the corresponding file whose file attribute accords with the filter rule to the application program in the host system for the application program to access.
In one embodiment of the present invention, the method further comprises the following steps:
s3, the application program initiates a reading request of a certain file;
s4, the file system in the host system generates an IO request according to the read request and sends the IO request to a file system filter driver, wherein the IO request comprises the file position and the file attribute of the file;
s5, the file system filter driver compares the file attribute with the filter rule, if the file attribute conforms to the filter rule, the file system filter driver sends the IO request to the mirror disk file system driver, the mirror disk file system driver sends the file in the mirror disk at the file location to the application program for the application program to access, if the file attribute does not conform to the filter rule, the file system filter driver rejects the IO request, and the application program cannot access the file requested to be read.
In a specific embodiment of the present invention, the file attribute includes one or more of a file name, a file creation time, a file modification time, a file type, and a file size.
In a specific embodiment of the present invention, the filtering rule includes one or more of a file name, a file creation time, a file modification time, a file type, and a file size.
In an embodiment of the invention, the mirror disk is a CDP mirror disk.
In one embodiment of the present invention, the file name is in compliance with the filter rule and includes one or both of full compliance and wildcard compliance.
In a specific embodiment of the present invention, the file types include one or more of doc, pdf, html, jpg, txt, ppt.
In order to facilitate understanding of the above-described embodiments of the present invention, the following detailed description of the embodiments of the present invention is provided by way of specific usage.
As shown in fig. 4, the principle of CDP image protection: when an application program requests to write data, the request firstly passes through a file system, the file system generates a new IO request after analyzing the request, the IO request comprises the written data, the data size and the position of a written disk, and then the IO request is transmitted to a file system filter driver.
And after the file system filter driver obtains the IO request, analyzing the IO request and forwarding the IO request to an original disk file system driver and a mirror disk file system driver. The IO requests forwarded to the original disk file system drive and the mirror disk file system drive are consistent, thereby ensuring that the content written to the original disk and the content written to the mirror disk are consistent.
And the original disk file system driver writes the data of the IO request into the corresponding disk sector of the original disk, thereby physically storing the data in the hard disk.
And simultaneously, writing the content written into the original disk and writing a copy of the content into the mirror image disk, thereby keeping the content of the original disk and the content of the mirror image disk completely consistent.
Mirror disk mount flow: selecting a mirror disk at the fault moment (selecting a recovery time point); selecting filtering rules (file or folder name, file type, modification time, etc.); mounting a mirror disk at the moment of failure in a host system, starting a file system filter driver, and configuring a filter rule; in the host system, the mirror disk file system driver filters out unnecessary files and folders according to a filtering rule, and only retains the required files and folders. In the host system, displaying required files and folders through a resource manager (i.e., an application program) of the operating system; in the host system, these files and folders are restored (optional operation, copy operation of files).
The principle of the mirror disk file filtering method is as follows: after the CDP mirror image disk is mounted and the filtering rule is set, the application program can access the mirror image disk through the file system. When an application initiates a file read request, the file system generates an IO request that includes the location of the file, which is passed to the file system filter driver.
The file system filter driver analyzes the IO request to obtain file attributes such as a file name to be accessed, file creation time, file modification time and the like, at the moment, the file system filter driver judges according to a filter rule, if the file attribute of the file conforms to the filter rule, the IO request is forwarded to a mirror disk file system driver, the mirror disk file system driver returns the file in the mirror disk at the file position to a file system or an application program, and the application program can access the file through the file system; if the file does not conform to the filtering rules, the file system filter driver rejects the IO request, eventually resulting in the application program not being able to access the file.
In general, there are the following filtering rules, which can be used in combination.
File names, the conformance of which can support both full conformance and wildcard conformance (: doc, pdf, html, jpg, txt, ppt, etc.
Time of creation of a document, the documents created within a time frame meeting a condition, e.g. [ 2018-01-0100: 00:00, 2018-01-0112: 00:00]
Time of file modification, the files modified within a time frame meeting conditions, e.g. [ 2018-01-0100: 00:00, 2018-01-0112: 00:00]
File size, file size within a range of file sizes, e.g., [2048, 4096], in bytes.
In summary, according to the above technical solution of the present invention, when the mirror magnetic disk is mounted on the host system, the filtering rules (file name, folder, file type, modification time, size, etc.) are specified, and unnecessary files and folders can be filtered out, so that the required files and folders are displayed quickly, and the required files and folders are restored quickly, which is simple to operate, and the mirror magnetic disk is mounted and the filtering rules are configured in the host system at the same time without being performed step by step; the time for restoring the window is short, and the time for restoring the window is greatly reduced because unnecessary files and folders are filtered; the target storage restoring pressure is reduced, and because unnecessary files and folders are filtered out, the data volume needing to be restored is greatly reduced, and the target storage restoring pressure is reduced; the bandwidth pressure of the storage network is reduced, and the data volume needing to be recovered is greatly reduced due to the fact that unnecessary files and folders are filtered out, and the bandwidth pressure of the storage network is reduced.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (6)
1. A mirror disk file filtering method is characterized by comprising the following steps:
s1, mounting the mirror image disk at the fault moment into the host system, and filtering the configuration of the drive filtering rule through the file system in the host system;
s2, the mirror image disk file system driver in the host system sends the corresponding file whose file attribute accords with the filter rule in the mirror image disk to the application program in the host system, so that the application program can access and recover the corresponding file;
s3, the application program initiates a reading request of a certain file;
s4, the file system in the host system generates an IO request according to the read request and sends the IO request to a file system filter driver, wherein the IO request comprises the file position and the file attribute of the file;
s5, the file system filter driver compares the file attribute with the filter rule, if the file attribute conforms to the filter rule, the file system filter driver sends the IO request to the mirror disk file system driver, the mirror disk file system driver sends the file in the mirror disk at the file location to the application program for the application program to access, if the file attribute does not conform to the filter rule, the file system filter driver rejects the IO request, and the application program cannot access the file requested to be read.
2. The image disk file filtering method according to claim 1, wherein the file attributes include one or more of a file name, a file creation time, a file modification time, a file type, and a file size.
3. The image disk file filtering method according to claim 1, wherein the filtering rules include one or more of file name, file creation time, file modification time, file type, and file size.
4. The method according to claim 1, wherein the mirror disk is a CDP mirror disk.
5. The image disk file filtering method according to claim 2, wherein the file name conforming to the filtering rule includes one or both of full conformance and wildcard conformance.
6. The method for filtering mirror disk files according to claim 2, wherein the file types include one or more of doc, pdf, html, jpg, txt, ppt.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811010274.3A CN109271341B (en) | 2018-08-31 | 2018-08-31 | Mirror image disk file filtering method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811010274.3A CN109271341B (en) | 2018-08-31 | 2018-08-31 | Mirror image disk file filtering method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109271341A CN109271341A (en) | 2019-01-25 |
CN109271341B true CN109271341B (en) | 2021-10-26 |
Family
ID=65154873
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811010274.3A Active CN109271341B (en) | 2018-08-31 | 2018-08-31 | Mirror image disk file filtering method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109271341B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110287064B (en) * | 2019-07-02 | 2020-04-17 | 成都易我科技开发有限责任公司 | Method and device for restoring disk data and electronic equipment |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102708317A (en) * | 2012-05-03 | 2012-10-03 | 沈阳通用软件有限公司 | Recording auditing method under Windows platform on basis of filter driver |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7619622B2 (en) * | 2006-03-31 | 2009-11-17 | Microsoft Corporation | Selective rendering for driver classes |
CN100446024C (en) * | 2007-01-26 | 2008-12-24 | 北京飞天诚信科技有限公司 | Protection method and system of electronic document |
CN101256570A (en) * | 2008-02-22 | 2008-09-03 | 山东中创软件工程股份有限公司 | File protection technique based on Windows system files filtering drive |
CN102194079B (en) * | 2011-03-18 | 2013-09-11 | 北京思创银联科技股份有限公司 | File access filtering method |
CN106547641B (en) * | 2015-09-17 | 2020-04-10 | 南京壹进制信息科技有限公司 | CDP backup method based on volume |
CN106648981A (en) * | 2016-12-13 | 2017-05-10 | 龚平 | Continuous data protection based virtual machine data protection method |
CN108170766B (en) * | 2017-12-25 | 2020-07-07 | 南京壹进制信息科技有限公司 | CDP backup and recovery method for ensuring database consistency |
-
2018
- 2018-08-31 CN CN201811010274.3A patent/CN109271341B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102708317A (en) * | 2012-05-03 | 2012-10-03 | 沈阳通用软件有限公司 | Recording auditing method under Windows platform on basis of filter driver |
Non-Patent Citations (1)
Title |
---|
基于Minifilter的数据备份技术的实时性与安全性研究;戈洋洋;《中国优秀硕士学位论文全文数据库信息科技辑》;20150215;第I138-78页 * |
Also Published As
Publication number | Publication date |
---|---|
CN109271341A (en) | 2019-01-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8229896B1 (en) | Method and apparatus for identifying data blocks required for restoration | |
CN104462563B (en) | A kind of file memory method and system | |
US9557928B2 (en) | Autonomic reclamation processing on sequential storage media | |
KR101926674B1 (en) | Log record management | |
US7680843B1 (en) | Method and system to offload archiving process to a secondary system | |
US7526623B1 (en) | Optimizing reclamation of data space | |
US8015157B2 (en) | File sharing system, file server, and method for managing files | |
JP6264666B2 (en) | Data storage method, data storage device, and storage device | |
US7594085B1 (en) | Reclaiming data space | |
CN105027070A (en) | Safety for volume operations | |
WO2015101084A1 (en) | Method, server and system for data recovery | |
US8140537B2 (en) | Block level tagging with file level information | |
US20070294568A1 (en) | Storage system and method of managing data using the same | |
CN113568566B (en) | Method for seamless migration of simple storage service by index object, main device and storage server | |
JP2005512191A (en) | A backup method for saving a snapshot of selected data in a mass storage system | |
CN102541691B (en) | Log check point recovery method applied to memory data base OLTP (online transaction processing) | |
US20190370127A1 (en) | Image recovery from volume image files | |
US8433864B1 (en) | Method and apparatus for providing point-in-time backup images | |
US10701153B1 (en) | Cloud data archiving using latest snapshot metadata | |
CN109271341B (en) | Mirror image disk file filtering method | |
CN109416617B (en) | Replication between heterogeneous storage systems | |
JP6376626B2 (en) | Data storage method, data storage device, and storage device | |
CN113568567B (en) | Method for seamless migration of simple storage service by index object, main device and storage server | |
WO2023121874A1 (en) | Backup, restore, and migration of cloud managed configuration properties | |
CN114880277A (en) | Block device snapshot method, system and storage medium |
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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20211124 Address after: Room 301, floor 3, building 5, yard 16, Meiliyuan Middle Road, Haidian District, Beijing 100097 Patentee after: Beijing Mars high tech digital technology Co.,Ltd. Address before: No. 1401, 23 / F, No. 105, North West Third Ring Road, Haidian District, Beijing 100048 Patentee before: Huang Jiang |
|
TR01 | Transfer of patent right |