CN109144792A - Data reconstruction method, device and system and computer readable storage medium - Google Patents

Data reconstruction method, device and system and computer readable storage medium Download PDF

Info

Publication number
CN109144792A
CN109144792A CN201811167895.2A CN201811167895A CN109144792A CN 109144792 A CN109144792 A CN 109144792A CN 201811167895 A CN201811167895 A CN 201811167895A CN 109144792 A CN109144792 A CN 109144792A
Authority
CN
China
Prior art keywords
database
backup
metadata
operation log
log
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
CN201811167895.2A
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201811167895.2A priority Critical patent/CN109144792A/en
Publication of CN109144792A publication Critical patent/CN109144792A/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/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques

Abstract

The invention discloses a kind of data reconstruction method, device, system and computer readable storage mediums, it is monitored including the current operating conditions to database, and judge whether database breaks down, if so, restoring according to each operation pre-recorded in the metadata and operation log backed up in advance in default storage region to the metadata in database;The operation recorded in operation log is all operations performed between backup twice.The application can restore the metadata in database according to operation pre-recorded in the metadata and operation log backed up in advance in default storage region in database failure, to avoid the case where loss of data occur in database failure, Information Security is improved.

Description

Data reconstruction method, device and system and computer readable storage medium
Technical field
The present embodiments relate to technical field of data security, more particularly to a kind of data reconstruction method, device and are System and computer readable storage medium.
Background technique
With the development of science and technology, having entered big data era at present, network data is constantly towards high quick change, the side of magnanimity To development, and the requirement to database is also higher and higher.Currently, a large amount of metadata is stored in database, but one Denier database breaks down, and will result in the metadata deposited in the database and loses, causes whole system to fail, data is caused to pacify Full hidden danger.
In consideration of it, the data reconstruction method, device, system and the computer that how to provide a kind of solution above-mentioned technical problem can Reading storage medium becomes the current problem to be solved of those skilled in the art.
Summary of the invention
The purpose of the embodiment of the present invention is that providing a kind of data reconstruction method, device, system and computer-readable storage medium Matter in use can restore the metadata in database, avoid loss of data occur in database failure The case where, improve Information Security.
In order to solve the above technical problems, the embodiment of the invention provides a kind of data reconstruction methods, comprising:
The current operating conditions of database are monitored, and judge whether the database breaks down,
If so, according to each behaviour pre-recorded in the metadata and operation log backed up in advance in default storage region The metadata opposed in the database is restored;The operation recorded in the operation log is performed between backup twice All operations.
Optionally, before the current operating conditions to database are monitored, further includes:
Timing backs up to the metadata stored in database in the default storage region, and will be in this Backup end All operation notes before completing afterwards to backup next time are into the operation log.
Optionally, all operation notes by before completing after this Backup end to backup next time are to described Process in operation log are as follows:
The historical operation in the operation log is deleted, and will be after this Backup end to before being completed backup next time All operation notes to the operation log.
Optionally, each operation presetting the metadata backed up in storage region in the foundation and being recorded in operation log After restoring to the metadata in the database, further includes:
Activation system front end applications.
The embodiment of the present invention provides a kind of Data Recapture Unit accordingly, comprising:
Monitoring modular is monitored for the current operating conditions to database, and judges whether the database occurs Failure, if so, triggering recovery module;
The recovery module is preset the metadata backed up in advance in storage region for foundation and is remembered in advance in operation log Each operation of record restores the metadata in the database;The operation recorded in the operation log is to back up twice Between performed all operations.
Optionally, further includes:
Backup module backs up to the metadata stored in database in the default storage region for timing;
Logging modle, for by all operation notes before being completed after this Backup end to backup next time to institute It states in operation log.
Optionally, the logging modle includes:
Unit is deleted, for deleting the historical operation in the operation log;
Recording unit, for by all operation notes before being completed after this Backup end to backup next time to institute State operation log.
The embodiment of the invention also provides a kind of data recovery systems, comprising:
Memory, for storing computer program;
Processor, the step of data reconstruction method as described above is realized when for executing the computer program.
The embodiment of the invention also provides a kind of computer readable storage medium, deposited on the computer readable storage medium Computer program is contained, the step of computer program realizes data reconstruction method as described above when being executed by processor.
The embodiment of the invention provides a kind of data reconstruction method, device, system and computer readable storage medium, packets It includes: the current operating conditions of database is monitored, and judge whether database breaks down, if so, being deposited according to default Pre-recorded each operation carries out the metadata in database in the metadata and operation log backed up in advance in storage area domain Restore;The operation recorded in operation log is all operations performed between backup twice.
As it can be seen that the application can be according to the metadata and behaviour backed up in advance in default storage region in database failure Make operation pre-recorded in log to restore the metadata in database, to avoid number occur in database failure The case where according to losing, improve Information Security.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to institute in the prior art and embodiment Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention Example, for those of ordinary skill in the art, without creative efforts, can also obtain according to these attached drawings Obtain other attached drawings.
Fig. 1 is a kind of flow diagram of data reconstruction method provided in an embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram of Data Recapture Unit provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of data recovery system provided in an embodiment of the present invention.
Specific embodiment
The embodiment of the invention provides a kind of data reconstruction method, device, system and computer readable storage mediums, make With can restore in the process to the metadata in database, avoid the case where loss of data occur in database failure, Improve Information Security.
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Fig. 1 is please referred to, Fig. 1 is a kind of flow diagram of data reconstruction method provided in an embodiment of the present invention.
This method comprises:
S110: being monitored the current operating conditions of database, and judges whether database breaks down, if so, Into S120;
It is understood that can be monitored in real time to the operating status of database in the application, when working as data block When preceding operating status exception, database of descriptions breaks down, and may cause the currently stored metadata of database at this time and loses, makes Thrashing.
S120: according to each operation pre-recorded in the metadata and operation log backed up in advance in default storage region Metadata in database is restored;The operation recorded in operation log is all behaviour performed between backup twice Make.
Specifically, constantly there is metadata write-in in database in system operation, the application can be in database Metadata backed up, the metadata after backup is stored into default storage region, and by this back up after the completion of and Backup each operation performed before completing next time is recorded into operation log, so as to when database failure, Metadata currently stored in default storage region is returned back in database, and standby according to the last time stored in operation log To all operations performed by this period before database failure after the completion of part, to Last Backup after the completion to database failure The metadata that this period is backed up to not yet in default storage region before is restored, and the member in the database after restoring is made Data are complete.Wherein, when being restored according to the operation in operation log to the metadata in database, by again The mode for executing the operation stores all data executed in the operating process into database, with to corresponding metadata into Row restores.
It should also be noted that, the institute that the operation recorded in operation log in the application is performed between backup twice There is operation, wherein if database breaks down, then operation log after the completion of this backup to before starting backup next time All operations performed by this period broken down after the completion of the operation of middle record specially this backup to database.
Further, before being monitored in above-mentioned S110 to the current operating conditions of database, this method further include:
Timing backs up to the metadata stored in database in default storage region, and will be after this Backup end extremely All operation notes before backup is completed next time are into operation log.
Specifically, when being backed up to the metadata in database, preferably by data by the way of timed backup Metadata in library backs up in default storage region, wherein can be at the time point that timing is some leisure in database Metadata backed up, such as 0 point of night is backed up the metadata in database, and certainly, backup cycle can be several It or several hours, and in order to avoid influencing the performance of database, backup cycle be not easy it is too short, specifically can be according to data The concrete condition in library is determined.In addition, due to being that the metadata in database is backed up in timing, so in this backup After the completion to before being completed backup next time, metadata can be also constantly stored in database, in order to prevent data during this period Library failure leads to the loss of data in this period, so will remember to all operations of database after the completion of this backup Record is completed into operation log until back up next time, can be according to nearest one when so as to this period, database breaks down Database is restored from all operations after the completion of Last Backup recorded in the metadata and operation log of secondary backup, So that restore after database in metadata it is complete.
Further, by all operation notes before being completed after this Backup end to backup next time to operation Process in log are as follows:
Historical operation in delete operation log, and by after this Backup end to next time backup complete before institute There is operation note to operation log.
It should be noted that in order to save space, the history that can will be stored in operation log after the completion of each backup Operation is deleted, thus by this each new operation note after the completion of backing up into operation log, until backed up next time At before always by new operation note into operation log.
Wherein, in order to make to run in the system front end application recovery of operation always before database failure, the application can be with The each operation recorded in the metadata and operation log backed up according to default storage region is to the metadata in database After being restored, activation system front end applications specifically can be according to the operation recorded in operation log before database failure It determines corresponding front end applications, and corresponding front end applications is started.
As it can be seen that the application can be according to the metadata and behaviour backed up in advance in default storage region in database failure Make operation pre-recorded in log to restore the metadata in database, to avoid number occur in database failure The case where according to losing, improve Information Security.
On the basis of the above embodiments, the embodiment of the present invention provides a kind of Data Recapture Unit accordingly, specifically asks Referring to Fig. 2.The device includes:
Monitoring modular 21 is monitored for the current operating conditions to database, and judges whether database occurs event Barrier, if so, triggering recovery module 22;
Recovery module 22, for pre-recorded in the metadata backed up in advance in storage region and operation log according to presetting Each operation the metadata in database is restored;The operation recorded in operation log is performed between backup twice All operations.
Further, the device further include:
Backup module backs up to the metadata stored in database in default storage region for timing;
Logging modle, for extremely grasping all operation notes before completing after this Backup end to backup next time Make in log.
Further, logging modle includes:
Unit is deleted, for the historical operation in delete operation log;
Recording unit, for extremely grasping all operation notes before completing after this Backup end to backup next time Make log.
It should be noted that Data Recapture Unit provided in the embodiment of the present invention has and is mentioned in above-described embodiment The identical beneficial effect of the data reconstruction method of confession, in addition, to the tool of data reconstruction method involved in this present embodiment Body introduction please refers to above method embodiment, and details are not described herein by the application.
On the basis of the above embodiments, it the embodiment of the invention also provides a kind of data recovery system, specifically please refers to Fig. 3.The system includes:
Memory 31, for storing computer program;
Processor 32 is realized when for executing computer program such as the step of above-mentioned data reconstruction method.
For example, the processor 32 in the application is monitored for realizing the current operating conditions to database, and judge Whether database breaks down, if so, according to preparatory in the metadata and operation log backed up in advance in default storage region Each operation of record restores the metadata in database;The operation recorded in operation log institute between backup twice All operations executed.
The embodiment of the invention also provides a kind of computer readable storage medium, it is stored on computer readable storage medium Computer program is realized when computer program is executed by processor such as the step of above-mentioned data reconstruction method.
The computer readable storage medium may include: USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. is various to deposit Store up the medium of program code.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other The difference of embodiment, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment For, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is said referring to method part It is bright.
It should also be noted that, in the present specification, such as the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in the process, method, article or apparatus that includes the element.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to 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, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (9)

