CN110362429A - Continuous data protection method, system, equipment and the medium of database - Google Patents

Continuous data protection method, system, equipment and the medium of database Download PDF

Info

Publication number
CN110362429A
CN110362429A CN201910628979.XA CN201910628979A CN110362429A CN 110362429 A CN110362429 A CN 110362429A CN 201910628979 A CN201910628979 A CN 201910628979A CN 110362429 A CN110362429 A CN 110362429A
Authority
CN
China
Prior art keywords
database
time
updated
calculate node
user
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
CN201910628979.XA
Other languages
Chinese (zh)
Other versions
CN110362429B (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.)
Excellent Polytron Technologies Inc
Original Assignee
Excellent Polytron Technologies Inc
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 Excellent Polytron Technologies Inc filed Critical Excellent Polytron Technologies Inc
Priority to CN201910628979.XA priority Critical patent/CN110362429B/en
Publication of CN110362429A publication Critical patent/CN110362429A/en
Application granted granted Critical
Publication of CN110362429B publication Critical patent/CN110362429B/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

Abstract

The present invention is more particularly directed to the continuous data protection method of database, system, equipment and media.Database includes first database and the second database, first database is visible to user, second database is invisible to user, second database late replicating first database, first database is the first database of first time, second database is the first database of the second time, and the second time, method included: to receive the instruction for the first database for giving the third time for change than first time delay scheduled time section;According to the instruction for the first database for giving the third time for change, the second database is updated, updated second database is the first database of third time, and the third time is between first time and the second time;Updated second database is switched to user as it can be seen that updated second database is switched to new first database.The purpose of continuous data protection may be implemented under the scene of database maloperation or database corruption in the present invention.

Description

