CN103902407A - Virtual machine recovery method and server - Google Patents

Virtual machine recovery method and server Download PDF

Info

Publication number
CN103902407A
CN103902407A CN201210590607.0A CN201210590607A CN103902407A CN 103902407 A CN103902407 A CN 103902407A CN 201210590607 A CN201210590607 A CN 201210590607A CN 103902407 A CN103902407 A CN 103902407A
Authority
CN
China
Prior art keywords
backup data
virtual machine
data piece
backup
mark
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
CN201210590607.0A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201210590607.0A priority Critical patent/CN103902407A/en
Publication of CN103902407A publication Critical patent/CN103902407A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

The invention discloses a virtual machine recovery method and a server. The virtual machine recovery method comprises the steps of obtaining a recovery instruction for recovering a virtual machine, wherein the recovery instruction comprises an identity of the virtual machine; obtaining associated data of the virtual machine according to the identity of the virtual machine, wherein the associated data include the association relation between backup data blocks of the virtual machine and identities of the backup data blocks of the virtual machine; obtaining identities of backup data blocks cached in a cache space; comparing the identities of the backup data blocks of the virtual machine with the identities of the backup data blocks cached in the cache space; if the identities of the backup data blocks of the virtual machine are matched with the identities of the backup data blocks cached in the cache space, reading the backup data blocks from the cache space; if the identities of the backup data blocks of the virtual machine are not matched with the identities of the backup data blocks cached in the cache space, reading the backup data blocks from a backup space; combining the read backup data blocks to be backup data of the virtual machine according to the association relation between the backup data blocks; recovering the virtual machine according to the backup data of the virtual machine. By means of the mode, the virtual machine recovery method and the server can increase the recovery speed of the virtual machine.

Description

