CN108762982A - A kind of database restoring method, apparatus and system - Google Patents

A kind of database restoring method, apparatus and system Download PDF

Info

Publication number
CN108762982A
CN108762982A CN201810478366.8A CN201810478366A CN108762982A CN 108762982 A CN108762982 A CN 108762982A CN 201810478366 A CN201810478366 A CN 201810478366A CN 108762982 A CN108762982 A CN 108762982A
Authority
CN
China
Prior art keywords
database
restored
middleware
business datum
calamity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810478366.8A
Other languages
Chinese (zh)
Other versions
CN108762982B (en
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.)
Hangzhou Dt Dream Technology Co Ltd
Original Assignee
Hangzhou Dt Dream 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 Hangzhou Dt Dream Technology Co Ltd filed Critical Hangzhou Dt Dream Technology Co Ltd
Priority to CN201810478366.8A priority Critical patent/CN108762982B/en
Priority to CN201910849759.XA priority patent/CN110647425A/en
Publication of CN108762982A publication Critical patent/CN108762982A/en
Application granted granted Critical
Publication of CN108762982B publication Critical patent/CN108762982B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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

A kind of database restoring method of the application offer, apparatus and system, method are applied to the calamity at main center in present in database recovery system for engine apparatus, and method includes:The recovery instruction of the mark of the honest example of the carrying database to be restored sent for management equipment based on calamity, the configuration information of database to be restored is obtained from backup & disaster recovery device;Configuration-direct is sent to middleware using the configuration information of acquisition, so that middleware creates the new example of database to be restored;The business datum table that database to be restored is obtained from backup & disaster recovery device divides business datum table write storage device of the table strategy by acquisition based on point library.Entire database recovery process is completed by calamity for engine apparatus so that middleware can special disposal business, therefore compared with the prior art, middleware can promote one times to the process performance of business.And by calamity for engine apparatus dedicated for database recovery, therefore recovery can be shortened and taken.

Description

