CN110633171A - JAVA hibernate framework-based log backup remote restoration system and method - Google Patents
JAVA hibernate framework-based log backup remote restoration system and method Download PDFInfo
- Publication number
- CN110633171A CN110633171A CN201910791150.1A CN201910791150A CN110633171A CN 110633171 A CN110633171 A CN 110633171A CN 201910791150 A CN201910791150 A CN 201910791150A CN 110633171 A CN110633171 A CN 110633171A
- Authority
- CN
- China
- Prior art keywords
- unit
- address information
- backup
- original database
- source address
- 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.)
- Withdrawn
Links
Images
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/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Quality & Reliability (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a JAVA hibernate framework-based log backup remote restoration system and a JAVA hibernate framework-based log backup remote restoration method, wherein the JAVA hibernate framework-based log backup remote restoration system comprises a human-computer interaction unit, a parameter key value pair and an execution statement, wherein the human-computer interaction unit is used for inputting a DML statement by a user, and acquiring the parameter key value pair and the execution statement according to the DML statement; the original database searching unit is connected with the man-machine interaction unit to acquire an execution statement and searches source address information of the original database according to the execution statement; and the backup searching unit is connected with the original database searching unit to acquire the source address information and searches the address information of the backup database according to the source address information. The invention solves the problems of incomplete database backup and inconvenience in reading at any time.
Description
Technical Field
The invention relates to the field of JAVA application, in particular to a JAVAhibernate framework-based log backup remote restoration system and method.
Background
At present, most enterprises widely adopt three frameworks of J2EE SSH for electronic remote control, namely Spring, Struts and Hibernate. Hibernate is an object relational mapping framework of open source code, which encapsulates JDBC very lightweight objects. However, in general, the remote control system of an enterprise only needs to backup the original database at regular time, only meets the production requirement, and cannot ensure the integrity of real-time log recording and data recovery because the data log is traceless and can be searched or the log is incompletely recorded. If a remote disaster recovery system is used, most enterprises cannot bear high-volume equipment facilities, and the daily maintenance procedure of the equipment is complex, so that great potential safety hazards exist. Therefore, there is a need for a log backup remote restoration system and method based on JAVAhibernate framework, which can solve the above problems.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a log backup remote restoration system based on a JAVAhibernate framework, solve the problems of incomplete log backup and inconvenience in reading, reduce maintenance cost and improve safety and accuracy.
In order to achieve the above purpose, the present invention provides the following technical solutions:
a log backup allopatric restoration system based on JAVAhibernate framework comprises: the human-computer interaction unit is used for inputting DML sentences by a user and acquiring parameter key value pairs and execution sentences according to the DML sentences;
the original database searching unit is connected with the man-machine interaction unit to acquire an execution statement and searches source address information of the original database according to the execution statement;
the original database operation unit is connected with the human-computer interaction unit to acquire parameter key value pairs and execution statements, is connected with the original database search unit to acquire source address information, deletes or positions the source address information according to the execution statements, and inserts the parameter key value pairs;
the backup searching unit is connected with the original database searching unit to acquire source address information and searches the address information of the backup database according to the source address information;
the backup function unit is connected with the human-computer interaction unit to acquire the parameter key value pairs and the execution statements, is connected with the backup searching unit to acquire the address information, deletes or positions the address information according to the execution statements and inserts the parameter key value pairs;
the log storage unit is connected with the backup functional unit to save the modification record of the operation log of the backup functional unit;
the original database detection unit is connected with the original database search unit to receive the source address information, and sends out an error signal when the source address information does not exist or exceeds the range;
and the backup restoration unit is connected with the original database detection unit to receive the error signal, and is connected with the original database operation unit to control the original database operation unit to be closed according to the error signal.
The log backup and restoration method of the log backup allopatric restoration system based on the JAVA hibernate framework comprises the following steps: (1) a user inputs DML sentences through a man-machine interaction unit, and the man-machine interaction unit acquires parameter key value pairs and execution sentences according to the DML sentences; (2) the original database searching unit acquires an execution statement of the man-machine interaction unit and searches source address information of an original database according to the execution statement; (3) the original database operation unit acquires the parameter key value pairs and the execution statements of the human-computer interaction unit, acquires the source address information of the original database search unit, deletes or positions the source address information according to the execution statements, and inserts the parameter key value pairs; (4) the backup searching unit acquires the source address information of the original database searching unit and searches the address information of the backup database according to the source address information; (5) the backup function unit acquires the parameter key value pairs and the execution statements of the human-computer interaction unit, acquires the address information of the backup searching unit, deletes or positions the address information according to the execution statements, and inserts the parameter key value pairs; (6) the original database detection unit receives the source address information of the original database search unit and sends out an error signal when the source address information does not exist or exceeds the range; (7) and the backup restoration unit receives the error signal sent by the original database detection unit and controls the original database operation unit to close according to the error signal.
The beneficial effect of adopting above technical scheme is: the input DML statements are synchronously recorded into the original database and the backup database through the SQL operation of the original database operation unit and the backup function unit, and when the original database cannot be used, the backup database reads backup data at any time for restoration, so that the integrity of data restoration is ensured, and compared with a disaster recovery system, the system is lower in cost and higher in safety. And the log storage unit stores the execution process of the operation log and corresponding parameter values (such as execution time, IP address, execution mode and the like), so that the stored record can be inquired, the function of restoring data at different time intervals is realized, and a complete track is provided for the back check of abnormal data of a user. The data error rate may set the update time interval to within 1 minute based on data transmission control of the backup lookup unit and the original database lookup unit.
Drawings
FIG. 1 is a schematic diagram of a JAVAhibernate framework-based log backup placeshifting restore system;
fig. 2 is a flowchart of a log backup restoring method of a JAVA hibernate framework-based log backup remote restoring system.
Detailed Description
The following describes in detail a preferred embodiment of the log backup allopatric restoration system and method based on the JAVAhibernate framework in conjunction with the accompanying drawings.
As shown in fig. 1, a JAVA hibernate framework based log backup allopatric restoration system includes:
the human-computer interaction unit is used for inputting DML sentences by a user and acquiring parameter key value pairs and execution sentences according to the DML sentences;
the original database searching unit is connected with the man-machine interaction unit to acquire an execution statement and searches source address information of the original database according to the execution statement;
the original database operation unit is connected with the human-computer interaction unit to acquire parameter key value pairs and execution statements, is connected with the original database search unit to acquire source address information, deletes or positions the source address information according to the execution statements, and inserts the parameter key value pairs;
the backup searching unit is connected with the original database searching unit to acquire source address information and searches the address information of the backup database according to the source address information;
the backup function unit is connected with the human-computer interaction unit to acquire the parameter key value pairs and the execution statements, is connected with the backup searching unit to acquire the address information, deletes or positions the address information according to the execution statements and inserts the parameter key value pairs;
the log storage unit is connected with the backup functional unit to save the modification record of the operation log of the backup functional unit;
the original database detection unit is connected with the original database search unit to receive the source address information, and sends out an error signal when the source address information does not exist or exceeds the range;
and the backup restoration unit is connected with the original database detection unit to receive the error signal, and is connected with the original database operation unit to control the original database operation unit to be closed according to the error signal.
The human-computer interaction unit comprises: the input module is used for inputting DML sentences by a user; the data processing module is connected with the input module to obtain parameter key value pairs and execution statements according to the DML statements; and the confirmation module is connected with the data processing module to receive the execution statement and is connected with the data searching unit to send the execution statement to the data searching unit according to the execution statement.
The man-machine interaction unit comprises a WEB application system using hibernate.
The original database is an ORACLE original database.
Copying the original content of the original database into a backup database, acquiring an execution statement and a parameter key value pair of a DML statement by a WEB application system through hiberate, searching source address information of the original database according to the execution statement by an original database searching unit, and performing addition, deletion or modification operation on the original database by an original database operating unit. The backup searching unit correspondingly searches the address information of the backup database according to the source address information of the original database searching unit, and the backup function unit performs addition, deletion or change operation on the backup database. The log storage unit inserts the execution time, IP, execution statement, execution mode and other contents of the backup database modification into the operation log. When the original database detection unit detects that the source address information of the original database searching unit is received incorrectly, an error signal is sent to the backup restoring unit, and the backup restoring unit controls the original database operating unit to close by disconnecting the original database operating unit from the original database searching unit. The backup function unit and the log storage unit are connected with a remote server, so that a backup database and operation log records can be read in real time, and traceable searching can be carried out.
As shown in fig. 2, the log backup restoring method of the JAVA hibernate framework-based log backup allopatric restoring system is characterized by comprising the following steps: (1) a user inputs DML sentences through a man-machine interaction unit, and the man-machine interaction unit acquires parameter key value pairs and execution sentences according to the DML sentences; (2) the original database searching unit acquires an execution statement of the man-machine interaction unit and searches source address information of an original database according to the execution statement; (3) the original database operation unit acquires the parameter key value pairs and the execution statements of the human-computer interaction unit, acquires the source address information of the original database search unit, deletes or positions the source address information according to the execution statements, and inserts the parameter key value pairs; (4) the backup searching unit acquires the source address information of the original database searching unit and searches the address information of the backup database according to the source address information; (5) the backup function unit acquires the parameter key value pairs and the execution statements of the human-computer interaction unit, acquires the address information of the backup searching unit, deletes or positions the address information according to the execution statements, and inserts the parameter key value pairs; (6) the log storage unit saves the modification record of the backup functional unit to the operation log; (7) the original database detection unit receives the source address information of the original database search unit and sends out an error signal when the source address information does not exist or exceeds the range; (8) and the backup restoration unit receives the error signal sent by the original database detection unit and controls the original database operation unit to close according to the error signal.
In the step (7), when the backup and restore unit receives the error signal sent by the original database detection unit, the return value of the original database operation unit is null.
The above is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, many variations and modifications can be made without departing from the inventive concept of the present invention, which falls into the protection scope of the present invention.
Claims (5)
1. The remote log backup restoration system based on the JAVA hibernate framework is characterized by comprising the following components:
the human-computer interaction unit is used for inputting DML sentences by a user and acquiring parameter key value pairs and execution sentences according to the DML sentences;
the original database searching unit is connected with the man-machine interaction unit to acquire an execution statement and searches source address information of the original database according to the execution statement;
the original database operation unit is connected with the human-computer interaction unit to acquire parameter key value pairs and execution statements, is connected with the original database search unit to acquire source address information, deletes or positions the source address information according to the execution statements, and inserts the parameter key value pairs;
the backup searching unit is connected with the original database searching unit to acquire source address information and searches the address information of the backup database according to the source address information;
the backup function unit is connected with the human-computer interaction unit to acquire the parameter key value pairs and the execution statements, is connected with the backup searching unit to acquire the address information, deletes or positions the address information according to the execution statements and inserts the parameter key value pairs;
the log storage unit is connected with the backup functional unit to save the modification record of the operation log of the backup functional unit;
the original database detection unit is connected with the original database search unit to receive the source address information, and sends out an error signal when the source address information does not exist or exceeds the range;
and the backup restoration unit is connected with the original database detection unit to receive the error signal, and is connected with the original database operation unit to control the original database operation unit to be closed according to the error signal.
2. The JAVA hibernate framework-based log backup placeshifting reduction system of claim 1, wherein the human-computer interaction unit comprises: the input module is used for inputting DML sentences by a user; the data processing module is connected with the input module to obtain parameter key value pairs and execution statements according to the DML statements; and the confirmation module is connected with the data processing module to receive the execution statement and is connected with the data searching unit to send the execution statement to the data searching unit according to the execution statement.
3. The JAVA hibernate framework-based log backup allopatric restoration system according to claim 1, wherein the primary database is an ORACLE primary database.
4. The log backup restoration method of the JAVA hibernate framework-based log backup allopatric restoration system, according to claim 1, comprises the following steps: (1) a user inputs DML sentences through a man-machine interaction unit, and the man-machine interaction unit acquires parameter key value pairs and execution sentences according to the DML sentences; (2) the original database searching unit acquires an execution statement of the man-machine interaction unit and searches source address information of an original database according to the execution statement; (3) the original database operation unit acquires the parameter key value pairs and the execution statements of the human-computer interaction unit, acquires the source address information of the original database search unit, deletes or positions the source address information according to the execution statements, and inserts the parameter key value pairs; (4) the backup searching unit acquires the source address information of the original database searching unit and searches the address information of the backup database according to the source address information; (5) the backup function unit acquires the parameter key value pairs and the execution statements of the human-computer interaction unit, acquires the address information of the backup searching unit, deletes or positions the address information according to the execution statements, and inserts the parameter key value pairs; (6) the log storage unit saves the modification record of the backup functional unit to the operation log; (7) the original database detection unit receives the source address information of the original database search unit and sends out an error signal when the source address information does not exist or exceeds the range; (8) and the backup restoration unit receives the error signal sent by the original database detection unit and controls the original database operation unit to close according to the error signal.
5. In the step (7), when the backup and restore unit receives the error signal sent by the original database detection unit, the return value of the original database operation unit is null.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910791150.1A CN110633171A (en) | 2019-08-26 | 2019-08-26 | JAVA hibernate framework-based log backup remote restoration system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910791150.1A CN110633171A (en) | 2019-08-26 | 2019-08-26 | JAVA hibernate framework-based log backup remote restoration system and method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110633171A true CN110633171A (en) | 2019-12-31 |
Family
ID=68970721
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910791150.1A Withdrawn CN110633171A (en) | 2019-08-26 | 2019-08-26 | JAVA hibernate framework-based log backup remote restoration system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110633171A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113254279A (en) * | 2021-07-14 | 2021-08-13 | 睿至科技集团有限公司 | Intelligent disaster recovery and backup management platform system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102541927A (en) * | 2010-12-30 | 2012-07-04 | 北京新媒传信科技有限公司 | Method and device for realizing data cache |
CN103761318A (en) * | 2014-01-27 | 2014-04-30 | 中国工商银行股份有限公司 | Method and system for data synchronization of relational heterogeneous databases |
CN105528368A (en) * | 2014-09-30 | 2016-04-27 | 北京金山云网络技术有限公司 | A database migration method and device |
US20160217174A1 (en) * | 2015-01-27 | 2016-07-28 | Kabushiki Kaisha Toshiba | Database system |
-
2019
- 2019-08-26 CN CN201910791150.1A patent/CN110633171A/en not_active Withdrawn
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102541927A (en) * | 2010-12-30 | 2012-07-04 | 北京新媒传信科技有限公司 | Method and device for realizing data cache |
CN103761318A (en) * | 2014-01-27 | 2014-04-30 | 中国工商银行股份有限公司 | Method and system for data synchronization of relational heterogeneous databases |
CN105528368A (en) * | 2014-09-30 | 2016-04-27 | 北京金山云网络技术有限公司 | A database migration method and device |
US20160217174A1 (en) * | 2015-01-27 | 2016-07-28 | Kabushiki Kaisha Toshiba | Database system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113254279A (en) * | 2021-07-14 | 2021-08-13 | 睿至科技集团有限公司 | Intelligent disaster recovery and backup management platform system |
CN113254279B (en) * | 2021-07-14 | 2021-11-30 | 睿至科技集团有限公司 | Intelligent disaster recovery and backup management platform system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8452735B2 (en) | Selecting a data restore point with an optimal recovery time and recovery point | |
Koenig et al. | A transformational framework for the automatic control of derived data | |
US8108343B2 (en) | De-duplication and completeness in multi-log based replication | |
US7933872B2 (en) | Database backup, refresh and cloning system and method | |
CN108572996B (en) | Synchronization method and device of database table structure, electronic equipment and storage medium | |
US9031901B1 (en) | Flexible database schema | |
WO2020253399A1 (en) | Log classification rule generation method, device, apparatus, and readable storage medium | |
US10853157B2 (en) | Compact binary event log generation | |
CN110942155A (en) | Research method of machine learning engine | |
EP3968185A1 (en) | Method and apparatus for pushing information, device and storage medium | |
CN104679841A (en) | Consumption terminal data flow copying method and system | |
CN109298978B (en) | Recovery method and system for database cluster of specified position | |
US20130275369A1 (en) | Data record collapse and split functionality | |
Homayouni | Testing extract-transform-load process in data warehouse systems | |
JP2008262537A (en) | Reasoning information based on retrieving case from archive record | |
CN114880405A (en) | Data lake-based data processing method and system | |
CN110633171A (en) | JAVA hibernate framework-based log backup remote restoration system and method | |
CN116680354A (en) | Metadata management method and system for lithium battery production and manufacturing industry | |
US9892001B2 (en) | Customizing backup and restore of databases | |
CN109446267B (en) | Cross-database data integration system and method based on 95598 ex-situ double-active disaster recovery model | |
CN116861708B (en) | Method and device for constructing multidimensional model of production equipment | |
US8195612B1 (en) | Method and apparatus for providing a catalog to optimize stream-based data restoration | |
CN111628924B (en) | E-mail sending method, system, storage medium and electronic equipment | |
CN105389378A (en) | System for integrating separate data | |
CN101667929A (en) | Maintenance system and method of business system |
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 | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20191231 |
|
WW01 | Invention patent application withdrawn after publication |