CN103838780A - Data recovery method of database and relevant device - Google Patents

Data recovery method of database and relevant device Download PDF

Info

Publication number
CN103838780A
CN103838780A CN201210490745.1A CN201210490745A CN103838780A CN 103838780 A CN103838780 A CN 103838780A CN 201210490745 A CN201210490745 A CN 201210490745A CN 103838780 A CN103838780 A CN 103838780A
Authority
CN
China
Prior art keywords
database
affairs
order
text
commands
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
CN201210490745.1A
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201210490745.1A priority Critical patent/CN103838780A/en
Publication of CN103838780A publication Critical patent/CN103838780A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • 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 data recovery method of a database. The data recovery method of the database comprises the steps of receiving a data recovery order which comprises a status code of a data status to be recovered; analyzing one or more parts of a binary log text into a clear text according to the status code; generating a reverse text according to the clear text, wherein execution sequences of affairs of the reverse text and the clear text are opposite; according to the binary log text and the reverse text, executing the reverse text to recover the database into the data status indicated by the status code.

Description

The data reconstruction method of database and relevant equipment
Technical field
The application relates to database, relates in particular to the data reconstruction method of database and relevant equipment.
Background technology
Along with scientific and technological progress and informationalized development, information miscellaneous is constantly produced and is reused, and is used for the database of the information of storing also therefore to play the part of important role.
Database can be stored very a large amount of information, and can required information be offered by suitable operation to user or other application.But, sometimes because the operation that makes a mistake or system such as need to safeguard at the reason, and can need the data of database to return to state for the previous period.Now, if database cannot recover data in quick and correct mode, will cause database that correct data cannot be provided for a long time, and cause the not convenient of user or cause other relevant application cannot normal operation.
MySQL database is a kind of database of increasing income being widely adopted; in the time that MySQL database need to recover data; conventionally can carry out data according to mysqldump Backup Data and binlog binary log text resumes work; or by the required data of other machine reproduction, or also can adopt the mode of artificial reparation.But above-mentioned reset mode all needs to expend long time, cause database cannot operate normally for a long time.
Summary of the invention
The method and apparatus that the application's fundamental purpose is to provide a kind of data to recover, so as correctly and the data of carrying out efficiently MySQL database resume work, and solve data long problem release time that prior art exists, wherein:
In aspect of the application, provide a kind of data reconstruction method of database, it is characterized in that, comprising:
Reception data are recovered order, and these data are recovered the state code that order includes the data mode of wish recovery;
According to this state code, at least a portion of binary log text is resolved to expressly text, this plaintext text packets contains the first affairs and the second affairs, this first transaction packet is containing one or more the first database commands, this second transaction packet is containing one or more the second database commands, and these first affairs and this second affairs are to carry out according to the first order, these one or more first database commands are to carry out according to the second order, and these one or more second database commands are according to order execution for the third time;
According to these first affairs and this second affairs and produce respectively the 3rd affairs and the 4th affairs of reverse text, the 3rd transaction packet contains one or more the 3rd database commands in contrast to these one or more the first database commands in logic, and the 4th transaction packet contains one or more the 4th database commands in contrast to these one or more the second database commands in logic; And
According to the 3rd affairs and the 4th affairs of carrying out this reverse text in contrast to the mode of this first order, according to carrying out this one or more the 3rd database commands in contrast to the mode of this second order, and according in contrast to this for the third time the mode of order carry out this one or more the 4th database commands, with by this database recovery to this indicated data mode of this state code.
Further, according in the application's method, also comprise: these one or more second database commands of these one or more the first database commands of these the first affairs and these the second affairs are carried out to logic and be inverted to produce respectively these one or more the 3rd database commands of the 3rd affairs and these one or more the 4th database commands of the 4th affairs and carry out logic and be inverted; These one or more the 3rd database commands of the 3rd affairs are carried out to order to be inverted; These one or more the 4th database commands of the 4th affairs are carried out to order to be inverted; And the 3rd affairs and this four affairs are carried out to order be inverted to produce this reverse text.
Further, according in the application's method, also comprise: according to the mode in contrast to this first order by the 3rd affairs and the 4th transaction journal in this reverse text; According in contrast to the mode of this second order, these one or more the 3rd database commands being recorded in to this reverse text; And according in contrast to this for the third time the mode of order these one or more the 4th database commands are recorded in to this reverse text.
Further, according in the application's method, also comprise: replace one or more ESCs of this plaintext text, these one or more the 3rd database commands and this one or more the 4th database commands can directly be carried out.
Further, according in the application's method, also comprise: the database command that the database command of insertion is replaced into deletion; The database command of deletion is replaced into the database command of insertion; And extract field code name, database name and the table name of one or more databases, to replace the field name of these one or more the 3rd data commands and these one or more the 4th data commands.
Further, according in the application's method, this database adopts MySQL database to implement, and this binary log text is the binary log text with row mode record in this MySQL database.
In aspect another of the application, provide a kind of data recovery apparatus of database, it is characterized in that, also comprise:
Data recovery module, recovers order in order to receive data, and these data are recovered the state code that order includes the data mode of wish recovery;
Binary log text resolution module, according to this state code, at least a portion of binary log text is resolved to expressly text, this plaintext text packets contains the first affairs and one second affairs, this first transaction packet is containing one or more the first database commands, this second transaction packet is containing one or more the second database commands, and these first affairs and this second affairs are to carry out according to the first order, these one or more first database commands are to carry out according to the second order, and these one or more second database commands are according to order execution for the third time;
Reverse text generating module, according to these first affairs and this second affairs and produce respectively the 3rd affairs and the 4th affairs of reverse text, the 3rd transaction packet contains one or more the 3rd database commands in contrast to these one or more the first database commands in logic, and the 4th transaction packet contains one or more the 4th database commands in contrast to these one or more the second database commands in logic; And
Data recovery module, according to the 3rd affairs and the 4th affairs of carrying out this reverse text in contrast to the mode of this first order, according to carrying out this one or more the 3rd database commands in contrast to the mode of this second order, and according in contrast to this for the third time the mode of order carry out this one or more the 4th database commands, with by this database recovery to this indicated data mode of this state code.
Further, according in the application's equipment, this reverse text generating module is carried out logic by these one or more second database commands of these one or more the first database commands of these the first affairs and these the second affairs and is inverted to produce respectively these one or more the 3rd database commands of the 3rd affairs and these one or more the 4th database commands of the 4th affairs and carries out logic and be inverted; This reverse text generating module is carried out order by these one or more the 3rd database commands of the 3rd affairs and is inverted; This reverse text generating module is carried out order by these one or more the 4th database commands of the 4th affairs and is inverted; And this reverse text generating module is also carried out order by the 3rd affairs and this four affairs and is inverted to produce this reverse text.
Further, according in the application's equipment, the 3rd affairs and the 4th affairs are to be recorded in this reverse text in contrast to the mode of this first order; These one or more the 3rd database commands are to be recorded in this reverse text in contrast to the mode of this second order; And these one or more the 4th database commands with in contrast to this for the third time the mode of order be recorded in this reverse text.
Further, according in the application's equipment, this binary log text resolution module is replaced one or more ESCs of this plaintext text, and these one or more the 3rd database commands and this one or more the 4th database commands can directly be carried out.
Further, according in the application's equipment, this reverse text generating module is replaced into the database command of insertion the database command of deletion, the database command of deletion is replaced into the database command of insertion, and extract field code name, database name and the table name of one or more databases, to replace the field name of these one or more the 3rd data commands and these one or more the 4th data commands.
Further, according in the application's equipment, this database adopts MySQL database to implement, and this binary log text is the binary log text with row mode record in this MySQL database.
Compared with prior art, according to the application's technical scheme, can effectively reduce the data release time of database.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide further understanding of the present application, forms the application's a part, and the application's schematic description and description is used for explaining the application, does not form the improper restriction to the application.In the accompanying drawings:
Fig. 1 is the process flow diagram after the data reconstruction method of the embodiment of the present application is simplified.
Fig. 2~Fig. 4 is the schematic diagram after the embodiment that produces the flow process of reverse text according to text expressly in Fig. 1 simplifies.
Fig. 5 is the functional block diagram after the Database Systems of the embodiment of the present application are simplified.
Embodiment
The application's main thought is, provide method and apparatus that a kind of data recover with correctly and the data of carrying out efficiently MySQL database resume work.
For making the application's object, technical scheme and advantage clearer, below in conjunction with drawings and the specific embodiments, the application is described in further detail.
Many system applies all can be carried out storing various information in usage data storehouse, and the application program in system can, by database command by information write into Databasce, also can read required information by database by database command.These system applies can be used one or more main frames to operate, and main frame can also utilize multiprocessor, multimachine device, carry out and/or the technology such as executed in parallel promotes availability and the processing power of whole system more.For example, database can be run on multiple main frames, and application program is also run on multiple main frames, with the performance of Hoisting System application.Main frame can move the operating system such as Linux or Windows, and database is only useful in the Database Systems of MySQL at present.
The data volume that database is stored, can constantly increase along with the time of system operation, and many database newly-increased data volumes every day are calculated with gigabyte (gigabyte) or billion (terabyte) byte easily.In the time that database is extremely delayed machine and is again started shooting, or in the time that user need to arrive the store status of special time by database recovery, must according to a definite order tandem carry out the recovery of data, can guarantee that database can correctly return to required store status.
Although existing various database all provides the function of storage data, but all likely there is very large difference in the design concept of every kind of database, composition structure and spendable order etc.By the database developing for basis for MySQL database or according to MySQL database, the technical scheme that data are recovered is proposed below.
MySQL database is mainly by the structure of binary log (binary log), and records the variation of event in MySQL database or data, copies and the function such as backup providing.The structure of binary log can include multiple binary log files (binlog) and a binary log index file (binlog index), in the time that MySQL database receives orders such as refreshing daily record (flush log), MySQL database will produce new binary log file, binary log index file is used for recording the index of all binary log files, for example, this index can be the file name of binary log file.
In MySQL database, binary log file has three kinds of memory modules conventionally, is respectively row (row) pattern, statement (statement) pattern and mixed (mix) pattern.The binary log file of row mode can record the information that in MySQL database, every data line is modified, and statement pattern can record in MySQL database the database command that each can Update Table, and mixed mode is the combination of row mode and statement pattern.Because row mode has recorded the information before and after data variation in MySQL database, so can data be returned to required state (or claiming data rewind, rollback) according to the data value recording in row mode and action type.Below, will how illustrate according to the binary log file with row mode storage in MySQL database, and carry out the data recovery of MySQL database.
Fig. 1 is the process flow diagram after the embodiment of the application's data reconstruction method simplifies.
In flow process 110, database receives data and recovers order, and data are recovered to include state code in order, to specify the data mode of required recovery.For example, data are recovered order can specified database should to return to " record position " are 1000 data mode.
In flow process 120, recover order and resolve corresponding binary log file according to data, take by binary log document analysis as corresponding plaintext text.For example, the database command mysqlbinlog that can adopt MySQL database to carry, and be corresponding plaintext text by binary log document analysis.In addition,, in flow process 120, only need, by recovering to order the partial content of relevant binary log file to resolve to data, therefore can reduce operand.
In flow process 130, produce reverse text according to the plaintext text of flow process 120, the execution order of the affairs (transaction) of reverse text and expressly text is contrary, the database command of the database command in each affairs of reverse text and corresponding affairs in text expressly in logic on the contrary and execution order be also contrary.
In flow process 140, according to existing binary log file and reverse text, carry out reverse text so that database recovery to data in flow process 110 are recovered to the specified data mode of order.
In flow process 120, carry out binary log document analysis and be the running of corresponding plaintext text.But the data of database have ESC, ESC be before letter, add " ", the symbol such as " x " or " x0 " represents, therefore ESC is not identical with the meaning of original alphabetical representative.Binary log file including has the on all four record of data with database, and includes ESC.Therefore, if the data that the mysqlbinlog instrument carrying by MySQL parsing binary log file obtains are because include ESC, and cannot obtain the database command that can directly carry out.
In one embodiment, the mysqlbinlog instrument that can carry MySQL by debugged program instruments such as GDB is modified, or use the instruments such as other scripts that carry to carry out required parsing running, binary log file is resolved, and reduction ESC, to obtain the database command that can directly carry out.
For example, in one embodiment, an order insert into tx values (' a bb') to be resolved, the text that the mysqlbinlog instrument carrying by MySQL is resolved can be " INSERT INTOtest.tx ", " SET " and "@1='a x08b " ', cannot directly carry out owing to including ESC " x0b " in text.Therefore, can revise mysqlbinlog instrument or use other script, ESC " x0b " is reduced to " b ", make in flow process 120 text after resolving become " INSERT INTO test.tx ", " SET " and " 1='a bb " ', and become the database command that directly can carry out.
Fig. 2~Fig. 4 is the schematic diagram after the embodiment that produces reverse text according to text expressly in flow process 130 simplifies, and below will further illustrate the producing method of reverse text in flow process 130 with Fig. 2~Fig. 4.
In Fig. 2, expressly in text 210, include three affairs 212,214 and 216, its T1, T2 and T3 represent respectively the environmental parameter of affairs 212,214 and 216.And expressly S1 ~ the S6 of text 210 is database command, for example, inserts (insert), delete (delete) and renewal (update) etc.Each affairs are carried out and are contained in BEGIN(and start respectively under the environmental parameter of self) and END(finish) between database command.
In Fig. 2, can the processing via flow process 131 by plaintext text 210, and the logic of carrying out respectively database command at affairs 212,214 and 216 places is inverted.It is that the logic of deleting, deleting is inverted is to insert and the logic upgraded is inverted and is still renewal that the logic of inserting is inverted.For example, the logic of the database command of insertion 2 is inverted to be and deletes 2.
For example, in one embodiment, will be by order insert into ccc values (2, the logic that " ") carries out flow process 131 running that is inverted, being to delete because the logic of database command insertion is inverted, is therefore delete from ccc where id=2and name=' ' through the result of logical inverse postpone.
In addition, in database, the field name of each table can be replaced by characters such as "@1 ", therefore, also needs@1 to replace to original field name in flow process 131.For example, in one embodiment, can see through the language such as perl and extract the information such as required field code name, database name and table name by regular expression, show to obtain required field information by the INFORMATION_SCHEMA of the functional query databases such as GetTableField again, and deposit field information in another table of comparisons, and utilize the table of comparisons to realize the running that is field name by character replacement such as "@1 ".
Therefore, plaintext text 210 can be obtained to text 220 via the processing of flow process 131, in text 220, database command S1 ' ~ S6 ' represents that respectively its logic corresponding to database command S1 ~ S6 in text 210 is inverted.
In Fig. 3, can the processing via flow process 133 by text 220, and the order that carries out respectively database command at affairs 222,224 and 226 places is inverted.For example, in affairs 224, by the order of database command by (S2 ', S3 ') be inverted into (S3 ', S2 '), and in affairs 226, by the order of database command by (S4 ', S5 ', S6 ') be inverted as (S6 ', S5 ', S4 ').Therefore, plaintext text 220 can be obtained to text 320 via the processing of flow process 133.
In Fig. 4, can the processing via flow process 135 by text 320, and will carry out being inverted of transaction order at affairs 322,324 and 326 places respectively.For example, it is 326,324 and 322 that the transaction order of text 320 322,324 and 326 is inverted, and becomes the affairs 422,424 and 426 in reverse text 420.
In the embodiment of Fig. 2 ~ Fig. 4, the order of flow process 131,133 and 135 also can exchange, also can be according to reverse text corresponding to plaintext text generating.For example, first carry out being inverted of transaction order of flow process 135, then the database command logic of carrying out flow process 131 is inverted, and then the database command order of carrying out flow process 133 is inverted, can produces according to plaintext text 210 equally identical reverse text 420.
Because the row mode of binary log file can record the information before and after data variation in MySQL database, so in flow process 140, can be according to affairs and the database command in the data value recording in row mode and reverse text, by carrying out the affairs that in reverse text, order is inverted, and the database command that in execution affairs, order is inverted and logic is inverted, and the data of database are returned to required state.
In the above-described embodiment, carry out the running that text resolution, reverse or data recover, can use the instrument that MySQL database carries or use the instruments such as other scripts of making by oneself, for example, use perl language etc. to extract information required in text by regular expression and carry out the work such as replacement of field.
Fig. 5 is the functional block diagram after the Database Systems 500 of the application's a embodiment are simplified.Database Systems 500 comprise can adopt one or more computer equipments and implement software, and computer equipment can adopt the equipment of movable type or non-moving type, for example, and the equipment such as server, personal computer, notebook computer or mobile phone.
Database Systems 500 can comprise data and recover order receiver module 510, binary log text resolution module 520, reverse text generating module 530 and data recovery module 540, and can carry out the recovery of data.
Data are recovered order receiver module 510 can, in order to carry out the running of flow process 110, recover order thereby can receive data.
Binary log text resolution module 520 can be in order to carry out the running of flow process 120, recover order and resolve corresponding binary log file according to data, take by binary log document analysis as corresponding plaintext text, and ESC can be changed.
Reverse text generating module 530 can be in order to carry out the running of flow process 130, carry out logic and be inverted, replace the running such as database command order in field name, affairs is inverted and the order of affairs is inverted, thereby can plaintext text be produced to reverse text according to above-mentioned embodiment.
Data recovery module 540 can be in order to carry out the running of flow process 140, thereby can be according to existing binary log file and reverse text, carries out reverse text so that database recovery to data in flow process 110 are recovered to the specified data mode of order.
In the above-described embodiment, although in flow process 140, can carry out the affairs that in reverse text, order is inverted, and carry out the database command that in affairs, order is inverted and logic is inverted, and the data of database are returned to required state.But affairs and the database command recording mode in reverse text also can be set to the mode record according to other.But, in the time that database carries out data recovery, still can carry out the affairs in plaintext text with the order being inverted, and carry out the database command in affairs with the order being inverted and the logic being inverted
The data volume of storing due to database is very large, conventionally calculates with gigabyte (gigabyte) or billion (terabyte) easily.If with current data reset mode, carrying out data according to the mysqldump Backup Data of MySQL database and binary log text resumes work, mysqldump Backup Data with billions of bit groups to tens billion of bit groups, collocation binary log text carries out data recovery, even if only have the data of minority to need to recover, database still needs at least a few hours to a couple of days to carry out data recovery and cannot normal operation.Even if by the required data of other machine reproduction, or adopt artificial mode of repairing, also cannot effectively reduce the time that data are recovered.
But, produce reverse text according to the above embodiments, then the binary log text of the arranging in pairs or groups mode of carrying out data recovery, can make the time that data are recovered be directly proportional with the data volume that needs recovery, and then significantly shorten data release times.If only have the data of minority to need to recover, even can reach the release time of minute rank, make database normal operation again fast, thereby reach the standard of high availability.
Those skilled in the art should understand, the application's embodiment can be provided as method, system or computer program.Therefore, the application can adopt complete hardware implementation example, completely implement software example or the form in conjunction with the embodiment of software and hardware aspect.And the application can adopt the form at one or more upper computer programs of implementing of computer-usable storage medium (including but not limited to magnetic disk memory, CD-ROM, optical memory etc.) that wherein include computer usable program code.
The embodiment that the foregoing is only the application, is not limited to the application, and for a person skilled in the art, the application can have various modifications and variations.All within the application's spirit and principle, any modification of doing, be equal to replacement, improvement etc., within all should being included in the application's claim scope.

Claims (12)

1. a data reconstruction method for database, is characterized in that, comprising:
Reception data are recovered order, and these data are recovered the state code that order includes the data mode of wish recovery;
According to this state code, at least a portion of binary log text is resolved to expressly text, this plaintext text packets contains the first affairs and the second affairs, this first transaction packet is containing one or more the first database commands, this second transaction packet is containing one or more the second database commands, and these first affairs and this second affairs are to carry out according to the first order, these one or more first database commands are to carry out according to the second order, and these one or more second database commands are according to order execution for the third time;
According to these first affairs and this second affairs and produce respectively the 3rd affairs and the 4th affairs of reverse text, the 3rd transaction packet contains one or more the 3rd database commands in contrast to these one or more the first database commands in logic, and the 4th transaction packet contains one or more the 4th database commands in contrast to these one or more the second database commands in logic; And
According to the 3rd affairs and the 4th affairs of carrying out this reverse text in contrast to the mode of this first order, according to carrying out this one or more the 3rd database commands in contrast to the mode of this second order, and according in contrast to this for the third time the mode of order carry out this one or more the 4th database commands, with by this database recovery to this indicated data mode of this state code.
2. method according to claim 1, is characterized in that, also comprises:
These one or more second database commands of these one or more the first database commands of these the first affairs and these the second affairs are carried out to logic to be inverted to produce respectively these one or more the 3rd database commands of the 3rd affairs and these one or more the 4th database commands of the 4th affairs and to carry out logic and be inverted;
These one or more the 3rd database commands of the 3rd affairs are carried out to order to be inverted;
These one or more the 4th database commands of the 4th affairs are carried out to order to be inverted; And
The 3rd affairs and this four affairs are carried out to order and be inverted to produce this reverse text.
3. method according to claim 1, is characterized in that, also comprises:
According in contrast to the mode of this first order by the 3rd affairs and the 4th transaction journal in this reverse text;
According in contrast to the mode of this second order, these one or more the 3rd database commands being recorded in to this reverse text; And
According in contrast to this for the third time the mode of order these one or more the 4th database commands are recorded in to this reverse text.
4. method according to claim 1, is characterized in that, also comprises:
Replace one or more ESCs of this plaintext text, these one or more the 3rd database commands and this one or more the 4th database commands can directly be carried out.
5. method according to claim 1, is characterized in that, also comprises:
The database command of insertion is replaced into the database command of deletion;
The database command of deletion is replaced into the database command of insertion; And
Extract field code name, database name and the table name of one or more databases, to replace the field name of these one or more the 3rd data commands and these one or more the 4th data commands.
6. method according to claim 1, is characterized in that, this database adopts MySQL database to implement, and this binary log text is the binary log text with row mode record in this MySQL database.
7. a data recovery apparatus for database, is characterized in that, also comprises:
Data recovery order receiver module, recovers order in order to receive data, and these data are recovered the state code that order includes the data mode of wish recovery;
Binary log text resolution module, according to this state code, at least a portion of binary log text is resolved to expressly text, this plaintext text packets contains the first affairs and the second affairs, this first transaction packet is containing one or more the first database commands, this second transaction packet is containing one or more the second database commands, and these first affairs and this second affairs are to carry out according to the first order, these one or more first database commands are to carry out according to the second order, and these one or more second database commands are according to order execution for the third time;
Reverse text generating module, according to these first affairs and this second affairs and produce respectively the 3rd affairs and the 4th affairs of reverse text, the 3rd transaction packet contains one or more the 3rd database commands in contrast to these one or more the first database commands in logic, and the 4th transaction packet contains one or more the 4th database commands in contrast to these one or more the second database commands in logic; And
Data recovery module, according to the 3rd affairs and the 4th affairs of carrying out this reverse text in contrast to the mode of this first order, according to carrying out this one or more the 3rd database commands in contrast to the mode of this second order, and according in contrast to this for the third time the mode of order carry out this one or more the 4th database commands, with by this database recovery to this indicated data mode of this state code.
8. data recovery apparatus as claimed in claim 7, it is characterized in that, this reverse text generating module is carried out logic by these one or more second database commands of these one or more the first database commands of these the first affairs and these the second affairs and is inverted to produce respectively these one or more the 3rd database commands of the 3rd affairs and these one or more the 4th database commands of the 4th affairs and carries out logic and be inverted; This reverse text generating module is carried out order by these one or more the 3rd database commands of the 3rd affairs and is inverted; This reverse text generating module is carried out order by these one or more the 4th database commands of the 4th affairs and is inverted; And this reverse text generating module is also carried out order by the 3rd affairs and this four affairs and is inverted to produce this reverse text.
9. data recovery apparatus as claimed in claim 7, is characterized in that, the 3rd affairs and the 4th affairs are to be recorded in this reverse text in contrast to the mode of this first order; These one or more the 3rd database commands are to be recorded in this reverse text in contrast to the mode of this second order; And these one or more the 4th database commands with in contrast to this for the third time the mode of order be recorded in this reverse text.
10. data recovery apparatus according to claim 7, it is characterized in that, this binary log text resolution module is replaced one or more ESCs of this plaintext text, and these one or more the 3rd database commands and this one or more the 4th database commands can directly be carried out.
11. data recovery apparatus according to claim 7, it is characterized in that, this reverse text generating module is replaced into the database command of insertion the database command of deletion, the database command of deletion is replaced into the database command of insertion, and extract field code name, database name and the table name of one or more databases, to replace the field name of these one or more the 3rd data commands and these one or more the 4th data commands.
12. data recovery apparatus as claimed in claim 7, is characterized in that, this database adopts MySQL database to implement, and this binary log text is the binary log text with row mode record in this MySQL database.
CN201210490745.1A 2012-11-27 2012-11-27 Data recovery method of database and relevant device Pending CN103838780A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210490745.1A CN103838780A (en) 2012-11-27 2012-11-27 Data recovery method of database and relevant device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210490745.1A CN103838780A (en) 2012-11-27 2012-11-27 Data recovery method of database and relevant device

Publications (1)

Publication Number Publication Date
CN103838780A true CN103838780A (en) 2014-06-04

Family

ID=50802289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210490745.1A Pending CN103838780A (en) 2012-11-27 2012-11-27 Data recovery method of database and relevant device

Country Status (1)

Country Link
CN (1) CN103838780A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104765659A (en) * 2015-04-30 2015-07-08 北京奇虎科技有限公司 Data recovery method and device applied to database
CN105117304A (en) * 2015-07-29 2015-12-02 北京京东尚科信息技术有限公司 MariaDB-based database recovery system and method
CN109145060A (en) * 2018-07-20 2019-01-04 腾讯科技(深圳)有限公司 Data processing method and device
CN109388523A (en) * 2018-09-26 2019-02-26 四川巧夺天工信息安全智能设备有限公司 A method of based on binary log file access pattern MySQL database
CN110781036A (en) * 2019-10-31 2020-02-11 北京东软望海科技有限公司 Data recovery method and device, computer equipment and storage medium
CN111177141A (en) * 2018-11-09 2020-05-19 上海擎感智能科技有限公司 Method, equipment and system for recovering data by utilizing MySQL (MySQL structured query language) parallel copying
CN111913972A (en) * 2019-05-10 2020-11-10 阿里巴巴集团控股有限公司 Data processing method, device and equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006095356A1 (en) * 2005-03-10 2006-09-14 Hewlett-Packard Development Company, L.P. A method of logging transactions and a method of reversing a transaction
US20070005664A1 (en) * 2005-06-30 2007-01-04 Microsoft Corporation Pre-image logging for database recovery
US20080183686A1 (en) * 2007-01-29 2008-07-31 Oracle International Corporation Apparatus to selectively remove the effects of transactions in online database and enable logical recovery
CN102156720A (en) * 2011-03-28 2011-08-17 中国人民解放军国防科学技术大学 Method, device and system for restoring data
CN102193780A (en) * 2010-03-08 2011-09-21 华为技术有限公司 Affair implementation method and affair implementation device
CN102629250A (en) * 2012-02-28 2012-08-08 杭州丰城信息技术有限公司 Recovery method of redo log files for main memory database

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006095356A1 (en) * 2005-03-10 2006-09-14 Hewlett-Packard Development Company, L.P. A method of logging transactions and a method of reversing a transaction
US20070005664A1 (en) * 2005-06-30 2007-01-04 Microsoft Corporation Pre-image logging for database recovery
US20080183686A1 (en) * 2007-01-29 2008-07-31 Oracle International Corporation Apparatus to selectively remove the effects of transactions in online database and enable logical recovery
CN102193780A (en) * 2010-03-08 2011-09-21 华为技术有限公司 Affair implementation method and affair implementation device
CN102156720A (en) * 2011-03-28 2011-08-17 中国人民解放军国防科学技术大学 Method, device and system for restoring data
CN102629250A (en) * 2012-02-28 2012-08-08 杭州丰城信息技术有限公司 Recovery method of redo log files for main memory database

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孙炳旭: "《SQL Server 7.0 使用管理指南》", 30 April 2000 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104765659A (en) * 2015-04-30 2015-07-08 北京奇虎科技有限公司 Data recovery method and device applied to database
CN105117304A (en) * 2015-07-29 2015-12-02 北京京东尚科信息技术有限公司 MariaDB-based database recovery system and method
CN109145060A (en) * 2018-07-20 2019-01-04 腾讯科技(深圳)有限公司 Data processing method and device
CN109145060B (en) * 2018-07-20 2020-09-04 腾讯科技(深圳)有限公司 Data processing method and device
CN109388523A (en) * 2018-09-26 2019-02-26 四川巧夺天工信息安全智能设备有限公司 A method of based on binary log file access pattern MySQL database
CN111177141A (en) * 2018-11-09 2020-05-19 上海擎感智能科技有限公司 Method, equipment and system for recovering data by utilizing MySQL (MySQL structured query language) parallel copying
CN111913972A (en) * 2019-05-10 2020-11-10 阿里巴巴集团控股有限公司 Data processing method, device and equipment
CN110781036A (en) * 2019-10-31 2020-02-11 北京东软望海科技有限公司 Data recovery method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US10146643B2 (en) Database recovery and index rebuilds
CN104040481B (en) Method and system for merging, storing and retrieving incremental backup data
CN103838780A (en) Data recovery method of database and relevant device
JP5039891B2 (en) Apparatus and method for generating a replica of a database
CN106484906B (en) Distributed object storage system flash-back method and device
CN105205053A (en) Method and system for analyzing database incremental logs
CN111324610A (en) Data synchronization method and device
CN101308471B (en) Method and device for data restoration
KR101643729B1 (en) System and method of data managing for time base data backup, restoring, and mounting
CN107665219B (en) Log management method and device
CN104199888A (en) Data recovery method and device for resilient file system
CN105446825A (en) Database test method and device
US10083192B2 (en) Deleted database record reuse
CN109491834A (en) A kind of data reconstruction method and device applied to database
WO2022174734A1 (en) Method and apparatus for storing data
CN113094442A (en) Full data synchronization method, device, equipment and medium
CN105659214B (en) The checkpointing of data cell set
CN115114370B (en) Master-slave database synchronization method and device, electronic equipment and storage medium
WO2016117007A1 (en) Database system and database management method
CN103177085A (en) Check point operation method and device
CN114816247A (en) Logic data acquisition method and device
CN114297196A (en) Metadata storage method and device, electronic equipment and storage medium
CN114356454A (en) Account checking data processing method, account checking data processing device, account checking data storage medium and program product
CN112965939A (en) File merging method, device and equipment
US9508062B2 (en) Problem management record profiling

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20140604