Continuous data protection method, system, equipment and the medium of database
Technical field
The present invention relates to database fields, the in particular to continuous data protection method of database, system, equipment and Jie Matter.
Background technique
Currently, under the scene of database maloperation or database corruption, for the database before giving for change, industry is logical Frequently with following three kinds of modes:
The first is full dose cold standby to be carried out to database, and combine Incremental Log, by returning shelves operation, before giving for change Database.But this mode needs backup database being updated to time before breaking down from the full dose cold standby time, it is extensive The multiple time is slower.
Second is to be flashed back by inverse operation to database, the database before giving for change.But this mode logarithm It is restricted according to the action type in library, for example, if the action type of database is DDL operation, since inverse behaviour is not supported in DDL operation Make, therefore can not flash back to database.
The third is usage history snapshot, gives the database of Snapshot time for change.But the recovery time of this mode also compared with Slowly, and the database of particular snapshot time can only be given for change, rather than the database before breaking down, therefore user is come It says, may cause unnecessary loss of data.
Summary of the invention
The purpose of the present invention is to provide the continuous data protection method of database, system, equipment and media, in database Under the scene of maloperation or database corruption, any point-in-time in the regular period can be restored to give database for change, it is extensive Complex velocity is fast, and there is no limit realize the purpose of continuous data protection to the action type of database.
The invention discloses a kind of continuous data protection method of database, database includes first database and the second number According to library, first database to user as it can be seen that the second database is invisible to user, second the first data of database late replicating Library, first database are the first database of first time, and the second database is the first database of the second time, the second time Than first time delay scheduled time section, method includes:
Receive the instruction for giving the first database of third time for change;
According to the instruction for the first database for giving the third time for change, the second database, updated second database are updated For the first database of third time, the third time is between first time and the second time;
Updated second database is switched to user as it can be seen that updated second database is switched to newly First database.
Optionally, first database is provided by the first calculate node, and the second database is provided by the second calculate node, is being prolonged The configuration of the second calculate node is lower than the configuration of the first calculate node when duplication late, and when updating, the configuration of the second calculate node is high In the configuration of the first calculate node.
Optionally, in late replicating the second calculate node configuration be lower than the first calculate node configuration, update when The configuration of second calculate node is equal to the configuration of the first calculate node.
Optionally, in late replicating the second calculate node configuration be equal to the first calculate node configuration, update when The configuration of second calculate node is higher than the configuration of the first calculate node.
Optionally, configuration of the configuration of the second calculate node equal to the first calculate node in the updated.
Optionally, it is arranged according to delay time and is instructed, predetermined amount of time is set.
Optionally, according to the Incremental Log between third time and the second time, the second database is updated.
The invention discloses a kind of continuous data protection system of database, database includes first database and the second number According to library, first database to user as it can be seen that the second database is invisible to user, second the first data of database late replicating Library, first database are the first database of first time, and the second database is the first database of the second time, the second time Than first time delay scheduled time section, system includes:
Receiving module is configured as receiving the instruction for the first database for giving the third time for change;
Update module is configured as the instruction according to the first database for giving the third time for change, updates the second database, more The second database after new is the first database of third time, and the third time is between first time and the second time;
Switching module is configured as updated second database being switched to user as it can be seen that will be updated Second database is switched to new first database.
Optionally, first database is provided by the first calculate node, and the second database is provided by the second calculate node, is being prolonged The configuration of the second calculate node is lower than the configuration of the first calculate node when duplication late, and when updating, the configuration of the second calculate node is high In the configuration of the first calculate node.
Optionally, in late replicating the second calculate node configuration be lower than the first calculate node configuration, update when The configuration of second calculate node is equal to the configuration of the first calculate node.
Optionally, in late replicating the second calculate node configuration be equal to the first calculate node configuration, update when The configuration of second calculate node is higher than the configuration of the first calculate node.
Optionally, configuration of the configuration of the second calculate node equal to the first calculate node in the updated.
Optionally, system further include: setup module is configured as that instruction is arranged according to delay time, the predetermined time is arranged Section.
Optionally, update module carries out the second database according to the Incremental Log between third time and the second time It updates.
The invention discloses a kind of continuous data protection equipment of database, equipment includes being stored with the executable finger of computer The memory and processor of order, processor are configured as executing instruction the continuous data protection method with implementation database, data Library includes first database and the second database, first database to user as it can be seen that the second database is invisible to user, second Database late replicating first database, first database is the first database of first time, when the second database is second Between first database, the second time included: than first time delay scheduled time section, method
Receive the instruction for giving the first database of third time for change;
According to the instruction for the first database for giving the third time for change, the second database, updated second database are updated For the first database of third time, the third time is between first time and the second time;
Updated second database is switched to user as it can be seen that updated second database is switched to newly First database.
The invention discloses a kind of computer storage medium using computer program code, computer program includes referring to It enables, instruction is executed by more than one computer with the continuous data protection method of implementation database, and database includes the first number According to library and the second database, for first database to user as it can be seen that the second database is invisible to user, the delay of the second database is multiple First database processed, first database are the first database of first time, and the second database is the first data of the second time Library, the second time includes: than first time delay scheduled time section, method
Receive the instruction for giving the first database of third time for change;
According to the instruction for the first database for giving the third time for change, the second database, updated second database are updated For the first database of third time, the third time is between first time and the second time;
Updated second database is switched to user as it can be seen that updated second database is switched to newly First database.
Compared with prior art, the present invention the main distinction and its effect are:
Firstly, the present invention can be generally applicable to carry out the type of database of data redundancy using " duplication " mode, including Relevant database (Typical Representative MySQL) and non-relational database (Typical Representative MongoDB), database include the first number According to library and the second database, for first database to user as it can be seen that the second database is invisible to user, first database has the One IP address, the second database have the second IP address, the second database late replicating first database, first database the The first database of one time, the second database are the first database of the second time, and the second time is more pre- than postponing at the first time It fixes time section.Wherein first database can be primary database, the second database can for from database (or backup database), User such as can be written and read at the operation in first database, and sightless second database is synchronizing always first database, To realize continuous data protection, and it will not influence the normal operating of user usually.
Secondly, the present invention is when receiving the instruction of the first database from the user for giving the third time for change, the instruction It is sent to the second database, the duplicating process of the second database can be stopped, and according to the instruction, updates the second data Library, updated second database be the third time first database, the third time at the first time and the second time between, So as to any point-in-time that is restored in the regular period to give database for change.
Again, updated second database can be switched to user it is seen, for example, the second IP address quilt by the present invention It is set as it can be seen that user can choose continues the operation such as read-write in first database, or second in the updated is several According to the operation such as being written and read on library, updated second database can also be switched to new first database, example by the present invention If the second IP address is replaced by the first IP address, the operations such as user can directly be written and read in new first database, To realize that database returns shelves, database maloperation or the influence of database corruption can be eliminated.
Again, first database of the invention is provided by the first calculate node, and the second database is mentioned by the second calculate node For wherein calculate node can be the virtual machine nodes of equal offers on cloud, the configuration of the second calculate node in late replicating Lower than the configuration of the first calculate node, so as to reduce backup cost, when updating, the configuration of the second calculate node is higher than the The configuration of one calculate node, so as to accelerate the speed that database is given for change, the configuration of the second calculate node is equal in the updated The configuration of first calculate node, so as to which the configuration of the second calculate node is adjusted to standard state.
Again, for the present invention when receiving delay time setting instruction from the user, which is sent to the second number According to library, and according to the instruction, predetermined amount of time is set, and user can pre-define the predetermined amount of time, and allow user Flexible setting is carried out, which can return the period of shelves, if predetermined amount of time is longer, can look for Return relatively long before database, if predetermined amount of time is shorter, the fast speed that database is given for change, especially for large capacity For database, compared to above-mentioned industry usual way, resume speed can have several times promotion.
Finally, the present invention is updated the second database according to the Incremental Log between third time and the second time, The operations such as the read-write that wherein user carries out in first database can be recorded in Incremental Log, when updating the second database When, the user's operation between third time and the second time is applied to the second database, so as to give the third time for change First database, to the action type of database, there is no limit, can also for example, if the action type of database is DDL operation To give database for change.
Detailed description of the invention
Fig. 1 is the hardware block diagram of the terminal of the continuous data protection method of database of the invention;
Fig. 2 is the schematic diagram of the continuous data protection method of the database of first embodiment according to the present invention;
Fig. 3 is the flow diagram of the continuous data protection method of the database of first embodiment according to the present invention;
Fig. 4 is the structural schematic diagram of the continuous data protection system of the database of second embodiment according to the present invention.
Specific embodiment
To keep purpose and the technical solution of the embodiment of the present invention clearer, below in conjunction with the attached of the embodiment of the present invention Figure, is clearly and completely described the technical solution of the embodiment of the present invention.Obviously, described embodiment is of the invention A part of the embodiment, instead of all the embodiments.Based on described the embodiment of the present invention, those of ordinary skill in the art Every other embodiment obtained, shall fall within the protection scope of the present invention under the premise of being not necessarily to creative work.
According to the present invention embodiment there is provided a kind of embodiment of the continuous data protection method of database, need Illustrate, step shown in the flowchart of the accompanying drawings can be in a computer system such as a set of computer executable instructions It executes, although also, logical order is shown in flow charts, and it in some cases, can be to be different from herein suitable Sequence executes shown or described step.
Method implementation provided by the application mode can be held in mobile terminal, terminal or server Row.For running on computer terminals, Fig. 1 is the continuous data protection method of the database of embodiment according to the present invention Terminal hardware block diagram.As shown in Figure 1, terminal 100 may include one or more (only shows in figure One out) (processor 101 can include but is not limited to central processor CPU, image processor GPU, number letter to processor 101 The processing unit of number processor DSP, Micro-processor MCV or programmable logic device FPGA etc.), the input for being interacted with user Output interface 102, memory 103 for storing data and the transmitting device 104 for communication function, processor 101, Input/output interface 102, memory 103 and transmitting device 104 are connected to each other via bus 105.Ordinary skill people Member does not cause to limit it is appreciated that structure shown in FIG. 1 only signal to the structure of above-mentioned electronic device.For example, calculating Machine terminal 100 may also include than shown in Fig. 1 more perhaps less component or with the configuration different from shown in Fig. 1.
Memory 103 can be used for storing data library, queue, application software software program and module, such as present invention is real Corresponding program instruction/the module of continuous data protection method of the database in mode is applied, processor 101 is stored in by operation Software program and module in memory 103 realize above-mentioned number thereby executing various function application and data processing According to the continuous data protection method in library.Memory 103 may include high speed random access memory, may also include nonvolatile memory, Such as one or more magnetic storage device, flash memory or other non-volatile solid state memories.In some instances, it stores Device 103 can further comprise the memory remotely located relative to processor 101, these remote memories can be connected by network It is connected to terminal 100.The example of above-mentioned network includes but is not limited to internet, intranet, local area network, mobile communication Net and combinations thereof.
Transmitting device 104 is used to that data to be received or sent via network, and network may include various connection types, such as Wired, wireless communication link or fiber optic cables etc..Above-mentioned network specific example may include the communication of terminal 100 The internet that supplier provides.
The first embodiment of the present invention is related to a kind of continuous data protection method of database, database includes the first number According to library and the second database, for first database to user as it can be seen that the second database is invisible to user, the delay of the second database is multiple First database processed, first database are the first database of first time, and the second database is the first data of the second time Library, the second time is than first time delay scheduled time section.
Fig. 2 is the schematic diagram of the continuous data protection method of the database.Specifically, as shown in Fig. 2, this method can be general All over the type of database for being suitable for carrying out data redundancy using " duplication " mode, including relevant database (Typical Representative MySQL) and non-relational database (Typical Representative MongoDB), database includes first database A1 and the second database A2, For first database A1 to user as it can be seen that the second database A2 is invisible to user, first database A1 has the first IP address IP1, the second database A2 have the second IP address IP2, the second database A2 late replicating first database A1, first database The first database A1, the second database A2 that A1 is first time T1 are the first database A1 of the second time T2, the second time T2 can be current time than first time T1 delay scheduled time section Δ T, first time T1, give the first number for change when user sends According to library A1 instruction when, current time be instruction sending time, for example, user gives first database A1 for change in 9 points of morning transmissions Instruction, first database A1 is 9 points of the morning of first database A1 at this time, if predetermined amount of time Δ T is 1 hour, this When the second database A2 be 8 a.m. first database A1.Wherein first database A1 can be primary database, the second data Library A2 can be the operations such as user can be written and read on first database A1 from database (or backup database), can not The the second database A2 seen is synchronizing always first database A1, to realize continuous data protection, and will not influence user Normal operating usually.
When receiving the instruction of the first database A1 from the user for giving third time T3 for change, which is sent to Second database A2 can stop the duplicating process of the second database A2, and according to the instruction, update the second database A2, Updated second database A2 is the first database A1 of third time T3, and the third time, T3 was in first time T1 and second Between between T2, the third time, T3 can be the time before database maloperation or database corruption, for example, third time T3 For 8 a.m. 40 divides 00 second, 8 a.m. 23 divides 08 second or 8 a.m. 56 divides 35 seconds etc., so as to be restored in the regular period Any point-in-time to give database for change.
Updated second database A2 can be switched to user it is seen, for example, the second IP address IP2 is arranged to As it can be seen that user can choose continues the operation such as read-write, or the second database in the updated on first database A1 It the operation such as is written and read on A2, updated second database A2 can also be switched to new first database A1, such as the The behaviour such as two IP address IP2 are replaced by the first IP address IP1, and user can directly be written and read on new first database A1 Make, to realize that database returns shelves, database maloperation or the influence of database corruption can be eliminated.
First database A1 is provided by the first calculate node, and the second database A2 is provided by the second calculate node, is fallen into a trap Operator node can be the virtual machine nodes of equal offers on cloud, and in late replicating, the configuration of the second calculate node A2 is lower than first The configuration of calculate node A1, so as to reduce backup cost, when updating, the configuration of the second calculate node A2 is higher than the first meter The configuration of operator node A1, so as to accelerate the speed that database is given for change, the configuration of the second calculate node A2 is equal in the updated The configuration of first calculate node A1, so as to which the configuration of the second calculate node A2 is adjusted to standard state.It is appreciated that meter The configuration of operator node includes CPU, memory and/or the IO ability etc. of calculate node.
When receiving delay time setting instruction from the user, which is sent to the second database A2, and According to the instruction, predetermined amount of time Δ T is set, and wherein predetermined amount of time Δ T can be 1 hour, 0.5 hour, 2 hours, 1 week, 1 A month etc., user can pre-define predetermined amount of time Δ T, and user is allowed to carry out flexible setting, the predetermined amount of time Δ T referred database can return the period of shelves, for example, if predetermined amount of time Δ T be 1 hour, can return shelves to 1 hour it It is interior, if predetermined amount of time Δ T longer, can give for change relatively long before database, if predetermined amount of time Δ T is shorter, The fast speed that database is given for change, compared to above-mentioned industry usual way, is restored for the database of large capacity Speed can have several times promotion.
According to the Incremental Log between third time T3 and the second time T2, the second database A2 is updated, wherein The operations such as the read-write that user carries out on first database A1 can be recorded in Incremental Log, as the second database A2 of update When, the user's operation between third time T3 and the second time T2 is applied to the second database A2, so as to give third for change The first database A1 of time T3, to the action type of database, there is no limit for example, if the action type of database is DDL operation, can also give database for change.
Fig. 3 is the flow diagram of the continuous data protection method of the database.Specifically, as shown in figure 3, the database Continuous data protection method the following steps are included:
Step 302, the instruction for giving the first database of third time for change is received;
Step 304, according to the instruction for the first database for giving the third time for change, the second database is updated, updated the Two databases are the first database of third time, and the third time is between first time and the second time;
Step 306, updated second database is switched to user as it can be seen that by updated second database It is switched to new first database.
Wherein, this method can be generally applicable to carry out the type of database of data redundancy using " duplication " mode, including Relevant database (Typical Representative MySQL) and non-relational database (Typical Representative MongoDB), database include the first number According to library and the second database, for first database to user as it can be seen that the second database is invisible to user, first database has the One IP address, the second database have the second IP address, the second database late replicating first database, first database the The first database of one time, the second database are the first database of the second time, and the second time is more pre- than postponing at the first time It fixes time section, can be at the first time current time, when user, which sends, gives the instruction of first database for change, current time is to refer to Sending time is enabled, for example, user sends the instruction for giving first database for change at 9 points of the morning, first database is 9 points of the morning at this time First database, if predetermined amount of time be 1 hour, at this time the second database be 8 a.m. first database.Wherein First database can be primary database, and the second database can be for from database (or backup database), and user can be the The operation such as it is written and read on one database, sightless second database synchronize always first database, to realize continuously Data protection, and will not influence the normal operating of user usually.
Wherein, when receiving the instruction of the first database from the user for giving the third time for change, which is sent To the second database, the duplicating process of the second database can be stopped, and according to the instruction, update the second database, update The second database afterwards is the first database of third time, the third time at the first time between the second time, when third Between can be time before database maloperation or database corruption, for example, the third time be 8 a.m. 40 divide 00 second, 8 a.m. 23 divides 08 second or 8 a.m. 56 divides 35 seconds etc., so as to any point-in-time that is restored in the regular period to give for change Database.
Wherein it is possible to be switched to updated second database to user it is seen, for example, the second IP address is arranged to As it can be seen that user can choose continues the operation such as read-write in first database, or on the second database in the updated It the operation such as is written and read, updated second database can also be switched to new first database, such as the second IP address It is replaced by the first IP address, the operation such as user can directly be written and read in new first database, to realize data Shelves are returned in library, can eliminate database maloperation or the influence of database corruption.
Optionally, first database is provided by the first calculate node, and the second database is provided by the second calculate node, is being prolonged The configuration of the second calculate node is lower than the configuration of the first calculate node when duplication late, and when updating, the configuration of the second calculate node is high In the configuration of the first calculate node.
Wherein, calculate node can be the virtual machine nodes of equal offers on cloud, the second calculate node in late replicating Configuration be lower than the first calculate node configuration, so as to reduce backup cost, update when the second calculate node configuration Higher than the configuration of the first calculate node, so as to accelerate the speed that database is given for change.It is appreciated that the configuration packet of calculate node Include the CPU, memory and/or IO ability etc. of calculate node.
Optionally, in late replicating the second calculate node configuration be lower than the first calculate node configuration, so as to Backup cost is reduced, the configuration of the second calculate node is equal to the configuration of the first calculate node when updating.
Optionally, in late replicating the second calculate node configuration be equal to the first calculate node configuration, update when The configuration of second calculate node is higher than the configuration of the first calculate node, so as to accelerate the speed that database is given for change.
Optionally, the configuration of the second calculate node is equal to the configuration of the first calculate node in the updated, so as to by the The configuration of two calculate nodes is adjusted to standard state.
Optionally, it is arranged according to delay time and is instructed, predetermined amount of time is set.
Wherein, when receiving delay time setting instruction from the user, which is sent to the second database, and And according to the instruction, predetermined amount of time is set, wherein predetermined amount of time can be 1 hour, 0.5 hour, 2 hours, 1 week, 1 month Deng, user can pre-define the predetermined amount of time, and allow user carry out flexible setting, the predetermined amount of time designation date Library can return the period of shelves, for example, shelves can be returned within an hour if predetermined amount of time is 1 hour, if it is pre- periodically Between section it is longer, then can give for change relatively long before database, if predetermined amount of time is shorter, speed that database is given for change compared with Fastly, for especially for the database of large capacity, compared to above-mentioned industry usual way, resume speed can have several times to mention It rises.
Optionally, according to the Incremental Log between third time and the second time, the second database is updated.
Wherein, the operations such as the read-write that user carries out in first database can be recorded in Incremental Log, work as update When the second database, the user's operation between third time and the second time is applied to the second database, so as to give for change The first database of third time, to the action type of database, there is no limit for example, if the action type of database is DDL operation, can also give database for change.
Second embodiment of the present invention is related to a kind of continuous data protection system of database, and database includes the first number According to library and the second database, for first database to user as it can be seen that the second database is invisible to user, the delay of the second database is multiple First database processed, first database are the first database of first time, and the second database is the first data of the second time Library, the second time is than first time delay scheduled time section.
Fig. 4 is the structural schematic diagram of the continuous data protection system of the database.Specifically, as shown in figure 4, the database Continuous data protection system include:
Receiving module is configured as receiving the instruction for the first database for giving the third time for change;
Update module is configured as the instruction according to the first database for giving the third time for change, updates the second database, more The second database after new is the first database of third time, and the third time is between first time and the second time;
Switching module is configured as updated second database being switched to user as it can be seen that will be updated Second database is switched to new first database.
Optionally, first database is provided by the first calculate node, and the second database is provided by the second calculate node, is being prolonged The configuration of the second calculate node is lower than the configuration of the first calculate node when duplication late, and when updating, the configuration of the second calculate node is high In the configuration of the first calculate node.
Optionally, in late replicating the second calculate node configuration be lower than the first calculate node configuration, update when The configuration of second calculate node is equal to the configuration of the first calculate node.
Optionally, in late replicating the second calculate node configuration be equal to the first calculate node configuration, update when The configuration of second calculate node is higher than the configuration of the first calculate node.
Optionally, configuration of the configuration of the second calculate node equal to the first calculate node in the updated.
Optionally, system further include: setup module is configured as that instruction is arranged according to delay time, the predetermined time is arranged Section.
Optionally, update module carries out the second database according to the Incremental Log between third time and the second time It updates.
First embodiment is method implementation corresponding with present embodiment, and present embodiment can be implemented with first Mode is worked in coordination implementation.The relevant technical details mentioned in first embodiment are still effective in the present embodiment, in order to It reduces and repeats, which is not described herein again.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in the first implementation In mode.
Third embodiment of the present invention is related to a kind of continuous data protection equipment of database, and equipment includes being stored with meter The memory and processor of calculation machine executable instruction, processor are configured as executing instruction the continuous data guarantor with implementation database Maintaining method, database include first database and the second database, and first database is to user as it can be seen that the second database is to user Invisible, the second database late replicating first database, first database is the first database of first time, the second data Library is the first database of the second time, and the second time included: than first time delay scheduled time section, method
Receive the instruction for giving the first database of third time for change;
According to the instruction for the first database for giving the third time for change, the second database, updated second database are updated For the first database of third time, the third time is between first time and the second time;
Updated second database is switched to user as it can be seen that updated second database is switched to newly First database.
First embodiment is method implementation corresponding with present embodiment, and present embodiment can be implemented with first Mode is worked in coordination implementation.The relevant technical details mentioned in first embodiment are still effective in the present embodiment, in order to It reduces and repeats, which is not described herein again.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in the first implementation In mode.
4th embodiment of the invention is related to a kind of computer storage medium using computer program code, computer Program includes instruction, and instruction is executed by more than one computer with the continuous data protection method of implementation database, database Including first database and the second database, to user as it can be seen that the second database is invisible to user, second counts first database According to library late replicating first database, first database is the first database of first time, and the second database was the second time First database, the second time included: than first time delay scheduled time section, method
Receive the instruction for giving the first database of third time for change;
According to the instruction for the first database for giving the third time for change, the second database, updated second database are updated For the first database of third time, the third time is between first time and the second time;
Updated second database is switched to user as it can be seen that updated second database is switched to newly First database.
First embodiment is method implementation corresponding with present embodiment, and present embodiment can be implemented with first Mode is worked in coordination implementation.The relevant technical details mentioned in first embodiment are still effective in the present embodiment, in order to It reduces and repeats, which is not described herein again.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in the first implementation In mode.
It should be noted that each method embodiment of the invention can be realized in a manner of software, hardware, firmware etc.. Regardless of the present invention is realized in a manner of software, hardware or firmware, instruction code may be stored in any kind of computer In addressable memory (such as permanent perhaps revisable volatibility is perhaps non-volatile solid or non-solid State, fix or replaceable medium etc.).Equally, memory may, for example, be programmable logic array (Programmable Array Logic, referred to as " PAL "), random access memory (Random Access Memory, referred to as " RAM "), programmable read only memory (Programmable Read Only Memory, referred to as " PROM "), read-only memory (Read-Only Memory, referred to as " ROM "), electrically erasable programmable read-only memory (Electrically Erasable Programmable ROM, referred to as " EEPROM "), disk, CD, digital versatile disc (Digital Versatile Disc, Referred to as " DVD ") etc..
It should be noted that each unit/the module mentioned in each equipment embodiment of the present invention is all logic unit/mould Block, physically, a logic unit can be a physical unit, are also possible to a part of a physical unit, may be used also With with the combination of multiple physical units realization, the Physical realization of these logic units itself be not it is most important, these The combination for the function that logic unit is realized is only the key for solving technical problem proposed by the invention.In addition, for protrusion Innovative part of the invention, the above-mentioned each equipment embodiment of the present invention is not by the technical problem proposed by the invention with solution The less close unit of relationship introduces, this does not indicate above equipment embodiment and there is no other units.
It should be noted that in the claim and specification of this patent, such as first and second or the like relationship Term is only used to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying There are any actual relationship or orders between these entities or operation.Moreover, the terms "include", "comprise" or its Any other variant is intended to non-exclusive inclusion so that include the process, methods of a series of elements, article or Equipment not only includes those elements, but also including other elements that are not explicitly listed, or further include for this process, Method, article or the intrinsic element of equipment.In the absence of more restrictions, being wanted by what sentence " including one " limited Element, it is not excluded that there is also other identical elements in the process, method, article or apparatus that includes the element.
Although being shown and described to the present invention by referring to some of the preferred embodiment of the invention, It will be understood by those skilled in the art that can to it, various changes can be made in the form and details, without departing from this hair Bright spirit and scope.

Claims (10)

1. a kind of continuous data protection method of database, which is characterized in that the database includes first database and second Database, to user as it can be seen that second database is invisible to user, second database postpones the first database The first database is replicated, the first database is the first database of first time, and second database is The first database of second time, second time is than the first time delay scheduled time section, the method packet It includes:
Receive the instruction for giving the first database of third time for change;
According to the instruction for the first database for giving the third time for change, second database, updated institute are updated The first database that the second database is the third time is stated, the third time is in the first time and described the Between two times;
Updated second database is switched to user as it can be seen that updated second database is switched For new first database.
2. the method according to claim 1, wherein the first database is provided by the first calculate node, institute The second database is stated to be provided by the second calculate node, in late replicating described in the second calculate node configuration be lower than described first The configuration of calculate node, update when described in the second calculate node configuration be higher than first calculate node configuration.
3. according to the method described in claim 2, it is characterized in that, matching for the second calculate node described in late replicating is set low In the configuration of first calculate node, when updating described in the configuration of the second calculate node be equal to first calculate node Configuration.
4. according to the method described in claim 2, it is characterized in that, the configuration etc. of the second calculate node described in late replicating In the configuration of first calculate node, when updating described in the configuration of the second calculate node be higher than first calculate node Configuration.
5. method according to any one of claim 2 to 4, which is characterized in that second calculate node in the updated Configuration be equal to first calculate node configuration.
6. instructing the method according to claim 1, wherein being arranged according to delay time, the pre- timing is set Between section.
7. the method according to claim 1, wherein according between the third time and second time Incremental Log is updated second database.
8. a kind of continuous data protection system of database, which is characterized in that the database includes first database and second Database, to user as it can be seen that second database is invisible to user, second database postpones the first database The first database is replicated, the first database is the first database of first time, and second database is The first database of second time, second time is than the first time delay scheduled time section, the system packet It includes:
Receiving module is configured as receiving the instruction for the first database for giving the third time for change;
Update module is configured as the instruction according to the first database for giving the third time for change, updates described second Database, updated second database are the first database of the third time, and the third time is in institute It states at the first time between second time;
Switching module is configured as updated second database being switched to user as it can be seen that will be updated Second database is switched to new first database.
9. a kind of continuous data protection equipment of database, which is characterized in that the equipment includes being stored with computer can be performed The memory and processor of instruction, the processor is configured to executing described instruction with the continuous data protection of implementation database Method, the database include first database and the second database, and the first database is to user as it can be seen that second number It is invisible to user according to library, first database described in the second database late replicating, when the first database is first Between the first database, second database is the first database of the second time, and second time compares institute State first time delay scheduled time section, which comprises
Receive the instruction for giving the first database of third time for change;
According to the instruction for the first database for giving the third time for change, second database, updated institute are updated The first database that the second database is the third time is stated, the third time is in the first time and described the Between two times;
Updated second database is switched to user as it can be seen that updated second database is switched For new first database.
10. a kind of computer storage medium using computer program code, which is characterized in that the computer program includes referring to It enables, described instruction is executed by more than one computer with the continuous data protection method of implementation database, the database packet Include first database and the second database, the first database to user as it can be seen that second database is invisible to user, First database described in the second database late replicating, the first database are first data of first time Library, second database are the first database of the second time, and second time is more pre- than first time delay It fixes time section, which comprises
Receive the instruction for giving the first database of third time for change;
According to the instruction for the first database for giving the third time for change, second database, updated institute are updated The first database that the second database is the third time is stated, the third time is in the first time and described the Between two times;
Updated second database is switched to user as it can be seen that updated second database is switched For new first database.
CN201910628979.XA 2019-07-12 2019-07-12 Continuous data protection method, system, device and medium for database Active CN110362429B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910628979.XA CN110362429B (en) 2019-07-12 2019-07-12 Continuous data protection method, system, device and medium for database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910628979.XA CN110362429B (en) 2019-07-12 2019-07-12 Continuous data protection method, system, device and medium for database

Publications (2)

Publication Number Publication Date
CN110362429A true CN110362429A (en) 2019-10-22
CN110362429B CN110362429B (en) 2021-08-06

Family

ID=68219115

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910628979.XA Active CN110362429B (en) 2019-07-12 2019-07-12 Continuous data protection method, system, device and medium for database

Country Status (1)

Country Link
CN (1) CN110362429B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102388361A (en) * 2009-04-03 2012-03-21 微软公司 Differential file and system restores from peers and the cloud
US8972353B1 (en) * 2011-12-02 2015-03-03 Emc Corporation System and method of enhanced backup and recovery configuration
CN107077404A (en) * 2014-10-28 2017-08-18 微软技术许可有限责任公司 From the time point database recovery of storage snapshot
CN109032849A (en) * 2018-08-30 2018-12-18 百度在线网络技术(北京)有限公司 Hot backup system, heat backup method and computer equipment
CN109828950A (en) * 2019-01-29 2019-05-31 深圳前海达闼云端智能科技有限公司 Data protection method, management system, server and readable storage medium
CN109871295A (en) * 2017-12-01 2019-06-11 北京金山云网络技术有限公司 A kind of data back up method, back-up device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102388361A (en) * 2009-04-03 2012-03-21 微软公司 Differential file and system restores from peers and the cloud
US8972353B1 (en) * 2011-12-02 2015-03-03 Emc Corporation System and method of enhanced backup and recovery configuration
CN107077404A (en) * 2014-10-28 2017-08-18 微软技术许可有限责任公司 From the time point database recovery of storage snapshot
CN109871295A (en) * 2017-12-01 2019-06-11 北京金山云网络技术有限公司 A kind of data back up method, back-up device, electronic equipment and storage medium
CN109032849A (en) * 2018-08-30 2018-12-18 百度在线网络技术(北京)有限公司 Hot backup system, heat backup method and computer equipment
CN109828950A (en) * 2019-01-29 2019-05-31 深圳前海达闼云端智能科技有限公司 Data protection method, management system, server and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
马青纯,: "基于Docker的云存储服务系统设计与实现", 《中国优秀硕士学位论文全文数据库信息科技辑(月刊)》 *

