CN105893184A - Incremental backup method and device - Google Patents

Incremental backup method and device Download PDF

Info

Publication number
CN105893184A
CN105893184A CN201610193106.7A CN201610193106A CN105893184A CN 105893184 A CN105893184 A CN 105893184A CN 201610193106 A CN201610193106 A CN 201610193106A CN 105893184 A CN105893184 A CN 105893184A
Authority
CN
China
Prior art keywords
data
incremental backup
bitmap table
data bit
virtual machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610193106.7A
Other languages
Chinese (zh)
Other versions
CN105893184B (en
Inventor
钟晋明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201610193106.7A priority Critical patent/CN105893184B/en
Publication of CN105893184A publication Critical patent/CN105893184A/en
Application granted granted Critical
Publication of CN105893184B publication Critical patent/CN105893184B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1479Generic software techniques for error detection or fault masking
    • G06F11/1492Generic software techniques for error detection or fault masking by run-time replication performed by the application software
    • G06F11/1494N-modular type

Abstract

The invention provides an incremental backup method and device. The method comprises the steps that when data is written into a virtual machine disk, a written virtual machine disk address is converted into an address space where a corresponding virtual machine disk file is located; one or more data bits corresponding to the address space in a preset bit graph corresponding to the virtual machine disk are determined; setting is carried out on the one or more data bits; when incremental backup is carried out, data in the address space corresponding to the set data bits in the bit graph is determined as incremental backup data. By means of the incremental backup method and device, it is not required to traverse all virtual machine disks, the virtual machine disk data modified within the incremental backup period can be found out through the bit graph, and therefore the workload of incremental backup can be reduced, and the incremental backup efficiency can be improved.

Description

A kind of incremental backup method and device
Technical field
The present invention relates to technical field of data backup, particularly relate to a kind of incremental backup method and device.
Background technology
Virtual machine backup has three kinds of backup modes, full backup, incremental backup and differential backup.Wherein, Full backup is to back up whole magnetic disk of virtual machine completely;Incremental backup is the data phase of backup every time The data increasing and revising after backing up in the last time;Differential backup is that the data of backup every time are relative to upper The data newly increasing and revising after full backup.
In the prior art, when magnetic disk of virtual machine being done incremental backup, it is required for backing up this every time The data in whole disk blocks in magnetic disk of virtual machine compare with the total data of last backup, root According to the difference of data, find out the disk block of difference, then the disk block of difference is preserved as this increasing The data of amount backup.When magnetic disk of virtual machine file is very big, and the when that increment amendment part being the least, this The workload of incremental backup mode is too big, and inefficient.
Summary of the invention
In view of this, the present invention provides a kind of incremental backup method and device, solves increment in prior art Back-up job amount is big and inefficient problem.
Specifically, the present invention is achieved through the following technical solutions:
The present invention provides a kind of incremental backup method, and described method includes:
When writing data into magnetic disk of virtual machine, the magnetic disk of virtual machine address of write is converted into the void of correspondence The address space at plan machine disk file place;
Determine in the default bitmap table that this magnetic disk of virtual machine is corresponding corresponding with this address space one or more Data bit;
The one or more data bit is carried out set operation;
When carrying out incremental backup, in the address space corresponding to data bit being set in bitmap table Data are defined as incremental backup data.
Further, described bitmap table is the first bitmap table being stored in internal memory, at this incremental backup After completing, described method also includes:
Described first bitmap table is saved in physical disk the position corresponding with this incremental backup data make For second chart, the first bitmap table is reset.
Further, described method also includes:
After carrying out set operation for each data bit, by the predetermined number adjacent with this data bit Data bit carries out set operation.
Further, for non-incremental backup first, the one or more data bit is being carried out set After operation, before not determining incremental backup data, described method also includes:
Position corresponding with last incremental backup data from physical disk obtains the second corresponding bitmap Table;
When first data bit and this second chart of described first bitmap table have the second of same position When data bit is all set, obtain the initial data in the address space corresponding with the first data bit and with Backup Data in the address space that second data bit is corresponding compares, if identical, then by the first data Position resets;
The address space corresponding to data bit that is described when carrying out incremental backup, that will be set in bitmap table In data be defined as incremental backup data, specifically include:
Data in the address space corresponding to data bit being set in the first bitmap table after comparing are true It is set to this incremental backup data.
Further, described method also includes:
According to preset time period, the bitmap table in internal memory is saved in physical disk as the 3rd bitmap table; After power loss recovery, before incremental backup, however, it is determined that the data bit institute being set in described 3rd bitmap table The corresponding data in address space are not incremented backup, it is determined that these data are this incremental backup data.
Based on identical design, the present invention also provides for a kind of incremental backup device, and described device includes:
Address conversioning unit, for when writing data into magnetic disk of virtual machine, by the magnetic disk of virtual machine of write Address is converted into the address space at the magnetic disk of virtual machine file place of correspondence;
Data locking unit, empty with this address for determining in the default bitmap table that this magnetic disk of virtual machine is corresponding Between corresponding one or more data bit;
Bitmap set unit, for carrying out set operation to the one or more data bit;
Increment determines unit, is used for when carrying out incremental backup, the data bit institute being set in bitmap table The corresponding data in address space are defined as incremental backup data.
Further, described bitmap table is the first bitmap table being stored in internal memory;
Described device also includes:
First storage unit, for after this incremental backup completes, is saved in described first bitmap table Position corresponding with this incremental backup data in physical disk is as second chart, by the first bitmap table Reset.
Further, described bitmap set unit, it is additionally operable to carrying out set behaviour for each data bit After work, the data bit of the predetermined number adjacent with this data bit is carried out set operation.
Further, described device also includes:
Data check and correction unit, for for non-incremental backup first, to the one or more data bit After carrying out set operation, before not determining incremental backup data, standby with last increment from physical disk Number is according to the second chart obtaining correspondence in corresponding position;The first data when described first bitmap table Position and this second chart have the second data bit of same position when being all set, obtain and the first number Standby according in the initial data in the address space that position is corresponding and the address space corresponding with the second data bit First data bit, according to comparing, if identical, is then reset by number;
Described increment determines unit, specifically for the data bit being set in the first bitmap table after comparing The corresponding data in address space are defined as this incremental backup data.
Further, described device also includes:
Second storage unit, for being saved in physics magnetic according to preset time period by the bitmap table in internal memory As the 3rd bitmap table in dish;
Described increment determines unit, is additionally operable to after power loss recovery, before incremental backup, however, it is determined that described Data in the address space corresponding to data bit being set in 3rd bitmap table are not incremented backup, then Determine that these data are this incremental backup data.
As can be seen here, the present invention can be virtual in write by arranging bitmap table for magnetic disk of virtual machine in advance During machine disk, magnetic disk of virtual machine address is converted into the address space of described magnetic disk of virtual machine file, then root Determine the data bit in the bitmap table of correspondence according to this address space, by data bit set, when carrying out, increment is standby During part, it is standby that the data in the address space corresponding to data bit being set in bitmap table are defined as increment Number evidence, thus carry out incremental backup.Therefore the present invention is without traveling through whole magnetic disk of virtual machine, only passes through The magnetic disk of virtual machine data that bitmap table is revised in then can finding out this incremental backup cycle, such that it is able to reduce The workload of incremental backup, improves the efficiency of incremental backup.
Accompanying drawing explanation
Fig. 1 is the process chart of a kind of incremental backup method in a kind of illustrative embodiments of the present invention;
Fig. 2 a is the schematic diagram of a kind of bitmap table in a kind of illustrative embodiments of the present invention;
Fig. 2 b is the schematic diagram of the another kind of bitmap table in a kind of illustrative embodiments of the present invention;
Fig. 3 a is bitmap Table A initial in a kind of illustrative embodiments of the present invention, the showing of bitmap table B It is intended to;
Fig. 3 b is the bitmap Table A of verification, the showing of bitmap table B in a kind of illustrative embodiments of the present invention It is intended to;
Fig. 3 c is the schematic diagram of the bitmap table C in a kind of illustrative embodiments of the present invention;
Fig. 4 a is the hardware of the incremental backup device place equipment in a kind of illustrative embodiments of the present invention Structure chart;
Fig. 4 b is the logical structure of a kind of incremental backup device in a kind of illustrative embodiments of the present invention Figure.
Detailed description of the invention
In order to solve the problem that prior art exists, the present invention provides a kind of incremental backup method and device, Can be by arranging bitmap table for magnetic disk of virtual machine in advance, when writing magnetic disk of virtual machine, by virtual machine magnetic Disk address is converted into the address space of described magnetic disk of virtual machine file, determines correspondence further according to this address space Bitmap table in data bit, by data bit set, when carrying out incremental backup, will bitmap table be set to Data in the address space corresponding to data bit of position are defined as incremental backup data, thus carry out increment Backup.Therefore the present invention is without traveling through whole magnetic disk of virtual machine, only then can be found out by bitmap table and this time increase In amount backup cycle, the magnetic disk of virtual machine data of amendment, such that it is able to reduce the workload of incremental backup, carry The efficiency of high incremental backup.
Refer to Fig. 1, be the place of a kind of incremental backup method in a kind of illustrative embodiments of the present invention Reason flow chart, before magnetic disk of virtual machine file is carried out incremental backup, needs first to magnetic disk of virtual machine file Carry out full backup.Each incremental backup operations afterwards specifically includes:
Step 101, when writing data into magnetic disk of virtual machine, will write magnetic disk of virtual machine address conversion Become the address space at corresponding magnetic disk of virtual machine file place;
In the present embodiment, when magnetic disk of virtual machine generation data write operation, main frame obtains the void of write Plan machine disk address.The usual thing of main frame presented in magnetic disk of virtual machine file due to magnetic disk of virtual machine In reason disk, magnetic disk of virtual machine address the actual address of write-not data, therefore main frame also needs virtual Machine disk address is converted into the address space at the magnetic disk of virtual machine file place of correspondence, writes such that it is able to obtain Enter the address that data are actual.For example, a magnetic disk of virtual machine capacity is 40G, corresponding virtual machine Disk file is 100M.When magnetic disk of virtual machine address is converted into magnetic disk of virtual machine file address, and Non-linear conversion, but change according to certain algorithm according to write sequence, and magnetic disk of virtual machine pair The magnetic disk of virtual machine file answered can increase with the write of data, such as, for magnetic disk of virtual machine, writing When entering 20G position data, corresponding to the 40M position of magnetic disk of virtual machine file;Write 30G position During data, corresponding to the 50M position of magnetic disk of virtual machine file.
Step 102, determine in the default bitmap table that this magnetic disk of virtual machine is corresponding corresponding with this address space One or more data bit;
When main frame is provided with magnetic disk of virtual machine, the bitmap table of correspondence can be set for magnetic disk of virtual machine in advance, This bitmap table includes the data bit that multiple size is identical.Described bitmap table is typically described main frame at internal memory One sector address space of middle distribution, this address space can be divided into the multiple data bit specifying size. For example, allocate the sector address space bitmap table as certain magnetic disk of virtual machine in advance at host memory, Size is 60K Bytes;And represent whether a 2M Bytes magnetic disk of virtual machine is written over a bit, I.e. one data bit is 1bit.Due to 1Bytes=8bit, then the bitmap table of 60K Bytes includes 60K* 8=480K data bit, this bitmap table can represent the magnetic disk of virtual machine file of 60K*8*2M=960G. In a preferred embodiment, bitmap table can be arranged in the internal memory of main frame, therefore read in magnetic disk of virtual machine When writing, para-position chart is modified and is equivalent to revise internal memory, from the read-write without reducing magnetic disk of virtual machine Speed.
When getting the address space at magnetic disk of virtual machine file place, main frame may determine that and this virtual machine One or more data bit corresponding with this address space in the default bitmap table that disk is corresponding.Such as virtual machine The address space of disk file is 0-4M, and in bitmap table, each data bit is 1bit and each position represents 2M Address space, then the data bit cell corresponding for address space 0-4M of magnetic disk of virtual machine file can divide Wei 0-1bit, 1-2bit.
In optional embodiment of the present invention, magnetic disk of virtual machine file can be set to qcow2 form, And install qcow2 driving in main frame, such that it is able to by the ground of the magnetic disk of virtual machine file of qcow2 form Space, location is converted to one or more data bit of correspondence.It addition, the present invention also supports alternative document form, And can change by installing corresponding driving, do not limit.
Step 103, the one or more data bit is carried out set operation;
These data bit, when determining one or more data bit described in this bitmap table, can be carried out by main frame Set operation, thus the data bit corresponding with unchanged magnetic disk of virtual machine file data makes a distinction.Example As data have amendment to be then set to 1, data are then set to 0 without amendment.
Step 104, when carrying out incremental backup, the ground corresponding to data bit being set in bitmap table Data in space, location are defined as incremental backup data.
When main frame carries out incremental backup to magnetic disk of virtual machine file, can be according to this magnetic disk of virtual machine pair current The bitmap table answered, determines that the data in the address space corresponding to the data bit being set in bitmap table are Incremental backup data.Then the data bit being set is carried out reverse conversion acquisition according to described preset rules The address space at magnetic disk of virtual machine file place, such that it is able to the data obtained in address space.The most right The incremental data obtained carries out incremental backup.
As can be seen here, the present invention can be virtual in write by arranging bitmap table for magnetic disk of virtual machine in advance During machine disk, magnetic disk of virtual machine address is converted into the address space of described magnetic disk of virtual machine file, then root Determine the data bit in the bitmap table of correspondence according to this address space, by data bit set, when carrying out, increment is standby During part, it is standby that the data in the address space corresponding to data bit being set in bitmap table are defined as increment Number evidence, thus carry out incremental backup.Therefore the present invention is without traveling through whole magnetic disk of virtual machine, only passes through The magnetic disk of virtual machine data that bitmap table is revised in then can finding out this incremental backup cycle, such that it is able to reduce The workload of incremental backup, improves the efficiency of incremental backup.
If it addition, above-mentioned bitmap table is the first bitmap table being stored in internal memory, then at this incremental backup After completing, the described first bitmap table in internal memory can be saved in physical disk and this increment by main frame The position that Backup Data is corresponding, as second chart, such that it is able to for the school of subsequent incremental backup Quasi-foundation, improves the accuracy rate of incremental backup.After preservation, described first bitmap table is reset, in order to be used for The incremental backup of this magnetic disk of virtual machine file follow-up.
It should be noted that in the above-described embodiments, when magnetic disk of virtual machine write data cause in bitmap table When multiple data bit are set, main frame can a multiple data bit of set, it is also possible to one one point Other set, the concrete frequency that can control labelling by arranging set cycle.For example, void is worked as Plan machine disk file is set to qcow2 form, and when qcow2 driving is installed in main frame, due to qcow2 Drive the data that every time can read 2M, therefore every data bit in bitmap table can be set and represent 2M's Address space, then when qcow2 drives and reads the conversion of 2M data laggard row address every time, corresponding bitmap table In 1 data bit, therefore can carry out the set of one one with para-position chart.If it is the most right to need Multiple data bit carry out set operation, then can arrange a set cycle, and record in set cycle and change The magnetic disk of virtual machine file data write is then once corresponding to described rewrite data in this set cycle Multiple data bit carry out set operation.
In the preferred embodiment of the invention, when the set of one one, main frame para-position chart, for After each data bit carries out set operation, can be according to the principle of locality, it was predicted that data to be written The data bit that the address space of magnetic disk of virtual machine file is corresponding, by the predetermined number adjacent with this data bit Data bit carries out set operation, such that it is able to improve signature velocity further.Specifically, address is obtained The data bit that space is corresponding, carries out set behaviour by the data bit of the predetermined number adjacent with this data bit Make.The scope of described predetermined number can set according to the actual requirements, when scope arranges bigger, then puts Bit time can be relatively long, but can relatively improve the speed of follow-up set;When scope arranges less, Then setting time can be relatively short, but the effect of follow-up set is relatively small, it is therefore desirable to user Choose suitable scope according to the actual requirements.
During above-mentioned set operation, the data bit being set in bitmap table including, a part of data bit is corresponding Address space in data situation about not being written over.Thus the magnetic disk of virtual machine literary composition of incremental backup can be caused Number of packages is according to redundancy occur.In order to solve the problem of this redundancy, in optional embodiment of the present invention, pin During to non-incremental backup first, after the one or more data bit is carried out set operation, the most true Before determining incremental backup data, can further from physical disk and in physical disk with on once increment The position that Backup Data is corresponding obtains the second chart of correspondence.And by the first bitmap table and the second bitmap Table successive appraximation, when having identical bits in first data bit and this second chart of described first bitmap table When the second data bit put all is set, obtain the original number in the address space corresponding with the first data bit Backup Data according to this and in the address space corresponding with the second data bit compares, if identical, then will First data bit resets;By that analogy.Then the data can being set in the first bitmap table after comparing The data in address space corresponding to Wei are defined as this incremental backup data, after incremental backup, preserve The first bitmap table after described successive appraximation.By to the data bit of set in adjacent twice bitmap table Verification, it is possible to reduce the redundant data in subsequent incremental backup, thus improve the efficiency of incremental backup, carry High incremental backup space availability ratio.
In optional embodiment of the present invention, according to preset time period, the bitmap table in internal memory can be protected It is stored to physical disk as the 3rd bitmap table, and when the next time cycle, covers former with new bitmap table The 3rd bitmap table preserved.And after power loss recovery, before incremental backup, however, it is determined that described 3rd Data in the address space corresponding to data bit being set in chart are not incremented backup, then can recognize Incremental backup is not carried out for the data in the address space that the 3rd bitmap table is corresponding, thus may determine that should Data are this incremental backup data.So the loss of data that system accident power-off causes can be avoided Problem, such that it is able to improve data backup safety.
For making the purpose of the present invention, technical scheme and advantage clearer, below to the party of the present invention Case is described in further detail.
During initialization, first main frame is the bitmap table that the distribution of each magnetic disk of virtual machine is corresponding, each bitmap table It is positioned at internal memory and allocates one section of space in advance, it is assumed that its size is 60K Bytes, with one in bitmap table The data bit of bit represents whether a 2M Bytes magnetic disk of virtual machine block is written over, and this bit can arrange value and be 0 or 1,0 expression is not written over, and 1 expression is written over.When initializing, each bit of this bitmap table all sets to 0. Due to 1Bytes=8bit, then the bitmap table of 60K Bytes includes 60K*8=480K data bit, should Bitmap table can represent the magnetic disk of virtual machine file of 60K*8*2M=960G.Magnetic disk of virtual machine file is set It is set to qcow2 form, and qcow2 driving is installed in main frame.
Before magnetic disk of virtual machine file is carried out incremental backup, first magnetic disk of virtual machine file is done full dose standby Part.
When first time incremental backup, when virtual machine write magnetic disk of virtual machine, it is assumed that write virtual machine magnetic The magnetic disk of virtual machine address of dish block is A, then drives according to qcow2, is turned by magnetic disk of virtual machine address A Changing the address space C at magnetic disk of virtual machine file place into, address space C is in units of 2M.Base area Space, location C determines bit corresponding in the bitmap table that described magnetic disk of virtual machine is corresponding, and bit is put 1.Often During secondary 1 bit of set, it is contemplated that the data near this bit are likely to be modified, therefore by this bit institute Preset range in bit all put 1.Such as, when 1 bit of set, together with the most totally 8 Bit (such as first three after four) is set to 1 simultaneously, and as shown in Figure 2 a, the most each little lattice represent 1bit, the " 1 " in a line the 5th bit, i.e. gray area from left to right is the actual magnetic disk of virtual machine file institute rewritten Bit corresponding to address space, after this bit puts 1, together with 3 bit before this bit and below 4 bit all put 1.If the bit that the address space at the magnetic disk of virtual machine file place again rewritten is corresponding is During the first row the 6th bit from left to right, then according to aforesaid operations flow process, can be by this bit and above 3 thereof Bit and 4 bit below all puts 1, and the bit having put 1 keeps bitmap table that is constant, then that obtain As shown in Figure 2 b, for 1 situation of putting that write data for the first time are corresponding, the void on the right in the dotted line frame on the left side In wire frame for second time write data corresponding put 1 situation.During follow-up write data, marker bit chart Mode is identical, and here is omitted.
When arriving the time cycle of incremental backup, can be the bit of 1 according to the value of current bitmap the exterior and the interior, look for Go out the address space of correspondence, then data corresponding for magnetic disk of virtual machine file address are preserved to incremental backup File, and bitmap table is saved in the most in the lump physical disk, finally by the bitmap table clear 0 in internal memory.
When second time does incremental backup, the mode of Set bit chart is identical with aforesaid way, such that it is able to root The bitmap table that this magnetic disk of virtual machine is corresponding is obtained according to disk write situation.Because writing magnetic disk of virtual machine space Time, during each 1 bit of set can together with set before and after the most totally 8 bit, then can cause certain redundancy, Therefore, before second time incremental backup, para-position chart is needed to proofread.Assume that current bitmap table is Bitmap table B, obtains the bitmap Table A of last backup corresponding to this magnetic disk of virtual machine, bitmap Table A and position Chart B is as shown in Figure 3 a.Compare the bit putting 1 in bitmap Table A and bitmap table B, obtain bitmap Table A With bitmap table B is simultaneously 1 bit, as shown in Figure 3 b, wherein with black surround mark correspondence all put 1 Bit.Obtain magnetic disk of virtual machine file data corresponding for these bit the most further and compare, as Really data are identical, then set to 0 by bit corresponding for data, if data differ, then data are corresponding Bit puts 1.Assume that the 5th the bit data from left to right of the first row in bitmap Table A are modified, other the most not by Amendment, the 6th the bit data from left to right of the first row in bitmap table B are modified, and other are not all modified, The bit that therefore black surround in Fig. 3 b can mark other sets to 0, the bitmap table C after then being calibrated, As shown in Figure 3 c, wherein remain 4 put 1 bit.Then carry out second time according to bitmap table C to increase Amount backup, and preserve bitmap table C.
In above-mentioned incremental backup process, present bit chart can be write physics according to timing cycle by main frame Disk, and preserve.According to performance requirement, timing cycle can be set to 1 minute, 10 seconds or 1 second Clock etc..Therefore the problem that the bitmap table caused because of the unexpected power-off of system is lost can be avoided.
Based on identical design, the present invention also provides for a kind of incremental backup device, and this device can be by soft Part realizes, it is also possible to realize by the way of hardware or software and hardware combining.As a example by implemented in software, this The incremental backup device of invention, as the device on a logical meaning, is the CPU by its place device Run after computer program instructions corresponding in memorizer is read and form.
Refer to Fig. 4 a and Fig. 4 b, be a kind of incremental backup in a kind of illustrative embodiments of the present invention Device 400, the basic running environment of this device includes CPU, memorizer and other hardware, from logical layer From the point of view of on face, this device 400 includes:
Address conversioning unit 401, for when writing data into magnetic disk of virtual machine, by the virtual machine of write Disk address is converted into the address space at the magnetic disk of virtual machine file place of correspondence;
Data locking unit 402, is used for determining in the default bitmap table that this magnetic disk of virtual machine is corresponding and this ground One or more data bit that space, location is corresponding;
Bitmap set unit 403, for carrying out set operation to the one or more data bit;
Increment determines unit 404, is used for when carrying out incremental backup, the data being set in bitmap table The data in address space corresponding to Wei are defined as incremental backup data.
Optionally, described bitmap table is the first bitmap table being stored in internal memory;Described device also includes:
First storage unit 405, for after this incremental backup completes, protects described first bitmap table It is stored in physical disk the position corresponding with this incremental backup data as second chart, by first Chart resets.
Optionally, described bitmap set unit 403, it is additionally operable to carrying out set for each data bit After operation, the data bit of the predetermined number adjacent with this data bit is carried out set operation.
Optionally, described device also includes:
Data check and correction unit 406, for for non-incremental backup first, to the one or more number After carrying out set operation according to position, before not determining incremental backup data, increase with the last time from physical disk The position that amount Backup Data is corresponding obtains the second chart of correspondence;When described first bitmap table first Data bit and this second chart have the second data bit of same position when being all set, obtain and the In initial data in the address space that one data bit is corresponding and the address space corresponding with the second data bit Backup Data compare, if identical, then by first data bit reset;
Described increment determines unit 404, specifically for the number being set in the first bitmap table after comparing It is defined as this incremental backup data according to the data in the address space corresponding to position.
Optionally, described device also includes:
Second storage unit 407, for being saved in thing according to preset time period by the bitmap table in internal memory As the 3rd bitmap table in reason disk;
Described increment determines unit 404, is additionally operable to after power loss recovery, before incremental backup, however, it is determined that Data in the address space corresponding to data bit being set in described 3rd bitmap table are not incremented backup, Then determine that these data are this incremental backup data.
As can be seen here, the present invention can be virtual in write by arranging bitmap table for magnetic disk of virtual machine in advance During machine disk, magnetic disk of virtual machine address is converted into the address space of described magnetic disk of virtual machine file, then root Determine the data bit in the bitmap table of correspondence according to this address space, by data bit set, when carrying out, increment is standby During part, it is standby that the data in the address space corresponding to data bit being set in bitmap table are defined as increment Number evidence, thus carry out incremental backup.Therefore the present invention is without traveling through whole magnetic disk of virtual machine, only passes through The magnetic disk of virtual machine data that bitmap table is revised in then can finding out this incremental backup cycle, such that it is able to reduce The workload of incremental backup, improves the efficiency of incremental backup.
In said apparatus, the function of unit and the process that realizes of effect specifically refer in said method corresponding Step realize process, do not repeat them here.
For device embodiment, owing to it corresponds essentially to embodiment of the method, so relevant part ginseng See that the part of embodiment of the method illustrates.Device embodiment described above is only schematically, The wherein said unit illustrated as separating component can be or may not be physically separate, makees The parts shown for unit can be or may not be physical location, i.e. may be located at a place, Or can also be distributed on multiple NE.Can select according to the actual needs part therein or The whole module of person realizes the purpose of the application scheme.Those of ordinary skill in the art are not paying creativeness In the case of work, i.e. it is appreciated that and implements.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all at this Within the spirit of invention and principle, any modification, equivalent substitution and improvement etc. done, should be included in Within the scope of protection of the invention.

Claims (10)

1. an incremental backup method, it is characterised in that described method includes:
When writing data into magnetic disk of virtual machine, the magnetic disk of virtual machine address of write is converted into the void of correspondence The address space at plan machine disk file place;
Determine in the default bitmap table that this magnetic disk of virtual machine is corresponding corresponding with this address space one or more Data bit;
The one or more data bit is carried out set operation;
When carrying out incremental backup, in the address space corresponding to data bit being set in bitmap table Data are defined as incremental backup data.
Method the most according to claim 1, it is characterised in that described bitmap table is to be stored in internal memory In the first bitmap table, after this incremental backup completes, described method also includes:
Described first bitmap table is saved in physical disk the position corresponding with this incremental backup data make For second chart, the first bitmap table is reset.
Method the most according to claim 2, it is characterised in that described method also includes:
After carrying out set operation for each data bit, by the predetermined number adjacent with this data bit Data bit carries out set operation.
Method the most according to claim 3, it is characterised in that for non-incremental backup first, After the one or more data bit is carried out set operation, before not determining incremental backup data, described Method also includes:
Position corresponding with last incremental backup data from physical disk obtains the second corresponding bitmap Table;
When first data bit and this second chart of described first bitmap table have the second of same position When data bit is all set, obtain the initial data in the address space corresponding with the first data bit and with Backup Data in the address space that second data bit is corresponding compares, if identical, then by the first data Position resets;
The address space corresponding to data bit that is described when carrying out incremental backup, that will be set in bitmap table In data be defined as incremental backup data, specifically include:
Data in the address space corresponding to data bit being set in the first bitmap table after comparing are true It is set to this incremental backup data.
Method the most according to claim 1, it is characterised in that described method also includes:
According to preset time period, the bitmap table in internal memory is saved in physical disk as the 3rd bitmap table; After power loss recovery, before incremental backup, however, it is determined that the data bit institute being set in described 3rd bitmap table The corresponding data in address space are not incremented backup, it is determined that these data are this incremental backup data.
6. an incremental backup device, it is characterised in that described device includes:
Address conversioning unit, for when writing data into magnetic disk of virtual machine, by the magnetic disk of virtual machine of write Address is converted into the address space at the magnetic disk of virtual machine file place of correspondence;
Data locking unit, empty with this address for determining in the default bitmap table that this magnetic disk of virtual machine is corresponding Between corresponding one or more data bit;
Bitmap set unit, for carrying out set operation to the one or more data bit;
Increment determines unit, is used for when carrying out incremental backup, the data bit institute being set in bitmap table The corresponding data in address space are defined as incremental backup data.
Device the most according to claim 6, it is characterised in that described bitmap table is to be stored in internal memory In the first bitmap table;
Described device also includes:
First storage unit, for after this incremental backup completes, is saved in described first bitmap table Position corresponding with this incremental backup data in physical disk is as second chart, by the first bitmap table Reset.
Device the most according to claim 7, it is characterised in that
Described bitmap set unit, is additionally operable to after carrying out set operation for each data bit, will be with The data bit of the predetermined number that this data bit is adjacent carries out set operation.
Device the most according to claim 8, it is characterised in that described device also includes:
Data check and correction unit, for for non-incremental backup first, to the one or more data bit After carrying out set operation, before not determining incremental backup data, standby with last increment from physical disk Number is according to the second chart obtaining correspondence in corresponding position;The first data when described first bitmap table Position and this second chart have the second data bit of same position when being all set, obtain and the first number Standby according in the initial data in the address space that position is corresponding and the address space corresponding with the second data bit First data bit, according to comparing, if identical, is then reset by number;
Described increment determines unit, specifically for the data bit being set in the first bitmap table after comparing The corresponding data in address space are defined as this incremental backup data.
Device the most according to claim 6, it is characterised in that described device also includes:
Second storage unit, for being saved in physics magnetic according to preset time period by the bitmap table in internal memory As the 3rd bitmap table in dish;
Described increment determines unit, is additionally operable to after power loss recovery, before incremental backup, however, it is determined that described Data in the address space corresponding to data bit being set in 3rd bitmap table are not incremented backup, then Determine that these data are this incremental backup data.
CN201610193106.7A 2016-03-30 2016-03-30 A kind of incremental backup method and device Active CN105893184B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610193106.7A CN105893184B (en) 2016-03-30 2016-03-30 A kind of incremental backup method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610193106.7A CN105893184B (en) 2016-03-30 2016-03-30 A kind of incremental backup method and device

Publications (2)

Publication Number Publication Date
CN105893184A true CN105893184A (en) 2016-08-24
CN105893184B CN105893184B (en) 2019-03-15

Family

ID=57014146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610193106.7A Active CN105893184B (en) 2016-03-30 2016-03-30 A kind of incremental backup method and device

Country Status (1)

Country Link
CN (1) CN105893184B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461783A (en) * 2014-12-10 2015-03-25 上海爱数软件有限公司 Virtual machine backup method by tracking sector data change
CN106802840A (en) * 2017-01-19 2017-06-06 郑州云海信息技术有限公司 A kind of virtual machine backup, restoration methods and device
CN107197022A (en) * 2017-06-02 2017-09-22 华南理工大学 OpenStack storage optimization methods and system
CN107391302A (en) * 2017-06-14 2017-11-24 深信服科技股份有限公司 Bitmap data management method and device
CN107423162A (en) * 2017-04-25 2017-12-01 北京邮电大学 Disaster recovery and backup systems and the synchronous method and device of source inter-system data
CN109471700A (en) * 2018-10-29 2019-03-15 北京京航计算通讯研究所 The virtual machine incremental backup method of difference bitmap characteristic based on Qcow2 image file
CN109471699A (en) * 2018-10-29 2019-03-15 北京京航计算通讯研究所 The virtual machine incremental backup system of difference bitmap characteristic based on Qcow2 image file
CN113626256A (en) * 2021-07-16 2021-11-09 济南浪潮数据技术有限公司 Virtual machine disk data backup method, device, terminal and storage medium
CN113626261A (en) * 2021-10-13 2021-11-09 苏州浪潮智能科技有限公司 Data backup method, device and equipment and computer readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100228913A1 (en) * 2009-03-06 2010-09-09 Vmware, Inc. Method for tracking changes in virtual disks
CN102646064A (en) * 2011-02-16 2012-08-22 微软公司 Incremental virtual machine backup supporting migration
CN103389926A (en) * 2013-06-25 2013-11-13 百度在线网络技术(北京)有限公司 Method and device used for backing-up virtual disk
CN104199687A (en) * 2014-08-14 2014-12-10 北京京东尚科信息技术有限公司 Method and device for processing data in virtual machine system
CN104461783A (en) * 2014-12-10 2015-03-25 上海爱数软件有限公司 Virtual machine backup method by tracking sector data change
CN104506619A (en) * 2014-12-22 2015-04-08 华为技术有限公司 Data backup and recovery method and device, and server
CN105022678A (en) * 2015-07-02 2015-11-04 深圳市深信服电子科技有限公司 Data backup method and apparatus for virtual machine

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100228913A1 (en) * 2009-03-06 2010-09-09 Vmware, Inc. Method for tracking changes in virtual disks
CN102646064A (en) * 2011-02-16 2012-08-22 微软公司 Incremental virtual machine backup supporting migration
CN103389926A (en) * 2013-06-25 2013-11-13 百度在线网络技术(北京)有限公司 Method and device used for backing-up virtual disk
CN104199687A (en) * 2014-08-14 2014-12-10 北京京东尚科信息技术有限公司 Method and device for processing data in virtual machine system
CN104461783A (en) * 2014-12-10 2015-03-25 上海爱数软件有限公司 Virtual machine backup method by tracking sector data change
CN104506619A (en) * 2014-12-22 2015-04-08 华为技术有限公司 Data backup and recovery method and device, and server
CN105022678A (en) * 2015-07-02 2015-11-04 深圳市深信服电子科技有限公司 Data backup method and apparatus for virtual machine

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461783A (en) * 2014-12-10 2015-03-25 上海爱数软件有限公司 Virtual machine backup method by tracking sector data change
CN106802840A (en) * 2017-01-19 2017-06-06 郑州云海信息技术有限公司 A kind of virtual machine backup, restoration methods and device
CN107423162A (en) * 2017-04-25 2017-12-01 北京邮电大学 Disaster recovery and backup systems and the synchronous method and device of source inter-system data
CN107197022A (en) * 2017-06-02 2017-09-22 华南理工大学 OpenStack storage optimization methods and system
CN107197022B (en) * 2017-06-02 2020-01-10 华南理工大学 OpenStack storage optimization method and system
CN107391302A (en) * 2017-06-14 2017-11-24 深信服科技股份有限公司 Bitmap data management method and device
CN109471699A (en) * 2018-10-29 2019-03-15 北京京航计算通讯研究所 The virtual machine incremental backup system of difference bitmap characteristic based on Qcow2 image file
CN109471700A (en) * 2018-10-29 2019-03-15 北京京航计算通讯研究所 The virtual machine incremental backup method of difference bitmap characteristic based on Qcow2 image file
CN109471699B (en) * 2018-10-29 2021-06-18 北京京航计算通讯研究所 Virtual machine incremental backup system based on difference bitmap characteristics of Qcow2 image file
CN109471700B (en) * 2018-10-29 2021-07-02 北京京航计算通讯研究所 Virtual machine incremental backup method based on difference bitmap characteristics of Qcow2 image file
CN113626256A (en) * 2021-07-16 2021-11-09 济南浪潮数据技术有限公司 Virtual machine disk data backup method, device, terminal and storage medium
CN113626256B (en) * 2021-07-16 2023-12-22 济南浪潮数据技术有限公司 Virtual machine disk data backup method, device, terminal and storage medium
CN113626261A (en) * 2021-10-13 2021-11-09 苏州浪潮智能科技有限公司 Data backup method, device and equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN105893184B (en) 2019-03-15

Similar Documents

Publication Publication Date Title
CN105893184A (en) Incremental backup method and device
CN105988718B (en) Non-volatile memory device and control method performed by controller
KR102625637B1 (en) Data storage device and operating method thereof
US9645894B2 (en) Data storage device and flash memory control method
CN107943414B (en) File system partition and data read-write method of embedded Linux
CN103019888B (en) Backup method and device
CN103688248B (en) A kind of management method of storage array, device and controller
TWI467581B (en) Hybrid storage apparatus and hybrid storage medium controlller and addressing method thereof
EP3489956B1 (en) Erase management in memory systems
US9575844B2 (en) Mass storage device and method of operating the same to back up data stored in volatile memory
US8386905B2 (en) Error correcting method, and memory controller and memory storage system using the same
EP4137924A1 (en) Fragment management method and fragment management apparatus
US9009405B2 (en) Methods and systems for instantaneous online capacity expansion
CN103106143B (en) Solid state storage device and logic thereof are to entity correspondence table method for building up
TWI447580B (en) Memory space managing method, and memory controller and memory storage device using the same
TWI442230B (en) Data writing method, memory controller and memory storage apparatus
TWI423022B (en) Memory management method, memory controller and memory storage apparatus
US8656090B2 (en) Method for performing block management, and associated memory device and controller thereof
US10387280B2 (en) Reporting defects in a flash memory back-up system
US10481979B2 (en) Storage system, computing system, and methods thereof
US9646721B1 (en) Solid state drive bad block management
CN102890655B (en) Memory storage device, memory controller and valid data recognition method thereof
CN104765569A (en) Data write-in method, memory control circuit unit and memory storing device
TWI489272B (en) Data protecting method, and memory controller and memory storage device using the same
TWI457755B (en) Data writing method, memory controller and memory storage apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
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: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant before: Huasan Communication Technology Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant