CN101739313B - Method for protecting and restoring continuous data - Google Patents

Method for protecting and restoring continuous data Download PDF

Info

Publication number
CN101739313B
CN101739313B CN2009102729250A CN200910272925A CN101739313B CN 101739313 B CN101739313 B CN 101739313B CN 2009102729250 A CN2009102729250 A CN 2009102729250A CN 200910272925 A CN200910272925 A CN 200910272925A CN 101739313 B CN101739313 B CN 101739313B
Authority
CN
China
Prior art keywords
time
data
write operation
recovery
metadata
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.)
Active
Application number
CN2009102729250A
Other languages
Chinese (zh)
Other versions
CN101739313A (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.)
Huazhong University of Science and Technology
Original Assignee
Huazhong University of Science and Technology
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 Huazhong University of Science and Technology filed Critical Huazhong University of Science and Technology
Priority to CN2009102729250A priority Critical patent/CN101739313B/en
Publication of CN101739313A publication Critical patent/CN101739313A/en
Application granted granted Critical
Publication of CN101739313B publication Critical patent/CN101739313B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a method for protecting and restoring continuous data, belongs to the computer data storage and backup method and aims to solve the problem that appropriate restoring time is difficult to identify by the existing method for protecting and restoring continuous data. In the invention, a host computer process and a server process are provided, the two processes are carried out in parallel; the host computer process comprises the following steps: initiating connection, copying, host computer command judgment, recording write operation info, carrying out full restoration and incrementation storage; the server process comprises the following steps: accepting connection, storing copied data by the server, command judgment by the server, write operation info storage by the sever, restoring request judgment and restoring data. With the method of the invention adopted, user requests for storing data to any-point-in-time can be supported and write data needed for completing restoration can be minimized; in addition, restoration time can be more conveniently and more effectively adjusted to seek appropriate recovery points and data loss can be minimized. The host computer and the server are separated, so that when a local host computer hard disk is damaged, data restoration can still be carried out.

Description

A kind of continuous data protection and restoration methods
Technical field
The invention belongs to computer data storage and backup method, be specifically related to a kind of restoration methods of continuous data protection system.
Background technology
Along with enterprise handles increasing progressively of degree of dependence to data, losing of low volume data can cause a large amount of economic losses.Traditional data backup and recovery adopt periodic backup and snapshot to realize always.Traditional backup mode and snapshot can only be accomplished to the data of set time point and recover, and the Data Update between twice backup can't be protected.Increase along with data volume; The traditional backup mode and the RPO of snapshot (Recovery Point Objective; The data recovery point objectives) and RTO (Recovery Time Objective; Release time target) just seem long, this is unacceptable for some to the very high infosystem of data dependence.This type systematic requires operation incessantly in a day 24 hours usually, and the break in service of short time or a spot of loss of data all possibly bring huge traffic lost.This has just impelled a kind of new data protection and recovery technology---the appearance of continuous data protection (CDP, Continuous Data Protection) technology.
The continuous data protection technology can realize the data recovery on the random time point at short notice; It can capture all data change of file-level or block level; The data binding time stamp that changes is stored; Thereby protected all old versions of data, be implemented to the recovery of random time point.
Yang Qing etc. design a kind of disk array framework; This system provides the continuous data protection function; Can in time return to the random time point; But do not preserve all old versions of the piece that Updates Information, improve space availability ratio but the block message that Updates Information is carried out XOR (XOR) operation, this system can't realize long-distance disaster; See Q.Yang; W.Xiao; And J.Ren.TRAP-Array:A disk array architecture providing timely recovery to any point-in-time.In Proceedings of International Symposium on Computer Architecture, 2006.
Liu Jingning, Feng Dan, Zhou Ke etc. propose the continuous data protection of piece level and the restoration methods of multi-fork diary storage; See patent publication No. CN101329642; And continuous data protection of piece level and the restoration methods based on the timestamp log storage proposed, see patent publication No. CN101286127; Be respectively in order to realize repeatedly rolling back action and the time that reduces write operation, recovery operation.
But above-mentioned continuous data protection and restoration methods, carrying out a data restore operation usually needs great amount of time, if recovery point is selected too early, then can lose a lot of normal data; If recovery point was selected evening, then can not make data return to normal state again.
Summary of the invention
The present invention provides a kind of continuous data protection and restoration methods; Solve the problem that existing continuous data protection and restoration methods are difficult for confirming suitable release time; Allow the keeper repeatedly to recover efficiently; Seek suitable recovery point, even and local hard drive damage, also can carry out data through the server of far-end and recover.
In order continuous data protection to be provided for current operation main frame, main frame should connect machine with a station server.In protection was carried out, main frame occurred in all the write operation information on the data to be protected with record, comprised time of origin, data length, the physical data of write operation and write the address.Server inside comprises two memory modules: meta data manager and physical data storage, deposit metadata and physical data respectively.
Data to be protected are storage data of some disk partition of user's appointment on the main frame, wherein comprise the memory address of physical data and physical data.
A kind of continuous data protection of the present invention and restoration methods comprise host process and server process, and two parallel carrying out of process is characterized in that:
One. host process comprises:
1.1 initiation Connection Step: main frame is connected with server, changes step 1.2;
1.2 copy step: send the copying data order to server, and all data to be protected of main frame current state all are sent to server, main frame gets into by guard mode, changes step 1.3;
1.3 main frame is judged commands steps: main frame is accepted user command, and the type of judges order, if the write operation order carry out step 1.4; If the order of full dose recovery request then carry out step 1.5; If the increment recovery request command then carry out step 1.6; If other order is not operated, change step 1.3;
1.4 write operation information recording step: host record occurs in the write operation information on the data to be protected; Comprise all write operations time of origin, data length, physical data, write the address; And to the each write operation of user order produces a random number as the operation of this time write operation order number; Send write operation information and corresponding operation thereof number to server, step 1.3 is changeed in the operation that host record variables A record main frame sends number;
1.5 full dose recovery request step: main frame stops to write down the write operation information that occurs on the data to be protected, and stops the write operation after this to be applied on the data to be protected, and main frame sends the recovery request order to server; The recovery request order is the full dose recovery request; The full dose recovery request comprises release time and current time, and waiting for server is accomplished recovering information, after receiving server and accomplishing recovering information; Main frame gets into by guard mode, changes step 1.3;
1.6 increment recovery request step: main frame stops to write down the write operation information that occurs on the data to be protected, and stops the write operation after this to be applied on the data to be protected, and main frame sends the recovery request order to server; Recovery request order is the increment recovery request, and the increment recovery request comprises the operation number of current time, release time and host record variables A record, and waiting for server is responded; After receiving server response, whether judging server response for forbidding increment recovery, is then to notify the user need carry out full dose to recover; Otherwise waiting for server is accomplished recovering information; After receiving server completion recovering information, main frame gets into by guard mode, changes step 1.3;
Two. server process comprises:
2.1 accept Connection Step: when main frame is connected with server, in meta data manager, generate article one recovery operation metadata, change step 2.2;
2.2 server stores copies data step: the deposit data to be protected that main frame is sent arrives physical data storage, becomes copies data D, changes step 2.3;
2.3 server is judged commands steps: server receives main frame and sends order, and judges that main frame sends the type of order, if send the write operation message command, then carry out step 2.4; If the recovery request order then carry out step 2.5;
2.4 server stores write operation information step: server receives write operation information that main frame sends and operation thereof number; It on physical data storage the physical data memory allocated address of write operation information; And write operation information is divided into write operation metadata and physical data; Be stored in meta data manager and physical data storage respectively, step 2.3 is changeed in the operation of last write operation that server record variable B record server is received number;
2.5 recovery request determining step: judging whether recovery request order is the full dose recovery request, is execution in step 2.6 then; Otherwise judging whether the write operation operation in the recovery request order number equals variable B, be execution in step 2.7 then, otherwise the notice main frame is forbidden increment recovery, changes step 2.3 again;
2.6 full dose recovering step: carry out sub-steps:
2.6.1 receive the time of origin T of the current time of main frame transmission as this recovery operation h, accept t release time of main frame requirement, establish the value that needs time N and equal time t;
2.6.2 in meta data manager, search each recovery operation metadata, find out one and satisfy condition: T s<N<T eThe recovery operation metadata, T sBe the start time value of this recovery operation metadata, T eFor the concluding time value of this recovery operation metadata, carry out substep 2.6.3;
2.6.3 from meta data manager, find out and satisfy condition: T s<T cThe write operation metadata of<N, T cBe the timestamp of this write operation metadata, the write operation metadata that satisfies condition put into reserve search collection R, carry out substep 2.6.4;
Whether equaling the preset value X of article one recovery operation metadata 2.6.4 judge the release time of the recovery operation metadata that substep 2.6.2 finds out, is then to carry out substep 2.6.5; Otherwise the value that will need time N is made as the release time in the said recovery operation metadata, carries out substep 2.6.2;
2.6.5 search among the collection R in reserve, to the write operation metadata of same source is arranged, only keep its timestamp near the write operation metadata of t release time, form and search collection R ', carry out substep 2.6.6;
2.6.6 from physical data storage, copies data D is duplicated a D ' that is; According to all write operation metadata of searching among the collection R '; Be the address of fetching data with each bar write operation metadata store address; Pressing data length and in physical data storage, take out the physical data of respective byte, is memory address with the source address, writes among the D '; All write operation metadata are finished, and carry out substep 2.6.7;
2.6.7 resulting D ' is sent back main frame, and the data to be protected of replacement main frame revert to user's data of required release time, carry out substep 2.6.8;
2.6.8 change the concluding time of a up-to-date recovery operation metadata into time that this recovery operation takes place from Y; And by new recovery operation metadata of following value insertion, its release time, start time, concluding time are followed successively by: the time T that this t release time, this recovery operation take place h, Y;
2.7 increment recovery step: carry out sub-steps:
Send the current time C of recovery operation and t release time that main frame requires 2.7.1 accept main frame, establish the value that needs time N and equal t release time; The time of origin T of this recovery operation hBe made as current time C;
2.7.2 in meta data manager, search each recovery operation metadata, find out one and satisfy condition: T S1<N<T E1The recovery operation metadata, T S1Be the start time value of this recovery operation metadata, T E1Be the concluding time value of this recovery operation metadata, establish the start time n of record 1 1Be T S1, release time n 2Be T E1
2.7.3 in meta data manager, search each recovery operation metadata, find out one and satisfy condition: T S2<C<T E2The recovery operation metadata, T S2Be the start time value of this recovery operation metadata, T E2Be the concluding time value of this recovery operation metadata, establish the start time c of record 2 1Be T S2, release time c 2Be T E2
2.7.4 judge c 1With n 1Size: if c 1>n 1, carry out substep 2.7.5, if c 1<n 1, if rotor step 2.7.6 is c 1=n 1, rotor step 2.7.7;
2.7.5 with timestamp at c 1And the source address of the write operation metadata between the current time C is put into interim source address collection R 1, and the value of current time C is made as c 2, rotor step 2.7.3;
2.7.6 with timestamp at n 1And the source address that needs the write operation metadata between the time N is put into interim source address collection R 1, and the value of N is made as n 2, rotor step 2.7.2;
2.7.7 the source address of the write operation metadata of timestamp between C and N of write operation is put into interim source address collection R 1
2.7.8 at interim source address collection R 1In, for a plurality of same source, only keep a source address, obtain the source address set R that needs s
2.7.9, form reserve and search collection R to 2.6.4 according to the substep 2.6.2 of said full dose recovery request, carry out substep 2.7.10;
2.7.10 in meta data manager, search the write operation metadata that satisfies following three conditions simultaneously: source address is gathered R in source address sIn; Timestamp is searched among the collection R in reserve; A plurality of write operation metadata have same source, then get timestamp near that write operation metadata of t release time; The write operation metadata that satisfies above-mentioned three conditions forms result set R r
At source address set R sIn, do not comprise into result set R rSource address, each source address produces a pseudo-write operation metadata, its form is: timestamp is X, source address is original source address, memory address equals original source address, data length and result set R rIn the data length of other write operation metadata equate; All pseudo-write operation metadata are put into result set R r
2.7.11 for result set R rIn the write operation metadata, be the address of fetching data with the memory address of each bar, press data length takes out respective byte in physical data storage physical data, be memory address with the source address, write in the data to be protected of main frame; Pseudo-write operation metadata being the address of fetching data with source address, pressing data length takes out respective byte in copies data D physical data, is memory address with the source address, writes in the data to be protected of main frame; All write operation metadata are finished, and obtain the data mode that the user needs release time, carry out substep 2.7.12;
2.7.12 change the concluding time of a up-to-date recovery operation metadata into time that this recovery operation takes place from Y; And by new recovery operation metadata of following value insertion, its release time, start time, concluding time are followed successively by: the time T that this t release time, this recovery operation take place h, Y.
Described continuous data protection and restoration methods is characterized in that:
In the said server stores write operation information step, said write operation metadata comprises timestamp, source address, memory address and data length, and stores in order:
Wherein, timestamp is the time that write operation takes place, and source address is the start address of write operation on main frame, and memory address is the memory address of physical data on the server physical data storage of write operation, and data length is the physical data size of write operation; Timestamp, source address, data length are by host record, and memory address is by server-assignment;
In said full dose recovering step and the increment recovery step, said recovery operation metadata comprises release time, start time and concluding time, and stores in order:
Wherein, the time that return to for the main frame requirement release time, the start time is the moment that this time recovery operation takes place, and the concluding time generates in the following manner:
Server is set up article one recovery operation metadata at meta data manager when receiving that main frame begins guarded command: be X release time, and X is the value of setting arbitrarily, but can not conflict with the timestamp of subsequent write operation metadata; Start time is the moment that this time recovery operation takes place, and the concluding time is Y, and Y is the value of setting arbitrarily, but can not conflict with the timestamp of subsequent write operation metadata; Before new recovery operation metadata of every insertion; With before concluding time of a nearest recovery operation metadata change start time of new recovery operation metadata into from Y, the value of the new recovery operation metadata of inserting is: this time release time, this time start time, Y.
It is different to the present invention is based on the method for extracting metadata, and the recovery approach can be divided into two kinds---and full dose is recovered and increment recovery.The full dose recovery is on the basis of the overall copy of initial time, extracts the metadata information of all write operations that need carry out again from the initial time to the release time again, needs the metadata information amount and the physical data quantity of information of extraction bigger.And increment recovery is according to the data to be protected of current time and the time that will return to; Only filter out the metadata information and the physical data of those write operations different release time with current time; Do not need the overall copy of initial time, thereby reduced metadata information and corresponding physical data information.
Wherein increment recovery is a core, provides the key of flexible positioning time point.Use the required data recovered of increment recovery to recover much less, so increment recovery can significantly reduce data and recover the needed time than common full dose.And the full dose recovery is replenishing increment recovery; When not possessing the increment recovery condition (for example disk failures, server do not have the record of current all data of main frame); Can only use full dose to recover; Make server that the record of current all data of main frame data to be protected arranged, the user just can repeatedly use increment recovery to carry out the fine setting of release time then.
The present invention utilizes the increment recovery mode, need can accurately confirm the time point of recovery.Normally provide by some supplementary meanss (the for example daily record of some programs and report etc.) and user's oneself use experience the release time that the user sets at the beginning, is difficult to accomplish accurate location.Usually be not that the recovery point confirmed is too early, a lot of normal data of loss can not reach best recovery effects, are exactly that recovery point was selected evening, and the data that are still mistake that recover can not make data return to normal state, belong to invalid recovery.As depicted in figs. 1 and 2, by increment recovery, the user can repeatedly use increment recovery to adjust release time under the assistance that full dose is recovered.Because the time of carrying out recovering than another time full dose increment recovery needed release time shortens greatly, the state after can going out to recover to user feedback apace supplies the user to judge whether current state is suitable.Operate and adjust through repeating repeatedly such increment recovery, can arrive comparatively ideal data mode apace---loss of data is minimized.
The present invention can not only support user's the request that repeatedly data is returned to random time point; And can make completion recover required writing data quantity minimum; And support more convenient time of returning to of adjustment efficiently loss of data to be minimized, and the separating of main frame and server to seek suitable recovery point; Guarantee after the local host hard disk corruptions, still can carry out data and recover.The present invention can use in needs carry out the system of continuous data protection.
Description of drawings
Fig. 1 is a main frame FB(flow block) of the present invention;
Fig. 2 is a server flow process block diagram of the present invention;
Fig. 3 is the change procedure synoptic diagram of data to be protected in the full dose recovery;
The process synoptic diagram that Fig. 4 recovers for full dose;
Fig. 5 is the change procedure synoptic diagram of data to be protected in the increment recovery;
Fig. 6 is the process synoptic diagram of increment recovery.
Embodiment
Below in conjunction with accompanying drawing the present invention is further specified.
The present invention includes host process and server process, two parallel carrying out of process,
As shown in Figure 1, host process comprises: Connection Step, copy step, main frame are judged commands steps, write operation information recording step, full dose recovering step and increment recovery step;
As shown in Figure 2, server process comprises: Connection Step, server stores copies data, server are judged commands steps, server stores write operation information step, recovery request determining step and data recovering step.
In order continuous data protection to be provided for current operation main frame, main frame should connect machine with a station server.When continuous data protection system comes into operation, to carry out copying data between main frame at first to be protected and the server---copy the data to be protected of main frame a fully to server.In protection is carried out; The information that main frame occurs in all write operations on the data to be protected with record comprise write operation time of origin, physical data, write address, data length, and be that each write operation generates a random number as the operation of this time write operation number.There are two main memory modules server inside: meta data manager and physical data storage, deposit metadata and physical data respectively.
When the user finds error in data, can send full dose recovery request or increment recovery request, carry out data and recover.
If totally 4 of the data to be protected of main frame: their address is respectively S a, S b, S c, S dFor ease of narration, with tlv triple [release time, start time, concluding time] a recovery operation metadata is described, with four-tuple (timestamp, source address, memory address, data length) a write operation metadata is described.For the write operation of same disk partition, data length all is the same usually, is made as k here.
Below in conjunction with embodiment full dose is recovered to be described further:
Fig. 3 is that data to be protected are from time t 0To t 6The change procedure synoptic diagram.Among the figure, t ' and t " be respectively twice release time of user; Frame of broken lines is represented the state of corresponding whole data blocks to be protected of time, and solid box representes that write operation has taken place corresponding corresponding data piece constantly; Character a in frame of broken lines and the solid box i, b i, c i, d iRepresent that respectively source address is S a, S b, S c, S dThe corresponding different time t of data block to be protected iThe time data storage in the address of physical storage, i=0,1 ..., 5; Arrow is illustrated in the arrow indication full dose/increment recovery solicit operation has taken place constantly;
T in for example scheming 1Value is a constantly 1Solid box, be illustrated in t 1Constantly, the address is S aData block to be protected write operation has taken place one time, the physical data of current write operation leaves the address a of physical data reservoir in 1The place; So, its corresponding write operation metadata is (t 1, S a, a 1, k).9 solid box among the figure are represented write operation respectively 9 times, and they are respectively: (t 1, S a, a 1, k), (t 1, S b, b 1, k), (t 1, S d, d 1, k), (t 2, S a, a 2, k), (t 2, S c, c 2, k), (t 4, S a, a 4, k), (t 4, S c, c 4, k), (t 5, S a, a 5, k), (t 5, S d, d 5, k).Point to t 3Arrow is constantly represented t 3Write operation, t have taken place one time constantly 3The t ' that the back brackets representes that be t ' release time of this time recovery request operation.Totally 2 arrows among the figure are represented twice recovery request operation respectively.Be that increment recovery request or full dose recovery request are inessential for the first time, be primarily aimed at recovery request operation for the second time here and describe, establish and revert to the full dose recovery request for the second time.
In the present embodiment, the user is at t 3Constantly carried out once returning to the recovery request of t ', wherein t 1<t '<t 2The data of copying data D are initial moment t 0Data.Article one, in the recovery operation metadata, release time, X was the value of setting arbitrarily 19800101000000, and the timestamp with the subsequent write operation metadata does not conflict; Concluding time Y is the value of setting arbitrarily 20301231000000, and the timestamp with the subsequent write operation metadata does not conflict.The recovery operation metadata is as shown in the table before recovering:
Release time Start time Concluding time
19800101000000 t 0 t 3
t’ t 3 20301231000000
Use full dose to recover host data to be protected below from current time t 6Constantly return to t ' (t 4<t "<t 5) constantly.
Server is at t 6Constantly receive main frame full dose recovery request, establish the time of origin T of this recovery operation h=t 6, carry out substep 3.2 with time t ' as the needs time, search the Operand data F that is restored 1=[t ', t 3, 20301231000000], be t ' its release time, the start time is t 3Carry out substep 3.3, take-off time t 3And t " between the write operation metadata put into reserve search the collection R, obtain R={ (t 4, S a, a 4, k), (t 4, S c, c 4, k) }; Carry out substep 3.4, because F 1T ' release time be not equal to start time 19800101000000 of article one recovery operation metadata, forward substep 3.2 to, with F 1T ' release time search the Operand data F that is restored as the needs time 2=[19800101000000, t 0, t 3], obtaining its release time is 19800101000000, the start time is t 0Carry out substep 3.3, take-off time t 0Put into reserve to the write operation metadata between the t ' and search collection R, obtain R={ (t 4, S a, a 4, k), (t 4, S c, c 4, k), (t 1, S a, a 1, k), (t 1, S b, b 1, k), (t 1, S d, d 1, k) }; Carry out substep 3.4, because F 2The start time 19800101000000 that equals article one recovery operation metadata release time; Rotor step 3.5; The write operation metadata of collection among the R searched in reserve handle from nearest one of t ', obtain searching collection R '={ (t at last by the identical timestamp of getting of source address 4, S a, a 4, k), (t 1, S b, b 1, k), (t 4, S c, c 4, k), (t 1, S d, d 1, k) }.
According to substep 3.6, each the bar write operation metadata among the R ' is the address of fetching data with memory address; Press data length and in physical data storage, take out the physical data of respective byte; With the source address is memory address, writes in the copy of data D, and rejuvenation is as shown in Figure 4.Carry out the data mode " a after recovering 4, b 1, c 4, d 1" be host data to be protected at t ' state constantly.
Revise the recovery operation metadata in the meta data manager, with current up-to-date recovery operation metadata [t ', t 3, 20301231000000] change into [t ', t 3, t 6], and insert a new recovery operation metadata: [t ", t 6, 20301231000000].So after recovering to accomplish, the recovery operation metadata becomes:
Release time Start time Concluding time
19800101000000 t 0 t 3
t’ t 3 t 6
t” t 6 20301231000000
Below in conjunction with embodiment increment recovery is described further:
Fig. 5 is that data to be protected are from moment t 0To t 6Change procedure.Among the figure, t ' and t " be respectively twice release time of user; The implication of each sign representative is identical with Fig. 3 among the figure.Write operation metadata wherein has: (t 1, S a, a 1, k), (t 2, S a, a 2, k), (t 2, S b, b 2, k), (t 3, S a, a 3, k), (t 3, S d, d 3, k), (t 5, S a, a 5, k), (t 5, S d, d 5, k).Equally, pay close attention to recovery request for the second time here, and establishing for the second time, recovery request is the increment recovery request.
Use below increment recovery with data to be protected from t 6Constantly return to t " (t 3<t "<t 4) constantly.
Server is at t 6Constantly receive the request of main frame increment recovery, the time that this request needs to recover is t ".If the value of current time C is t 6, establish the time of origin T of this recovery operation h=t 6Article one, in the recovery operation metadata, release time, X was the value of setting arbitrarily 19800101000000, and the timestamp with the subsequent write operation metadata does not conflict; Concluding time Y is the value of setting arbitrarily 20301231000000, and the timestamp with the subsequent write operation metadata does not conflict.The recovery operation metadata is as shown in the table before recovering:
Release time Start time Concluding time
19800101000000 t 0 t 4
t’ t 4 20301231000000
Carry out substep 4.2, the time t that recovers as required " the inquiry Operand data Z that is restored 1: [19800101000000, t 0, t 4], get its start time n 1Be t 0, release time n 2Be 19800101000000.
Carry out substep 4.3, according to current time t 6Inquire about the Operand data Z that is restored 2: [t ', t 4, 20301231000000], get its start time c 1Be t 4, release time c 2Be t '.
Carry out substep 4.4, because c 1>n 1, carry out substep 4.5, take-off time stabs at time t 4And t 6Between the source address of write operation metadata put into result set R 1: { S a, S d, and to make the value of C be t ', changes substep 4.3 over to, searches the Operand data Z that is restored according to time t ' 1, get its start time c 1Be t 0, release time c 2Be 19800101000000.
Carry out substep 4.4, because start time c 1Equal start time n 1, change substep 4.7 over to, take-off time stabs at time t ' and t " between the source address of write operation metadata put into interim source address collection R 1={ S a, S d, S a, S a, S b, S d.
Carry out substep 4.8, remove interim source address collection R 1In the repeat to address (RA), obtain the source address set R that needs s{ S a, S b, S d.
Carry out the method for substep 4.9, search the recovery operation metadata Z that obtains requiring the time t ' place that returns to according to full dose recovery request substep 3.2 to 3.4 1, get its start time n 3Be t 0, release time n 4Be 19800101000000.Owing to n release time 4Equal the start time 19800101000000 of article one recovery operation metadata, then stop searching and with timestamp at time t 0To t " between the write operation metadata join reserve search the collection R, R={ (t 1, S a, a 1, k), (t 2, S a, a 2, k), (t 2, S b, b 2, k), (t 3, S a, a 3, k), (t 3, S d, d 3, k) }.
Carry out substep 4.10, in meta data manager, search the write operation metadata that satisfies following three conditions simultaneously: source address is gathered R in source address sIn; Timestamp is in searching collection R '; A plurality of write operation metadata have same source, then get timestamp near release time N that write operation metadata be met the result set R of condition r{ (t 3, S a, a 3, k), (t 2, S b, b 2, k) with (t 3, S d, d 3, k) }.R sIn source address in R, all have coupling the item, need not to add pseudo-write operation metadata.
Carry out substep 4.11, according to R rIn metadata, treat protected data and carry out to recover.The process of recovering is as shown in Figure 6.Carry out the data mode " a after recovering 3, b 2, c 0, d 3" be host data to be protected at t ' state constantly.
Carry out substep 4.12, revise the recovery operation metadata in the meta data manager, with current up-to-date recovery operation metadata [t ", t 4, 20301231000000] change into [t ", t 4, t 6], and insert a new recovery operation metadata: [t ', t 6, 20301231000000].So after recovering to accomplish, the recovery operation metadata becomes:
Release time Start time Concluding time
19800101000000 t 0 t 4
t” t 4 t 6
t’ t 6 20301231000000

Claims (2)

1. continuous data protection and restoration methods comprise host process and server process, and two parallel carrying out of processes is characterized in that:
One. host process comprises:
1.1 initiation Connection Step: main frame is connected with server, changes step 1.2;
1.2 copy step: send the copying data order to server, and all data to be protected of main frame current state all are sent to server, main frame gets into by guard mode, changes step 1.3;
1.3 main frame is judged commands steps: main frame is accepted user command, and the type of judges order, if the write operation order carry out step 1.4; If the order of full dose recovery request then carry out step 1.5; If the increment recovery request command then carry out step 1.6; If other order is not operated, change step 1.3;
1.4 write operation information recording step: host record occurs in the write operation information on the data to be protected; Comprise all write operations time of origin, data length, physical data, write the address; And to the each write operation of user order produces a random number as the operation of this time write operation order number; Send write operation information and corresponding operation thereof number to server, step 1.3 is changeed in the operation that host record variables A record main frame sends number;
1.5 full dose recovery request step: main frame stops to write down the write operation information that occurs on the data to be protected, and stops the write operation after this to be applied on the data to be protected, and main frame sends the recovery request order to server; The recovery request order is the full dose recovery request; The full dose recovery request comprises release time and current time, and waiting for server is accomplished recovering information, after receiving server and accomplishing recovering information; Main frame gets into by guard mode, changes step 1.3;
1.6 increment recovery request step: main frame stops to write down the write operation information that occurs on the data to be protected, and stops the write operation after this to be applied on the data to be protected, and main frame sends the recovery request order to server; Recovery request order is the increment recovery request, and the increment recovery request comprises the operation number of current time, release time and host record variables A record, and waiting for server is responded; After receiving server response, whether judging server response for forbidding increment recovery, is then to notify the user need carry out full dose to recover; Otherwise waiting for server is accomplished recovering information; After receiving server completion recovering information, main frame gets into by guard mode, changes step 1.3;
Two. server process comprises:
2.1 accept Connection Step: when main frame is connected with server, in meta data manager, generate article one recovery operation metadata, change step 2.2;
2.2 server stores copies data step: the deposit data to be protected that main frame is sent arrives physical data storage, becomes copies data D, changes step 2.3;
2.3 server is judged commands steps: server receives main frame and sends order, and judges that main frame sends the type of order, if send the write operation message command, then carry out step 2.4; If the recovery request order then carry out step 2.5;
2.4 server stores write operation information step: server receives write operation information that main frame sends and operation thereof number; It on physical data storage the physical data memory allocated address of write operation information; And write operation information is divided into write operation metadata and physical data; Be stored in meta data manager and physical data storage respectively, step 2.3 is changeed in the operation of last write operation that server record variable B record server is received number;
2.5 recovery request determining step: judging whether recovery request order is the full dose recovery request, is execution in step 2.6 then; Otherwise judging whether the write operation operation in the recovery request order number equals variable B, be execution in step 2.7 then, otherwise the notice main frame is forbidden increment recovery, changes step 2.3 again;
2.6 full dose recovering step: carry out sub-steps:
2.6.1 receive the time of origin T of the current time of main frame transmission as this recovery operation h, accept t release time of main frame requirement, establish the value that needs time N and equal time t;
2.6.2 in meta data manager, search each recovery operation metadata, find out one and satisfy condition: T s<N<T eThe recovery operation metadata, T sBe the start time value of this recovery operation metadata, T eFor the concluding time value of this recovery operation metadata, carry out substep 2.6.3;
2.6.3 from meta data manager, find out and satisfy condition: T s<T cThe write operation metadata of<N, T cBe the timestamp of this write operation metadata, the write operation metadata that satisfies condition put into reserve search collection R, carry out substep 2.6.4;
Whether equaling the preset value X of article one recovery operation metadata 2.6.4 judge the release time of the recovery operation metadata that substep 2.6.2 finds out, is then to carry out substep 2.6.5; Otherwise the value that will need time N is made as the release time in the said recovery operation metadata, carries out substep 2.6.2;
2.6.5 search among the collection R in reserve, to the write operation metadata of same source is arranged, only keep its timestamp near the write operation metadata of t release time, form and search collection R ', carry out substep 2.6.6;
2.6.6 from physical data storage, copies data D is duplicated a D ' that is; According to all write operation metadata of searching among the collection R '; Be the address of fetching data with each bar write operation metadata store address; Pressing data length and in physical data storage, take out the physical data of respective byte, is memory address with the source address, writes among the D '; All write operation metadata are finished, and carry out substep 2.6.7;
2.6.7 resulting D ' is sent back main frame, and the data to be protected of replacement main frame revert to user's data of required release time, carry out substep 2.6.8;
2.6.8 change the concluding time of a up-to-date recovery operation metadata into time that this recovery operation takes place from Y; And by new recovery operation metadata of following value insertion, its release time, start time, concluding time are followed successively by: the time T that this t release time, this recovery operation take place h, Y;
2.7 increment recovery step: carry out sub-steps:
Send the current time C of recovery operation and t release time that main frame requires 2.7.1 accept main frame, establish the value that needs time N and equal t release time; The time of origin T of this recovery operation hBe made as current time C;
2.7.2 in meta data manager, search each recovery operation metadata, find out one and satisfy condition: T S1<N<T E1The recovery operation metadata, T S1Be the start time value of this recovery operation metadata, T E1Be the concluding time value of this recovery operation metadata, establish the start time n of record 1 1Be T S1, release time n 2Be T E1
2.7.3 in meta data manager, search each recovery operation metadata, find out one and satisfy condition: T S2<C<T E2The recovery operation metadata, T S2Be the start time value of this recovery operation metadata, T E2Be the concluding time value of this recovery operation metadata, establish the start time c of record 2 1Be T S2, release time c 2Be T E2
2.7.4 judge c 1With n 1Size: if c 1>n 1, carry out substep 2.7.5, if c 1<n 1, if rotor step 2.7.6 is c 1=n 1, rotor step 2.7.7;
2.7.5 with timestamp at c 1And the source address of the write operation metadata between the current time C is put into interim source address collection R 1, and the value of current time C is made as c 2, rotor step 2.7.3;
2.7.6 with timestamp at n 1And the source address that needs the write operation metadata between the time N is put into interim source address collection R 1, and the value of N is made as n 2, rotor step 2.7.2;
2.7.7 the source address of the write operation metadata of timestamp between C and N of write operation is put into interim source address collection R 1
2.7.8 at interim source address collection R 1In, for a plurality of same source, only keep a source address, obtain the source address set R that needs s
2.7.9, form reserve and search collection R to 2.6.4 according to the substep 2.6.2 of said full dose recovery request, carry out substep 2.7.10;
2.7.10 in meta data manager, search the write operation metadata that satisfies following three conditions simultaneously: source address is gathered R in source address sIn; Timestamp is searched among the collection R in reserve; A plurality of write operation metadata have same source, then get timestamp near that write operation metadata of t release time; The write operation metadata that satisfies above-mentioned three conditions forms result set R r
At source address set R sIn, do not comprise into result set R rSource address, each source address produces a pseudo-write operation metadata, its form is: timestamp is X, source address is original source address, memory address equals original source address, data length and result set R rIn the data length of other write operation metadata equate; All pseudo-write operation metadata are put into result set R r
2.7.11 for result set R rIn the write operation metadata, be the address of fetching data with the memory address of each bar, press data length takes out respective byte in physical data storage physical data, be memory address with the source address, write in the data to be protected of main frame; Pseudo-write operation metadata being the address of fetching data with source address, pressing data length takes out respective byte in copies data D physical data, is memory address with the source address, writes in the data to be protected of main frame; All write operation metadata are finished, and obtain the data mode that the user needs release time, carry out substep 2.7.12;
2.7.12 change the concluding time of a up-to-date recovery operation metadata into time that this recovery operation takes place from Y; And by new recovery operation metadata of following value insertion, its release time, start time, concluding time are followed successively by: the time T that this t release time, this recovery operation take place h, Y.
2. continuous data protection as claimed in claim 1 and restoration methods is characterized in that:
In the said server stores write operation information step, said write operation metadata comprises timestamp, source address, memory address and data length, and stores in order:
Wherein, timestamp is the time that write operation takes place, and source address is the start address of write operation on main frame, and memory address is the memory address of physical data on the server physical data storage of write operation, and data length is the physical data size of write operation; Timestamp, source address, data length are by host record, and memory address is by server-assignment;
In said full dose recovering step and the increment recovery step, said recovery operation metadata comprises release time, start time and concluding time, and stores in order:
Wherein, the time that return to for the main frame requirement release time, the start time is the moment that this time recovery operation takes place, and the concluding time generates in the following manner:
Server is set up article one recovery operation metadata at meta data manager when receiving that main frame begins guarded command: be X release time, and X is the value of setting arbitrarily, but can not conflict with the timestamp of subsequent write operation metadata; Start time is the moment that this time recovery operation takes place, and the concluding time is Y, and Y is the value of setting arbitrarily, but can not conflict with the timestamp of subsequent write operation metadata; Before new recovery operation metadata of every insertion; With before concluding time of a nearest recovery operation metadata change start time of new recovery operation metadata into from Y, the value of the new recovery operation metadata of inserting is: this time release time, this time start time, Y.
CN2009102729250A 2009-11-27 2009-11-27 Method for protecting and restoring continuous data Active CN101739313B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009102729250A CN101739313B (en) 2009-11-27 2009-11-27 Method for protecting and restoring continuous data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009102729250A CN101739313B (en) 2009-11-27 2009-11-27 Method for protecting and restoring continuous data

Publications (2)

Publication Number Publication Date
CN101739313A CN101739313A (en) 2010-06-16
CN101739313B true CN101739313B (en) 2012-02-29

Family

ID=42462828

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009102729250A Active CN101739313B (en) 2009-11-27 2009-11-27 Method for protecting and restoring continuous data

Country Status (1)

Country Link
CN (1) CN101739313B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110650000A (en) * 2019-09-29 2020-01-03 华中科技大学 Signal detection and recovery method

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8666944B2 (en) * 2010-09-29 2014-03-04 Symantec Corporation Method and system of performing a granular restore of a database from a differential backup
CN102999400A (en) * 2012-11-22 2013-03-27 中国电信股份有限公司云计算分公司 Data backup method and device of cloud storage system
CN103092533B (en) * 2013-01-24 2016-04-27 上海爱数信息技术股份有限公司 A kind of method and system of data remote synchronization
CN103198017B (en) * 2013-04-07 2016-04-13 武汉天喻信息产业股份有限公司 A kind of method of test data integrity protection and device
CN104281500B (en) * 2013-07-04 2017-12-26 北京中科同向信息技术有限公司 data any time recovery point (RPO) constructing technology
CN104794021A (en) * 2014-03-19 2015-07-22 北京中科同向信息技术有限公司 Random time point backspacing technology
CN104717558A (en) * 2015-03-05 2015-06-17 福建新大陆通信科技股份有限公司 Backing up and restoring method of set top box data
CN105740101A (en) * 2016-01-29 2016-07-06 青岛海尔智能家电科技有限公司 Automatic backup and automatic restoration method and apparatus for MySQL database
CN108241555B (en) * 2016-12-26 2022-03-01 阿里巴巴集团控股有限公司 Backup and recovery method and device of distributed database and server
CN109426585A (en) * 2017-08-22 2019-03-05 阿里巴巴集团控股有限公司 A kind of method and apparatus for backing up, restoring database data
CN108259569B (en) * 2017-12-25 2020-10-27 南京壹进制信息科技有限公司 Method and system for protecting agentless continuous data based on IPSAN shared storage
CN109669818B (en) * 2018-12-20 2019-11-12 广州鼎甲计算机科技有限公司 Continuous data protection method and system without local cache
CN111506653B (en) * 2020-04-17 2024-03-26 中国人民银行清算总中心 System and method for recovering planned data of data remote synchronization
CN112312396B (en) * 2020-11-05 2023-02-24 山东云海国创云计算装备产业创新中心有限公司 NoC tracking data generation method and related device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110650000A (en) * 2019-09-29 2020-01-03 华中科技大学 Signal detection and recovery method

Also Published As

Publication number Publication date
CN101739313A (en) 2010-06-16

Similar Documents

Publication Publication Date Title
CN101739313B (en) Method for protecting and restoring continuous data
CN105389230B (en) A kind of continuous data protection system and method for combination snapping technique
US9501542B1 (en) Methods and apparatus for volume synchronization
CN103853837B (en) Oracle does not stop the table level back-up restoring method of Production database automatically
CN101334797B (en) Distributed file systems and its data block consistency managing method
US20200334206A1 (en) Storage and synchronization of metadata in a distributed storage system
US8060714B1 (en) Initializing volumes in a replication system
CN102891849B (en) Service data synchronization method, data recovery method, data recovery device and network device
US8712970B1 (en) Recovering a database to any point-in-time in the past with guaranteed data consistency
US8108634B1 (en) Replicating a thin logical unit
CN101706795B (en) Method for synchronizing data of database in active/standby server
CN100562858C (en) The methods, devices and systems of EMS memory data-base remote disaster tolerance
CN102024016B (en) Rapid data restoration method for distributed file system (DFS)
US7650369B2 (en) Database system management method and database system
US20100114837A1 (en) Remote disaster data recovery system and method
CN105938457B (en) Filter method, device and the data reading system of data
CN101316184B (en) Disaster tolerance switching method, system and device
CN107256182A (en) A kind of method and apparatus of database restoration
CN103336728A (en) Disk data recovery method
CN102955720A (en) Method for improving stability of EXT (extended) file system
CN104461776A (en) Application disaster tolerance method based on CDP and iSCSI virtual disk technology
CN108415793A (en) The membership qualification of copy group is changed via journalizing
CN105574187A (en) Duplication transaction consistency guaranteeing method and system for heterogeneous databases
CN105468475A (en) Backup method and backup device of database
CN109189860A (en) A kind of active and standby increment synchronization method of MySQL based on Kubernetes system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant