CN108664353A - The method, apparatus and replica management server that data are restored - Google Patents

The method, apparatus and replica management server that data are restored Download PDF

Info

Publication number
CN108664353A
CN108664353A CN201710197375.5A CN201710197375A CN108664353A CN 108664353 A CN108664353 A CN 108664353A CN 201710197375 A CN201710197375 A CN 201710197375A CN 108664353 A CN108664353 A CN 108664353A
Authority
CN
China
Prior art keywords
data
replicas
base
updated
storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710197375.5A
Other languages
Chinese (zh)
Inventor
杨孝平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Group Sichuan Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Sichuan Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Group Sichuan Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201710197375.5A priority Critical patent/CN108664353A/en
Publication of CN108664353A publication Critical patent/CN108664353A/en
Pending legal-status Critical Current

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/1471Saving, restoring, recovering or retrying involving logging of persistent data for recovery
    • 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/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1435Saving, restoring, recovering or retrying at system level using file system or storage system metadata

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The method, apparatus and replica management server restored the embodiment of the invention discloses a kind of data.This method includes:Store the initial data obtained;When initial data is there are when data to be updated, mode that base data replicas storage updates the data is determined based on remaining data memory space and the quantity for generating base data replicas;It is stored and is updated the data according to the mode that base data replicas storage updates the data;When receiving the instruction of data recovery, data storage path is redirected into the store path for base data replicas.The embodiment of the present invention can improve the efficiency of data recovery.

Description

The method, apparatus and replica management server that data are restored
Technical field
The method, apparatus restored the present invention relates to field of communication technology more particularly to a kind of data and replica management service Device.
Background technology
With the rapid development of office automation and e-commerce, enterprise is higher and higher to the dependence of information system, number Take on important role, the backup and recovery of database and business datum as the core of information system according to library and business datum Also just particularly significant.
The backup of database and business datum and recovery technology mainly pass through database and industry using backup/restoration system The Backup and Restore interface of business data first carries out backup logic to database and business datum, then when database and business number When according to occurring damaging or needing to be restored to a certain logical time point, the backup pair of backup/restoration system logic-based is recycled Database either carries out opening database after the completion of business datum is restored to be restored or restores the operations such as application again.
For example, the recovery process to database is:Data base logic duplicated record is inquired first, and closes database;So Afterwards under log-on data library to non-hang-up nomount states, restore control file;Database is started to again and hangs up mount states Under, the data file and journal file and data base logic of restoring database chase after journalizing;Database is finally opened, it is extensive The data in complex data library.
By the above process as can be seen that using traditional data backup and resume technology to database or business number Very long and complicated cumbersome process is needed according to recovery is carried out, longer time is spent, reduces the efficiency that business datum is restored.
Invention content
The method, apparatus and replica management server restored an embodiment of the present invention provides a kind of data, can improve number According to the efficiency of recovery.
In a first aspect, an embodiment of the present invention provides a kind of methods that data are restored, including:
Store the initial data obtained;
When initial data is there are when data to be updated, based on remaining data memory space and the number of base data replicas is generated Amount determines the mode that base data replicas storage updates the data;
It is stored and is updated the data according to the mode that base data replicas storage updates the data;
When receiving the instruction of data recovery, data storage path is redirected into the storage road for base data replicas Diameter.
Second aspect, an embodiment of the present invention provides the devices that a kind of data are restored, including:
Initial data storage unit, for obtaining and storing initial data;
Determination unit, for when there are when data to be updated, be based on remaining data memory space and generate former for initial data The quantity of beginning data copy determines the mode that base data replicas storage updates the data;
Storage unit is updated the data, the mode for being updated the data according to base data replicas storage, which stores, to be updated the data;
Unit is redirected, is original number for when receiving the instruction of data recovery, data storage path to be redirected According to the store path of copy.
The third aspect, an embodiment of the present invention provides the replica management servers that a kind of data are restored, including:
Memory, processor, communication interface and bus;
Memory, processor and communication interface are connected by bus and complete mutual communication;
Memory is for storing program code;
Processor is corresponding with executable program code to run by reading the executable program code stored in memory Program, for executing a kind of method that data are restored, the method that data are restored includes:
Store the initial data obtained;
When initial data is there are when data to be updated, based on remaining data memory space and the number of base data replicas is generated Amount determines the mode that base data replicas storage updates the data;
It is stored and is updated the data according to the mode that base data replicas storage updates the data;
When receiving the instruction of data recovery, data storage path is redirected into the storage road for base data replicas Diameter.
The method, apparatus and replica management server restored an embodiment of the present invention provides a kind of data, the present invention are implemented In example, the initial data of acquisition is stored first;When initial data is there are when data to be updated, based on remaining data memory space and The quantity for generating base data replicas determines the mode that base data replicas storage updates the data, and is deposited according to base data replicas The mode that storage updates the data, which stores, to be updated the data;When receiving the instruction of data recovery, it is by data storage path redirection The store path of initial data and the store path of base data replicas.The embodiment of the present invention is needed in database or business datum When being restored, the operation that need not be restored to database or business datum can by redirecting data storage path The database of different backup copies or the data of application program are directly used with realizing, so as to greatly promote operation system Resume speed and the time, greatly promote Database Systems or other operation systems recovery time, simplify database or industry The recovery operation of business system improves the efficiency that data are restored, and database or operation system restore more rapidly and expense is lower, skill Art risk is low and safeguards simple.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, will make below to required in the embodiment of the present invention Attached drawing is briefly described, it should be apparent that, drawings described below is only some embodiments of the present invention, for For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings Attached drawing.
Fig. 1 is the configuration diagram for the method application that a kind of data provided according to embodiments of the present invention are restored;
Fig. 2 is the schematic flow chart for the method restored according to the data that one embodiment of the invention provides;
Fig. 3 is a kind of base data replicas storage update in the method restored according to the data that one embodiment of the invention provides The schematic diagram of data mode;
Fig. 4 is stored more according to another base data replicas in the method that the data that one embodiment of the invention provides are restored The schematic diagram of new data mode;
Fig. 5 is stored more according to another base data replicas in the method that the data that one embodiment of the invention provides are restored The schematic diagram of new data mode;
Fig. 6 is the schematic block diagram of the device restored according to the data that one embodiment of the invention provides;
Fig. 7 is the schematic block diagram of the replica management server provided according to one embodiment of the invention.
Specific implementation mode
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art The every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
The embodiment of the present invention be suitable for database or the application data such as data stored and stored more copies generate and Management, and in database or application corrupted data, stored copies is directly used to carry out the scene of business recovery.Fig. 1 is root According to a kind of configuration diagram for the method application that data are restored provided in an embodiment of the present invention.The side restored with data shown in Fig. 1 For method application scenarios, one or more production servers (only show 2 production servers in Fig. 1:Production server 1 and life Production server 2) carry out data transmission between replica management server, in the embodiment of the present invention, data can in production server It is stored and is backed up to be transmitted to replica management server, replica management server can also give birth to data in production server At one or more base data replicas.Due to being stored data in the embodiment of the present invention in replica management server, in life When producing database or application corrupted data in server or needing to restore the data of a certain historical juncture, will can directly it count It is redirected in replica management server in the store path of corresponding base data replicas according to store path, to realize to difference The database of backup copies or the data of application program directly use, so as to promoted operation system resume speed and when Between, the recovery operation that simplifies database or operation system, business continuance is substantially improved.
Fig. 2 is the schematic flow chart for the method restored according to the data that one embodiment of the invention provides.As shown in Fig. 2, This approach includes the following steps.
110, store the initial data of acquisition.
Wherein, initial data is the data generated in database and application data, is deposited after obtaining initial data Storage, as first part of backup initial data.
It should be noted that initial data area and data pair can be arranged in replica management server in the embodiment of the present invention Local area, by the initial data storage of acquisition to initial data area, by the copy being subsequently generated storage to data copy area, original number May include the one or more original volumes for storing initial data in, data copy area may include storage base data replicas One or more copy volumes.
For example, by taking production server is carried out data transmission by Network File System NFS and replica management server as an example, For production server by NFS by original data transmissions to replica management server, replica management server stores initial data It waits in original volume.
It should be noted that when storing initial data, the time of Raw Data Generation can also be stored, initial data Mark or initial data correspond to the information such as the mark of production server or application etc., and different lifes are taken in order to can subsequently look into The data copy of production server, different application or database in different moments.
120, when there are when data to be updated, be based on remaining data memory space and generate base data replicas for initial data Quantity determine the mode that base data replicas storage updates the data.
Wherein, when database or application operation, it may be desirable to by certain data updates in initial data be new Data, it is data to be updated that these, which need newer data, and updated new data is to update the data.Initial data pair There are many modes that this storage updates the data, how much remaining based on replica management server storage, and generates original The quantity of data copy can determine that base data replicas storage updates the data by the way of.Base data replicas in this step It refer to copy corresponding with initial data.
It should be noted that whether need to capture new timing node data when base data replicas storage updates the data be A kind of mode for determining the quantity for generating base data replicas is determined and is generated that is, when needing to capture new timing node data The quantity of base data replicas is more than 1;When needing to capture new timing node data, the number for generating base data replicas is determined Amount is equal to 1.It can not be updated the data into storage in base data replicas, initial data, initial data pair can also be stored simultaneously Mode that the data stored in this can be updated the data based on different base data replicas storages determines.
130, it is stored and is updated the data according to the mode that base data replicas storage updates the data.
Wherein, after determining mode that base data replicas storage updates the data, according to determining mode to updating number According to being stored.
140, when receiving the instruction of data recovery, data storage path is redirected into the storage for base data replicas Path.
Wherein, in database or application corrupted data (production server system needs emergency recovery) and user's needs When restoring the data of a certain historical juncture, it will usually the instruction restored to replica management server transmission data, for example, production clothes Business device system needs to send the instruction (instruction that data are restored) that system emergency restores to replica management server when emergency recovery, Indicate the data for needing to restore.It may include the time and production server or answer that data are restored in the instruction that data are restored The information such as mark, the information that the instruction that such replica management server based on data restores includes determine corresponding original Data copy, and data storage path is redirected to the store path for the base data replicas determined.Redirection refers to handle Database changes to B using the store path of data by A, B store path data copy purposes is used to reach database, even if number The data in base data replicas are used according to when restoring.Such as use the store path of data by/ora/datafile/ database Xxx.ora is revised as the store path of base data replicas in backup medium, such as:mcmg:/ora/datacopy1/xxx.ora.
For example, by taking production server is carried out data transmission by NFS and replica management server as an example, backup server will Initial data storage waits in original volume, and in database or application corrupted data, data storage path is redirected to original number According to the store path of copy, i.e., address data memory is redirected in copy volume.After data storage path redirection, data Library or application system can use the data in data copy to execute opening operation.
Due to being stored data in the embodiment of the present invention in replica management server, in database or corrupted data is applied When, directly data storage path can be redirected in replica management server in the store path of base data replicas, from And realize and the database of different backup copies or the data of application program are directly used, so as to promote the extensive of operation system The efficiency that complex velocity and time, the recovery operation for simplifying database or operation system, raising data are restored.
It is understood that in embodiments of the present invention, step 120 can also be executed specifically as following steps.
121, when the quantity that remaining data memory space is more than preset value, and generates base data replicas is more than 1, determine The mode that base data replicas storage updates the data is the first predetermined manner.
122, when the quantity that remaining data memory space is more than preset value, and generates base data replicas is less than or equal to 1, Determine that the mode that base data replicas storage updates the data is the second predetermined manner.
123, when residual memory space is less than or equal to preset value, determine the mode that base data replicas storage updates the data For third predetermined manner.
Wherein it is determined that the mode that base data replicas storage updates the data can first determine whether depositing for replica management server Spatial Residual situation is stored up, then in the generation quantity for judging base data replicas.It is preset respectively for different situations different The mode that base data replicas storage updates the data.Judge the memory space residue situation of replica management server, that is, judges surplus Whether remaining data space is more than preset value.If remaining data memory space is more than preset value, illustrate that replica management takes The memory space residue of business device is more, and memory space simultaneously takes it easy;If remaining data memory space is less than or equal to preset value, Illustrate that the memory space residue of replica management server is less, memory space is nervous.In the embodiment of the present invention, if it is decided that copy The memory space of management server is nervous, then when base data replicas storage updates the data, only storage updates the data, and is come with this Save memory space.The size of preset value can be set according to demand, always be stored for example, being set as replica management server The 30% of space.
It is understood that in embodiments of the present invention, determining that base data replicas storage updates the data in step 121 Mode be the first predetermined manner after, then step 130 executes to be updated the data according to described in the storage of the first predetermined manner, specific to walk Suddenly it is:It is to update the data by data update to be updated in initial data;Updated initial data is synchronized to initial data pair In this.
Wherein, the first predetermined manner is to be more than preset value in remaining data memory space and generate base data replicas The mode that base data replicas storage updates the data when quantity is more than 1.It is waited for more to initial data at this point, update will be updated the data In new data, base data replicas is synchronous with initial data progress data.
Specifically, this step may be used segmentation mirror image mode by the initial data in original volume be synchronized to storage it is original In the copy volume of data copy.For example, original volume is first looked for out, it, will be in original volume then by way of dividing mirror image Initial data copies in the base data replicas of copy volume, you can realizes and creates logical time point pair in any suitable time This.
It should be noted that due to when initial data needs update, had updated in initial data by updating the data Data to be updated, so data synchronous in base data replicas are with the initial data after new.
In addition, updated initial data is synchronized in the step in base data replicas above-mentioned, can also be performed For:Newer data in updated initial data are synchronized in base data replicas.
Wherein, in this step original volume is identified using the tracking of original volume update area and Replica updating area tracking technology With the data area of data update in copy volume, then the synchronous data changed are only needed when data synchronize.
It is just not necessarily to replicate unnecessary data when data synchronize in this step.When copy volume needs to complete using original volume When data are synchronized to obtain newest time point copy, it is only necessary to compare the data in the data and original volume in copy volume It is right, determine that the original volume data area different from copy volume, i.e., the data area updated the data in original volume, data synchronize When only synchronize the data of this data area, the synchronization without carrying out total data.For example, if a size is The initial data of 1TB has 1% data to update, then in this step only need to expend replicate about 10GB more count accurately according to and It is not the initial data of entire 1TB.So restore data or even traditional synchronization total data relative to from backup medium For, speed more rapidly, expense it is lower.
Fig. 3 is a kind of base data replicas storage update in the method restored according to the data that one embodiment of the invention provides The schematic diagram of data mode.For example, as shown in figure 3, replica management server to store data space carry out region division, and Setting area identifies, while replica management server safeguards book bitmap, and each volume is had recorded in book bitmap includes Data area identifies pointer corresponding with its, and pointer is used to indicate the position in corresponding data region.The data update in original volume When, updating the data for original volume can be updated into original volume, the data in original volume are then synchronized to copy volume again.
Similarly, when the data that original volume needs synchronization counterpart to roll up, with new region in can also only needing synchronization counterpart to roll up Data.
It is understood that in embodiments of the present invention, determining that base data replicas storage updates the data in step 122 Mode be the second predetermined manner after, then step 130 executes to be updated the data according to described in the storage of the second predetermined manner, specific to walk Suddenly it is:Initial data is synchronized in base data replicas;It is determined in initial data based on the data to be updated in initial data Data to be updated in copy;It is to update the data by the data update to be updated in base data replicas.
Wherein, the first predetermined manner is to be more than preset value in remaining data memory space and generate base data replicas The mode that base data replicas storage updates the data when quantity is less than or equal to 1.At this point, being synchronized first in base data replicas original Then data determine the data to be updated in base data replicas by the location information of data to be updated in initial data, It is again to update the data by the data update to be updated in base data replicas.Base data replicas can also become during this step Holonmic space copy.
In addition, in above process, initial data is synchronized in base data replicas in this period section, initial data Do not allow to update, at this time if there is with new data, then will first update the data and be stored in interim copy, and synchronize by initial data To in base data replicas and then determining data to be updated in base data replicas;It will be waited for more in base data replicas New data is updated to updating the data in interim copy.Interim copy can be stored in the volume of temporal cache, in the process, secondary This management server can safeguard holonmic space copy volume and temporal cache volume.
Fig. 4 is stored more according to another base data replicas in the method that the data that one embodiment of the invention provides are restored The schematic diagram of new data mode.For example, as shown in figure 4, replica management server to store data space carry out region division, And setting area identifies, while replica management server safeguards book bitmap, each volume is had recorded in book bitmap includes Data area identify corresponding with its pointer, pointer is used to indicate the position in corresponding data region.In Fig. 4, in original volume Be identified as 001,0A2,0A3,00D, 009,010,011,012 data area in store initial data, original number in copy volume Initial data is synchronized according to copy, updating the data during this stores to temporal cache and roll up in bitmap, complete in copy volume After being synchronized at data, stored updating the data.
A complete copy (base data replicas) is generated in this step, can be made immediately after the completion of holonmic space copy creating Start to roll up, can be used on host immediately, and can be read and writen by HELPER APPLICATIONS.
It is understood that in embodiments of the present invention, determining that base data replicas storage updates the data in step 121 Mode be third predetermined manner after, then step 130 executes to be updated the data according to described in the storage of third predetermined manner, specific to walk Suddenly it is:It stores and updates the data in base data replicas;Determine the first position that data to be updated store in initial data Information;Determine the second position information for storing and updating the data in base data replicas;Book bitmap is established, initial data rolls up position Figure includes the mapping relations of first position information and second position information.
Wherein, third predetermined manner is that base data replicas stores when remaining data memory space is less than or equal to preset value The mode updated the data.It is stored into base data replicas at this point, will update the data, it then will by the book bitmap of foundation Updating the data for base data replicas storage establishes mapping relations with the data to be updated in initial data.
Fig. 5 is stored more according to another base data replicas in the method that the data that one embodiment of the invention provides are restored The schematic diagram of new data mode.For example, as shown in figure 5, replica management server to store data space carry out region division, And setting area identifies, replica management server can safeguard a book bitmap, book position while ghost is rolled up Had recorded in figure the data area that each volume includes identify in pointer corresponding with its and original volume data area to be updated and The mapping relations in region are updated the data in copy volume, pointer is used to indicate the position in corresponding data region.In Fig. 5, original volume In be identified as 001,0A2,0A3,00D, 009,010,011,012 data area in store initial data, it is empty in copy volume It is quasi- be stored in original volume just as data area, when data need to carry out write operation in the 0A3 of data area, 0A3 is in original Begin to involve in the data area that row data store, so at this time by virtual data area corresponding with the positions 0A3 in copy volume point Data area B01 with entity, and the data of write-in 0A3 are needed in B01 storages, record 0A3's and B01 in book bitmap Mapping relations.When needing the when of accessing the data of original volume by original volume bitmap to read respective data area, when needing to access When copy volume data, respective data blocks are read by copy volume bitmap.
In the above embodiment of the present invention, by data restore method can database or application corrupted data when, Directly " pull-up " is carried out by the data of different base data replicas in replica management server and use.This technology and tradition Backup, the data process for using restoring and then reuse it is different, so that the whole process that data are restored is become:It backs up and makes immediately With two parts, the resume speed of operation system can be greatly promoted and the time, greatly promote Database Systems or other business Recovery time of system, the recovery operation for simplifying database or operation system, database or operation system restore more rapidly and Expense is lower, technical risk is low and it is simple to safeguard.
Fig. 6 shows the schematic block diagram of the device 200 restored according to the data that one embodiment of the invention provides.Such as Fig. 6 Shown, which includes:
Initial data storage unit 201, for obtaining and storing initial data;
Determination unit 202, for when the initial data is there are when data to be updated, based on remaining data memory space and The quantity for generating base data replicas determines the mode that the base data replicas storage updates the data;
Storage unit 203 is updated the data, for being deposited according to the mode updated the data described in base data replicas storage It is updated the data described in storage;
Unit 204 is redirected, for being described by data storage path redirection when receiving the instruction of data recovery The store path of base data replicas.
Due to being stored data in the embodiment of the present invention in replica management server, in database or corrupted data is applied When, can directly data storage path be redirected in the store path of replica management server, to realize to different standby The database of part copy or the data of application program directly use, so as to promoted operation system resume speed and the time, Simplify the recovery operation of database or operation system, improve the efficiency that data are restored.
It is understood that the determination unit 202 is additionally operable to:
When the quantity that the remaining data memory space is more than preset value, and generates the base data replicas is more than 1, Determine that the mode that the base data replicas storage updates the data is the first predetermined manner;
When the remaining data memory space is more than preset value, and the quantity for generating the base data replicas is less than or equal to When 1, determine that the mode that the base data replicas storage updates the data is the second predetermined manner;
When the size of the residual memory space is less than or equal to the preset value, the base data replicas storage is determined The mode updated the data is third predetermined manner.
It is understood that the mode that the determination base data replicas storage updates the data is described first default Mode;
The storage unit 203 that updates the data is specifically used for:
It is described update the data by data update to be updated described in the initial data;
Updated initial data is synchronized in the base data replicas.
It is understood that the storage unit 203 that updates the data is specifically used for:
Newer data in updated initial data are synchronized in the base data replicas.
It is understood that the mode that the determination base data replicas storage updates the data is described second default Mode;
The storage unit 203 that updates the data is specifically used for:
The initial data is synchronized in the base data replicas;
The data to be updated in the base data replicas are determined based on the data to be updated in the initial data;
It is described update the data by the data update to be updated in the base data replicas.
It is understood that the storage unit 203 that updates the data is specifically used for:
Described update the data is stored in interim copy;
Determine the data to be updated in the base data replicas;
It is updating the data in the interim copy by data update to be updated in the base data replicas.
It is understood that the mode that the determination base data replicas storage updates the data is default for the third Mode;
The storage unit 203 that updates the data is specifically used for:
It is updated the data described in storage in the base data replicas;
Determine the first position information that the data to be updated store in the initial data;
Determine the second position information updated the data described in storage in the base data replicas;
Initial data volume bitmap is established, the initial data volume bitmap includes the first position information and the second The mapping relations of confidence breath.
It is understood that the determination unit 202 is additionally operable to:
Based on the quantity for needing capture time node data to determine generation base data replicas.
The device 200 that data according to the ... of the embodiment of the present invention are restored can correspond to data according to the ... of the embodiment of the present invention and restore Method in executive agent, and data restore device 200 in modules above and other operation and/or function Respectively in order to realize the corresponding flow of each method in Fig. 1 to Fig. 5, for sake of simplicity, details are not described herein.
Fig. 7 is the schematic block diagram of the replica management server 300 provided according to one embodiment of the invention.As shown in fig. 7, Replica management server 300 includes processor 301, memory 302 and communication interface 303, and memory 302 is executable for storing Program code, processor 301 is run by reading in memory 302 executable program code that stores and executable program The corresponding program of code, communication interface 303 is used for and external device communication, and replica management server 300 can also include bus 304, bus 304 is used for connection processing device 301, memory 302 and communication interface 303, makes processor 301, memory 302 and leads to Letter interface 303 is in communication with each other by bus 304.
Specifically, processor 301 is additionally operable to execute a kind of method that data are restored;Wherein, the method that the data are restored Including:
Store the initial data obtained;
When there are when data to be updated, be based on remaining data memory space and generate base data replicas for the initial data Quantity determine the mode that the base data replicas storage updates the data;
Described update the data is stored according to the mode updated the data described in base data replicas storage;
When receiving the instruction of data recovery, data storage path is redirected into the storage for the base data replicas Path.
Replica management server 300 according to the ... of the embodiment of the present invention can correspond to data according to the ... of the embodiment of the present invention and restore Method in executive agent, and above and other operation and/or function of the modules in replica management server 300 Respectively in order to realize the corresponding flow of each method in Fig. 1 to Fig. 5, for sake of simplicity, details are not described herein.
Those of ordinary skill in the art may realize that lists described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This A little functions are implemented in hardware or software actually, depend on the specific application and design constraint of technical solution.Specially Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not It is considered as beyond the scope of this invention.
It is apparent to those skilled in the art that for convenience of description and succinctly, foregoing description is The specific work process of system, device and unit, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or replace It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right It is required that protection domain subject to.

Claims (17)

1. a kind of method that data are restored, which is characterized in that including:
Store the initial data obtained;
When the initial data is there are when data to be updated, based on remaining data memory space and the number of base data replicas is generated Amount determines the mode that the base data replicas storage updates the data;
Described update the data is stored according to the mode updated the data described in base data replicas storage;
When receiving the instruction of data recovery, data storage path is redirected into the storage road for the base data replicas Diameter.
2. the method that data are restored according to claim 1, which is characterized in that described to be based on remaining data memory space and life The mode that the base data replicas storage updates the data is determined at the quantity of base data replicas, including:
When the quantity that the remaining data memory space is more than preset value, and generates the base data replicas is more than 1, determine The mode that the base data replicas storage updates the data is the first predetermined manner;
When the quantity that the remaining data memory space is more than preset value, and generates the base data replicas is less than or equal to 1, Determine that the mode that the base data replicas storage updates the data is the second predetermined manner;
When the residual memory space is less than or equal to the preset value, determine what the base data replicas storage updated the data Mode is third predetermined manner.
3. the method that data are restored according to claim 2, which is characterized in that the determination base data replicas storage The mode updated the data is first predetermined manner;
It is described according to the mode that updates the data described in base data replicas storage store it is described update the data, including:
It is described update the data by data update to be updated described in the initial data;
Updated initial data is synchronized in the base data replicas.
4. the method that data are restored according to claim 3, which is characterized in that described to be synchronized to updated initial data In the base data replicas, including:
Newer data in updated initial data are synchronized in the base data replicas.
5. the method that data are restored according to claim 2, which is characterized in that the determination base data replicas storage The mode updated the data is second predetermined manner;
It is described according to the mode that updates the data described in base data replicas storage store it is described update the data, including:
The initial data is synchronized in the base data replicas;
The data to be updated in the base data replicas are determined based on the data to be updated in the initial data;
It is described update the data by the data update to be updated in the base data replicas.
6. the method that data are restored according to claim 5, which is characterized in that the initial data is synchronized to institute described While stating in base data replicas, further include:
Described update the data is stored in interim copy;
It is described the initial data is synchronized in the base data replicas after, determine in the base data replicas Data to be updated;
It is updating the data in the interim copy by data update to be updated in the base data replicas.
7. the method that data are restored according to claim 2, which is characterized in that the determination base data replicas storage The mode updated the data is the third predetermined manner;
It is described according to the mode that updates the data described in base data replicas storage store it is described update the data, including:
It is updated the data described in storage in the base data replicas;
Determine the first position information that the data to be updated store in the initial data;
Determine the second position information updated the data described in storage in the base data replicas;
Book bitmap is established, the book bitmap includes the mapping of the first position information and the second position information Relationship.
8. the method that data are restored according to claim 1, which is characterized in that it is described based on remaining data memory space and Before the quantity of generation base data replicas determines the mode that the base data replicas storage updates the data, further include:
Based on the quantity for needing capture time node data to determine generation base data replicas.
9. the device that a kind of data are restored, which is characterized in that including:
Initial data storage unit, for obtaining and storing initial data;
Determination unit, for when there are when data to be updated, be based on remaining data memory space and generate former for the initial data The quantity of beginning data copy determines the mode that the base data replicas storage updates the data;
Update the data storage unit, for according to the mode that updates the data described in base data replicas storage store it is described more New data;
Unit is redirected, is the original number for when receiving the instruction of data recovery, data storage path to be redirected According to the store path of copy.
10. the device that data are restored according to claim 9, which is characterized in that the determination unit is additionally operable to:
When the quantity that the remaining data memory space is more than preset value, and generates the base data replicas is more than 1, determine The mode that the base data replicas storage updates the data is the first predetermined manner;
When the quantity that the remaining data memory space is more than preset value, and generates the base data replicas is less than or equal to 1, Determine that the mode that the base data replicas storage updates the data is the second predetermined manner;
When the residual memory space is less than or equal to the preset value, determine what the base data replicas storage updated the data Mode is third predetermined manner.
11. the device that data are restored according to claim 10, which is characterized in that the determination base data replicas is deposited It is first predetermined manner to store up the mode updated the data;
The storage unit that updates the data is specifically used for:
It is described update the data by data update to be updated described in the initial data;
Updated initial data is synchronized in the base data replicas.
12. the device restored according to data described in claim 11, which is characterized in that the storage unit that updates the data specifically is used In:
Newer data in updated initial data are synchronized in the base data replicas.
13. the device that data are restored according to claim 10, which is characterized in that the determination base data replicas is deposited It is second predetermined manner to store up the mode updated the data;
The storage unit that updates the data is specifically used for:
The initial data is synchronized in the base data replicas;
The data to be updated in the base data replicas are determined based on the data to be updated in the initial data;
It is described update the data by the data update to be updated in the base data replicas.
14. the device restored according to data described in claim 13, which is characterized in that the storage unit that updates the data specifically is used In:
Described update the data is stored in interim copy;
Determine the data to be updated in the base data replicas;
It is updating the data in the interim copy by data update to be updated in the base data replicas.
15. the device that data are restored according to claim 10, which is characterized in that the determination base data replicas is deposited It is the third predetermined manner to store up the mode updated the data;
The storage unit that updates the data is specifically used for:
It is updated the data described in storage in the base data replicas;
Determine the first position information that the data to be updated store in the initial data;
Determine the second position information updated the data described in storage in the base data replicas;
Initial data volume bitmap is established, the initial data volume bitmap includes the first position information and the second confidence The mapping relations of breath.
16. the device that data are restored according to claim 9, which is characterized in that the determination unit is additionally operable to:
Based on the quantity for needing capture time node data to determine generation base data replicas.
17. a kind of replica management server, which is characterized in that including:
Memory, processor, communication interface and bus;
Memory, processor and communication interface are connected by bus and complete mutual communication;
Memory is for storing program code;
Processor runs journey corresponding with executable program code by reading the executable program code stored in memory Sequence, for executing a kind of method that data are restored, the method that the data are restored includes:
Store the initial data obtained;
When initial data is there are when data to be updated, the quantity based on remaining data memory space and generation base data replicas is true Determine the mode that base data replicas storage updates the data;
It is stored and is updated the data according to the mode that base data replicas storage updates the data;
When receiving the instruction of data recovery, data storage path is redirected into the store path for base data replicas.
CN201710197375.5A 2017-03-29 2017-03-29 The method, apparatus and replica management server that data are restored Pending CN108664353A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710197375.5A CN108664353A (en) 2017-03-29 2017-03-29 The method, apparatus and replica management server that data are restored

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710197375.5A CN108664353A (en) 2017-03-29 2017-03-29 The method, apparatus and replica management server that data are restored

Publications (1)

Publication Number Publication Date
CN108664353A true CN108664353A (en) 2018-10-16

Family

ID=63786202

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710197375.5A Pending CN108664353A (en) 2017-03-29 2017-03-29 The method, apparatus and replica management server that data are restored

Country Status (1)

Country Link
CN (1) CN108664353A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111444114A (en) * 2019-01-16 2020-07-24 阿里巴巴集团控股有限公司 Method, device and system for processing data in nonvolatile memory
CN113448772A (en) * 2020-11-23 2021-09-28 北京新氧科技有限公司 Refined data rollback method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120036394A1 (en) * 2009-04-15 2012-02-09 Chengdu Huawei Symantec Technologies Co., Ltd. Data recovery method, data node, and distributed file system
CN103678039A (en) * 2013-12-05 2014-03-26 华为技术有限公司 Data recovery method and device
CN103870362A (en) * 2014-03-21 2014-06-18 华为技术有限公司 Data recovery method, data recovery device and backup system
CN105487940A (en) * 2015-11-18 2016-04-13 华为技术有限公司 Disaster recovery side, production side and data recovery method between disaster recovery side and production side

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120036394A1 (en) * 2009-04-15 2012-02-09 Chengdu Huawei Symantec Technologies Co., Ltd. Data recovery method, data node, and distributed file system
CN103678039A (en) * 2013-12-05 2014-03-26 华为技术有限公司 Data recovery method and device
CN103870362A (en) * 2014-03-21 2014-06-18 华为技术有限公司 Data recovery method, data recovery device and backup system
CN105487940A (en) * 2015-11-18 2016-04-13 华为技术有限公司 Disaster recovery side, production side and data recovery method between disaster recovery side and production side

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111444114A (en) * 2019-01-16 2020-07-24 阿里巴巴集团控股有限公司 Method, device and system for processing data in nonvolatile memory
CN111444114B (en) * 2019-01-16 2023-06-13 阿里巴巴集团控股有限公司 Method, device and system for processing data in nonvolatile memory
CN113448772A (en) * 2020-11-23 2021-09-28 北京新氧科技有限公司 Refined data rollback method and device
CN113448772B (en) * 2020-11-23 2023-08-11 北京新氧科技有限公司 Method and device for rolling back refined data

Similar Documents

Publication Publication Date Title
US10642694B2 (en) Monitoring containers in a distributed computing system
EP3474516B1 (en) Data processing method and device
EP2784675B1 (en) Method, device and system for data reconstruction
EP2972983B1 (en) Dynamically managing memberships in replicated state machines within a distributed computing environment
CN106407040A (en) Remote data copy method and system
US20180150230A1 (en) State machine abstraction for log-based consensus protocols
CN108351860A (en) The distributed storage devices based on RDMA of low latency
CN114637475B (en) Distributed storage system control method and device and readable storage medium
CN103780638A (en) Data synchronization method and system
JP4715774B2 (en) Replication method, replication system, storage device, program
EP3848809A1 (en) Data disaster recovery method and site
JP6455898B2 (en) Data replication method, primary data storage controller, apparatus, system, and program
CN104486438B (en) The disaster recovery method and device of distributed memory system
CN106855834B (en) Data backup method, device and system
CN109144416A (en) The method and apparatus for inquiring data
CN108762982B (en) A kind of database restoring method, apparatus and system
WO2017008648A1 (en) Cluster switching method and equipment
CN106802892A (en) For the method and apparatus of master/slave data consistency verification
JP6196389B2 (en) Distributed disaster recovery file synchronization server system
CN111367856B (en) Data copying method, device, electronic equipment and machine-readable storage medium
CN111666266A (en) Data migration method and related equipment
CN114564339A (en) Disk image file cross-platform migration method and system
CN109542684A (en) A kind of storage remote copy method, device, equipment and storage medium
CN109726211B (en) Distributed time sequence database
CN108664353A (en) The method, apparatus and replica management server that data are restored

Legal Events

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

Application publication date: 20181016