Also Published As

Publication number Publication date
CN110362429B (en) 2021-08-06

Similar Documents

Publication Publication Date Title
US9367598B2 (en) Merging an out of synchronization indicator and a change recording indicator in response to a failure in consistency group formation
US9934102B2 (en) Automatic adjustment of data replication based on data access
WO2007103141A2 (en) Method and apparatus for providing virtual machine backup
CN103761165A (en) Log backup method and log backup device
CN108694231A (en) Using NVM and by multiple log recording buffers come ahead log recording
WO2014060882A1 (en) Consistency group management
US20190347245A1 (en) Determining when a change set was delivered to a workspace or stream and by whom
CN114722092A (en) Time series data processing method, system, storage medium and electronic equipment
CN109933461A (en) A kind of method and apparatus of data processing
CN105608150A (en) Business data processing method and system
CN104503868A (en) Data synchronizing method, device and system
CN117555966A (en) Database master-slave synchronization method, device, equipment and readable storage medium
CN111078418B (en) Operation synchronization method, device, electronic equipment and computer readable storage medium
CN110362429A (en) Continuous data protection method, system, equipment and the medium of database
CN109271278B (en) Method and device for determining number of references of disk snapshot data slices
CN110377616A (en) A kind of data-erasure method, device, electronic equipment and storage medium
CN113448774B (en) Method, system, device and medium for optimizing copy-on-write storage snapshot management
CN109656901A (en) Data processing method and device, electronic equipment
US20230132158A1 (en) Process flow managment method and device
CN110362556A (en) Operating method, system, equipment and the medium of database
CN113688142B (en) Index management method, device, storage medium and electronic equipment
CN114547144B (en) Time sequence data range query method, device and equipment
CN111831206B (en) Storage space switching method and back-end monitoring system
CN116431063A (en) Streaming data processing method and device, electronic equipment and storage medium
CN110955556B (en) Database recovery method and device, storage medium and database system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant