CN102521070A - Mirror image recovering method of journal information based on internal memory - Google Patents
Mirror image recovering method of journal information based on internal memory Download PDFInfo
- Publication number
- CN102521070A CN102521070A CN2011103720091A CN201110372009A CN102521070A CN 102521070 A CN102521070 A CN 102521070A CN 2011103720091 A CN2011103720091 A CN 2011103720091A CN 201110372009 A CN201110372009 A CN 201110372009A CN 102521070 A CN102521070 A CN 102521070A
- Authority
- CN
- China
- Prior art keywords
- internal memory
- log information
- mirror image
- journal information
- read
- 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
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention provides a mirror image recovering method of journal information based on an internal memory, and the mirror image recovering method comprises the following steps of: writing the journal information into the internal memory directly; reading the journal information in the internal memory and backing up the journal information in a mirror image server; and judging whether the journal information in the internal memory is lost or not, and reading the journal information from the mirror image server to the internal memory if the journal information is lost. Through the mirror image recovering method of the journal information based on the internal memory, which is provided by the invention, when the journal information in the internal memory is lost, the journal information in the internal memory can be recovered quickly.
Description
Technical field
The present invention relates to software field, particularly relate to a kind of backup and restoration methods of log information management.
Background technology
At present, along with the continuous expansion of computer software development project, file is more and more, can effectively trace into the action of program generation certain operations through journal file; As increasing, deletion is revised; Operations such as inquiry aspect the more important thing is when can the program of tracing into making a mistake, and some error messages are provided timely; The related personnel can find out problem where occurred through reading to separate this error log information at once, so that take corresponding means to revise and improve to problem timely.
But along with the function of software goes from strength to strength, the daily record read-write is very frequent, and constantly frequent daily record read-write operation has then aggravated load of server, has reduced software performance.At this moment, can go through the log information content is written in the internal memory, and then go the information in the rdma read, improve the performance of project operation.But also defective place, if the data in the internal memory can not permanently keep, in case server has shut down or restarted, the data in the internal memory will be lost.
So, lose in order to prevent the daily record data in the internal memory, need make a kind of internal memory daily record mirror image technology recovery technology.
Summary of the invention
The object of the present invention is to provide a kind of log information image recovery method based on internal memory, when can the log information in internal memory losing, the log information in the fast quick-recovery internal memory.
In order to solve above technical matters, the present invention provides a kind of log information image recovery method based on internal memory, comprising:
Log information is directly write to internal memory;
Read the log information in the internal memory, backup to mirror image server;
Judge whether the log information in the internal memory is lost, as lose, from mirror image server, read log information to internal memory.
Further, said log information is written in the internal memory, method is: the wirte () method through the ByteArrayOutputStream class among the JAVA is write the log information content in the internal memory.
Further, the said log information that reads in the internal memory, method is: the read () method through the ByteArrayInputStream class among the JAVA reads the information in the internal memory.
Further, saidly judge whether the log information in the internal memory is lost, and method is: mirror image server scans the internal memory of item server constantly, when the memory information in finding item server does not have, thinks that the internal memory log information loses.
Further, the said log information that from mirror image server, reads is to internal memory, and method is: the wirte () method through the ByteArrayOutputStream class among the JAVA is write the log information content in the internal memory.
Compared with prior art, a kind of log information image recovery method provided by the invention based on internal memory, when can the log information in internal memory losing, the log information in the fast quick-recovery internal memory.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes a part of the present invention, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, does not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 is a kind of log information image recovery method based on internal memory provided by the invention.
Embodiment
In order to make technical matters to be solved by this invention, technical scheme and beneficial effect clearer, clear,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
As shown in Figure 1; The present invention provides a kind of log information image recovery method based on internal memory, the log information in the internal memory is backuped in the mirror image server, when not having log information in the internal memory; Recovery logs information is in internal memory from mirror image server, and concrete grammar comprises:
Step 1, log information is directly write in the internal memory, rather than directly read and write in journal file or the database.
In the present embodiment, a kind of method that log information is written in the internal memory is the log information content to be write in the internal memory through the wirte () method of the ByteArrayOutputStream class among the JAVA.
In the present embodiment; The mode that reads of memory information daily record can read the information in the internal memory through the read () method of the ByteArrayInputStream class among the JAVA; Mode through reading internal memory can realize log management fast; Because the read or write speed of internal memory greater than direct file read-write and database access, improves the operational efficiency of software.
Step 3, judge whether the log information in the internal memory is lost, as lose, forward step 4 to; As do not lose, return step 1.
Judge that the method that the internal memory log information is lost is: mirror image server scans the internal memory of item server constantly, when the memory information in finding item server does not have, thinks that the internal memory log information loses.
When judging that the internal memory log information is lost, can the log information that back up in the mirror image server be written in the internal memory, method is: through the wirte () method of the ByteArrayOutputStream class among the JAVA log information content is write in the internal memory and gone.
Step 4, from mirror image server, read log information to internal memory.
Above-mentioned explanation illustrates and has described a preferred embodiment of the present invention; But as previously mentioned; Be to be understood that the present invention is not limited to the form that this paper discloses, should do not regard eliminating as, and can be used for various other combinations, modification and environment other embodiment; And can in invention contemplated scope described herein, change through the technology or the knowledge of above-mentioned instruction or association area.And change that those skilled in the art carried out and variation do not break away from the spirit and scope of the present invention, then all should be in the protection domain of accompanying claims of the present invention.
Claims (5)
1. the log information image recovery method based on internal memory is characterized in that, comprising:
Log information is directly write to internal memory;
Read the log information in the internal memory, backup to mirror image server;
Judge whether the log information in the internal memory is lost, as lose, from mirror image server, read log information to internal memory.
2. the method for claim 1 is characterized in that, said log information is written in the internal memory, and method is: the wirte () method through the ByteArrayOutputStream class among the JAVA is write the log information content in the internal memory.
3. the method for claim 1 is characterized in that, the said log information that reads in the internal memory, and method is: the read () method through the ByteArrayInputStream class among the JAVA reads the information in the internal memory.
4. the method for claim 1; It is characterized in that saidly judge whether the log information in the internal memory is lost, and method is: mirror image server scans the internal memory of item server constantly; When the memory information in finding item server does not have, think that the internal memory log information loses.
5. the method for claim 1 is characterized in that, the said log information that from mirror image server, reads is to internal memory, and method is: the wirte () method through the ByteArrayOutputStream class among the JAVA is write the log information content in the internal memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011103720091A CN102521070A (en) | 2011-11-18 | 2011-11-18 | Mirror image recovering method of journal information based on internal memory |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011103720091A CN102521070A (en) | 2011-11-18 | 2011-11-18 | Mirror image recovering method of journal information based on internal memory |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102521070A true CN102521070A (en) | 2012-06-27 |
Family
ID=46292005
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011103720091A Pending CN102521070A (en) | 2011-11-18 | 2011-11-18 | Mirror image recovering method of journal information based on internal memory |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102521070A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104778098A (en) * | 2015-04-09 | 2015-07-15 | 浪潮电子信息产业股份有限公司 | Memory mirroring method and system and memory monitor |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1670709A (en) * | 2004-03-19 | 2005-09-21 | 株式会社日立制作所 | A replicated database system and device executing log data transfer synchronously and database data transfer asynchronously |
CN1794646A (en) * | 2005-04-27 | 2006-06-28 | 华为技术有限公司 | Method for obtaining of daily information from network element equipment by network management server |
CN1874253A (en) * | 2005-06-02 | 2006-12-06 | 华为技术有限公司 | Method for managing system log |
CN101072124A (en) * | 2007-06-22 | 2007-11-14 | 中兴通讯股份有限公司 | Log obtaining method |
CN102012793A (en) * | 2010-11-12 | 2011-04-13 | 浪潮(北京)电子信息产业有限公司 | Mirror image implementing method and device |
-
2011
- 2011-11-18 CN CN2011103720091A patent/CN102521070A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1670709A (en) * | 2004-03-19 | 2005-09-21 | 株式会社日立制作所 | A replicated database system and device executing log data transfer synchronously and database data transfer asynchronously |
CN1794646A (en) * | 2005-04-27 | 2006-06-28 | 华为技术有限公司 | Method for obtaining of daily information from network element equipment by network management server |
CN1874253A (en) * | 2005-06-02 | 2006-12-06 | 华为技术有限公司 | Method for managing system log |
CN101072124A (en) * | 2007-06-22 | 2007-11-14 | 中兴通讯股份有限公司 | Log obtaining method |
CN102012793A (en) * | 2010-11-12 | 2011-04-13 | 浪潮(北京)电子信息产业有限公司 | Mirror image implementing method and device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104778098A (en) * | 2015-04-09 | 2015-07-15 | 浪潮电子信息产业股份有限公司 | Memory mirroring method and system and memory monitor |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103577121B (en) | A kind of highly reliable linear file access method based on Nand Flash | |
US10255235B2 (en) | Database storage system based on jukebox and method using the system | |
US8448023B2 (en) | Approach for data integrity in an embedded device environment | |
CN102033786B (en) | Method for repairing consistency of copies in object storage system | |
CN103914407B (en) | A kind of SD card power down protection, restoration methods and the SD card with power down protection | |
CN103577574A (en) | High-reliability linear file system based on nand flash | |
CN102609337A (en) | Rapid data recovery method for memory database | |
CN104050056A (en) | File system backup of multi-storage-medium device | |
CN102541691B (en) | Log check point recovery method applied to memory data base OLTP (online transaction processing) | |
CN102314503A (en) | Indexing method | |
CN103544110A (en) | Block-level continuous data protection method based on solid-state disc | |
CN105468544A (en) | Method and apparatus for realizing power-failure-proof file system, and power-failure-proof file system | |
CN104360914A (en) | Incremental snapshot method and device | |
CN104899114A (en) | Continuous time data protection method on solid state drive | |
CN108614876A (en) | A kind of system and data processing method based on Redis databases | |
CN106104515A (en) | Utilize File system design and the fault recovery method of nonvolatile memory | |
CN104376099A (en) | Flash-memory-based file system implementation method and device | |
CN102609484A (en) | General method for managing log of system | |
CN103559119B (en) | File operation requests disposal route and device | |
CN105302488A (en) | Data writing method and system for storage system | |
CN107451014A (en) | A kind of data reconstruction method and device | |
CN103544097A (en) | Journal storing method, journal storing system, journal reading method and journal reading system of embedded system | |
CN103678608A (en) | Log management method and device | |
CN109582497B (en) | Rapid emergency starting method based on dynamic data increment | |
CN104978241A (en) | Data recovery method and apparatus for COW type file system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20120627 |