A kind of database restoring method, apparatus and system
Technical field
This application involves database technical field more particularly to a kind of database restoring method, apparatus and systems.
Background technology
With the rapid growth of data volume, the framework of database starts to be developed from centralization to distribution.It is used at present Distributed data base system generally include the middleware of distributed data base, distributed data base etc..In order to ensure distribution The safety of Database Systems, it usually needs it is standby for subsequently number recovery to carry out database calamity.
In the related art, when the database to a certain business restores, calamity is for management equipment first from Disaster Preparation Center Backup & disaster recovery device obtain the configuration information of database to be restored, and the configuration information of database to be restored is sent to main center Middleware so that middleware creates the example of database to be restored according to configuration information, and divide table strategy automatic based on a point library Generate the routing iinformation of database to be restored;Then calamity is obtained from the backup & disaster recovery device of Disaster Preparation Center to be restored again for management equipment The business datum table of database, and business datum table is sent to the middleware at main center, and by middleware according to number to be restored According to the routing iinformation in library, business datum table is written in the storage device at main center, to complete the recovery of database.
However, due to the data writing process of the middleware in addition to needing to handle database to be restored at main center, it is also necessary to Access of the processing business to other databases, therefore the processing pressure of the middleware at main center is bigger, and then influence business To the access performance of database, user experience is reduced.
Invention content
In view of this, a kind of database restoring method of the application offer, apparatus and system, to solve existing reset mode meeting Influence business is to the access performance of database, the problem of reducing user experience.
According to the embodiment of the present application in a first aspect, providing a kind of database restoring method, the method is applied to data The calamity at main center is for engine apparatus in the recovery system of library, the present in database recovery system also include calamity for management equipment, calamity it is standby in The backup & disaster recovery device of the heart and the storage device at main center, the method includes:
Step 1: the recovery of the mark of the honest example of the carrying database to be restored sent for management equipment based on the calamity Instruction, the configuration information of database to be restored is obtained from the backup & disaster recovery device;
Step 2: configuration-direct is sent to the middleware using the configuration information obtained, so that the middleware creates The new example of database to be restored;
Step 3: obtaining the business datum table of database to be restored from the backup & disaster recovery device, and divide table plan based on a point library The storage device slightly is written into the business datum table of acquisition.
According to the second aspect of the embodiment of the present application, a kind of present in database recovery system is provided, the system comprises:
Calamity sends the honest example for carrying database to be restored for the calamity to main center for management equipment for engine apparatus The recovery of mark instructs;
The backup & disaster recovery device of Disaster Preparation Center, the configuration information for storing database to be restored and business datum table;
For engine apparatus, the recovery for the mark based on the honest example for carrying database to be restored refers to the calamity at main center It enables, the configuration information of database to be restored is obtained from the backup & disaster recovery device, and sent out to middleware using the configuration information obtained Send configuration-direct;The business datum table of database to be restored is obtained from the backup & disaster recovery device, and divides table strategy will based on a point library The storage device at main center is written in the business datum table of acquisition;
The middleware at main center creates the new example of database to be restored for being based on the configuration-direct;
The storage device at main center, the business datum table being written for engine apparatus for storing the calamity.
According to the third aspect of the embodiment of the present application, a kind of database recovery device is provided, described device is applied to data The calamity at main center is for engine apparatus in the recovery system of library, the present in database recovery system also include calamity for management equipment, calamity it is standby in The backup & disaster recovery device of the heart and the storage device at main center, described device include:
First acquisition module, the honest example for carrying database to be restored for being sent for management equipment based on the calamity The recovery of mark instructs, and the configuration information of database to be restored is obtained from the backup & disaster recovery device;
First sending module, for sending configuration-direct to the middleware using the configuration information obtained, so that described Middleware creates the new example of database to be restored;
Second acquisition module, the business datum table for obtaining database to be restored from the backup & disaster recovery device;
Writing module, for dividing table strategy that the storage device is written in the business datum table of acquisition based on point library.
Using the embodiment of the present application, calamity for engine apparatus after receiving the recovery instruction that calamity sends for management equipment, The recovery instruction of the mark of the honest example of the carrying database to be restored sent for management equipment based on calamity, is obtained from backup & disaster recovery device The configuration information of database to be restored is taken, and configuration-direct is sent to middleware using the configuration information obtained, so that middleware Create the new example of database to be restored;The business datum table of database to be restored is obtained from backup & disaster recovery device, and is based on dividing library Divide table strategy by the business datum table write storage device of acquisition, to complete database recovery.It is based on foregoing description it is found that whole The recovery process of a database be all by calamity for engine apparatus complete so that the middleware at main center can with special disposal other Access of the business to database, therefore the application is compared with the prior art, the process performance of the middleware at main center to other business One times can be at least promoted, and then improves the usage experience of user.Simultaneously as calamity for engine apparatus dedicated for into line number According to library recovery process, other business need not be handled, therefore can largely shorten recovery and take.
Description of the drawings
Fig. 1 is existing present in database recovery system structural schematic diagram of the application shown according to an exemplary embodiment;
Fig. 2 is a kind of present in database recovery system structural schematic diagram of the application shown according to an exemplary embodiment;
Fig. 3 is a kind of embodiment flow chart of database restoring method of the application shown according to an exemplary embodiment;
Fig. 4 is the embodiment flow of another database restoring method of the application shown according to an exemplary embodiment Figure;
Fig. 5 is a kind of hardware structure diagram of calamity of the application shown according to an exemplary embodiment for engine apparatus;
Fig. 6 is a kind of example structure figure of database recovery device of the application shown according to an exemplary embodiment.
Specific implementation mode
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended The example of consistent device and method of some aspects be described in detail in claims, the application.
It is the purpose only merely for description specific embodiment in term used in this application, is not intended to be limiting the application. It is also intended to including majority in the application and "an" of singulative used in the attached claims, " described " and "the" Form, unless context clearly shows that other meanings.It is also understood that term "and/or" used herein refers to and wraps Containing one or more associated list items purposes, any or all may be combined.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application A little information should not necessarily be limited by these terms.These terms are only used for same type of information being distinguished from each other out.For example, not departing from In the case of the application range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determination ".
Fig. 1 is existing present in database recovery system structural schematic diagram of the application shown according to an exemplary embodiment, Fig. 1 Shown in recovery system include that for management equipment, the middleware at main center and each storage device, (Fig. 1 lists 3 storages and sets calamity It is standby) and Disaster Preparation Center backup & disaster recovery device.Wherein, calamity can pass through with main center and Disaster Preparation Center respectively for management equipment Network interacts, the data (such as metadata and business datum) for obtaining database to be restored from backup & disaster recovery device, concurrently It send into the middleware at main center, and database recovery is completed by middleware;The middleware at main center is for managing database, example Such as database is configured, is monitored, Data Migration, backed up in synchronization, and each business of processing to the access of database (by for The example that each database creates is realized), record has the metadata of database, and (such as table is divided in the configuration information of database and a point library Routing iinformation).
Recovery for database, it will be appreciated that for the standby reverse process of data calamity, that is, need to ensure business datum, metadata (such as restore to which time point, which database to need to restore) to restore as requested, and ensures to restore the consistency of data.
With reference to Fig. 1, it is discussed in detail how calamity in the prior art has interacted for management equipment with the middleware at main center At the recovery of database:
When calamity receives database recovery instruction for management equipment, based on time point for being carried in the instruction and to be restored The instance identification of database reads from backup & disaster recovery device and unlocks the metadata text of the time point corresponding database to be restored To extract the configuration information of database to be restored, and the middleware at main center is written in the configuration information of database to be restored by part, So that middleware creates the new example of database to be restored according to configuration information, and automatically generate the routing letter of database to be restored Breath;Then calamity reads again from backup & disaster recovery device for management equipment and unlocks the business datum file of database to be restored, with extraction Business datum table, and business datum table is written to the middleware at main center, and by middleware according to the routing iinformation of generation, by industry Business tables of data is written in the storage device at main center.
Since during database recovery, metadata write-in is executed with business datum write-in needs sequence, and each The business datum of database to be restored is also required to be sequentially written according to routing iinformation,
In an exemplary scenario, it is assumed that there is the example of 10 databases to need to restore, corresponding meta data file size There is 1M or so, the corresponding business datum file size of example of average each database is 50G, and size is 100G after unlocking, By test, for meta data file reading, unlock, be written, need -15 seconds 12 seconds, the business datum text of each database The reading of part is unlocked, is written, and needs 3.5 hours, therefore at least needs 35 (one day hours for the example of 10 databases More time) it could restore to complete.It can thus be appreciated that entire recovery process is relatively time consuming.
In addition, data writing process of the middleware at main center in addition to needing to handle database to be restored, it is also necessary to handle Access of other business to database, therefore the processing pressure of the middleware at main center is bigger, the number especially restored in needs In the case of measuring greatly, access performance of the business to database can be seriously affected, reduces user experience.
Based on this, Fig. 2 is a kind of present in database recovery system structural representation of the application shown according to an exemplary embodiment Figure, the application increase calamity for engine apparatus on the basis of above-mentioned Fig. 1 in main center, which can be with for engine apparatus Calamity is interacted for the backup & disaster recovery device of management equipment and Disaster Preparation Center by network.During carrying out database recovery, The triggering for the recovery instruction that calamity is sent based on calamity for management equipment for engine apparatus, database to be restored is obtained from backup & disaster recovery device Metadata and business datum, and metadata is restored to the middleware at main center respectively, business datum is restored to main center Storage device.
It is obtained it follows that entire recovery system completes data during completing database recovery, by calamity for engine apparatus It takes and restores, the middleware at main center is dedicated for handling access of other business to database, to which the application passes through business Data flow and the separation for restoring data flow, it is ensured that stability, the reliability of business.In addition, since metadata needs to restore extremely Middleware, business datum need to restore to storage device, therefore recovery and business datum of the calamity for engine apparatus for metadata Recovery can synchronize and execute recovery, be independent of each other, restore to take so as to shorten.
The technical solution of the application is discussed in detail with specific embodiment below:
Fig. 3 is a kind of embodiment flow chart of database restoring method of the application shown according to an exemplary embodiment, In conjunction with above-mentioned present in database recovery system structural schematic diagram shown in Fig. 2, which can apply at main center Calamity is in engine apparatus (such as PC machine).Involved database can be distributed data base in the embodiment of the present application.Such as Fig. 3 institutes Show, which includes the following steps:
Step 301:The recovery of the mark of the honest example of the carrying database to be restored sent for management equipment based on calamity is referred to It enables, the configuration information of database to be restored is obtained from backup & disaster recovery device.
In one embodiment, when a certain service operation exception, the database which is related to can be re-started extensive After multiple or certain user database is destroyed by attack, need to re-start recovery or computer room to the database of the user Fire occurs, causes the resource pool of all databases in main center to burn, needs all databases for restoring the center again.Base In this, the mark of the honest example by inputting database to be restored for management equipment to calamity, triggering calamity generates extensive for management equipment Multiple instruction, and the recovery of generation instruction is sent to calamity for engine apparatus, to which calamity can receive the standby pipe of calamity for engine apparatus Manage the recovery instruction that equipment is sent.
Wherein, database to be restored is made of an example, and honest example refers to backuping to the number in backup & disaster recovery device According to the corresponding example in library.It will be appreciated by persons skilled in the art that the mark of example either number or letter, can also It is the combination of number and letter, the application is herein without limiting.
In one embodiment, for the process for the configuration information for obtaining database to be restored from backup & disaster recovery device, due to calamity Standby server is in order to save the memory space shared by Backup Data, the storage for the metadata of database, typically boil down to What one file was stored, therefore calamity can first read the metadata of database to be restored for engine apparatus from backup & disaster recovery device Then file parses and extracts the configuration information of database to be restored in meta data file again.
Wherein, the configuration information of database to be restored refers to the required metadata when creating the example of database, For example, table, the letters such as database generated time, and the user that has access rights that the example specification of database, database include Breath.
Step 302:Configuration-direct is sent to middleware using the configuration information of acquisition, so that middleware creates number to be restored According to the new example in library.
In one embodiment, it is by accessing the database in middleware since user is in accessing database data Example complete, therefore calamity for engine apparatus when carrying out database recovery, need to middleware transmission configuration-direct, middleware It is that database to be restored creates a new example using the configuration information that configuration-direct carries, to complete the recovery of metadata. Wherein, the mark of the new example for the database to be restored that middleware creates can be with the mark of the honest example described in above-mentioned steps 301 It is sensible same, it can not also be identical.
It should be noted that calamity for engine apparatus using obtain configuration information to middleware send configuration-direct it Afterwards, intermediate data table can also be extracted from meta data file, the intermediate data table refers to using database to be restored The tables of data generated in the process, and by the intermediate data table of extraction be sent to middleware establishment database to be restored new example In, so as to ensure to restore the consistency of data.
Refer to it should be further noted that calamity sends configuration in the configuration information using acquisition for engine apparatus to middleware After order, the mark of the new example of the database to be restored of middleware return can also be received, and is being carried from meta data file Intermediate data table and then the mark using the honest example recorded in the mark update intermediate data table of new example are taken, thus After intermediate data table is restored in the new example created to middleware, it can ensure business normal operation.
Step 303:The business datum table of database to be restored is obtained from backup & disaster recovery device, and divides table strategy will based on a point library The business datum table write storage device of acquisition.
In one embodiment, it since each database includes multiple business datum tables, and is deposited shared by each business datum table It is also bigger to store up space, therefore backup & disaster recovery device is in backup database, the business datum gauge pressure for typically including by database It is condensed to file to be stored, therefore calamity can first read the business number of database to be restored for engine apparatus from backup & disaster recovery tolerance According to file, business datum file is then parsed again to extract business datum table.Wherein, record has business number in business datum table According to.
In one embodiment, a point library divides table strategy that can be Hash strategy, can also be Weight Algorithm, and the application is herein not It is defined.It, can writing with special disposal business datum since calamity is not necessarily to handle other business for the opposite middleware of engine apparatus Enter process, therefore it is time-consuming short to restore write-in.Divide business datum table write storage device of the table strategy by acquisition for based on point library Detailed description, may refer to the associated description of following embodiment illustrated in fig. 4, wouldn't be described in detail herein.
It should be noted that above-mentioned steps 302 synchronous can be executed with step 303, the recovery to shorten database takes.
For the process of above-mentioned steps 301 to step 303, it is based on above-mentioned exemplary scenario shown in FIG. 1,10 databases Example need to restore, the meta data file of corresponding 1M or so, the corresponding business datum file of example of average each database Size is 50G, and size is 100G after unlocking.Due to recovery and the recovery of business datum of metadata synchronous can execute it is extensive It is multiple, and file of metadata itself is simultaneously little, therefore the recovery of metadata takes and can be ignored, and only considers business datum Restore to take, it is final to restore to depositing for the example of the database of 1 business datum file comprising 50G sizes by test Store up equipment, need it is time-consuming be only 25 minutes (being shortened compared with existing scheme at least 3 hours).
In the present embodiment, calamity after receiving the recovery instruction that calamity sends for management equipment, is based on calamity for engine apparatus The recovery instruction of the mark of the honest example for the carrying database to be restored that standby management equipment is sent waits for extensive from the acquisition of backup & disaster recovery device The configuration information in complex data library, and configuration-direct is sent to middleware using the configuration information obtained, so that middleware establishment waits for Restore the new example of database;The business datum table of database to be restored is obtained from backup & disaster recovery device, and divides table plan based on a point library Slightly by the business datum table write storage device of acquisition, to complete database recovery.Based on foregoing description it is found that entire data The recovery process in library is completed for engine apparatus by calamity so that the middleware at main center can be with other business pair of special disposal The access of database, therefore the application is compared with the prior art, the middleware at main center at least can to the process performance of other business One times is enough promoted, and then improves the usage experience of user.Simultaneously as calamity is extensive dedicated for carrying out database for engine apparatus Multiple process, need not handle other business, therefore can largely shorten recovery and take.
Fig. 4 is the embodiment flow of another database restoring method of the application shown according to an exemplary embodiment Figure, based on the basis of above-mentioned embodiment illustrated in fig. 3, how the present embodiment based on point library divide business number of the table strategy by acquisition According to being illustrated for table write storage device, as shown in figure 4, the database restoring method includes the following steps:
Step 401:Table strategy is divided to be that each business datum table distributes storage device based on a point library.
In one embodiment, since the performance of storage device in main center can be influenced by Operational Visit amount, calamity Standby engine apparatus needs to divide the table strategy to be based on a point library before the storage device at main center is written in the business datum table of acquisition Each business datum table distributes storage device, this point of library divides table strategy that can integrate the current processing capacity of each storage device, be It distributes the business datum table to be written.
Step 402:By concurrent writing, each business datum table is written in corresponding storage device.
In one embodiment, since each database generally comprises multiple business datum tables, and nothing between each database Any association, therefore calamity can be by concurrent writing, by each business datum table of database to be restored for engine apparatus It is written in corresponding storage device, restores to take with further shortening.
Based on above-mentioned exemplary scenario shown in FIG. 1,10 databases to be restored correspond to the meta data file of 1M or so, The business datum file size of average each database is 50G, and size is 100G after unlocking.Recovery due to metadata and industry The recovery of business data can synchronize and execute recoverys, and file of metadata itself and little, thus metadata recovery it is time-consuming can To ignore, only consider that the recovery of business datum takes, by test, for 10 databases to be restored, each database It is corresponding with the business datum file of 50G sizes, is restored to storage device by parallel mode, taking for needing is 35-50 minutes Between (less than 1 hour time).
Step 403:The address of the corresponding storage device of each business datum table is sent to middleware, so that middleware is sharp With the local routing iinformation of the address update of the corresponding storage device of each business datum table.
In one embodiment, the routing iinformation of middleware local refers to middleware in the new reality for creating database to be restored After example, routing iinformation that the business datum table that includes for database to be restored automatically generates.Since calamity is each for engine apparatus The address of the storage device of business datum table distribution is locally that the routing iinformation that business datum table generates is very possible with middleware It is inconsistent, and the process that is actually written into of business datum table is executed for the storage device that engine apparatus distributes according to calamity, therefore The routing iinformation of business datum table in update middleware is removed in the address for needing the storage device distributed for engine apparatus using calamity, After the completion of ensuring database recovery, business can normally access database.
It should be noted that since above-mentioned steps 402 are interaction of the calamity for engine apparatus and the storage device at main center, step Rapid 403 be interaction of the calamity for engine apparatus and middleware, and two steps are independent of each other, and can both synchronize execution, can also sequence It executes, and to the front and back execution of step 402 and step 403 sequence without limiting.
It should be further noted that calamity for engine apparatus after completing database recovery, can will restore complete Notification message is sent to calamity for management equipment, calamity for management equipment can to middleware transmission data library version number upgrade command, So that middleware updates the data the version number in library.
In the present embodiment, calamity for engine apparatus for each business datum table distribute storage device after, by being written in parallel to Business datum table is written in corresponding storage device mode, since the data volume of ordinary business practice tables of data is very big, leads to It crosses and is written in parallel to, can further shorten recovery and take.
Corresponding with the embodiment of aforementioned data library restoration methods, present invention also provides the implementations of database recovery device Example.
The embodiment of the application database recovery device can apply the calamity at main center on engine apparatus.Device is implemented Example can also be realized by software realization by way of hardware or software and hardware combining.For implemented in software, as Device on one logical meaning is by the processor of equipment where it by corresponding computer journey in nonvolatile memory Sequence instruction reads what operation in memory was formed.For hardware view, as shown in figure 5, for the application according to an embodiment Implement a kind of calamity for exemplifying for the hardware structure diagram of engine apparatus, in addition to processor shown in fig. 5, memory, network interface, with And except nonvolatile memory, the equipment in embodiment where device can also be wrapped generally according to the actual functional capability of the equipment Other hardware are included, this is repeated no more.
Fig. 6 is a kind of example structure figure of database recovery device of the application shown according to an exemplary embodiment, The database recovery device can be applied to the calamity at main center for engine apparatus, as shown in fig. 6, the database recovery device packet It includes:
First acquisition module 610, for carrying the honest of database to be restored based on the calamity for what management equipment was sent The recovery instruction of the mark of example, the configuration information of database to be restored is obtained from the backup & disaster recovery device;
First sending module 620, for sending configuration-direct to the middleware using the configuration information obtained, so that institute State the new example that middleware creates database to be restored;
Second acquisition module 630, the business datum table for obtaining database to be restored from the backup & disaster recovery device;
Writing module 640, for dividing table strategy that the storage device is written in the business datum table of acquisition based on point library.
In an optional realization method, the business datum table includes multiple tables of data;Said write module 640, tool Body is used to divide table strategy to be that each business datum table distributes storage device based on a point library;By concurrent writing, by each industry Tables of data of being engaged in is written in corresponding storage device.
In an optional realization method, described device further includes (being not shown in Fig. 6):
Second sending module, for dividing table strategy for each business datum table point based on a point library in said write module 640 After storage device, the address of the corresponding storage device of each business datum table is sent to the middleware, so that described Middleware updates local routing iinformation using the address of the corresponding storage device of each business datum table, wherein the local Routing iinformation refer to the middleware after the new example for creating database to be restored, be the database packet to be restored The routing iinformation that the business datum table contained automatically generates.
In an optional realization method, first sending module 620 and second acquisition module 630 and write-in mould Block, which synchronizes, to be executed.
In an optional realization method, first acquisition module 610 is specifically used for reading from the backup & disaster recovery device The meta data file of database to be restored;Parse and extract the configuration information of database to be restored in the meta data file.
In an optional realization method, described device further includes (being not shown in Fig. 6):
Intermediate data table recovery module, in first sending module 620 using the configuration information obtained to described After middleware sends configuration-direct, intermediate data table is extracted from the meta data file, the intermediate data table refers to The tables of data generated in using the data base procedure to be restored;The intermediate data table of extraction is sent to the middleware wound In the new example for the database to be restored built.
In an optional realization method, described device further includes (being not shown in Fig. 6):
Update module, for after sending configuration-direct to the middleware using the configuration information obtained, receiving institute State the mark of the new example of the database to be restored of middleware return;Extracted from the meta data file intermediate data table it Afterwards, the mark of the honest example recorded in the intermediate data table is updated using the mark of new example.
The function of each unit and the realization process of effect specifically refer to and correspond to step in the above method in above-mentioned apparatus Realization process, details are not described herein.
For device embodiments, since it corresponds essentially to embodiment of the method, so related place is referring to method reality Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separating component The unit of explanation may or may not be physically separated, and the component shown as unit can be or can also It is not physical unit, you can be located at a place, or may be distributed over multiple network units.It can be according to actual It needs that some or all of module therein is selected to realize the purpose of application scheme.Those of ordinary skill in the art are not paying In the case of going out creative work, you can to understand and implement.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the application Its embodiment.This application is intended to cover any variations, uses, or adaptations of the application, these modifications, purposes or Person's adaptive change follows the general principle of the application and includes the undocumented common knowledge in the art of the application Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the application are by following Claim is pointed out.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability Including so that process, method, commodity or equipment including a series of elements include not only those elements, but also wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that wanted including described There is also other identical elements in the process of element, method, commodity or equipment.
The foregoing is merely the preferred embodiments of the application, not limiting the application, all essences in the application With within principle, any modification, equivalent substitution, improvement and etc. done should be included within the scope of the application protection god.