1. a kind of data reconstruction method characterized by comprising
The current operating conditions of database are monitored, and judge whether the database breaks down,
If so, according to each operation pair pre-recorded in the metadata and operation log backed up in advance in default storage region Metadata in the database is restored;The operation recorded in the operation log institute performed between backup twice There is operation.
2. data reconstruction method according to claim 1, which is characterized in that in the current operating conditions to database Before being monitored, further includes:
Timing backs up to the metadata stored in database in the default storage region, and will be after this Backup end extremely All operation notes before backup is completed next time are into the operation log.
3. data reconstruction method according to claim 2, which is characterized in that it is described will be after this Backup end to next Process of all operation notes into the operation log before secondary backup completion are as follows:
Delete the historical operation in the operation log, and by the institute before completing after this Backup end to backup next time There is operation note to the operation log.
4. data reconstruction method according to claim 1, which is characterized in that preset in storage region and back up in the foundation Metadata and operation log in after each operation for recording restores the metadata in the database, further includes:
Activation system front end applications.
5. a kind of Data Recapture Unit characterized by comprising
Monitoring modular is monitored for the current operating conditions to database, and judges whether the database breaks down, If so, triggering recovery module;
The recovery module, for pre-recorded in the metadata backed up in advance in storage region and operation log according to presetting Each operation restores the metadata in the database;The operation recorded in the operation log is between backup twice Performed all operations.
6. Data Recapture Unit according to claim 5, which is characterized in that further include:
Backup module backs up to the metadata stored in database in the default storage region for timing;
Logging modle, for by all operation notes before being completed after this Backup end to backup next time to the behaviour Make in log.
7. Data Recapture Unit according to claim 6, which is characterized in that the logging modle includes:
Unit is deleted, for deleting the historical operation in the operation log;
Recording unit, for by all operation notes before being completed after this Backup end to backup next time to the behaviour Make log.
8. a kind of data recovery system characterized by comprising
Memory, for storing computer program;
Processor realizes the data reconstruction method as described in Claims 1-4 any one when for executing the computer program The step of.
9. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program, realizing the data reconstruction method as described in Claims 1-4 any one when the computer program is executed by processor Step.
CN201811167895.2A 2018-10-08 2018-10-08 Data reconstruction method, device and system and computer readable storage medium Pending CN109144792A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811167895.2A CN109144792A (en) 2018-10-08 2018-10-08 Data reconstruction method, device and system and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811167895.2A CN109144792A (en) 2018-10-08 2018-10-08 Data reconstruction method, device and system and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN109144792A true CN109144792A (en) 2019-01-04