A kind of virtual machine restoration methods and server
Technical field
The present invention relates to field of computer technology, particularly relate to a kind of method and server that recovers virtual machine.
Background technology
Disaster tolerant backup system refers to sets up a set of standby system in this locality, set up the standby system that a set of or many covers are suitable with local system in strange land.When under local backup system generation disaster scenario, can also use remote backup system, restoring data.
Virtual machine refer to by software simulation have complete hardware system function, operate in a complete computer in complete isolation environment.In the time that virtual machine breaks down, can send the recovery notice of recovering virtual machine to disaster tolerant backup system.Disaster tolerant backup system receives and recovers after notice, send to home server and local backup space the recovery instruction that recovers virtual machine respectively, so that home server reads the Backup Data of virtual machine from local backup space, and recover virtual machine according to Backup Data, or, disaster tolerant backup system sends to strange land server and remote backup space the recovery instruction that recovers virtual machine respectively, so that strange land server reads the Backup Data of virtual machine from remote backup space, and recover virtual machine according to Backup Data.
And no matter be that virtual machine is recovered in local recovery virtual machine or strange land, server all need to be from backup space, reads the Backup Data of complete virtual machine, and resume speed is slower.
Summary of the invention
The technical matters that embodiment of the present invention mainly solves is to provide a kind of restoration methods and server of virtual machine, can improve the resume speed of virtual machine.
First aspect, provides a kind of restoration methods of virtual machine, comprising: obtain the recovery instruction that recovers virtual machine, recover the mark that instruction comprises virtual machine; Obtain the associated data of virtual machine according to the mark of virtual machine, associated data comprises the mark of the Backup Data piece of incidence relation between the Backup Data piece of virtual machine and virtual machine, wherein, the Backup Data of virtual machine is divided into multiple Backup Data pieces, and multiple Backup Data piece is all stored in backup space; Obtain the mark of the Backup Data piece of spatial cache institute buffer memory; The comparison mark of Backup Data piece of virtual machine and the mark of the Backup Data piece of spatial cache institute buffer memory; If the mark of the Backup Data piece of the mark of the Backup Data piece of virtual machine and spatial cache institute buffer memory matches, read Backup Data piece from spatial cache, otherwise, read Backup Data piece from backup space; According to the incidence relation between Backup Data piece, the Backup Data of Backup Data piece composition virtual machine will be read; Recover virtual machine according to the Backup Data of virtual machine.
In conjunction with the implementation of first aspect, in the first possibility implementation of first aspect, the step that the Backup Data of virtual machine is divided into multiple Backup Data pieces comprises: the Backup Data of virtual machine is divided into multiple Backup Data pieces according to data de-duplication method.
In conjunction with the implementation of first aspect, in the second possibility implementation of first aspect, be designated data fingerprint, and data fingerprint is calculated to Backup Data piece by pre-defined algorithm.
In conjunction with the second possibility implementation of first aspect, in the third possibility implementation of first aspect, pre-defined algorithm comprises Secure Hash Algorithm and Message Digest Algorithm 5.
In conjunction with the implementation of first aspect, in the 4th kind of possibility implementation of first aspect, before receiving the recovery instruction that recovers virtual machine, also comprise: according to scheduling strategy, the Backup Data piece in backup space is called in to spatial cache, and remember the mark of the Backup Data piece of spatial cache institute buffer memory.
In conjunction with the 4th kind of possibility implementation of first aspect, in the 5th kind of possibility implementation of first aspect, the step of the Backup Data piece in backup space being called in to spatial cache according to scheduling strategy comprises: obtain the called statistical value of the Backup Data piece of backup space, called statistical value is for recording the invoked number of times of Backup Data piece; Whether the called statistical value of judgement is greater than predefine value; If called statistical value is greater than predefine value, the corresponding Backup Data piece of the statistical value that will be called is called in spatial cache.
Second aspect provides a kind of server, comprising: the first acquisition module, for obtaining the recovery instruction that recovers virtual machine, recovers the mark that instruction comprises virtual machine; The second acquisition module, for obtain the associated data of virtual machine according to the mark of virtual machine, associated data comprises the mark of the Backup Data piece of incidence relation between the Backup Data piece of virtual machine and virtual machine, wherein, the Backup Data of virtual machine is divided into multiple Backup Data pieces, and multiple Backup Data piece is all stored in backup space; The 3rd acquisition module, for obtaining the mark of Backup Data piece of spatial cache institute buffer memory; Comparing module, for comparing the mark of Backup Data piece of virtual machine and the mark of the Backup Data piece of spatial cache institute buffer memory; The first read module, matches for the mark of the mark of the Backup Data piece at virtual machine and the Backup Data piece of spatial cache institute buffer memory, reads Backup Data piece from spatial cache; The second read module, does not match for the mark of the mark of the Backup Data piece at virtual machine and the Backup Data piece of spatial cache institute buffer memory, reads Backup Data piece from backup space; Composite module, for according to the incidence relation between Backup Data piece, will read the Backup Data of Backup Data piece composition virtual machine; Recover module, for recovering virtual machine according to the Backup Data of virtual machine.
In conjunction with the implementation of second aspect, in the first possibility implementation of second aspect, be designated data fingerprint, and data fingerprint is calculated to Backup Data piece by pre-defined algorithm.
In conjunction with the first possibility implementation of second aspect, in the second possibility implementation of second aspect, pre-defined algorithm comprises Secure Hash Algorithm and Message Digest 5.
In conjunction with second aspect implementation, in the third possibility implementation of second aspect, server also comprises: call in module, for according to according to scheduling strategy, the Backup Data piece of backup space being called in to spatial cache, and remember the mark of the Backup Data piece at the slow place of spatial cache.
In conjunction with the third possibility implementation of second aspect, in the 4th kind of possibility implementation of second aspect, calling in module comprises: acquiring unit, and for obtaining the called statistical value of Backup Data piece of backup space, called statistical value is for recording the invoked number of times of Backup Data piece; Judging unit, for judging whether called statistical value is greater than predefine value; Scheduling unit, for determine to such an extent that called statistical value is greater than predefine value at judging unit, the corresponding Backup Data piece of the statistical value that will be called is called in spatial cache.
The beneficial effect of embodiment of the present invention is: by the Backup Data piece of focus is called in to spatial cache, in the time that needs recover virtual machine, obtain the Backup Data piece matching with the mark of the Backup Data piece of virtual machine from spatial cache, obtain and the unmatched Backup Data piece of mark of the Backup Data piece of virtual machine from backup space, and by the Backup Data piece composition Backup Data getting, recover virtual machine according to Backup Data.Wherein, because the read or write speed of spatial cache is better than backup space, the speed of obtaining Backup Data piece from spatial cache is faster, improves the speed of recovering virtual machine.Further, if when batch save virtual machine, the identical Backup Data piece of part in virtual machine can obtain from spatial cache in batches, reduces the burden of backup space, further improves the speed of recovering virtual machine.
Brief description of the drawings
In order to be illustrated more clearly in embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the structural representation of virtual machine backup/restoration system of the present invention.
Fig. 2 is the process flow diagram of virtual machine restoration methods the first embodiment of the present invention;
Fig. 3 is the schematic diagram of applying data de-duplication method reduction storage space in virtual machine restoration methods the first embodiment of the present invention;
Fig. 4 is the process flow diagram of virtual machine restoration methods the second embodiment of the present invention;
Fig. 5 is the process flow diagram of in virtual machine restoration methods the second embodiment of the present invention, Backup Data piece in backup space being called in to spatial cache;
Fig. 6 is the structural representation of server the first embodiment of the present invention;
Fig. 7 is the structural representation of server the second embodiment of the present invention.
Embodiment
Refer to Fig. 1, Fig. 1 is the structural representation of virtual machine backup/restoration system of the present invention.As shown in the figure, described system 10 comprises server 11, spatial cache 12 and backup space 13.
Server 11 is divided into the Backup Data of virtual machine multiple Backup Data pieces in advance, each Backup Data piece is to there being Backup Data block identification, each virtual machine is to there being the incidence relation of one group of Backup Data block identification, make the server 11 can be according to the Backup Data piece of the incidence relation combination virtual machine of Backup Data block identification, thus the Backup Data of reduction virtual machine.The mark of the incidence relation between Backup Data piece corresponding to virtual machine and the Backup Data piece of virtual machine is all recorded in associated data, and sets up corresponding relation between associated data and the mark of virtual machine.
Server 11 is called in spatial cache 12 according to scheduling strategy by the Backup Data piece in backup space 13, and the mark of the Backup Data piece of 12 buffer memorys in record buffer memory space.Wherein, scheduling strategy can be set according to actual conditions, for example: the Backup Data piece that called number of times can be greater than or equal to predetermined value is called in spatial cache 12.It should be noted that: Backup Data piece is called in spatial cache 12 by server 11, can receive after the recovery instruction that recovers virtual machine at server 11, or, after upper once server 11 completes recovery virtual machine.
Server 11 receives after the recovery instruction that recovers virtual machine, recovers the mark that instruction comprises virtual machine, obtains the associated data of virtual machine according to the mark of virtual machine.Server 11 obtains the Backup Data mark of 12 buffer memorys of spatial cache, and compare the mark of Backup Data piece of virtual machine and the mark of the Backup Data piece of 12 buffer memorys of spatial cache, if the mark of the Backup Data piece of the mark of the Backup Data piece of virtual machine and 12 buffer memorys of spatial cache matches, obtain Backup Data piece according to the mark of Backup Data piece from spatial cache 12, otherwise, obtain Backup Data piece from backup space 13.Server 11, according to the incidence relation between Backup Data piece, will get the Backup Data of Backup Data piece composition virtual machine, and recovers virtual machine according to the Backup Data of virtual machine.
In embodiment of the present invention, server 11 is called in spatial cache 12 by Backup Data piece in advance.In the time that server 11 receives recovery instruction, obtain the Backup Data piece matching with the mark of the Backup Data piece of virtual machine from spatial cache 12, obtain and the unmatched Backup Data piece of mark of the Backup Data piece of virtual machine from backup space 13, and by the Backup Data piece composition Backup Data getting, recover virtual machine according to Backup Data.Wherein, because the read or write speed of spatial cache 12 is better than backup space 13, the speed of obtaining Backup Data piece from spatial cache 12 is faster, improves the speed of recovering virtual machine.Further, if when batch save virtual machine, the identical Backup Data piece of part in virtual machine can obtain from spatial cache 12 in batches, further reduces the burden of backup space, further improves the speed of recovering virtual machine.
Refer to Fig. 2, Fig. 2 is the process flow diagram of restoration methods first embodiment of virtual machine of the present invention.As shown in the figure, described method comprises:
Step S201: server obtains the recovery instruction that recovers virtual machine, recovers the mark that instruction comprises virtual machine;
Virtual machine refer to by software simulation have complete hardware system function, operate in a complete computer in complete isolation environment, wherein, virtual machine can parasitize on server.The mark that is designated virtual machine of virtual machine, for identifying different virtual machine, wherein, mark can customize tag, also can the IP address of virtual machine or the calculating title of virtual machine etc.
Step S202: server obtains the associated data of virtual machine according to the mark of virtual machine; associated data comprises the mark of the Backup Data piece of incidence relation between the Backup Data piece of virtual machine and virtual machine; wherein; the Backup Data of virtual machine is divided into multiple Backup Data pieces, and multiple Backup Data piece is all stored in backup space;
Incidence relation between Backup Data piece is the ordinal relation referring to for Backup Data piece, and server can be combined into complete Backup Data by Backup Data piece according to this incidence relation.Further, the method that the Backup Data of virtual machine is divided into multiple Backup Data pieces can be data de-duplication method, virtual machine be designated data fingerprint, incidence relation is sequence relation.
The method that the Backup Data of virtual machine is divided into multiple Backup Data pieces according to data de-duplication method is: first the Backup Data of virtual machine is divided into many parts of Backup Data pieces, then adopt pre-defined algorithm to calculate Backup Data piece, obtain the data fingerprint of Backup Data, wherein, pre-defined algorithm comprises Message Digest Algorithm 5 (MD5, Message Digest Algorithm5) or Secure Hash Algorithm (SHA1, Secure Hash Algorithm) etc.; Data fingerprint is compared between two again, if two data fingerprints match, illustrate that the corresponding Backup Data piece of two data fingerprints is identical Backup Data piece, identical Backup Data piece only retains a in backup space, play the effect that reduces the shared storage space of Backup Data, as shown in Figure 3; The Backup Data of each virtual machine is to there being the sequence of one group of data fingerprint, and records the sequence relation of the corresponding data fingerprint of virtual machine and data fingerprint by associated data.Further, set up the corresponding relation of mark and the associated data of virtual machine.
Step S203: server obtains the mark of the Backup Data piece of spatial cache institute buffer memory;
Spatial cache is for refer to can high-speed read-write, and read or write speed is better than the storage space of backup space.Concrete restriction is not done in the mark institute memory location of the Backup Data piece of spatial cache institute buffer memory, can be stored in one section of space that spatial cache is allocated in advance, or, be stored in the self-contained storage space of server.If the mark of the Backup Data piece of spatial cache institute buffer memory is stored in one section of space that spatial cache is allocated in advance,, in the time that Backup Data piece is called in to spatial cache, also will identifies and be stored in this one section of space allocating in advance accordingly.
Further, there is one-to-one relationship in the buffer address in the mark of the Backup Data piece of spatial cache institute buffer memory and Backup Data piece place spatial cache, the backup address in the mark of the Backup Data piece in backup space and Backup Data piece place backup space also exists one-to-one relationship.Can get buffer address or the backup address of Backup Data piece by the mark of Backup Data piece, then read Backup Data piece according to buffer address from spatial cache, or, read Backup Data piece according to backup address from backup space.
Step S204: the server comparison mark of Backup Data piece of virtual machine and the mark of the Backup Data piece of spatial cache institute buffer memory, if the mark of the Backup Data piece of the mark of the Backup Data piece of virtual machine and spatial cache institute buffer memory matches, enter step S205, otherwise enter step S206;
Step S205: server obtains Backup Data piece from spatial cache;
If when the mark of the Backup Data piece of the mark of the Backup Data piece of virtual machine and spatial cache institute buffer memory matches, illustrate that spatial cache is cached with this Backup Data piece, server can obtain the corresponding buffer address of mark of Backup Data piece, and from spatial cache, reads Backup Data piece according to buffer address.
Step S206: server obtains Backup Data piece from backup space;
If when the mark of the Backup Data piece of the mark of the Backup Data piece of virtual machine and spatial cache institute buffer memory does not match, illustrate and in spatial cache, be not cached with this Backup Data piece, server obtains the corresponding backup address of mark of Backup Data piece, and from backup space, obtains Backup Data piece according to backup address.
Step S207: server, according to the incidence relation between Backup Data piece, will get the Backup Data of Backup Data piece composition virtual machine, and recovers virtual machine according to the Backup Data of virtual machine.
Server gets after complete Backup Data, directly on server, recovers virtual machine according to Backup Data.
In embodiment of the present invention, by Backup Data piece is called in to spatial cache, in the time that needs recover virtual machine, obtain the Backup Data piece matching with the mark of the Backup Data piece of virtual machine from spatial cache, obtain and the unmatched Backup Data piece of mark of the Backup Data piece of virtual machine from backup space, and by the Backup Data piece composition Backup Data getting, recover virtual machine according to Backup Data.Wherein, because the read or write speed of spatial cache is better than backup space, the speed of obtaining Backup Data piece from spatial cache is faster, improves the speed of recovering virtual machine.Further, if when batch save virtual machine, the identical Backup Data piece of part in virtual machine can obtain from spatial cache in batches, further reduces the burden of backup space, further improves the speed of recovering virtual machine.
Refer to Fig. 4, Fig. 4 is the process flow diagram of virtual machine restoration methods the second embodiment of the present invention.As shown in the figure, described method comprises:
Step S301: server is called in spatial cache according to scheduling strategy by the Backup Data piece in backup space, and remember the Backup Data block identification of spatial cache institute buffer memory;
Backup space is for the Backup Data of storage virtual machine, and the Backup Data of virtual machine can be divided into multiple Backup Data pieces according to data de-duplication method, substitutes Backup Data with multiple Backup Data pieces, is stored in backup space.If Backup Data piece is to divide and obtain according to data de-duplication method, Backup Data block identification is the data fingerprint of Backup Data piece.
The method that the Backup Data piece of virtual machine is divided into multiple Backup Data pieces according to data de-duplication method is: first the Backup Data of virtual machine is divided into many parts of Backup Data pieces, then adopt pre-defined algorithm to calculate Backup Data piece, obtain the data fingerprint of Backup Data, wherein, pre-defined algorithm comprises MD5 or SHA1 etc.; Data fingerprint is compared between two again, if two data fingerprints match, illustrate that the corresponding Backup Data piece of two data fingerprints is identical Backup Data piece, identical Backup Data piece only retains a in backup space, play the effect that reduces the shared storage space of Backup Data, as shown in Figure 3; The Backup Data of each virtual machine is to there being the sequence of one group of data fingerprint, and records the incidence relation of the corresponding data fingerprint of virtual machine and data fingerprint by associated data.Further, make the mark of associated data and virtual machine set up corresponding relation.
Spatial cache is for the Backup Data piece of buffer memory virtual machine, and spatial cache read or write speed is better than backup space.Scheduling strategy can be set according to actual conditions, and in embodiment of the present invention, a kind of scheduling strategy is that the Backup Data piece of focus is called in to spatial cache, and as shown in Figure 5, step S301 comprises:
Step S3011: server obtains the called statistical value of Backup Data piece, called statistical value is for recording the invoked number of times of Backup Data piece;
Each Backup Data piece correspondence is provided with a called statistical value, and when server reads a Backup Data piece, called statistical value increases predefine spacing value accordingly, and for example: predefine spacing value is one, called statistical value increases by one.
Step S3012: whether the called statistical value of server judgement is greater than predefine value, if called statistical value is greater than predefine value, enters step S3013;
The called statistical value of Backup Data piece is greater than predefine value, and defining this Backup Data piece is focus Backup Data piece, needs this focus Backup Data piece to call in spatial cache.
Step S3013: the corresponding Backup Data piece of the statistical value that will be called is called in spatial cache, and the mark of the Backup Data piece of record buffer memory space institute buffer memory.
Step S302: server obtains the recovery instruction that recovers virtual machine, recovers the mark that instruction comprises virtual machine;
The mark of virtual machine is for uniquely tagged virtual machine.Virtual machine refer to by software simulation have complete hardware system function, operate in a complete computer in complete isolation environment, wherein, virtual machine parasitizes on server.
Step S303: server obtains the associated data of virtual machine according to the mark of virtual machine; associated data comprises the mark of the Backup Data piece of incidence relation between the Backup Data piece of virtual machine and virtual machine; wherein; the Backup Data of virtual machine is divided into multiple Backup Data pieces, and multiple Backup Data piece is all stored in backup space;
Incidence relation between Backup Data piece is the sequencing relation of Backup Data piece, according to this incidence relation, Backup Data piece is formed to complete Backup Data.In embodiment of the present invention, the method that the Backup Data of virtual machine is divided into multiple Backup Data pieces is data de-duplication method, the data fingerprint that is designated Backup Data piece of Backup Data piece, data fingerprint is by being that pre-defined algorithm calculates Backup Data piece, wherein, pre-defined algorithm comprises MD5 or SHA1 algorithm.
Step S304: server obtains the mark of the Backup Data piece of spatial cache institute buffer memory;
The mark of the Backup Data piece of spatial cache institute buffer memory can be stored in spatial cache and allocate one section of space in advance, also can be stored in the self-contained storage space of server.
Further, there is one-to-one relationship in the buffer address in the mark of the Backup Data piece of spatial cache institute buffer memory and Backup Data piece place spatial cache, the backup address in the mark of the Backup Data piece in backup space and Backup Data piece place backup space also exists one-to-one relationship.Can get buffer address or the backup address of Backup Data piece by the mark of Backup Data piece, then read Backup Data piece according to buffer address from spatial cache, or, read Backup Data piece according to backup address from backup space.
Step S305: the server comparison mark of Backup Data piece of virtual machine and the mark of the Backup Data piece of spatial cache institute buffer memory, if the mark of the Backup Data piece of the mark of the Backup Data piece of virtual machine and spatial cache institute buffer memory matches, enter step S306, otherwise enter step S307;
Step S306: server obtains Backup Data piece from spatial cache;
If when the mark of the Backup Data piece of the mark of the Backup Data piece of virtual machine and spatial cache institute buffer memory matches, server obtains the corresponding buffer address of mark of Backup Data piece, and from spatial cache, obtains Backup Data piece according to buffer address.
Step S307: server obtains Backup Data piece from backup space;
If when the mark of the Backup Data piece of the mark of the Backup Data piece of virtual machine and spatial cache institute buffer memory does not match, server obtains the corresponding backup address of mark of Backup Data piece, and from backup space, obtains Backup Data piece according to backup address.
Step S308: server, according to the incidence relation between Backup Data piece, will get the Backup Data of Backup Data piece composition virtual machine, and recovers virtual machine according to the Backup Data of virtual machine.
Server gets after complete Backup Data, directly on server, recovers virtual machine according to Backup Data.
In embodiment of the present invention, server is called in spatial cache by Backup Data piece from backup space according to scheduling strategy in advance.In the time that server recovers instruction, server obtains the Backup Data piece matching with the mark of the Backup Data piece of virtual machine from spatial cache, obtain and the unmatched Backup Data piece of mark of the Backup Data piece of virtual machine from backup space, and by the Backup Data piece composition Backup Data getting, recover virtual machine according to Backup Data.Wherein, because the read or write speed of spatial cache is better than backup space, the speed of obtaining Backup Data piece from spatial cache is faster, improves the speed of recovering virtual machine.Further, if when batch save virtual machine, the identical Backup Data piece of part in virtual machine can obtain from spatial cache in batches, further reduces the burden of backup space, further improves the speed of recovering virtual machine.
Refer to Fig. 6, Fig. 6 is the structural representation of server the first embodiment of the present invention.As shown in the figure, described server 40 comprises the first acquisition module 402, the second acquisition module 403, the 3rd acquisition module 404, comparing module 405, the first read module 406, the second read module 407, composite module 408 and recovers module 409.
The first acquisition module 402 obtains the recovery instruction that recovers virtual machine, recovers the mark that instruction comprises virtual machine.The second acquisition module 403 obtains the associated data of virtual machine according to the mark of virtual machine, associated data comprises the mark of the Backup Data piece of incidence relation between the Backup Data piece of virtual machine and virtual machine, wherein, the Backup Data of virtual machine is divided into multiple Backup Data pieces, and multiple Backup Data piece is all stored in backup space.In embodiment of the present invention, the method that the Backup Data of virtual machine is divided into multiple Backup Data pieces can be data de-duplication method, Backup Data piece be designated data fingerprint, data fingerprint is obtained Backup Data piece meter by pre-defined algorithm, wherein, pre-defined algorithm comprises MD5 or SHA1 algorithm.
The 3rd acquisition module 404 obtains the mark of the Backup Data piece of spatial cache institute buffer memory.Comparing module 405 is compared the mark of Backup Data piece of virtual machine and the mark of the Backup Data piece of spatial cache institute buffer memory.If comparing module 405 comparisons obtain the mark of Backup Data piece of virtual machine and the mark of the Backup Data piece of spatial cache institute buffer memory matches, the first read module 406 reads this Backup Data piece from spatial cache, otherwise the second read module 407 reads this Backup Data piece from backup space.
Composite module 408, according to the incidence relation between Backup Data piece, will read the Backup Data of Backup Data piece composition virtual machine.Recover module 409 and recover virtual machine according to the Backup Data of virtual machine.
Server 40 also comprises calls in module 401.Call in module 401, according to scheduling strategy, the Backup Data piece in backup space is called in to spatial cache, and the mark of the Backup Data piece of record buffer memory space institute buffer memory.Wherein, scheduling strategy can be set according to actual conditions, and in embodiment of the present invention, a kind of scheduling strategy is the Backup Data block dispatching strategy based on focus, calls in module 401 and comprises acquiring unit 4011, judging unit 4012 and scheduling unit 4013.
Acquiring unit 4011 obtains the called statistical value of the Backup Data piece of backup space, and called statistical value is for recording the invoked number of times of Backup Data piece.Whether the called statistical value of judging unit 4012 is greater than predefine value.If judging unit 4012 determines to such an extent that called statistical value is greater than predefine value, the scheduling unit 4013 corresponding Backup Data piece of statistical value that will be called is called in spatial cache, and records the mark of Backup Data piece.
In embodiment of the present invention, call in module 401 and in advance Backup Data piece is called in to spatial cache, in the time that needs recover virtual machine, the first read module 406 reads the Backup Data piece matching with the mark of the Backup Data piece of virtual machine from spatial cache, the second read module 407 reads and the unmatched Backup Data piece of mark of the Backup Data piece of virtual machine from backup space, composite module 408, by the Backup Data piece composition Backup Data getting, recovers module 409 and recovers virtual machine according to Backup Data.Wherein, because the read or write speed of spatial cache is better than backup space, the speed of obtaining Backup Data piece from spatial cache is faster, improves the speed of recovering virtual machine.Further, if when batch save virtual machine, the identical Backup Data piece of part in virtual machine can obtain from spatial cache in batches, further reduces the burden of backup space, further improves the speed of recovering virtual machine.
Refer to Fig. 5, Fig. 5 is the structural representation of server the second embodiment of the present invention.As shown in the figure, described server 50 comprises processor 501, storer 502, bus 503 and interface 504.Processor 501, interface 504 and storer 502 are all connected with bus 503.
Processor 501, for obtain the recovery instruction that recovers virtual machine by interface 504, recovers the mark that instruction comprises virtual machine; Obtain the associated data of virtual machine according to the mark of virtual machine, associated data comprises the mark of the Backup Data piece of incidence relation between the Backup Data piece of virtual machine and virtual machine, wherein, the Backup Data of virtual machine is divided into multiple Backup Data pieces, and multiple Backup Data piece is all stored in backup space 52; Obtain the mark of the Backup Data piece of 51 buffer memorys of spatial cache; The comparison mark of Backup Data piece of virtual machine and the mark of the Backup Data piece of 51 buffer memorys of spatial cache; If the mark of the Backup Data piece of the mark of the Backup Data piece of virtual machine and 51 buffer memorys of spatial cache matches, read Backup Data piece by interface 504 from spatial cache 51, otherwise, read Backup Data piece by interface 504 from backup space 52; According to the incidence relation between Backup Data piece, the Backup Data of Backup Data piece composition virtual machine will be read; Recover virtual machine according to the Backup Data of virtual machine.
Wherein, the above-mentioned processing procedure that processor 501 is carried out is normally completed by one section of programmed control, and program is deposited in storer 502, in the time that needs carry out above-mentioned action, program is called in to processor 501, has been controlled by processor 501.Certainly, above-mentioned processing procedure can also be to be completed by hardware.
The foregoing is only embodiments of the present invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes instructions of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.

Claims (11)

1. a restoration methods for virtual machine, is characterized in that, described method comprises:
Obtain the recovery instruction that recovers virtual machine, described recovery instruction comprises the mark of described virtual machine;
Obtain the associated data of described virtual machine according to the mark of described virtual machine, described associated data comprises the mark of the Backup Data piece of incidence relation between the Backup Data piece of described virtual machine and virtual machine, wherein, the Backup Data of described virtual machine is divided into multiple Backup Data pieces, and described multiple Backup Data piece is all stored in backup space;
Obtain the mark of the Backup Data piece of described spatial cache institute buffer memory;
Compare the mark of Backup Data piece of described virtual machine and the mark of the Backup Data piece of described spatial cache institute buffer memory;
If the mark of the Backup Data piece of the mark of the Backup Data piece of described virtual machine and described spatial cache institute buffer memory matches, read described Backup Data piece from described spatial cache, otherwise, read described Backup Data piece from described backup space;
According to the incidence relation between described Backup Data piece, will read described Backup Data piece and form the Backup Data of described virtual machine;
Recover described virtual machine according to the Backup Data of described virtual machine.
2. method according to claim 1, is characterized in that, the step that the Backup Data of described virtual machine is divided into multiple Backup Data pieces comprises:
The Backup Data of described virtual machine is divided into multiple Backup Data pieces according to data de-duplication method.
3. method according to claim 1, is characterized in that,
The described data fingerprint that is designated, and described data fingerprint is calculated Backup Data piece by pre-defined algorithm.
4. method according to claim 3, is characterized in that,
Described pre-defined algorithm comprises Secure Hash Algorithm and Message Digest Algorithm 5.
5. method according to claim 1, is characterized in that, before recovering the recovery instruction of virtual machine, also comprises in described reception:
According to scheduling strategy, the Backup Data piece in described backup space is called in to spatial cache, and remember the mark of the Backup Data piece of described spatial cache institute buffer memory.
6. method according to claim 5, is characterized in that, described step of the Backup Data piece in described backup space being called in to spatial cache according to scheduling strategy comprises:
Obtain the called statistical value of the Backup Data piece of backup space, described called statistical value is for recording the invoked number of times of Backup Data piece;
Judge whether described called statistical value is greater than predefine value;
If described called statistical value is greater than predefine value, corresponding described called statistical value Backup Data piece is called in to spatial cache.
7. a server, is characterized in that, described server comprises:
The first acquisition module, for obtaining the recovery instruction that recovers virtual machine, described recovery instruction comprises the mark of described virtual machine;
The second acquisition module, for obtain the associated data of described virtual machine according to the mark of described virtual machine, described associated data comprises the mark of the Backup Data piece of incidence relation between the Backup Data piece of described virtual machine and virtual machine, wherein, the Backup Data of described virtual machine is divided into multiple Backup Data pieces, and described multiple Backup Data piece is all stored in backup space;
The 3rd acquisition module, for obtaining the mark of Backup Data piece of described spatial cache institute buffer memory;
Comparing module, for comparing the mark of Backup Data piece of described virtual machine and the mark of the Backup Data piece of described spatial cache institute buffer memory;
The first read module, matches for the mark of the mark of the Backup Data piece at described virtual machine and the Backup Data piece of described spatial cache institute buffer memory, reads described Backup Data piece from described spatial cache;
The second read module, does not match for the mark of the mark of the Backup Data piece at described virtual machine and the Backup Data piece of described spatial cache institute buffer memory, reads described Backup Data piece from described backup space;
Composite module, for according to the incidence relation between described Backup Data piece, will read described Backup Data piece and form the Backup Data of described virtual machine;
Recover module, for recovering described virtual machine according to the Backup Data of described virtual machine.
8. the server of stating according to claim 7, is characterized in that,
The described data fingerprint that is designated, and described data fingerprint is calculated Backup Data piece by pre-defined algorithm.
9. server according to claim 8, is characterized in that,
Described pre-defined algorithm comprises Secure Hash Algorithm and Message Digest 5.
10. server according to claim 7, is characterized in that, described server also comprises:
Call in module, for according to according to scheduling strategy, the Backup Data piece of described backup space being called in to spatial cache, and remember the mark of the Backup Data piece at slow place described in described spatial cache.
11. servers according to claim 10, is characterized in that, described in call in module and comprise:
Acquiring unit, for obtaining the called statistical value of Backup Data piece of backup space, described called statistical value is for recording the invoked number of times of Backup Data piece;
Judging unit, for judging whether described called statistical value is greater than predefine value;
Scheduling unit, for determine to such an extent that called statistical value is greater than predefine value at described judging unit, calls in spatial cache by corresponding described called statistical value Backup Data piece.
CN201210590607.0A 2012-12-31 2012-12-31 Virtual machine recovery method and server Pending CN103902407A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210590607.0A CN103902407A (en) 2012-12-31 2012-12-31 Virtual machine recovery method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210590607.0A CN103902407A (en) 2012-12-31 2012-12-31 Virtual machine recovery method and server

Publications (1)

Publication Number Publication Date
CN103902407A true CN103902407A (en) 2014-07-02

Family

ID=50993744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210590607.0A Pending CN103902407A (en) 2012-12-31 2012-12-31 Virtual machine recovery method and server

Country Status (1)

Country Link
CN (1) CN103902407A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104506619A (en) * 2014-12-22 2015-04-08 华为技术有限公司 Data backup and recovery method and device, and server
CN106020932A (en) * 2015-05-21 2016-10-12 中国科学院计算技术研究所 Security protection method and system used for KVM system
CN106294018A (en) * 2016-08-11 2017-01-04 浪潮(北京)电子信息产业有限公司 A kind of virtual machine restoration methods and device
CN106547642A (en) * 2015-09-18 2017-03-29 中国移动通信集团公司 A kind of method and device of data backup memory
WO2017147794A1 (en) * 2016-03-02 2017-09-08 华为技术有限公司 Differential data backup method and device
CN109324867A (en) * 2017-07-31 2019-02-12 郑州云海信息技术有限公司 A kind of virtual machine temporary storage method, restoration methods and device
CN109992449A (en) * 2017-12-31 2019-07-09 中国移动通信集团四川有限公司 Backup image management system, method, equipment and medium
CN110275801A (en) * 2019-06-21 2019-09-24 珠海格力电器股份有限公司 Data recovery method, device, system, computer equipment and storage medium
CN110399202A (en) * 2019-06-29 2019-11-01 苏州浪潮智能科技有限公司 A kind of method and device of efficient virtual machine disaster tolerance
CN112612646A (en) * 2020-12-25 2021-04-06 深圳市科力锐科技有限公司 Application quick recovery method, device, equipment and storage medium
CN115237679A (en) * 2022-09-21 2022-10-25 南京拓界信息技术有限公司 Data recovery system based on host system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101383991A (en) * 2007-09-06 2009-03-11 大唐移动通信设备有限公司 Customer scheduling method and device in packet service
CN101414277A (en) * 2008-11-06 2009-04-22 清华大学 Need-based increment recovery disaster-containing system and method based on virtual machine

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101383991A (en) * 2007-09-06 2009-03-11 大唐移动通信设备有限公司 Customer scheduling method and device in packet service
CN101414277A (en) * 2008-11-06 2009-04-22 清华大学 Need-based increment recovery disaster-containing system and method based on virtual machine

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨天明: "网络备份中重复数据删除技术研究", 《中国博士学位论文全文数据库 信息科技辑》 *

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104506619A (en) * 2014-12-22 2015-04-08 华为技术有限公司 Data backup and recovery method and device, and server
CN104506619B (en) * 2014-12-22 2018-06-05 华为技术有限公司 A kind of data backup, restoration methods and its device, server
US10082982B2 (en) 2014-12-22 2018-09-25 Huawei Technologies Co., Ltd. Data backup method and apparatus, data restoration method and apparatus, and server
CN106020932B (en) * 2015-05-21 2019-04-02 中国科学院计算技术研究所 A kind of safety protecting method and system for KVM virtual machine system
CN106020932A (en) * 2015-05-21 2016-10-12 中国科学院计算技术研究所 Security protection method and system used for KVM system
CN106547642B (en) * 2015-09-18 2020-01-17 中国移动通信集团公司 Data storage backup method and device
CN106547642A (en) * 2015-09-18 2017-03-29 中国移动通信集团公司 A kind of method and device of data backup memory
WO2017147794A1 (en) * 2016-03-02 2017-09-08 华为技术有限公司 Differential data backup method and device
CN106294018B (en) * 2016-08-11 2019-11-01 浪潮(北京)电子信息产业有限公司 A kind of virtual machine restoration methods and device
CN106294018A (en) * 2016-08-11 2017-01-04 浪潮(北京)电子信息产业有限公司 A kind of virtual machine restoration methods and device
CN109324867A (en) * 2017-07-31 2019-02-12 郑州云海信息技术有限公司 A kind of virtual machine temporary storage method, restoration methods and device
CN109992449A (en) * 2017-12-31 2019-07-09 中国移动通信集团四川有限公司 Backup image management system, method, equipment and medium
CN109992449B (en) * 2017-12-31 2023-04-11 中国移动通信集团四川有限公司 Backup image management system, method, device and medium
CN110275801A (en) * 2019-06-21 2019-09-24 珠海格力电器股份有限公司 Data recovery method, device, system, computer equipment and storage medium
CN110399202A (en) * 2019-06-29 2019-11-01 苏州浪潮智能科技有限公司 A kind of method and device of efficient virtual machine disaster tolerance
CN110399202B (en) * 2019-06-29 2022-03-04 苏州浪潮智能科技有限公司 Efficient virtual machine disaster recovery method and device
CN112612646A (en) * 2020-12-25 2021-04-06 深圳市科力锐科技有限公司 Application quick recovery method, device, equipment and storage medium
CN115237679A (en) * 2022-09-21 2022-10-25 南京拓界信息技术有限公司 Data recovery system based on host system

Similar Documents

Publication Publication Date Title
CN103902407A (en) Virtual machine recovery method and server
CN110442560B (en) Log replay method, device, server and storage medium
CN101997823B (en) Distributed file system and data access method thereof
CN107506145B (en) Physical storage scheduling method and cloud host creation method
CN104935469A (en) Distributive storage method and system for log information
CN104484131A (en) Device and corresponding method for processing data of multi-disk servers
CN111385294B (en) Data processing method, system, computer device and storage medium
CN104679493A (en) Improved method for process event handling mechanism
CN104050014A (en) Efficient storage management method based on virtualization platform
CN116340053A (en) Log processing method, device, computer equipment and medium for system crash
CN105302489A (en) Heterogeneous multi-core remote embedded memory system and method
CN112463880B (en) Block chain data storage method and related device
CN110554992A (en) Distributed metadata path management method, system, terminal and storage medium
CN102339305A (en) Database cluster failure recovery method on basis of partial ordering relation logs
CN113051186B (en) Method and device for processing page bump in memory recovery and electronic equipment
CN112799872B (en) Erasure code encoding method and device based on key value pair storage system
CN105068896A (en) Data processing method and device based on RAID backup
CN115185744A (en) Validity verification method and device of backup data and computer equipment
CN106339279B (en) Service recovery method and device
CN112835967B (en) Data processing method, device, equipment and medium based on distributed storage system
CN109120714B (en) Security data recovery method and system, and node server
CN113360571A (en) Characteristic mark-based power grid monitoring system memory database relation database synchronization method
CN104636345A (en) Database reading and writing method based on distributed cache
CN106375354B (en) Data processing method and device
CN110399098A (en) A kind of data processing method and electronic equipment

Legal Events

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

Application publication date: 20140702

RJ01 Rejection of invention patent application after publication