Claims (15)

1. a kind of database restoring method, which is characterized in that the method is applied to the calamity at main center in present in database recovery system Standby engine apparatus, the present in database recovery system also include calamity in management equipment, the backup & disaster recovery device of Disaster Preparation Center, and master The middleware of the heart, storage device, the method includes:
Step 1: the recovery of the mark of the honest example of the carrying database to be restored sent for management equipment based on the calamity is referred to It enables, the configuration information of database to be restored is obtained from the backup & disaster recovery device;
Step 2: using obtain configuration information to the middleware send configuration-direct so that the middleware establishment wait for it is extensive The new example in complex data library;
Step 3: obtaining the business datum table of database to be restored from the backup & disaster recovery device, and divide table strategy will based on a point library The storage device is written in the business datum table of acquisition.
2. according to the method described in claim 1, it is characterized in that, the business datum table include multiple tables of data, based on point Library divides table strategy that the storage device is written in the business datum table of acquisition, including:
Table strategy is divided to be that each business datum table distributes storage device based on a point library;
By concurrent writing, each business datum table is written in corresponding storage device.
3. according to the method described in claim 2, it is characterized in that, dividing table strategy to be distributed for each business datum table based on a point library After storage device, the method further includes:
The address of the corresponding storage device of each business datum table is sent to the middleware, so that the middleware is using respectively The local routing iinformation of the address update of the corresponding storage device of a business datum table, wherein the local routing iinformation refers to Be the middleware after the new example for creating database to be restored, the business datum for including for the database to be restored The routing iinformation that table automatically generates.
4. according to the method described in claim 1, it is characterized in that, step 2 execution synchronous with the step 3.
5. according to the method described in claim 1, it is characterized in that, obtaining matching for database to be restored from the backup & disaster recovery device Confidence ceases, including:
The meta data file of database to be restored is read from the backup & disaster recovery device;
Parse and extract the configuration information of database to be restored in the meta data file.
6. according to the method described in claim 5, it is characterized in that, the configuration information using acquisition is matched to middleware transmission After setting instruction, the method further includes:
Intermediate data table is extracted from the meta data file, the intermediate data table refers to using the data to be restored The tables of data generated during library;
The intermediate data table of extraction is sent in the new example for the database to be restored that the middleware creates.
7. according to the method described in claim 6, it is characterized in that, the method further includes:
After sending configuration-direct to the middleware using the configuration information obtained, waiting for of receiving that the middleware returns is extensive The mark of the new example in complex data library;
After extracting intermediate data table in the meta data file, the intermediate data table is updated using the mark of new example The mark of the honest example of middle record.
8. a kind of present in database recovery system, which is characterized in that the system comprises:
Calamity sends the mark for the honest example for carrying database to be restored for the calamity to main center for management equipment for engine apparatus Recovery instruction;
The backup & disaster recovery device of Disaster Preparation Center, the configuration information for storing database to be restored and business datum table;
For engine apparatus, the recovery for the mark based on the honest example for carrying database to be restored instructs the calamity at main center, from The backup & disaster recovery device obtains the configuration information of database to be restored, and is sent and configured to middleware using the configuration information obtained Instruction;The business datum table of database to be restored is obtained from the backup & disaster recovery device, and divides table strategy by acquisition based on a point library The storage device at main center is written in business datum table;
The middleware at main center creates the new example of database to be restored for being based on the configuration-direct;
The storage device at main center, the business datum table being written for engine apparatus for storing the calamity.
9. a kind of database recovery device, which is characterized in that described device is applied to the calamity at main center in present in database recovery system Standby engine apparatus, the present in database recovery system also include calamity in management equipment, the backup & disaster recovery device of Disaster Preparation Center, and master The storage device of the heart, described device include:
First acquisition module, the mark of the honest example for carrying database to be restored for being sent for management equipment based on the calamity Recovery instruction, the configuration information of database to be restored is obtained from the backup & disaster recovery device;
First sending module, for sending configuration-direct to the middleware using the configuration information obtained, so that the centre Part creates the new example of database to be restored;
Second acquisition module, the business datum table for obtaining database to be restored from the backup & disaster recovery device;
Writing module, for dividing table strategy that the storage device is written in the business datum table of acquisition based on point library.
10. device according to claim 9, which is characterized in that the business datum table includes multiple tables of data;
Said write module divides table strategy to be that each business datum table distributes storage device specifically for being based on a point library;By simultaneously Each business datum table is written in corresponding storage device row writing mode.
11. device according to claim 10, which is characterized in that described device further includes:
Second sending module, for dividing table strategy to be that the distribution storage of each business datum table is set based on a point library in said write module After standby, the address of the corresponding storage device of each business datum table is sent to the middleware, so that the middleware is sharp With the local routing iinformation of the address update of the corresponding storage device of each business datum table, wherein the local routing letter Breath refers to the middleware after the new example for creating database to be restored, the business for including for the database to be restored The routing iinformation that tables of data automatically generates.
12. device according to claim 9, which is characterized in that first sending module and second acquisition module And writing module is synchronized and is executed.
13. device according to claim 9, which is characterized in that first acquisition module is specifically used for standby from the calamity Server reads the meta data file of database to be restored;It parses and extracts matching for database to be restored in the meta data file Confidence ceases.
14. device according to claim 13, which is characterized in that described device further includes:
Intermediate data table recovery module, for being sent out to the middleware using the configuration information obtained in first sending module After sending configuration-direct, intermediate data table is extracted from the meta data file, the intermediate data table is referred to using institute State the tables of data generated in data base procedure to be restored;The intermediate data table of extraction waiting for of being sent to that the middleware creates is extensive In the new example in complex data library.
15. device according to claim 14, which is characterized in that described device further includes:
Update module, after sending configuration-direct to the middleware in the configuration information for utilizing acquisition, during reception is described Between part return database to be restored new example mark;From in the meta data file extract intermediate data table after, The mark of the honest example recorded in the intermediate data table is updated using the mark of new example.
CN201810478366.8A 2018-05-18 2018-05-18 A kind of database restoring method, apparatus and system Active CN108762982B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810478366.8A CN108762982B (en) 2018-05-18 2018-05-18 A kind of database restoring method, apparatus and system
CN201910849759.XA CN110647425A (en) 2018-05-18 2018-05-18 Database recovery method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810478366.8A CN108762982B (en) 2018-05-18 2018-05-18 A kind of database restoring method, apparatus and system

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN201910849759.XA Division CN110647425A (en) 2018-05-18 2018-05-18 Database recovery method and device

Publications (2)

Publication Number Publication Date
CN108762982A true CN108762982A (en) 2018-11-06
CN108762982B CN108762982B (en) 2019-09-17

Family

ID=64007300

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201810478366.8A Active CN108762982B (en) 2018-05-18 2018-05-18 A kind of database restoring method, apparatus and system
CN201910849759.XA Pending CN110647425A (en) 2018-05-18 2018-05-18 Database recovery method and device

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201910849759.XA Pending CN110647425A (en) 2018-05-18 2018-05-18 Database recovery method and device

Country Status (1)

Country Link
CN (2) CN108762982B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110888760A (en) * 2019-11-26 2020-03-17 中国工商银行股份有限公司 Data recovery method and device, and data processing method and device
CN111367888A (en) * 2020-03-03 2020-07-03 杭州安恒信息技术股份有限公司 Database checking method, checking system and related devices
CN113419896A (en) * 2020-07-24 2021-09-21 阿里巴巴集团控股有限公司 Data recovery method and device, electronic equipment and computer readable medium
CN114079670A (en) * 2020-07-30 2022-02-22 华为技术有限公司 Method, device and communication system for transmitting routing information

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838755A (en) * 2012-11-23 2014-06-04 景幂机械(上海)有限公司 Remote heterogeneous disaster tolerant system of database
US9858162B2 (en) * 2015-10-23 2018-01-02 International Business Machines Corporation Creation of a provisioning environment based on probability of events

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8548959B2 (en) * 2010-11-29 2013-10-01 Ca, Inc. System and method for minimizing data recovery window
CN102156720A (en) * 2011-03-28 2011-08-17 中国人民解放军国防科学技术大学 Method, device and system for restoring data
CN103838646B (en) * 2014-02-13 2017-10-20 中国科学院国家天文台 A kind of system and method for Ground Application big data disaster-tolerant backup
CN105224637A (en) * 2015-09-24 2016-01-06 珠海许继芝电网自动化有限公司 A kind of based on PostgreSQL database active and standby/the comprehensive method of cluster application

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838755A (en) * 2012-11-23 2014-06-04 景幂机械(上海)有限公司 Remote heterogeneous disaster tolerant system of database
US9858162B2 (en) * 2015-10-23 2018-01-02 International Business Machines Corporation Creation of a provisioning environment based on probability of events

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110888760A (en) * 2019-11-26 2020-03-17 中国工商银行股份有限公司 Data recovery method and device, and data processing method and device
CN111367888A (en) * 2020-03-03 2020-07-03 杭州安恒信息技术股份有限公司 Database checking method, checking system and related devices
CN111367888B (en) * 2020-03-03 2023-04-11 杭州安恒信息技术股份有限公司 Database checking method, checking system and related devices
CN113419896A (en) * 2020-07-24 2021-09-21 阿里巴巴集团控股有限公司 Data recovery method and device, electronic equipment and computer readable medium
CN113419896B (en) * 2020-07-24 2023-12-22 阿里巴巴集团控股有限公司 Data recovery method, device, electronic equipment and computer readable medium
CN114079670A (en) * 2020-07-30 2022-02-22 华为技术有限公司 Method, device and communication system for transmitting routing information

Also Published As

Publication number Publication date
CN110647425A (en) 2020-01-03
CN108762982B (en) 2019-09-17

Similar Documents

Publication Publication Date Title
WO2019154394A1 (en) Distributed database cluster system, data synchronization method and storage medium
CN108762982B (en) A kind of database restoring method, apparatus and system
US8572136B2 (en) Method and system for synchronizing a virtual file system at a computing device with a storage device
US10248356B2 (en) Using scratch extents to facilitate copying operations in an append-only storage system
US7330859B2 (en) Database backup system using data and user-defined routines replicators for maintaining a copy of database on a secondary server
US6823474B2 (en) Method and system for providing cluster replicated checkpoint services
CN104378423B (en) Metadata cluster distributed memory system and reading, the method for write-in storage data
CN102891849B (en) Service data synchronization method, data recovery method, data recovery device and network device
CN113396407A (en) System and method for augmenting database applications using blockchain techniques
WO2018049983A1 (en) Data synchronization method and system, and synchronization acquisition method and device
CN106484565B (en) Method of data synchronization and relevant device between multiple data centers
US20120151245A1 (en) In-flight block map for a clustered redirect-on-write filesystem
US9864791B2 (en) Flow for multi-master replication in distributed storage
CN108958969B (en) Database disaster recovery method, device and disaster recovery and backup systems
CN113360456B (en) Data archiving method, device, equipment and storage medium
US20090063486A1 (en) Data replication using a shared resource
CN106325768B (en) A kind of two-shipper storage system and method
CN104536852B (en) Data recovery method and device
CN116389233A (en) Container cloud management platform active-standby switching system, method and device and computer equipment
CN115344550A (en) Method, device and medium for cloning directories of distributed file system
CN110121712A (en) A kind of blog management method, server and Database Systems
CN109947592A (en) A kind of method of data synchronization, device and relevant device
US11341159B2 (en) In-stream data load in a replication environment
US11093465B2 (en) Object storage system with versioned meta objects
CN108664353A (en) The method, apparatus and replica management server that data are restored

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
GR01 Patent grant
GR01 Patent grant