Family

ID=64810448

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811167895.2A Pending CN109144792A (en) 2018-10-08 2018-10-08 Data reconstruction method, device and system and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109144792A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109828863A (en) * 2019-01-10 2019-05-31 网联清算有限公司 Data disaster tolerance method, apparatus, storage medium and computer equipment
CN109857594A (en) * 2019-02-19 2019-06-07 广州视源电子科技股份有限公司 Restoration methods, device and the electronic equipment of whiteboarding software operation data
CN109918386A (en) * 2019-01-31 2019-06-21 北京明略软件系统有限公司 A kind of data reconstruction method and device, computer readable storage medium
CN110955562A (en) * 2019-11-26 2020-04-03 杭州安恒信息技术股份有限公司 Data recovery method, system, equipment and readable storage medium
CN112181722A (en) * 2020-09-16 2021-01-05 济南浪潮数据技术有限公司 Data backup and recovery method, device, equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080162590A1 (en) * 2007-01-03 2008-07-03 Oracle International Corporation Method and apparatus for data rollback
CN104166600A (en) * 2014-08-01 2014-11-26 腾讯科技(深圳)有限公司 Data backup and recovery methods and devices
CN105045680A (en) * 2015-07-10 2015-11-11 上海爱数软件有限公司 Data backup method for DM database
CN105205053A (en) * 2014-05-30 2015-12-30 阿里巴巴集团控股有限公司 Method and system for analyzing database incremental logs
CN107357688A (en) * 2017-07-28 2017-11-17 广东神马搜索科技有限公司 Distributed system and its fault recovery method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080162590A1 (en) * 2007-01-03 2008-07-03 Oracle International Corporation Method and apparatus for data rollback
CN105205053A (en) * 2014-05-30 2015-12-30 阿里巴巴集团控股有限公司 Method and system for analyzing database incremental logs
CN104166600A (en) * 2014-08-01 2014-11-26 腾讯科技(深圳)有限公司 Data backup and recovery methods and devices
CN105045680A (en) * 2015-07-10 2015-11-11 上海爱数软件有限公司 Data backup method for DM database
CN107357688A (en) * 2017-07-28 2017-11-17 广东神马搜索科技有限公司 Distributed system and its fault recovery method and device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109828863A (en) * 2019-01-10 2019-05-31 网联清算有限公司 Data disaster tolerance method, apparatus, storage medium and computer equipment
CN109918386A (en) * 2019-01-31 2019-06-21 北京明略软件系统有限公司 A kind of data reconstruction method and device, computer readable storage medium
CN109918386B (en) * 2019-01-31 2021-04-30 北京明略软件系统有限公司 Data recovery method and device and computer readable storage medium
CN109857594A (en) * 2019-02-19 2019-06-07 广州视源电子科技股份有限公司 Restoration methods, device and the electronic equipment of whiteboarding software operation data
CN110955562A (en) * 2019-11-26 2020-04-03 杭州安恒信息技术股份有限公司 Data recovery method, system, equipment and readable storage medium
CN112181722A (en) * 2020-09-16 2021-01-05 济南浪潮数据技术有限公司 Data backup and recovery method, device, equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN109144792A (en) Data reconstruction method, device and system and computer readable storage medium
KR950006173B1 (en) Dynamic file extention method and system in on-line database system
JP4324616B2 (en) Data processing method in storage system
CN102945278B (en) A kind of method and apparatus of data-base recording redo log
CN106354583B (en) A kind of heat backup method and system of MySQL database
WO2019020081A1 (en) Distributed system and fault recovery method and apparatus thereof, product, and storage medium
CN101231604B (en) Apparatus, system, and method for volume-level restoration of cluster server data
CN101566959A (en) Using volume snapshots to prevent file corruption in failed restore operations
CN107608826A (en) A kind of fault recovery method, device and the medium of the node of storage cluster
CN103186624A (en) Data synchronization method and data synchronization device
CN109240614A (en) A kind of date storage method, device and relevant device
CN109684338A (en) A kind of data-updating method of storage system
CN105243340B (en) It is a kind of to prevent the method and system that data are accidentally deleted in HBase
CN105487940A (en) Disaster recovery side, production side and data recovery method between disaster recovery side and production side
CN109474470A (en) One kind is from monitoring method and device
CN104636218B (en) Data reconstruction method and device
CN109710456B (en) Data recovery method and device
CN109614268A (en) A kind of restoration methods of cloud Backup Data, apparatus and system
CN105740098A (en) Determination method and system for stale data among backup data
CN116088770B (en) Data management method, device, system, electronic equipment and storage medium
CN106599006B (en) Data recovery method and device
CN110515769A (en) A kind of backup processing method, device and electronic equipment and readable storage medium storing program for executing
US20080184070A1 (en) RAID capacity expansion interruption recovery handling method and system
CN109918228B (en) Data power failure maintaining method and system
CN113821377B (en) Data recovery method, system and storage medium of distributed storage cluster

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

Application publication date: 20190104

RJ01 Rejection of invention patent application after publication