CN107423166A - A kind of data processing method and system based on overlay file system - Google Patents
A kind of data processing method and system based on overlay file system Download PDFInfo
- Publication number
- CN107423166A CN107423166A CN201710676109.0A CN201710676109A CN107423166A CN 107423166 A CN107423166 A CN 107423166A CN 201710676109 A CN201710676109 A CN 201710676109A CN 107423166 A CN107423166 A CN 107423166A
- Authority
- CN
- China
- Prior art keywords
- data
- backup
- reduction
- files
- file
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
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 data processing method based on overlay file system, method comprises the following steps:Initial configuration is completed based on overlay file system characteristics;Performed according to different boot parameters and operate the backup-and-restore for realizing data accordingly.The present invention combs core configuration data validation incremental backup data and the scope of reduction, and design the backup-and-restore operation that different boot parameters perform file by using overlay file system organization file system structures.User only need to select different boot entries to quickly finish the backup-and-restore to data, greatly reduce maintenance and the use cost of backup and reduction, and ensure that the accuracy of the data of backup-and-restore.The invention also discloses a kind of data handling system based on overlay file system.
Description
Technical field
The present invention relates to technical field of data processing, more specifically to a kind of number based on overlay file system
According to processing method and system.
Background technology
Nowadays linux system has been obtained for more and more extensive application, especially will to stability in server, storage etc.
Seek very high application scenarios.But being also faced with system simultaneously and breaking down causes the potential risk of core configuration loss of data,
This is just needed periodically to back up core configuration data, and the reduction behaviour of core data is performed when encountering problems and can not repair
Make.Traditional backup can not realize simple and fast to the incremental backups of core configuration data and quick reduction, and need to consider standby
The problems such as dump of part file, use cost is higher.Therefore, how effectively realizing the incremental backup of data and quickly reducing is
One urgent problem to be solved.
The content of the invention
In view of this, it is an object of the invention to provide a kind of data processing method based on overlay file system and
System, by using overlay file system organization file system structures, comb core configuration data validation incremental backup data
With the scope of reduction, and the backup-and-restore operation that different boot parameters perform files is designed.User need to only select different draw
Backup-and-restore to data can be quickly finished by leading item, greatly reduce maintenance and the use cost of backup and reduction, and
It ensure that the accuracy of the data of backup-and-restore.
To achieve the above object, the present invention provides following technical scheme:
A kind of data processing method based on overlay file system, the described method comprises the following steps:
Initial configuration is completed based on overlay file system characteristics;
Performed according to different boot parameters and operate the backup-and-restore for realizing data accordingly.
Preferably, it is described to be included based on overlay file system characteristics completion initial configuration:
Obtaining has the file path of core configuration data change;
Tetra- file directorys of lower, upper, merged, work are created under the file path, wherein, described four
File directory supports the overlay file system characteristics;
By core configuration data copy to lower files, perform corresponding operation and complete initial configuration.
Preferably, it is described to realize that the backup of data includes according to the different corresponding operations of boot parameter execution:
Add the parameter backup that boot entry includes backup;
When system, which starts, detects the parameter backup, carry lower files are read-write, copy upper texts
In part content to lower files;
Restart system, complete the backup of data.
Preferably, it is described to realize that the reduction of data includes according to the different corresponding operations of boot parameter execution:
Add the parameter reduction that boot entry includes reduction;
When system, which starts, detects the parameter reduction, the content in upper files is deleted;
Restart system, complete the reduction of data.
A kind of data handling system based on overlay file system, including:
Initial configuration module, for completing initial configuration based on overlay file system characteristics;
Data processing module, for realizing the backup of data according to the different corresponding operations of boot parameter execution and going back
It is former.
Preferably, the initial configuration module includes:
Acquiring unit, there is the file path of core configuration data change for obtaining;
Creating unit, for creating tetra- file directorys of lower, upper, merged, work under the file path,
Wherein, four file directorys support the overlay file system characteristics;
Copy cell, for core configuration data copy to lower files, the corresponding operation of execution to be completed into initialization
Configuration.
Preferably, the data processing module includes:Data backup unit, the data backup unit are used for:
Add the parameter backup that boot entry includes backup;
When system, which starts, detects the parameter backup, carry lower files are read-write, copy upper texts
In part content to lower files;
Restart system, complete the backup of data.
Preferably, the data processing module also includes data convert unit, and the data convert unit is used for:
Add the parameter reduction that boot entry includes reduction;
When system, which starts, detects the parameter reduction, the content in upper files is deleted;
Restart system, complete the reduction of data.
It can be seen from the above technical proposal that the invention discloses a kind of data processing based on overlay file system
Method, it is primarily based on overlay file system characteristics and completes initial configuration, is then performed according to different boot parameters corresponding
Operation realize the backup-and-restores of data, by using overlay file system organization file system structures, comb core and match somebody with somebody
Data validation incremental backup data and the scope of reduction are put, and designs the backup-and-restore behaviour that different boot parameters perform file
Make.User only need to select different boot entries to quickly finish the backup-and-restore to data, greatly reduce backup
The maintenance of reduction and use cost, and ensure that the accuracy of the data of backup-and-restore.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of flow of the data processing method embodiment 1 based on overlay file system disclosed by the invention
Figure;
Fig. 2 is a kind of flow of the data processing method embodiment 2 based on overlay file system disclosed by the invention
Figure;
Fig. 3 is that a kind of structure of the data handling system embodiment 1 based on overlay file system disclosed by the invention is shown
It is intended to;
Fig. 4 is that a kind of structure of the data handling system embodiment 2 based on overlay file system disclosed by the invention is shown
It is intended to.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained all other under the premise of creative work is not made
Embodiment, belong to the scope of protection of the invention.
As shown in figure 1, it is a kind of embodiment of the data processing method based on overlay file system disclosed by the invention
1 flow chart, method may comprise steps of:
S101, based on overlay file system characteristics complete initial configuration;
When needing to handle data, overlay file system characteristics are primarily based on, design document system architecture is complete
Into initial configuration.
S102, the backup-and-restore that data are realized in corresponding operation is performed according to different boot parameters.
After initial configuration is completed, the backup-and-restore work(of corresponding data is further performed according to different boot parameters
Energy.
In summary, in the above-described embodiments, when needing to handle data, it is primarily based on overlay files system
System characteristic completes initial configuration, is then performed according to different boot parameters and operates the backup for realizing data accordingly and go back
Original, by using overlay file system organization file system structures, comb core configuration data validation incremental backup data and
The scope of reduction, and design the backup-and-restore operation that different boot parameters perform file.User need to only select different guiding
Item can quickly finish the backup-and-restore to data, greatly reduce maintenance and the use cost of backup and reduction, and protect
The accuracy of the data of backup-and-restore is demonstrate,proved.
As shown in Fig. 2 it is a kind of embodiment of the data processing method based on overlay file system disclosed by the invention
2 flow chart, method may comprise steps of:
S201, acquisition have the file path of core configuration data change;
When needing to handle data, there is the file road of core configuration data change by combing routine use first
Footpath, get the file path of core configuration data change.
S202, tetra- file directorys of lower, upper, merged, work are created under file path, wherein, four texts
Part catalogue supports overlay file system characteristics;
After the file path of core configuration data change is got, under the file path got create lower,
Tetra- file directorys of upper, merged, work, wherein four file directorys created need to support that overlay file system is special
Property.
S203, by core configuration data copy to lower files, perform corresponding operation and complete initial configuration;
Then core configuration data copy to lower files, and mount-t overlay overlay- are performed
Olowerdir=./lower, upperdir=./upper, workdir=./work./merged complete initial configuration.
S204, addition boot entry include the parameter backup of backup;
During data processing, when needing to back up data, boot entry is added in systems and includes backup
Parameter backup.
S205, when system starts and detects parameter backup, carry lower files is read-write, copy upper texts
In part content to lower files;
Upon power-up of the system, if detecting parameter backup, carry lower files are read-write, and are copied
In upper file contents to lower files.
S206, restart system, complete the backup of data;
After the completion of copying upper file contents to lower files, system is restarted, then backup is completed.
S207, addition boot entry include the parameter reduction of reduction;
During data processing, when needing to reduce data, addition boot entry includes in systems first
The parameter reduction of reduction.
S208, when system start detect the parameter reduction when, delete upper files in content;
Upon power-up of the system, if detecting parameter reduction, the content in upper files is deleted.
S209, restart system, complete the reduction of data.
After the completion of deleting the content in upper files, Chongqing system, then the reduction of data is completed.
In summary, in the above-described embodiments, when needing to handle data, obtain has core configuration data first
The file path of change, tetra- file directorys of lower, upper, merged, work are created under file path, wherein, four
File directory supports overlay file system characteristics, and core configuration data copy to lower files performs corresponding
Initial configuration is completed in operation;Then the parameter backup that boot entry includes backup is added, the ginseng is detected when system starts
During number backup, carry lower files are read-write, copy in upper file contents to lower files, restart system,
Complete the backup of data;Then the parameter reduction that boot entry includes reduction is added, the parameter is detected when system starts
During reduction, the content in upper files is deleted, system is restarted, completes the reduction of data.By using overlay texts
Part system organization file system structure, core configuration data validation incremental backup data and the scope of reduction are combed, and designed not
The backup-and-restore operation of file is performed with boot parameter.User only need to select different boot entries to quickly finish logarithm
According to backup-and-restore, greatly reduce maintenance and the use cost of backup and reduction, and ensure that the data of backup-and-restore
Accuracy.
As shown in figure 3, it is a kind of embodiment of the data handling system based on overlay file system disclosed by the invention
1 structural representation, system can include:
Initial configuration module 301, for completing initial configuration based on overlay file system characteristics;
When needing to handle data, overlay file system characteristics are primarily based on, design document system architecture is complete
Into initial configuration.
Data processing module 302, for according to different boot parameter perform corresponding operation realize data backup and
Reduction.
After initial configuration is completed, the backup-and-restore work(of corresponding data is further performed according to different boot parameters
Energy.
In summary, in the above-described embodiments, when needing to handle data, it is primarily based on overlay files system
System characteristic completes initial configuration, is then performed according to different boot parameters and operates the backup for realizing data accordingly and go back
Original, by using overlay file system organization file system structures, comb core configuration data validation incremental backup data and
The scope of reduction, and design the backup-and-restore operation that different boot parameters perform file.User need to only select different guiding
Item can quickly finish the backup-and-restore to data, greatly reduce maintenance and the use cost of backup and reduction, and protect
The accuracy of the data of backup-and-restore is demonstrate,proved.
As shown in figure 4, it is a kind of embodiment of the data handling system based on overlay file system disclosed by the invention
2 structural representation, system can include:
Acquiring unit 401, there is the file path of core configuration data change for obtaining;
When needing to handle data, there is the file road of core configuration data change by combing routine use first
Footpath, get the file path of core configuration data change.
Creating unit 402, for creating tetra- file directorys of lower, upper, merged, work under file path,
Wherein, four file directorys support overlay file system characteristics;
After the file path of core configuration data change is got, under the file path got create lower,
Tetra- file directorys of upper, merged, work, wherein four file directorys created need to support that overlay file system is special
Property.
Copy cell 403, for core configuration data copy to lower files, the corresponding operation of execution to be completed just
Beginningization configures;
Then core configuration data copy to lower files, and mount-t overlay overlay- are performed
Olowerdir=./lower, upperdir=./upper, workdir=./work./merged complete initial configuration.
Data backup unit 404, the parameter backup for including backup for adding boot entry, ginseng is detected when system starts
During number backup, carry lower files are read-write, copy in upper file contents to lower files, restart system,
Complete the backup of data;
During data processing, when needing to back up data, boot entry is added in systems and includes backup
Parameter backup.
Upon power-up of the system, if detecting parameter backup, carry lower files are read-write, and are copied
In upper file contents to lower files.
After the completion of copying upper file contents to lower files, system is restarted, then backup is completed.
Data convert unit 405, the parameter reduction for including reduction for adding boot entry, detected when system starts
During to the parameter reduction, the content in upper files is deleted, system is restarted, completes the reduction of data.
During data processing, when needing to reduce data, addition boot entry includes in systems first
The parameter reduction of reduction.
Upon power-up of the system, if detecting parameter reduction, the content in upper files is deleted.
After the completion of deleting the content in upper files, Chongqing system, then the reduction of data is completed.
In summary, in the above-described embodiments, when needing to handle data, obtain has core configuration data first
The file path of change, tetra- file directorys of lower, upper, merged, work are created under file path, wherein, four
File directory supports overlay file system characteristics, and core configuration data copy to lower files performs corresponding
Initial configuration is completed in operation;Then the parameter backup that boot entry includes backup is added, the ginseng is detected when system starts
During number backup, carry lower files are read-write, copy in upper file contents to lower files, restart system,
Complete the backup of data;Then the parameter reduction that boot entry includes reduction is added, the parameter is detected when system starts
During reduction, the content in upper files is deleted, system is restarted, completes the reduction of data.By using overlay texts
Part system organization file system structure, core configuration data validation incremental backup data and the scope of reduction are combed, and designed not
The backup-and-restore operation of file is performed with boot parameter.User only need to select different boot entries to quickly finish logarithm
According to backup-and-restore, greatly reduce maintenance and the use cost of backup and reduction, and ensure that the data of backup-and-restore
Accuracy.
Each embodiment is described by the way of progressive in this specification, what each embodiment stressed be with it is other
The difference of embodiment, between each embodiment identical similar portion mutually referring to.
The foregoing description of the disclosed embodiments, professional and technical personnel in the field are enable to realize or using the present invention.
A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention
The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one
The most wide scope caused.
Claims (8)
1. a kind of data processing method based on overlay file system, it is characterised in that the described method comprises the following steps:
Initial configuration is completed based on overlay file system characteristics;
Performed according to different boot parameters and operate the backup-and-restore for realizing data accordingly.
2. according to the method for claim 1, it is characterised in that described to be completed initially based on overlay file system characteristics
Changing configuration includes:
Obtaining has the file path of core configuration data change;
Tetra- file directorys of lower, upper, merged, work are created under the file path, wherein, four files
Catalogue supports the overlay file system characteristics;
By core configuration data copy to lower files, perform corresponding operation and complete initial configuration.
3. according to the method for claim 2, it is characterised in that described that corresponding operation is performed according to different boot parameters
Realizing the backup of data includes:
Add the parameter backup that boot entry includes backup;
When system, which starts, detects the parameter backup, carry lower files are read-write, are copied in upper files
Hold to lower files;
Restart system, complete the backup of data.
4. according to the method for claim 3, it is characterised in that described that corresponding operation is performed according to different boot parameters
Realizing the reduction of data includes:
Add the parameter reduction that boot entry includes reduction;
When system, which starts, detects the parameter reduction, the content in upper files is deleted;
Restart system, complete the reduction of data.
A kind of 5. data handling system based on overlay file system, it is characterised in that including:
Initial configuration module, for completing initial configuration based on overlay file system characteristics;
Data processing module, the backup-and-restore for realizing data is operated accordingly for being performed according to different boot parameters.
6. system according to claim 5, it is characterised in that the initial configuration module includes:
Acquiring unit, there is the file path of core configuration data change for obtaining;
Creating unit, for creating tetra- file directorys of lower, upper, merged, work under the file path, its
In, four file directorys support the overlay file system characteristics;
Copy cell, for completing initialization and matching somebody with somebody core configuration data copy to lower files, the corresponding operation of execution
Put.
7. system according to claim 6, it is characterised in that the data processing module includes:Data backup unit, institute
Data backup unit is stated to be used for:
Add the parameter backup that boot entry includes backup;
When system, which starts, detects the parameter backup, carry lower files are read-write, are copied in upper files
Hold to lower files;
Restart system, complete the backup of data.
8. system according to claim 7, it is characterised in that the data processing module also includes data convert unit,
The data convert unit is used for:
Add the parameter reduction that boot entry includes reduction;
When system, which starts, detects the parameter reduction, the content in upper files is deleted;
Restart system, complete the reduction of data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710676109.0A CN107423166B (en) | 2017-08-09 | 2017-08-09 | Data processing method and system based on overlay file system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710676109.0A CN107423166B (en) | 2017-08-09 | 2017-08-09 | Data processing method and system based on overlay file system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107423166A true CN107423166A (en) | 2017-12-01 |
CN107423166B CN107423166B (en) | 2020-03-20 |
Family
ID=60436862
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710676109.0A Active CN107423166B (en) | 2017-08-09 | 2017-08-09 | Data processing method and system based on overlay file system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107423166B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109558275A (en) * | 2018-10-25 | 2019-04-02 | 深圳点猫科技有限公司 | A kind of method and electronic equipment of the factory reset based on educational system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101673230A (en) * | 2009-10-16 | 2010-03-17 | 国电南京自动化股份有限公司 | Method for automatically backing up and recovering configuration data of embedded system by using a U-disk |
CN103514063A (en) * | 2012-06-21 | 2014-01-15 | 浙江大华技术股份有限公司 | Method and device for processing FLASH data |
CN106557384A (en) * | 2015-09-25 | 2017-04-05 | 中兴通讯股份有限公司 | Based on the data processing method of Linux, device and system |
-
2017
- 2017-08-09 CN CN201710676109.0A patent/CN107423166B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101673230A (en) * | 2009-10-16 | 2010-03-17 | 国电南京自动化股份有限公司 | Method for automatically backing up and recovering configuration data of embedded system by using a U-disk |
CN103514063A (en) * | 2012-06-21 | 2014-01-15 | 浙江大华技术股份有限公司 | Method and device for processing FLASH data |
CN106557384A (en) * | 2015-09-25 | 2017-04-05 | 中兴通讯股份有限公司 | Based on the data processing method of Linux, device and system |
Non-Patent Citations (3)
Title |
---|
DONGHAO: "从"快照"到overlay filesystem", 《HTTP://WWW.UDPWORK.COM/ITEM/6821.HTML》 * |
虞云翔: "嵌入式Linux系统中Overlay文件系统的实现", 《微电子学与计算机》 * |
陈爱珍: "overlay文件系统解析", 《HTTP://DOCKONE.IO/ARTICLE/1511》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109558275A (en) * | 2018-10-25 | 2019-04-02 | 深圳点猫科技有限公司 | A kind of method and electronic equipment of the factory reset based on educational system |
Also Published As
Publication number | Publication date |
---|---|
CN107423166B (en) | 2020-03-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102567136B (en) | The backup of a kind of computer system, method of reducing, device and computer system | |
CN103473067B (en) | Built-in Linux subregion and data restoration method, system and system development method | |
CN103970585B (en) | Create the method and device of virtual machine | |
CN104699423B (en) | The method and apparatus that drive is bound in linux system | |
US20120203742A1 (en) | Remote data protection in a networked storage computing environment | |
CN102331957B (en) | File backup method and device | |
US20070276848A1 (en) | Apparatus and method for managing data | |
US8140537B2 (en) | Block level tagging with file level information | |
US8521690B2 (en) | Using a sparse file as a clone of a file | |
CN103186387B (en) | Electronic installation and its method for updating OS | |
CN103678036B (en) | A kind of backup method found based on virtual machine operation information data | |
CN110908671A (en) | Method and device for constructing docker mirror image and computer readable storage medium | |
CN103559139B (en) | A kind of date storage method and device | |
US20200192744A1 (en) | Fast recovery from failures in a chronologically ordered log-structured key-value storage system | |
CN103430178A (en) | Method, apparatus and product of data updating | |
CN110162429A (en) | System repair, server and storage medium | |
CN104866324A (en) | Method for constructing portable operating system and portable memorizer | |
CA2959647C (en) | Data migration tool with intermediate incremental copies | |
CN103226603A (en) | File synchronization update method and system based on portable storage device | |
US8630982B2 (en) | Individual object restore | |
CN103559224A (en) | Method and device for hashing metadata objects | |
US20130041868A1 (en) | Data synchronization | |
US9268755B2 (en) | Performing persistent undo and redo operation within computer software | |
CN108664255A (en) | A kind of method for upgrading software and device | |
CN102331920A (en) | Data processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |