CN108536554A - A kind of backup method of data file - Google Patents

A kind of backup method of data file Download PDF

Info

Publication number
CN108536554A
CN108536554A CN201810386036.6A CN201810386036A CN108536554A CN 108536554 A CN108536554 A CN 108536554A CN 201810386036 A CN201810386036 A CN 201810386036A CN 108536554 A CN108536554 A CN 108536554A
Authority
CN
China
Prior art keywords
file
backup
redundant
redundancy
processing
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.)
Pending
Application number
CN201810386036.6A
Other languages
Chinese (zh)
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.)
Weihai Ocean Vocational College
Original Assignee
Weihai Ocean Vocational College
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 Weihai Ocean Vocational College filed Critical Weihai Ocean Vocational College
Priority to CN201810386036.6A priority Critical patent/CN108536554A/en
Publication of CN108536554A publication Critical patent/CN108536554A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of backup methods of data file, when being included in the backup operation instruction for receiving data file, deconsolidation process is carried out to specified file, for the file of detachable processing, obtain its minimum top of file, a redundant file is saved as, to being unable to the file of deconsolidation process, carries out standard backups processing;Standard backups processing is carried out to detachable file and redundancy backup processing is carried out to redundant file.The present invention realizes the dual backup of the i.e. top of file of data file pith, and proposes a kind of test method, filters out minimum top of file and is backed up the reliability for improving backup method entirety to improve resource utilization.

Description

A kind of backup method of data file
Technical field
The present invention relates to information technology fields, and in particular to a kind of backup method of data file.
Background technology
To prevent terminal loss or terminal by virus attack, the file in terminal is caused to be lost, user is generally by file Backup is at server (such as cloud server), when ensureing that the file in currently stored terminal or currently stored path is lost, It can inquire in the server and get backup file.
Such as a kind of file backup method and system are disclosed in the patent document of Publication No. CN104331343A, it mentions More perfect file backup scheme.
But any backup is not safe against all possibilities, any storage medium has the probability of failure, so counterweight mian part Redundancy backup will be carried out by dividing.For data file, top of file damage will entire file failure;As long as and file header It does not damage, application program can obtain the essential information of data file, to which smooth opening obtains which part data, reduce damage It loses.
So needing a kind of backup method, pith i.e. top of file is made to occupy more backup spaces.
But data file type is various, and top of file length is also different, it is impossible to have accurately for each file Judge file header method, so needing a kind of method for generally judging file header, and being backed up, reaches to top of file Duplicate protection.
Invention content
The present invention is to solve the problems in background technology, the duplicate protection to data file pith is realized, with existing Redundancy technique based on, propose a kind of backup method of data file, realized by following technical scheme:
A kind of backup method of data file, the file backup method include the following steps:
Step 1-1:In the backup operation instruction for receiving data file, deconsolidation process is carried out to specified file, it is right In the file of detachable processing, its minimum top of file is obtained, a redundant file is saved as, to being unable to the text of deconsolidation process Part carries out standard backups processing;
Step 1-2:Standard backups processing is carried out to detachable file and redundancy backup processing is carried out to redundant file.Pass through Step 1-1,1-2 may be implemented to document classification, and pair can further be backed up with the file of redundancy backup.
Further, the deconsolidation process includes the following steps:
Step 2-1:The file total size is V bytes, enable n=1 (n represents the number for executing step 2-2, due to the use of Application program opens the step of file is most expends resource in this step, therefore to control number), the end bit of minimum top of file It is set to p, p=V/2 and rounding is enabled, it is specified that maximum cycle a T, s are free Bytes number variable, enables s=V, enter step 2-2;
Step 2-2:N=n+1 is enabled, file is saved as to the file of an original same type from the content of 0-p bytes, It is opened using the corresponding application program of original, opens and successfully then enter step 2-3, opened failure and then enter step 2-4;
Step 2-3:Enable s=p (p is available, achieves), p=p-V/2n(further reducing top of file range), works as n>When T 2-5 is entered step, 2-2 is otherwise entered step;
Step 2-4:P=p+V/2n(appropriate to expand top of file range), works as n>2-5 is entered step when T, otherwise enters step Rapid 2-2;
Step 2-5:As s=p, this file is judged to being unable to the file of deconsolidation process, and otherwise minimum top of file is 0-s The content of byte.
Preferably, the maximum cycle T takes 5.
Above-mentioned steps are executed by maximum 5 cycles, can be excessive by redundant file, the meaningless file of redundancy backup is seen Make the file that cannot be split, otherwise filters out the redundant file (body here of the minimum 3.125% original volume of a volume Product can increase with the value of T and become smaller) carry out redundancy backup operation.
Further, the standard backups processing includes the following steps:
Step 4-1:Determine the backup path of the file;
Step 4-2:The backup path is added in the attribute information of the file;
Step 4-3:The backup file of the file is generated, and the backup file is added to the backup path and is corresponded to Memory space in.
Further, the redundancy backup processing includes the following steps:
Step 5-1:Determine the redundancy backup path of the redundant file;
Step 5-2:The redundancy backup path and redundant file byte number are added to the attribute letter of the redundant file In breath;
Step 5-3:It generates the redundancy backup file of the redundant file, and the redundancy backup file is added to described In the corresponding memory space in redundancy backup path.
Above step 5-1 to 5-3 realizes the redundancy backup to redundant file.
The beneficial effects of the invention are as follows:Data file is classified, to the file of file header can be obtained, by its text The taking-up of part head has carried out additional copy, increases the reliability of entire backup scenario;And it applies most save system money wherein The progressive algorithm that source is found finds suitable redundant file size with fewer number.
Description of the drawings
Fig. 1 is the flow chart of step 1-1,1-2 in embodiment 1 in the present invention
Fig. 2 is the flow chart of step 2-1,2-2,2-3,2-4,2-5 in embodiment 1 in the present invention
Specific implementation mode
In order to make the technical means, the creative features, the aims and the efficiencies achieved by the present invention be easy to understand, tie below Conjunction is specifically illustrating, and the present invention is further explained.It should be appreciated that specific embodiment described herein is only used to explain this hair It is bright, it is not intended to limit the present invention.
As shown in Figure 1, Figure 2, a kind of backup method of data file, includes the following steps:
Step 1-1:In the backup operation instruction for receiving data file, deconsolidation process is carried out to file, for removable The file for dividing processing obtains its minimum top of file, saves as a redundant file, to being unable to the file of deconsolidation process, carries out Standard backups processing;
Step 1-2:Standard backups processing is carried out to detachable file and redundancy backup processing is carried out to redundant file.Pass through Step 1-1,1-2 may be implemented to document classification, and pair can further be backed up with the file of redundancy backup.
The deconsolidation process includes the following steps:
Step 2-1:The file total size is V bytes, enable n=1 (n represents the number for executing step 2-2, due to the use of Application program opens the step of file is most expends resource in this step, therefore to control number), the end bit of minimum top of file It is set to p, p=V/2 and rounding is enabled, it is specified that maximum cycle a T, s are free Bytes number variable, enables s=V, enter step 2-2;
Step 2-2:N=n+1 is enabled, file is saved as into a former type file from the content of 0-p bytes, uses original Corresponding application program is opened, and is opened and is successfully then entered step 2-3, is opened failure and is then entered step 2-4;
Step 2-3:Enable s=p (p is available, achieves), p=p-V/2n(further reducing top of file range), works as n>When T 2-5 is entered step, 2-2 is otherwise entered step;
Step 2-4:P=p+V/2n(appropriate to expand top of file range), works as n>2-5 is entered step when T, otherwise enters step Rapid 2-2;
Step 2-5:As s=p, this file is judged to being unable to the file of deconsolidation process, and otherwise minimum top of file is 0-s The content of byte.
The maximum cycle T takes 5.
Above-mentioned steps are executed by maximum 5 cycles, can be excessive by redundant file, the meaningless file of redundancy backup is seen Make the file that cannot be split, otherwise filters out the redundant file (body here of the minimum 3.125% original volume of a volume Product can increase with the value of T and become smaller) carry out redundancy backup operation.
The standard backups processing includes the following steps:
Step 4-1:Determine the backup path of the file;
Step 4-2:The backup path is added in the attribute information of the file;
Step 4-3:The backup file of the file is generated, and the backup file is added to the backup path and is corresponded to Memory space in.
Above step 4-1 to 4-3 is the prior art, and backup operation is carried out to file.
Further, the redundancy backup processing includes the following steps:
Step 5-1:Determine the redundancy backup path of the redundant file;
Step 5-2:The redundancy backup path and redundant file byte number are added to the attribute letter of the redundant file In breath;
Step 5-3:It generates the redundancy backup file of the redundant file, and the redundancy backup file is added to described In the corresponding memory space in redundancy backup path.
Above step 5-1 to 5-3 realizes the redundancy backup to redundant file.
Embodiment 1, the method backed up to data file A the present embodiment provides one, the wherein file size of A are 1, 000,000 byte, 400,000 byte of top of file length.
When receiving to A progress backup operation instructions, deconsolidation process, implementation steps 2-1 to 2-5, V=are carried out to file 1000000, n=1, p=500000, T=5, s=V=1000000 enter step 2-2,
2-2, n=1+1=2 are entered step, 0-500000 byte contents save as a former type file B, and B is due to containing Complete file head, it is possible to be opened by application program, enter step 2-3
Enter step 2-3, s=p=500000, p=500000-250000=250000, n=2<5 so enter step 2-2 is recycled;
2-2, n=3 are entered step, 0-250000 byte contents cannot cover complete file head, cannot be beaten by application program It opens, so entering step 2-4;
Enter step 2-4, p=250000+125000=375000, n=3<5 thus enter step 2-2 cycle;
2-2, n=4 are entered step, 0-375000 byte contents cannot cover complete file head, cannot be beaten by application program It opens, so entering step 2-4;
Enter step 2-4, p=375000+62500=437500, n=4<5 thus enter step 2-2 cycle;
2-2 is entered step, n=5,0-437500 can cover complete file head, can be opened by application program, so into Step 2-3 cycles;
2-3, s=437500, p=437500-31250=406250 are entered step, 2-2 cycles are entered step;
2-2 is entered step, n=6,0-406250 can cover complete file head, can be opened by application program, into step Rapid 2-3 cycles;
2-3, s=p=406250 are entered step, due to n=6>5, so entering step 2-5;
2-5 is entered step, since s is not equal to p, so minimum top of file is the content of 0-406250 bytes.
So file A is detachable file, minimum top of file is the content of the 0-406250 bytes of A, saves as redundancy File B.
Pass through step 2-1 to 2-5, it can be seen that the size of minimum top of file is after five times repeat, with practical text The size of part head differs very little, saves system resource.
Step 1-2 is executed, standard backups processing (step 4-1 to 4-3) is carried out to A, determines the backup path of A files; In the present embodiment, it refers to storing file duplication into the corresponding memory space of backup path to carry out backup operation to file, should Backup path can be located at same terminal with the currently stored path of the file, may be alternatively located at different terminals, such as by local text Part backs up to high in the clouds.User can trigger backup operation by way of dragging file or by the control in terminal display interface Instruction includes the backup path of file in backup operation instruction.The backup path is added in the attribute information of A files When content, various information stores respectively, can make an addition to backup path in attribute information at corresponding byte.
The backup file C of A files is generated, and C files are added in the corresponding memory space of the backup path.
Redundancy backup processing is carried out to B files, step 5-1 to 5-3 is executed, determines the redundancy backup path of B files;By institute It states redundancy backup path and B files byte number 406250 is added in the attribute information of B files;Generate the redundancy backup of B files File D, and D files are added in the corresponding memory space in the redundancy backup path.
So far backup has been carried out in file A and the file B containing file A minimum top of files is also backed up, and reaches At the dual fail-safe to minimum top of file.
In the case where file A damages file C is also damaged, the head that can transfer file D overlay files A or C corresponds to Part, attempt restore data.
The basic principles, main features and advantages of the invention have been shown and described above.The technical staff of the industry should Understand, the present invention is not limited to the above embodiments, and the above embodiments and description only describe the originals of the present invention Reason, without departing from the spirit and scope of the present invention, various changes and improvements may be made to the invention, these changes and improvements It all fall within the protetion scope of the claimed invention.The claimed scope of the invention is by appended claims and its equivalent circle It is fixed.

Claims (5)

1. a kind of backup method of data file, it is characterised in that:It the described method comprises the following steps:
Step 1-1:In the backup operation instruction for receiving data file, deconsolidation process is carried out to specified file, for can The file of deconsolidation process obtains its minimum top of file, saves as a redundant file, to being unable to the file of deconsolidation process, into The processing of row standard backups;
Step 1-2:Standard backups processing is carried out to detachable file and redundancy backup processing is carried out to its redundant file.
2. a kind of data file backup method according to claim 1, it is characterised in that:The deconsolidation process includes following Step:
Step 2-1:The file total size is V bytes, enables n=1, the end position of minimum top of file is p, enables p=V/2 simultaneously Rounding enables s=V, enters step 2-2, it is specified that a maximum cycle T, s are free Bytes number variable;
Step 2-2:N=n+1 is enabled, file is saved as into a file identical with original type from the content of 0-p bytes, is made It is opened with the corresponding application program of original, opens and successfully then enter step 2-3, opened failure and then enter step 2-4;
Step 2-3:Enable s=p, p=p-V/2n, work as n>2-5 is entered step when T, otherwise enters step 2-2;
Step 2-4:P=p+V/2n, work as n>2-5 is entered step when T, otherwise enters step 2-2;
Step 2-5:As s=p, this file is judged to being unable to the file of deconsolidation process, and otherwise minimum top of file is 0-s bytes Content.
3. a kind of data file backup method according to claim 2, it is characterised in that:The maximum cycle T takes 5。
4. a kind of data file backup method according to claim 1, it is characterised in that:The standard backups are handled Following steps:
Step 4-1:Determine the backup path of the file;
Step 4-2:The backup path is added in the attribute information of the file;
Step 4-3:The backup file of the file is generated, and the backup file is added to the backup path is corresponding to be deposited It stores up in space.
5. a kind of data file backup method according to claim 1, it is characterised in that:The redundancy backup is handled Following steps:
Step 5-1:Determine the redundancy backup path of the redundant file;
Step 5-2:The redundancy backup path and redundant file byte number are added in the attribute information of the redundant file;
Step 5-3:The redundancy backup file of the redundant file is generated, and the redundancy backup file is added to the redundancy In the corresponding memory space of backup path.
CN201810386036.6A 2018-04-26 2018-04-26 A kind of backup method of data file Pending CN108536554A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810386036.6A CN108536554A (en) 2018-04-26 2018-04-26 A kind of backup method of data file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810386036.6A CN108536554A (en) 2018-04-26 2018-04-26 A kind of backup method of data file

Publications (1)

Publication Number Publication Date
CN108536554A true CN108536554A (en) 2018-09-14

Family

ID=63479318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810386036.6A Pending CN108536554A (en) 2018-04-26 2018-04-26 A kind of backup method of data file

Country Status (1)

Country Link
CN (1) CN108536554A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140586A (en) * 2007-09-30 2008-03-12 浙江大学 Method for building file systems on NAND flash memory in embedded system
US20090271412A1 (en) * 2008-04-29 2009-10-29 Maxiscale, Inc. Peer-to-Peer Redundant File Server System and Methods
CN102411523A (en) * 2011-11-30 2012-04-11 广东威创视讯科技股份有限公司 Method and device for storing file backups and backup method for file systems
CN102750324A (en) * 2012-05-28 2012-10-24 华为技术有限公司 File storage system, file storage device and file access method
CN104331343A (en) * 2014-11-06 2015-02-04 深圳市中兴移动通信有限公司 File backup method and system
CN107153794A (en) * 2016-03-03 2017-09-12 腾讯科技(深圳)有限公司 File encrypting method and device, file decryption method and apparatus
CN107220146A (en) * 2017-05-24 2017-09-29 万兴科技股份有限公司 A kind of file scan restoration methods and device
CN107832625A (en) * 2017-11-21 2018-03-23 江苏神州信源系统工程有限公司 A kind for the treatment of method and apparatus of document

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140586A (en) * 2007-09-30 2008-03-12 浙江大学 Method for building file systems on NAND flash memory in embedded system
US20090271412A1 (en) * 2008-04-29 2009-10-29 Maxiscale, Inc. Peer-to-Peer Redundant File Server System and Methods
CN102411523A (en) * 2011-11-30 2012-04-11 广东威创视讯科技股份有限公司 Method and device for storing file backups and backup method for file systems
CN102750324A (en) * 2012-05-28 2012-10-24 华为技术有限公司 File storage system, file storage device and file access method
CN104331343A (en) * 2014-11-06 2015-02-04 深圳市中兴移动通信有限公司 File backup method and system
CN107153794A (en) * 2016-03-03 2017-09-12 腾讯科技(深圳)有限公司 File encrypting method and device, file decryption method and apparatus
CN107220146A (en) * 2017-05-24 2017-09-29 万兴科技股份有限公司 A kind of file scan restoration methods and device
CN107832625A (en) * 2017-11-21 2018-03-23 江苏神州信源系统工程有限公司 A kind for the treatment of method and apparatus of document

Similar Documents

Publication Publication Date Title
US10126973B2 (en) Systems and methods for retaining and using data block signatures in data protection operations
US8108446B1 (en) Methods and systems for managing deduplicated data using unilateral referencing
US9223660B2 (en) Storage device to backup content based on a deduplication system
CN103870514B (en) Data de-duplication method and device
WO2019014531A1 (en) Method, apparatus, and electronic device for processing consensus requests in a blockchain consensus network
US11762813B2 (en) Quality score compression apparatus and method for improving downstream accuracy
US8818952B2 (en) Storage apparatus and duplicate data detection method
WO2014037767A1 (en) Multi-level inline data deduplication
CN102436408A (en) Data storage cloud and cloud backup method based on Map/Dedup
CN103150260A (en) Method and device for deleting repeating data
CN110618974A (en) Data storage method, device, equipment and storage medium
CN109558213A (en) The method and apparatus for managing the virtual machine snapshot of OpenStack platform
US10142415B2 (en) Data migration
Kumar et al. Bucket based data deduplication technique for big data storage system
CN110765069B (en) Data migration method, device and system
CN105022676B (en) A kind of memory database redoes log the restoration methods and device of file
CN103559224A (en) Method and device for hashing metadata objects
US9952771B1 (en) Method and system for choosing an optimal compression algorithm
CN113821382A (en) Real-time database data processing method, system and equipment
US20160275134A1 (en) Nosql database data validation
US11269521B2 (en) Method, device and computer program product for processing disk unavailability states
US10268543B2 (en) Online volume repair
CN108536554A (en) A kind of backup method of data file
CN104281412A (en) Method for removing repeating data before data storage
CN105930223A (en) Method for reducing size of check point file

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180914