CN106095619A - A kind of virtual machine backup method and device - Google Patents
A kind of virtual machine backup method and device Download PDFInfo
- Publication number
- CN106095619A CN106095619A CN201610406788.5A CN201610406788A CN106095619A CN 106095619 A CN106095619 A CN 106095619A CN 201610406788 A CN201610406788 A CN 201610406788A CN 106095619 A CN106095619 A CN 106095619A
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- file
- magnetic disk
- image file
- backup
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1461—Backup scheduling policy
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
The embodiment of the invention discloses a kind of virtual machine backup method and device, method includes: generate the first kind image file of magnetic disk of virtual machine;The system identification information of file system based on the magnetic disk of virtual machine obtained, determines the detection algorithm for file integrity detection to be utilized;Utilize described detection algorithm, detect described first kind image file the most complete;If it is, terminate full backup flow process;If it does not, interval the first preset time period, return the step of the first kind image file performing described generation magnetic disk of virtual machine.As can be seen here, after magnetic disk of virtual machine is backed up, check that the image file generated is the most complete, if completely, represent that backup completes, terminate backup flow process, if imperfect, re-start backup, and the image file continuing checking for generating is the most complete, it is to avoid the situation of virtual machine backup invalidation.
Description
Technical field
The present invention relates to data processing field, particularly to a kind of virtual machine backup method and device.
Background technology
The method of virtual machine backup generally includes: utilize disk snapshot technology, generates the image file of virtual machine, then will
The image file of virtual machine backups to specify position, when virtual-machine fail, utilizes image file to make virtual machine return to backup
Time situation.
At present, virtual machine carrying out backup is generally all online backup, i.e. when virtual machine is in running status, to void
Plan machine disk carries out Disk Backup.But, if magnetic disk of virtual machine cache policy is first to write caching, then write magnetic disk of virtual machine, then
During to magnetic disk of virtual machine online backup, data may also not write in magnetic disk of virtual machine, say, that virtual machine magnetic
Data in dish are incomplete, in this case, can cause backup invalidation.
Summary of the invention
The purpose of the embodiment of the present invention is to provide a kind of virtual machine backup method and device, it is to avoid virtual machine backup invalidation
Situation.
For reaching above-mentioned purpose, the embodiment of the invention discloses a kind of virtual machine backup method, including:
Generate the first kind image file of magnetic disk of virtual machine;
The system identification information of file system based on the magnetic disk of virtual machine obtained, determines to be utilized complete for file
Property detection detection algorithm;
Utilize described detection algorithm, detect described first kind image file the most complete;
If it is, terminate full backup flow process;
If it does not, interval the first preset time period, return the first kind image file performing described generation magnetic disk of virtual machine
Step.
Optionally, it is also possible to including:
After terminating full backup flow process, when the metadata of described magnetic disk of virtual machine changes, determine and change
File corresponding to metadata, generate the Equations of The Second Kind image file of the file of described correspondence;
Utilize described detection algorithm, detect described Equations of The Second Kind image file the most complete;
If it is, terminate incremental backup flow process;
If it does not, interval the second preset time period, return the Equations of The Second Kind mirror image of the file performing the described correspondence of described generation
The step of file.
Optionally, it is also possible to including:
After terminating full backup flow process, when the metadata of described magnetic disk of virtual machine changes, by described virtual machine
The first kind image file that the currently stored file of disk generates with the last full backup contrasts, and determines and changes
File, the 3rd class image file of the file changed described in generation;
Utilize described detection algorithm, detect described 3rd class image file the most complete;
If it is, terminate differential backup flow process;
If it does not, interval the 3rd preset time period, return the 3rd class of the file changed described in the described generation of execution
The step of image file.
Optionally, it is also possible to including:
Record the metadata information of described magnetic disk of virtual machine;
The metadata information of the described magnetic disk of virtual machine according to record, it is judged that whether the metadata of described magnetic disk of virtual machine is sent out
Raw change.
Optionally, it is also possible to including:
When the number of times of the step returning the first kind image file performing described generation magnetic disk of virtual machine exceedes predetermined threshold value
Time, outputting alarm information.
For reaching above-mentioned purpose, the embodiment of the invention also discloses a kind of virtual machine back-up device, including:
First generation module, for generating the first kind image file of magnetic disk of virtual machine;
Determine module, for the system identification information of file system based on the magnetic disk of virtual machine obtained, determine to be utilized
The detection algorithm for file integrity detection;
First detection module, is used for utilizing described detection algorithm, detects described first kind image file the most complete;
First processing module, for when the testing result of described first detection module is for being, terminates full backup flow process,
Otherwise, it is spaced the first preset time period, triggers described first generation module.
Optionally, it is also possible to including:
Second generation module, for after terminating full backup flow process, when the metadata of described magnetic disk of virtual machine changes
During change, determine the file that the metadata changed is corresponding, generate the Equations of The Second Kind image file of the file of described correspondence;
Second detection module, is used for utilizing described detection algorithm, detects described Equations of The Second Kind image file the most complete;
Second processing module, for when the testing result of described second detection module is for being, terminates incremental backup flow process,
Otherwise, it is spaced the second preset time period, triggers described second generation module.
Optionally, it is also possible to including:
3rd generation module, for after terminating full backup flow process, when the metadata of described magnetic disk of virtual machine changes
During change, the first kind image file that file currently stored for described magnetic disk of virtual machine and the last full backup generate is carried out
Contrast, determines the file changed, the 3rd class image file of the file changed described in generation;
3rd detection module, is used for utilizing described detection algorithm, detects described 3rd class image file the most complete;
3rd processing module, for when the testing result of described 3rd detection module is for being, terminates differential backup flow process,
Otherwise, it is spaced the 3rd preset time period, triggers described 3rd generation module.
Optionally, it is also possible to including:
Logging modle, for the metadata information of described magnetic disk of virtual machine;
Judge module, for the metadata information of the described magnetic disk of virtual machine according to described logging modle record, it is judged that institute
Whether the metadata stating magnetic disk of virtual machine changes.
Optionally, it is also possible to including:
Alarm module, during for exceeding predetermined threshold value when the number of times triggering described first generation module, outputting alarm information.
As seen from the above technical solution, apply the embodiment of the present invention, generate the first kind image file of magnetic disk of virtual machine;Base
In the system identification information of the file system of magnetic disk of virtual machine, determine that the detection for file integrity detection to be utilized is calculated
Method;Utilize described detection algorithm, detect described first kind image file the most complete;If it is, terminate full backup flow process;As
The most no, it is spaced the first preset time period, returns the step of the first kind image file performing described generation magnetic disk of virtual machine.
As can be seen here, after magnetic disk of virtual machine is backed up, check that the image file generated is the most complete, if completely,
Represent that backup completes, terminate backup flow process, if imperfect, re-start backup, and the image file continuing checking for generating is
No completely, it is to avoid the situation of virtual machine backup invalidation.
Certainly, arbitrary product or the method for implementing the present invention must be not necessarily required to reach all the above excellent simultaneously
Point.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
In having technology to describe, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to
Other accompanying drawing is obtained according to these accompanying drawings.
The first schematic flow sheet of the virtual machine backup method that Fig. 1 provides for the embodiment of the present invention;
The second schematic flow sheet of the virtual machine backup method that Fig. 2 provides for the embodiment of the present invention;
The third schematic flow sheet of the virtual machine backup method that Fig. 3 provides for the embodiment of the present invention;
The first structural representation of the virtual machine back-up device that Fig. 4 provides for the embodiment of the present invention;
The second structural representation of the virtual machine back-up device that Fig. 5 provides for the embodiment of the present invention;
The third structural representation of the virtual machine back-up device that Fig. 6 provides for the embodiment of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Describe, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole embodiments wholely.Based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under not making creative work premise
Embodiment, broadly falls into the scope of protection of the invention.
In order to be better understood from the provided scheme of the embodiment of the present invention, first below from the angle of backup data quantity, to void
The mode of plan machine backup is introduced.Concrete:
Virtual machine backup generally has three kinds of backup modes, full backup, incremental backup, differential backup:
Full backup, it is simply that whole magnetic disk of virtual machine is backed up completely;Incremental backup, it is simply that the data of backup every time
Data that are that increase after being only comparable to last backup and that revised;Differential backup, it is simply that the data of backup are relative every time
Data that are that increase after last full backup and that revised.
As an example it is assumed that magnetic disk of virtual machine comprises the data of 100G, full backup, it is simply that to whole magnetic disk of virtual machine
The data of 100G back up.After full backup, this magnetic disk of virtual machine newly increases the data of 100M, now, increment
Backup and differential backup are both for the data of this 100M and back up.Hereafter, newly increase in this magnetic disk of virtual machine again
The data of 100M, now, incremental backup is that the data of the 100M for second time increase back up;Differential backup is for two
The data of the 200M of secondary increase back up.
In order to solve prior art problem, embodiments provide a kind of virtual machine backup method and device, to keep away
Exempt from the situation of virtual machine backup invalidation.
A kind of virtual machine backup method provided the embodiment of the present invention below is described in detail.Fig. 1 is that the present invention is real
Execute the first schematic flow sheet of the virtual machine backup method that example provides, including:
S101: generate the first kind image file of magnetic disk of virtual machine.
It is emphasized that owing to first kind image file is to be directed to virtual disk, therefore, this first kind mirror image literary composition
Part, is in full backup the image file generated, and the scheme that embodiment illustrated in fig. 1 provides is the scheme of full backup.
It is understood that the triggering command generating the first kind image file of magnetic disk of virtual machine can have multiple, such as,
The instruction etc. sent manually.
It addition, the specific implementation generating the first kind image file of magnetic disk of virtual machine can use of the prior art
Any one implementation, the embodiment of the present invention does not limits at this.
S102: the system identification information of file system based on the magnetic disk of virtual machine obtained, determines to be utilized for literary composition
The detection algorithm of part integrity detection.
In order to avoid the situation of virtual machine backup invalidation, the backup content i.e. avoiding magnetic disk of virtual machine is imperfect, the present invention
The scheme that embodiment is provided, it is thus necessary to determine that the integrity of first kind image file, and then judged result based on integrity is next
Determine and follow-up the most again back up;Meanwhile, the detection algorithm for file integrity detection corresponding to different file system
Can be different.Therefore, based on this process thought, after generating first kind image file, it may be determined that to be utilized for file
The detection algorithm of integrity detection, and then the follow-up analyzing and processing performing backup integrity based on this detection algorithm;Wherein, described
The system identification information of detection algorithm file system based on the magnetic disk of virtual machine obtained is determined.For example, virtual machine magnetic
The system identification information of the file system of dish can be ext (Extended file system extends file system) 2, ext4
The detection algorithm (in other words detect instrument) corresponding Deng, different file system can be identical or different, and such as ext4 is corresponding
Detection algorithm can be fsck (file system check, file system detects) algorithm.It is emphasized that detection algorithm
It can be detection algorithm of the prior art.
It is understood that the detection for file integrity detection to be utilized corresponding to first kind image file is calculated
Method can be: before backup virtual machine process, set by the system identification information of the file system being in advance based on magnetic disk of virtual machine
Fixed, and then, during backup virtual machine, directly obtain this detection algorithm set in advance;Certainly, this first eka-ytterbium
The detection algorithm for file integrity detection to be utilized as corresponding to file can also be: during backup virtual machine
Being determined, concrete determination process may include that
Obtain the system identification information of the file system of described magnetic disk of virtual machine;
According to described system identification information, determine the detection algorithm for file integrity detection to be utilized.
Wherein, the specific implementation of the system identification information obtaining the file system of this magnetic disk of virtual machine can use existing
This is not limited by mode, the embodiment of the present invention to have any one in technology to determine.Furthermore it is possible to preset multiple system mark
Knowledge information and the corresponding relation of the detection algorithm for file integrity detection, and then determining the file of this magnetic disk of virtual machine
After the system identification information of system, can determine that the detection for integrity detection to be utilized is calculated based on this corresponding relation
Method.
It is emphasized that the concrete of the above-mentioned determination the provided detection algorithm for file integrity detection to be utilized
Implementation is merely exemplary, should not constitute the restriction to the embodiment of the present invention.
S103: utilizing described detection algorithm, detection first kind image file is the most complete, if it is, terminate full backup
Flow process, if it does not, perform S104.
After determining detection algorithm, it is possible to use this detection algorithm, detect this first kind image file the most complete, tool
The detection process of body is similarly to the prior art.Wherein, after utilizing this detection algorithm to detect that this first kind image file is complete,
Show that full backup is effective, at this point it is possible to terminate full backup flow process;And when utilizing this detection algorithm detection first kind mirror image literary composition
When part is imperfect, show that full backup is invalid, at this point it is possible to perform S104, with when conforming to a predetermined condition, again back up.
S104: judge whether the duration at interval arrives the first preset time period, performs S101 if it is, return.
If it is to say, detection first kind image file is imperfect, then it represents that this time backup invalidation, need to re-start
Backup.In order to ensure the effectiveness of backup next time, it is, ensure that the data content of magnetic disk of virtual machine is complete, therefore, no as far as possible
It is the most again to back up, but interval the first preset time period, return and perform S101, again back up, again detect, until detection
First kind image file is complete.Wherein, the first preset time period can be set according to practical situation, does not limits at this.
For example:
If magnetic disk of virtual machine cache policy is first to write caching, then writes magnetic disk of virtual machine, then online to magnetic disk of virtual machine
During backup, data may also not write in magnetic disk of virtual machine, say, that the data in magnetic disk of virtual machine are imperfect
, in this case, backup invalidation can be caused;
For this situation, after generating image file, detection image file is the most complete, if imperfect, is spaced one
The section time, regenerate image file.After being spaced this period of time, the data in caching may have been written to magnetic disk of virtual machine
In.If the data in Huan Cun have been written in magnetic disk of virtual machine, then it is complete for detecting the image file regenerated;If
Data in caching are not also write in magnetic disk of virtual machine, the most again certain interval of time, regenerate image file, until detection mirror
As file is complete, back up and effectively.
As one embodiment of the present invention, when returning the first kind image file performing described generation magnetic disk of virtual machine
The number of times of step when exceeding predetermined threshold value, outputting alarm information.
It is to say, if there is repeatedly regenerating first kind image file, and the first kind mirror image literary composition that detection generates
The most incomplete situation of part, then it represents that file system may be destroyed, in this case, outputting alarm information, so that
User processes in time.
Applying embodiment illustrated in fig. 1 of the present invention, after backing up magnetic disk of virtual machine, whether the image file that inspection generates
Completely, if completely, represent that backup completes, terminate backup flow process, if imperfect, re-start backup, and continue checking for raw
The image file become is the most complete, it is to avoid the situation of virtual machine backup invalidation.
The second schematic flow sheet of the virtual machine backup method that Fig. 2 provides for the embodiment of the present invention, shown in Fig. 2 of the present invention
Embodiment, on the basis of embodiment illustrated in fig. 1 of the present invention, when S103 detection first kind image file is complete, is i.e. terminating entirely
After amount backup flow process, increase following steps:
S105: when the metadata of magnetic disk of virtual machine changes, determines the file that the metadata changed is corresponding, raw
Become the Equations of The Second Kind image file of the file of described correspondence.
Wherein, after terminating full backup flow process, when the metadata of magnetic disk of virtual machine changes, virtual machine magnetic is shown
Corresponding data in dish is changed, and can again back up, ensure the complete of backup with this in the way of using incremental backup
Property.Concrete, the process of incremental backup is: determine the file that the metadata changed is corresponding, generates the literary composition of described correspondence
The Equations of The Second Kind image file of part.
Wherein, the metadata of magnetic disk of virtual machine specifically can include the information such as file size, attribute, authority information.At this
In invention illustrated embodiment, the metadata information of described magnetic disk of virtual machine can be recorded;Described magnetic disk of virtual machine according to record
Metadata information, it is judged that whether the metadata of described magnetic disk of virtual machine changes.
As one embodiment of the present invention, meta data block map table can be generated, record in meta data block map table
The disk block that metadata takies.The disk block taken by the metadata of record in meta data block map table, finds corresponding unit number
According to, it is judged that whether metadata is changed, if metadata is changed, then it represents that the corresponding data in magnetic disk of virtual machine occurs
Change.
It addition, metadata map table can also record the information that detection image file is the most complete, such as, when detection mirror
When picture file is complete, value corresponding in metadata map table is set to 1, when detecting image file and being imperfect, by metadata map
Value corresponding in table is set to 0.Additionally, when judging that metadata occurs change, also value corresponding in metadata map table is set to 0.
By the metadata map table record to foregoing, can show more intuitively in backup procedure to user
Current state, makes user understand the progress of backup procedure more in time, in order to subsequent operation.
S106: utilize described detection algorithm, detects described Equations of The Second Kind image file the most complete, if it is, terminate this time
Incremental backup flow process, if it does not, perform S107.
The file system of magnetic disk of virtual machine is fixing, and the detection algorithm that therefore incremental backup utilizes utilizes with full backup
Detection algorithm identical, it is not necessary to redefine.
S107: judge whether the duration at interval arrives the second preset time period, performs S105 if it is, return.
If it is to say, detection Equations of The Second Kind image file is imperfect, then it represents that this time backup invalidation, need to re-start
Backup.In order to ensure the effectiveness of backup next time, it is, ensure that the data content of magnetic disk of virtual machine is complete, therefore, no as far as possible
It is the most again to back up, but interval the second preset time period, return and perform S105, again back up, again detect, until detection
Equations of The Second Kind image file is complete.Wherein, the second preset time period can be identical or different with the first preset time period.
For example:
If magnetic disk of virtual machine cache policy is first to write caching, then writes magnetic disk of virtual machine, then online to magnetic disk of virtual machine
During backup, data may also not write in magnetic disk of virtual machine, say, that the data in magnetic disk of virtual machine are imperfect
, in this case, backup invalidation can be caused.
For this situation, after generating image file, detection image file is the most complete, if imperfect, is spaced one
The section time, regenerate image file.After being spaced this period of time, the data in caching may have been written to magnetic disk of virtual machine
In.If the data in Huan Cun have been written in magnetic disk of virtual machine, then it is complete for detecting the image file regenerated;If
Data in caching are not also write in magnetic disk of virtual machine, the most again certain interval of time, regenerate image file, until detection mirror
As file is complete, back up and effectively.
As one embodiment of the present invention, when the Equations of The Second Kind mirror image returning the file performing the described correspondence of described generation
When the number of times of the step of file exceedes the threshold value of setting, outputting alarm information.
It is to say, if there is repeatedly regenerating Equations of The Second Kind image file, and the Equations of The Second Kind mirror image literary composition that detection generates
The most incomplete situation of part, then it represents that file system may be destroyed, in this case, outputting alarm information, so that
User processes in time.
Apply embodiment illustrated in fig. 2 of the present invention, after completing full backup, increase for the file increased or change
Amount backup, checks that the image file that incremental backup generates is the most complete, if completely, represents that incremental backup completes, terminates increment
Backup flow process, if imperfect, re-start incremental backup, and the image file continuing checking for generating is the most complete, it is to avoid
The situation that virtual machine incremental backup is invalid.
The third schematic flow sheet of the virtual machine backup method that Fig. 3 provides for the embodiment of the present invention, shown in Fig. 3 of the present invention
Embodiment, on the basis of embodiment illustrated in fig. 1 of the present invention, when S103 detection first kind image file is complete, is i.e. terminating entirely
After amount backup flow process, increase following steps:
S108: when the metadata of magnetic disk of virtual machine changes, by file currently stored for magnetic disk of virtual machine with recently
The first kind image file of full backup generation contrasts, and determines the file changed, changes described in generation
The 3rd class image file of file.
Wherein, after terminating full backup flow process, when the metadata of magnetic disk of virtual machine changes, virtual machine magnetic is shown
Corresponding data in dish is changed, and can again back up, ensure the complete of backup with this in the way of using differential backup
Property.Concrete, the process of differential backup is: generated with the last full backup by file currently stored for magnetic disk of virtual machine
First kind image file contrast, determine the file changed, the 3rd eka-ytterbium of the file changed described in generation
As file.
Wherein, the metadata of magnetic disk of virtual machine specifically can include the information such as file size, attribute, authority information.At this
In invention illustrated embodiment, the metadata information of described magnetic disk of virtual machine can be recorded;Described magnetic disk of virtual machine according to record
Metadata information, it is judged that whether the metadata of described magnetic disk of virtual machine changes.
As one embodiment of the present invention, meta data block map table can be generated, record in meta data block map table
The disk block that metadata takies.The disk block taken by the metadata of record in meta data block map table, finds corresponding unit number
According to, it is judged that whether metadata is changed, if metadata is changed, then it represents that the corresponding data in magnetic disk of virtual machine occurs
Change.
It addition, metadata map table can also record the information that detection image file is the most complete, such as, when detection mirror
When picture file is complete, value corresponding in metadata map table is set to 1, when detecting image file and being imperfect, by metadata map
Value corresponding in table is set to 0.Additionally, when judging that metadata occurs change, also value corresponding in metadata map table is set to 0.
By the metadata map table record to foregoing, can show more intuitively in backup procedure to user
Current state, makes user understand the progress of backup procedure more in time, in order to subsequent operation.
S109: utilize described detection algorithm, detects described 3rd class image file the most complete, if it is, represent backup
Success, terminates this differential backup flow process, if it does not, perform S110.
The file system of magnetic disk of virtual machine is fixing, and the detection algorithm that therefore differential backup utilizes utilizes with full backup
Detection algorithm identical, it is not necessary to redefine.
S110: judge whether the duration at interval arrives the 3rd preset time period, performs S108 if it is, return.
If it is to say, detection the 3rd class image file is imperfect, then it represents that this time backup invalidation, need to re-start
Backup.In order to ensure the effectiveness of backup next time, it is, ensure that the data content of magnetic disk of virtual machine is complete, therefore, no as far as possible
It is the most again to back up, but interval the 3rd preset time period, return and perform S108, again back up, again detect, until detection
3rd class image file is complete.Wherein, the 3rd preset time period can phase with the first preset time period and the second preset time period
Same or different.
For example:
If magnetic disk of virtual machine cache policy is first to write caching, then writes magnetic disk of virtual machine, then online to magnetic disk of virtual machine
During backup, data may also not write in magnetic disk of virtual machine, say, that the data in magnetic disk of virtual machine are imperfect
, in this case, backup invalidation can be caused.
For this situation, after generating image file, detection image file is the most complete, if imperfect, is spaced one
The section time, regenerate image file.After being spaced this period of time, the data in caching may have been written to magnetic disk of virtual machine
In.If the data in Huan Cun have been written in magnetic disk of virtual machine, then it is complete for detecting the image file regenerated;If
Data in caching are not also write in magnetic disk of virtual machine, the most again certain interval of time, regenerate image file, until detection mirror
As file is complete, back up and effectively.
As one embodiment of the present invention, when the 3rd class returning the file changed described in the described generation of execution
When the number of times of the step of image file exceedes the threshold value of setting, outputting alarm information.
It is to say, if there is repeatedly regenerating the 3rd class image file, and the 3rd class mirror image literary composition that detection generates
The most incomplete situation of part, then it represents that file system may be destroyed, in this case, outputting alarm information, so that
User processes in time.
Apply embodiment illustrated in fig. 3 of the present invention, after completing full backup, poor for the file increased or change
Different backup, checks that the image file that differential backup generates is the most complete, if completely, represents that differential backup completes, terminates difference
Backup flow process, if imperfect, re-start differential backup, and the image file continuing checking for generating is the most complete, it is to avoid
The situation that virtual machine differential backup is invalid.
Corresponding with above-mentioned embodiment of the method, the embodiment of the present invention also provides for a kind of virtual machine back-up device.
The first structural representation of the virtual machine back-up device that Fig. 4 provides for the embodiment of the present invention, including:
First generation module 201, for generating the first kind image file of magnetic disk of virtual machine;
Determine module 202, for the system identification information of file system based on the magnetic disk of virtual machine obtained, determine and treat profit
The detection algorithm for file integrity detection;
First detection module 203, is used for utilizing described detection algorithm, detects described first kind image file the most complete;
First processing module 204, for when the testing result of first detection module 203 is for being, terminates full backup stream
Journey, otherwise, is spaced the first preset time period, triggers the first generation module 201.
In illustrated embodiment of the present invention, it is also possible to including:
Alarm module, is used for when the number of times triggering the first generation module 201 exceedes predetermined threshold value, outputting alarm information.
Applying embodiment illustrated in fig. 4 of the present invention, after backing up magnetic disk of virtual machine, whether the image file that inspection generates
Completely, if completely, represent that backup completes, terminate backup flow process, if imperfect, re-start backup, and continue checking for raw
The image file become is the most complete, it is to avoid the situation of virtual machine backup invalidation.
The second structural representation of the virtual machine back-up device that Fig. 5 provides for the embodiment of the present invention, shown in Fig. 5 of the present invention
Embodiment is on the basis of embodiment illustrated in fig. 4 of the present invention, it is also possible to including:
Second generation module 205, for after terminating full backup flow process, when the metadata of described magnetic disk of virtual machine occurs
During change, determine the file that the metadata changed is corresponding, generate the Equations of The Second Kind image file of the file of described correspondence;
Second detection module 206, is used for utilizing described detection algorithm, detects described Equations of The Second Kind image file the most complete;
Second processing module 207, for when the testing result of the second detection module 206 is for being, terminates incremental backup stream
Journey, otherwise, is spaced the second preset time period, triggers the second generation module 205.
In illustrated embodiment of the present invention, it is also possible to including: logging modle and judge module (not shown), wherein,
Logging modle, for the metadata information of described magnetic disk of virtual machine;
Judge module, for the metadata information of the described magnetic disk of virtual machine according to described logging modle record, it is judged that institute
Whether the metadata stating magnetic disk of virtual machine changes.
Apply embodiment illustrated in fig. 5 of the present invention, after completing full backup, increase for the file increased or change
Amount backup, checks that the image file that incremental backup generates is the most complete, if completely, represents that incremental backup completes, terminates increment
Backup flow process, if imperfect, re-start incremental backup, and the image file continuing checking for generating is the most complete, it is to avoid
The situation that virtual machine incremental backup is invalid.
The third structural representation of the virtual machine back-up device that Fig. 6 provides for the embodiment of the present invention, shown in Fig. 6 of the present invention
Embodiment is on the basis of embodiment illustrated in fig. 4 of the present invention, it is also possible to including:
3rd generation module 208, for after terminating full backup flow process, when the metadata of described magnetic disk of virtual machine occurs
During change, the first kind image file that file currently stored for described magnetic disk of virtual machine and the last full backup generate is entered
Row contrast, determines the file changed, the 3rd class image file of the file changed described in generation;
3rd detection module 209, is used for utilizing described detection algorithm, detects described 3rd class image file the most complete;
3rd processing module 210, for when the testing result of the 3rd detection module 209 is for being, terminates differential backup stream
Journey, otherwise, is spaced the 3rd preset time period, triggers the 3rd generation module 208.
In illustrated embodiment of the present invention, it is also possible to including: logging modle and judge module (not shown), wherein,
Logging modle, for the metadata information of described magnetic disk of virtual machine;
Judge module, for the metadata information of the described magnetic disk of virtual machine according to described logging modle record, it is judged that institute
Whether the metadata stating magnetic disk of virtual machine changes.
Apply embodiment illustrated in fig. 6 of the present invention, after completing full backup, poor for the file increased or change
Different backup, checks that the image file that differential backup generates is the most complete, if completely, represents that differential backup completes, terminates difference
Backup flow process, if imperfect, re-start differential backup, and the image file continuing checking for generating is the most complete, it is to avoid
The situation that virtual machine differential backup is invalid.
It should be noted that in this article, the relational terms of such as first and second or the like is used merely to a reality
Body or operation separate with another entity or operating space, and deposit between not necessarily requiring or imply these entities or operating
Relation or order in any this reality.And, term " includes ", " comprising " or its any other variant are intended to
Comprising of nonexcludability, so that include that the process of a series of key element, method, article or equipment not only include that those are wanted
Element, but also include other key elements being not expressly set out, or also include for this process, method, article or equipment
Intrinsic key element.In the case of there is no more restriction, statement " including ... " key element limited, it is not excluded that
Including process, method, article or the equipment of described key element there is also other identical element.
Each embodiment in this specification all uses relevant mode to describe, identical similar portion between each embodiment
Dividing and see mutually, what each embodiment stressed is the difference with other embodiments.Real especially for device
For executing example, owing to it is substantially similar to embodiment of the method, so describe is fairly simple, relevant part sees embodiment of the method
Part illustrate.
One of ordinary skill in the art will appreciate that all or part of step realizing in said method embodiment is can
Completing instructing relevant hardware by program, described program can be stored in computer read/write memory medium,
The storage medium obtained designated herein, such as: ROM/RAM, magnetic disc, CD etc..
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit protection scope of the present invention.All
Any modification, equivalent substitution and improvement etc. made within the spirit and principles in the present invention, are all contained in protection scope of the present invention
In.
Claims (10)
1. a virtual machine backup method, it is characterised in that including:
Generate the first kind image file of magnetic disk of virtual machine;
The system identification information of file system based on the magnetic disk of virtual machine obtained, determines to be utilized examining for file integrality
The detection algorithm surveyed;
Utilize described detection algorithm, detect described first kind image file the most complete;
If it is, terminate full backup flow process;
If it does not, interval the first preset time period, return the step of the first kind image file performing described generation magnetic disk of virtual machine
Suddenly.
Method the most according to claim 1, it is characterised in that also include:
After terminating full backup flow process, when the metadata of described magnetic disk of virtual machine changes, determine the unit changed
The file that data are corresponding, generates the Equations of The Second Kind image file of the file of described correspondence;
Utilize described detection algorithm, detect described Equations of The Second Kind image file the most complete;
If it is, terminate incremental backup flow process;
If it does not, interval the second preset time period, return the Equations of The Second Kind image file of the file performing the described correspondence of described generation
Step.
Method the most according to claim 1, it is characterised in that also include:
After terminating full backup flow process, when the metadata of described magnetic disk of virtual machine changes, by described magnetic disk of virtual machine
The first kind image file that currently stored file generates with the last full backup contrasts, and determines the literary composition changed
Part, the 3rd class image file of the file changed described in generation;
Utilize described detection algorithm, detect described 3rd class image file the most complete;
If it is, terminate differential backup flow process;
If it does not, interval the 3rd preset time period, return the 3rd class mirror image of the file changed described in the described generation of execution
The step of file.
The most according to the method in claim 2 or 3, it is characterised in that also include:
Record the metadata information of described magnetic disk of virtual machine;
The metadata information of the described magnetic disk of virtual machine according to record, it is judged that whether the metadata of described magnetic disk of virtual machine changes
Become.
Method the most according to claim 1, it is characterised in that also include:
When returning the number of times of step of the first kind image file performing described generation magnetic disk of virtual machine and exceeding predetermined threshold value, defeated
Go out warning information.
6. a virtual machine back-up device, it is characterised in that including:
First generation module, for generating the first kind image file of magnetic disk of virtual machine;
Determine module, for the system identification information of file system based on the magnetic disk of virtual machine obtained, determine use to be utilized
Detection algorithm in file integrity detection;
First detection module, is used for utilizing described detection algorithm, detects described first kind image file the most complete;
First processing module, for when the testing result of described first detection module is for being, terminates full backup flow process, no
Then, it is spaced the first preset time period, triggers described first generation module.
Device the most according to claim 6, it is characterised in that also include:
Second generation module, for after terminating full backup flow process, when the metadata of described magnetic disk of virtual machine changes,
Determine the file that the metadata changed is corresponding, generate the Equations of The Second Kind image file of the file of described correspondence;
Second detection module, is used for utilizing described detection algorithm, detects described Equations of The Second Kind image file the most complete;
Second processing module, for when the testing result of described second detection module is for being, terminates incremental backup flow process, no
Then, it is spaced the second preset time period, triggers described second generation module.
Device the most according to claim 6, it is characterised in that also include:
3rd generation module, for after terminating full backup flow process, when the metadata of described magnetic disk of virtual machine changes,
The first kind image file that file currently stored for described magnetic disk of virtual machine and the last full backup generate is contrasted,
Determine the file changed, the 3rd class image file of the file changed described in generation;
3rd detection module, is used for utilizing described detection algorithm, detects described 3rd class image file the most complete;
3rd processing module, for when the testing result of described 3rd detection module is for being, terminates differential backup flow process, no
Then, it is spaced the 3rd preset time period, triggers described 3rd generation module.
9. according to the device described in claim 7 or 8, it is characterised in that also include:
Logging modle, for the metadata information of described magnetic disk of virtual machine;
Judge module, for the metadata information of the described magnetic disk of virtual machine according to described logging modle record, it is judged that described void
Whether the metadata of plan machine disk changes.
Device the most according to claim 6, it is characterised in that also include:
Alarm module, during for exceeding predetermined threshold value when the number of times triggering described first generation module, outputting alarm information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610406788.5A CN106095619A (en) | 2016-06-08 | 2016-06-08 | A kind of virtual machine backup method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610406788.5A CN106095619A (en) | 2016-06-08 | 2016-06-08 | A kind of virtual machine backup method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106095619A true CN106095619A (en) | 2016-11-09 |
Family
ID=57227887
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610406788.5A Pending CN106095619A (en) | 2016-06-08 | 2016-06-08 | A kind of virtual machine backup method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106095619A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106610864A (en) * | 2017-01-01 | 2017-05-03 | 国云科技股份有限公司 | Detection method for cloning integrity of virtual machine |
CN107357690A (en) * | 2017-08-28 | 2017-11-17 | 郑州云海信息技术有限公司 | The backup method and system of a kind of virtual-machine data |
CN108229162A (en) * | 2016-12-15 | 2018-06-29 | 中标软件有限公司 | A kind of implementation method of cloud platform virtual machine completeness check |
CN109344001A (en) * | 2018-08-29 | 2019-02-15 | 广东微云科技股份有限公司 | A kind of concurrent backup method and system of virtual machine file |
CN109857332A (en) * | 2017-11-30 | 2019-06-07 | 北京京穗蓝盾信息安全技术有限公司 | A kind of method and device of magnetic disk of virtual machine file security inspection |
CN112394969A (en) * | 2019-08-14 | 2021-02-23 | 华为技术有限公司 | Method, server and terminal equipment for patch release |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101056205A (en) * | 2007-04-04 | 2007-10-17 | 杭州华为三康技术有限公司 | A management method, system and device based on ATCA architecture-based server |
CN101635638A (en) * | 2008-07-25 | 2010-01-27 | 中兴通讯股份有限公司 | Disaster tolerance system and disaster tolerance method thereof |
CN102023908A (en) * | 2010-12-03 | 2011-04-20 | 中兴通讯股份有限公司 | Method and device for backing up boot program |
CN102780578A (en) * | 2012-05-29 | 2012-11-14 | 上海斐讯数据通信技术有限公司 | Updating system and updating method for operating system for network equipment |
CN103218276A (en) * | 2013-04-23 | 2013-07-24 | 深圳市京华科讯科技有限公司 | Method and system for multi-node incremental backup |
US20150186044A1 (en) * | 2013-12-30 | 2015-07-02 | Symantec Corporation | Systems and methods for improving snapshot performance |
CN104794025A (en) * | 2015-04-27 | 2015-07-22 | 四川效率源信息安全技术有限责任公司 | Method for quick verification on storage device |
CN105391629A (en) * | 2014-09-05 | 2016-03-09 | 杭州迪普科技有限公司 | Resource backup method and device |
WO2016073625A2 (en) * | 2014-11-04 | 2016-05-12 | Rubrik, Inc. | Data management system |
-
2016
- 2016-06-08 CN CN201610406788.5A patent/CN106095619A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101056205A (en) * | 2007-04-04 | 2007-10-17 | 杭州华为三康技术有限公司 | A management method, system and device based on ATCA architecture-based server |
CN101635638A (en) * | 2008-07-25 | 2010-01-27 | 中兴通讯股份有限公司 | Disaster tolerance system and disaster tolerance method thereof |
CN102023908A (en) * | 2010-12-03 | 2011-04-20 | 中兴通讯股份有限公司 | Method and device for backing up boot program |
CN102780578A (en) * | 2012-05-29 | 2012-11-14 | 上海斐讯数据通信技术有限公司 | Updating system and updating method for operating system for network equipment |
CN103218276A (en) * | 2013-04-23 | 2013-07-24 | 深圳市京华科讯科技有限公司 | Method and system for multi-node incremental backup |
US20150186044A1 (en) * | 2013-12-30 | 2015-07-02 | Symantec Corporation | Systems and methods for improving snapshot performance |
CN105391629A (en) * | 2014-09-05 | 2016-03-09 | 杭州迪普科技有限公司 | Resource backup method and device |
WO2016073625A2 (en) * | 2014-11-04 | 2016-05-12 | Rubrik, Inc. | Data management system |
CN104794025A (en) * | 2015-04-27 | 2015-07-22 | 四川效率源信息安全技术有限责任公司 | Method for quick verification on storage device |
Non-Patent Citations (1)
Title |
---|
韦尔什等: "《LINUX权威指南 第三版》", 31 March 2000 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108229162A (en) * | 2016-12-15 | 2018-06-29 | 中标软件有限公司 | A kind of implementation method of cloud platform virtual machine completeness check |
CN108229162B (en) * | 2016-12-15 | 2021-10-08 | 中标软件有限公司 | Method for realizing integrity check of cloud platform virtual machine |
CN106610864A (en) * | 2017-01-01 | 2017-05-03 | 国云科技股份有限公司 | Detection method for cloning integrity of virtual machine |
CN107357690A (en) * | 2017-08-28 | 2017-11-17 | 郑州云海信息技术有限公司 | The backup method and system of a kind of virtual-machine data |
CN109857332A (en) * | 2017-11-30 | 2019-06-07 | 北京京穗蓝盾信息安全技术有限公司 | A kind of method and device of magnetic disk of virtual machine file security inspection |
CN109344001A (en) * | 2018-08-29 | 2019-02-15 | 广东微云科技股份有限公司 | A kind of concurrent backup method and system of virtual machine file |
CN109344001B (en) * | 2018-08-29 | 2022-01-11 | 广东微云科技股份有限公司 | Concurrent backup method and system for virtual machine files |
CN112394969A (en) * | 2019-08-14 | 2021-02-23 | 华为技术有限公司 | Method, server and terminal equipment for patch release |
CN112394969B (en) * | 2019-08-14 | 2023-04-28 | 华为技术有限公司 | Patch release method, server and terminal equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106095619A (en) | A kind of virtual machine backup method and device | |
CN106557703B (en) | Safety detection | |
US9910735B1 (en) | Generating an application-consistent snapshot | |
CN104520820B (en) | Use the functional assessment of lightweight process snapshot | |
CN103729204B (en) | Using the online data moving method and device of renewal in a kind of network platform | |
US20160026540A1 (en) | Merging an out of synchronization indicator and a change recording indicator in response to a failure in consistency group formation | |
CN108089971B (en) | Log service method and system based on embedded real-time system | |
CN103914407B (en) | A kind of SD card power down protection, restoration methods and the SD card with power down protection | |
US10402279B2 (en) | Optimization to permit block based incremental backup across system reboot or crash | |
US9086969B2 (en) | Establishing a useful debugging state for multithreaded computer program | |
EP2992439A1 (en) | Selective backup of program data to non-volatile memory | |
US9405756B1 (en) | Cloud-based point-in-time restore of computer data | |
US10503601B2 (en) | Method and apparatus for tracking objects in a first memory | |
CN104461791A (en) | Information processing method and device | |
CN106096447A (en) | A kind of document protection method and device | |
US20070143591A1 (en) | Method for non-destructive restoration of a corrupted operating system | |
CN109144947A (en) | A kind of control method and device of the cluster file system of virtualization system | |
JP2012238331A (en) | Data protection method and computing apparatus | |
CN109388617A (en) | A kind of determination method and device of document time stamp confidence level | |
CN106611364B (en) | Storage fragment sorting method and device | |
CN104750602A (en) | Dynamic stain data analyzing method and device | |
CN106970851A (en) | Method and apparatus for disk detection process in distributed file system | |
CN106802839A (en) | A kind of virtual-machine data guard method driven based on block | |
CN110362425A (en) | Based on the data copy guard method and system for writing copy | |
CN104021355A (en) | Safety inspection method for simultaneously operating same file through multiple processes |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No. Applicant after: Xinhua three Technology Co., Ltd. Address before: 310053 Hangzhou science and Technology Industrial Park, high tech Industrial Development Zone, Zhejiang Province, No. six and road, No. 310 Applicant before: Huasan Communication Technology Co., Ltd. |
|
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: 20161109 |