CN103019888B - Backup method and device - Google Patents

Backup method and device Download PDF

Info

Publication number
CN103019888B
CN103019888B CN201210562431.8A CN201210562431A CN103019888B CN 103019888 B CN103019888 B CN 103019888B CN 201210562431 A CN201210562431 A CN 201210562431A CN 103019888 B CN103019888 B CN 103019888B
Authority
CN
China
Prior art keywords
backup
residual quantity
quantity bitmap
bitmap
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201210562431.8A
Other languages
Chinese (zh)
Other versions
CN103019888A (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.)
Chengdu Huawei Technology Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201210562431.8A priority Critical patent/CN103019888B/en
Publication of CN103019888A publication Critical patent/CN103019888A/en
Application granted granted Critical
Publication of CN103019888B publication Critical patent/CN103019888B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The embodiment of the present invention provides a kind of backup method and device.Method comprises: at current delta backup time, creates current backup moment snapshot; The residual quantity bitmap created according to a upper backup time and described current backup moment snapshot, carry out incremental backup; Described residual quantity bitmap is that a backup time creates on described, and changed with the data in source disk before described establishment current backup moment snapshot and upgrade.The embodiment of the present invention is by creating residual quantity bitmap at a upper backup time, change according to the data in source disk between twice backup time and upgrade residual quantity bitmap, make the current backup moment can according on one backup time create and a upper backup time and between the current backup moment with in source disk data change and upgrade residual quantity bitmap back up, and generate bitmap without the need to carrying out snapshot comparison in the current backup moment, shorten BACKUP TIME, improve the overall performance of backup.

Description

Backup method and device
Technical field
The embodiment of the present invention relates to redundancy technique, particularly relates to a kind of backup method and device.
Background technology
For the backup of disk, industry generally adopts the mode of snapshot to carry out.The advantage of snapshot is to ensure data in magnetic disk consistance at a time, is also to read snapshot to back up during backup, can reduce the impact on source disk.Fig. 1 is the common backup schematic diagram based on snapshot.As shown in Figure 1, at backup time, do snapshot to source disk, backup server reads Backup Data from snapshot, and produce simultaneously server can continue to source disk write production data.
Backup is mainly divided into full backup and incremental backup.Full backup data volume is large, requires very high to backup window, backup speed, backup storage capacity.Incremental backup is divided into again difference incremental backup and cumulative increment backup.In difference incremental backup, each backup has only been backed up relative to since last time backup, the data volume that source disk changes, and no matter last backup is incremental backup or full backup.In sigma delta backup, each backup is only backed up relative to after last full backup, the data volume that source disk changes.Usually, typical incremental backup method comprises: snapshot is divided into some data blocks by a certain size, one on the corresponding residual quantity bitmap of each data block; Snapshot and snapshot during last backup in contrast current backup moment, if the data difference of the data block of identical address, be then 1 by correspondence position in residual quantity bitmap, otherwise be set to 0; From current backup moment snapshot, read the data that residual quantity bitmap intermediate value is the position corresponding data block of 1, carry out incremental backup.
Realizing in process of the present invention, inventor finds: existing incremental backup method needs to carry out snapshot comparison at backup time and generates bitmap, extends BACKUP TIME, the serious overall performance reducing backup.
Summary of the invention
The embodiment of the present invention provides a kind of backup method and device, generates the problem that bitmap causes prolongation BACKUP TIME, overall performance is backed up in serious reduction in order to solve existing incremental backup method owing to carrying out snapshot comparison at backup time.
First aspect, the embodiment of the present invention provides a kind of backup method, comprising:
At current delta backup time, create current backup moment snapshot;
The residual quantity bitmap created according to a upper backup time and described current backup moment snapshot, carry out incremental backup; Described residual quantity bitmap is that a backup time creates on described, and changed with the data in source disk before described establishment current backup moment snapshot and upgrade.
In conjunction with first aspect, in the first possible implementation of first aspect, before described establishment current backup moment snapshot, also comprise:
At a upper backup time, create a upper backup time snapshot and residual quantity bitmap, in described residual quantity bitmap, each position is initial value;
If there are the data of data block to change in source disk, be then non-initial value by position corresponding with described data block in described residual quantity bitmap.
In conjunction with the first possible implementation of first aspect, in the implementation that the second of first aspect is possible, if there are the data of data block to change in described source disk, are then non-initial value by position corresponding with described data block in described residual quantity bitmap, comprise:
When monitoring the write operation to described source disk, obtain the address of described write operation;
Determine at least one data block corresponding with the address of described write operation;
Be non-initial value by least one position corresponding with at least one data block described in described residual quantity bitmap.
In conjunction with the implementation that the first or the second of first aspect are possible, in the third possible implementation of first aspect, described current delta backup is difference incremental backup; The described residual quantity bitmap according to a upper backup time establishment and described current backup moment snapshot, carry out incremental backup, comprising:
The data of the data block corresponding with the position of non-initial value in described residual quantity bitmap are read from described current backup moment snapshot;
Data according to the data block of the position correspondence of described non-initial value carry out incremental backup.
In conjunction with the implementation that the first or the second of first aspect are possible, in the 4th kind of possible implementation of first aspect, described current delta backup is backed up for cumulative increment; The described residual quantity bitmap according to a upper backup time establishment and described current backup moment snapshot, carry out incremental backup, comprising:
If a upper backup is full backup, from described current backup moment snapshot, then read the data of the data block corresponding with the position of non-initial value in described residual quantity bitmap, if a upper backup is incremental backup, then obtain the merging residual quantity bitmap from the full backup of the last time to a upper backup, the data of the data block that reading is corresponding with the position of non-initial value in described merging residual quantity bitmap from described current backup moment snapshot;
Data according to the data block of the position correspondence of described non-initial value carry out incremental backup.
In conjunction with the 4th kind of possible implementation of first aspect, in the 5th kind of possible implementation of first aspect, the merging residual quantity bitmap that described acquisition is backed up from the full backup of the last time to upper, comprising:
Obtain the residual quantity bitmap that from the full backup of the last time to a upper backup, each backup time creates; The residual quantity bitmap that each backup described creates is merged, obtains the described merging residual quantity bitmap from the full backup of the last time to a upper backup; Or,
Obtain merging residual quantity bitmap that a upper backup time obtains and the residual quantity bitmap that a upper backup time creates; The residual quantity bitmap that the merging residual quantity bitmap obtain a described upper backup time and a upper backup time create merges, and obtains the described merging residual quantity bitmap from the full backup of the last time to a upper backup.
In conjunction with any one possible implementation above-mentioned of first aspect or first aspect, in the 6th kind of possible implementation of first aspect, described in carry out incremental backup after, also comprise:
Delete described current delta backup snapshots.
Second aspect, the embodiment of the present invention provides a kind of back-up device, comprising:
Creation module, at current delta backup time, creates current backup moment snapshot;
Backup module, for according to upper one backup time create residual quantity bitmap and described current backup moment snapshot, carry out incremental backup; Described residual quantity bitmap is that a backup time creates on described, and changed with the data in source disk before described establishment current backup moment snapshot and upgrade.
In conjunction with second aspect, in the first possible implementation of second aspect, described creation module also for, at a upper backup time, create a upper backup time snapshot and residual quantity bitmap, in described residual quantity bitmap, each position is initial value;
Also comprise: update module, for in described creation module after a upper backup time creates residual quantity bitmap, before current delta backup time creates current backup moment snapshot, if there are the data of data block to change in source disk, be then non-initial value by position corresponding with described data block in described residual quantity bitmap.
In conjunction with the first possible implementation of second aspect, in the implementation that the second of second aspect is possible, described update module specifically for:
When monitoring the write operation to described source disk, obtain the address of described write operation;
Determine at least one data block corresponding with the address of described write operation;
Be non-initial value by least one position corresponding with at least one data block described in described residual quantity bitmap.
In conjunction with the implementation that the first or the second of second aspect are possible, in the third possible implementation of second aspect, described current delta backup is difference incremental backup; Described backup module specifically comprises:
First reading unit, for reading the data of the data block corresponding with the position of non-initial value in described residual quantity bitmap from described current backup moment snapshot;
Backup units, the data for the data block of the position correspondence according to described non-initial value carry out incremental backup.
In conjunction with the implementation that the first or the second of second aspect are possible, in the 4th kind of possible implementation of second aspect, described current delta backup is backed up for cumulative increment; Described backup module specifically comprises:
Second reading unit, if be full backup for a upper backup, from described current backup moment snapshot, then read the data of the data block corresponding with the position of non-initial value in described residual quantity bitmap, if a upper backup is incremental backup, then obtain the merging residual quantity bitmap from the full backup of the last time to a upper backup, the data of the data block that reading is corresponding with the position of non-initial value in described merging residual quantity bitmap from described current backup moment snapshot;
Backup units, the data for the data block of the position correspondence according to described non-initial value carry out incremental backup.
In conjunction with the 4th kind of possible implementation of second aspect, in the 5th kind of possible implementation of second aspect, described second reading unit, for obtaining the merging residual quantity bitmap backed up to upper from the full backup of the last time, specifically comprises:
Obtain the residual quantity bitmap that from the full backup of the last time to a upper backup, each backup time creates; The residual quantity bitmap that each backup described creates is merged, obtains the described merging residual quantity bitmap from the full backup of the last time to a upper backup; Or,
Obtain merging residual quantity bitmap that a upper backup time obtains and the residual quantity bitmap that a upper backup time creates; The residual quantity bitmap that the merging residual quantity bitmap obtain a described upper backup time and a upper backup time create merges, and obtains the described merging residual quantity bitmap from the full backup of the last time to a upper backup.
In conjunction with any one possible implementation above-mentioned of second aspect or first aspect, in the 6th kind of possible implementation of second aspect, also comprise:
Removing module, after carrying out incremental backup at described backup module, deletes described current delta backup snapshots.
One above in multiple technical scheme at least has following technique effect:
The embodiment of the present invention is by creating residual quantity bitmap at a upper backup time, change according to the data in source disk between twice backup time and upgrade residual quantity bitmap, make the current backup moment can according on one backup time create and a upper backup time and between the current backup moment with in source disk data change and upgrade residual quantity bitmap back up, and generate bitmap without the need to carrying out snapshot comparison in the current backup moment, shorten BACKUP TIME, improve the overall performance of backup.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the common backup schematic diagram based on snapshot;
The schematic flow sheet of a kind of backup method that Fig. 2 provides for the embodiment of the present invention one;
The another schematic flow sheet of a kind of backup method that Fig. 3 provides for the embodiment of the present invention one;
Fig. 4 is a kind of backup scenario schematic diagram of the embodiment of the present invention one;
Fig. 5 is another backup scenario schematic diagram of the embodiment of the present invention one;
The structural representation of a kind of back-up device 600 that Fig. 6 provides for the embodiment of the present invention two;
The structural representation of a kind of back-up device 700 that Fig. 7 provides for the embodiment of the present invention three.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The schematic flow sheet of a kind of backup method that Fig. 2 provides for the embodiment of the present invention one.As shown in Figure 2, method comprises:
201, at current delta backup time, current backup moment snapshot is created.
For example, the back-up device that the embodiment of the present invention provides creates current backup moment snapshot at current delta backup time.Particularly, back-up device can be arranged on backup server and is equiped with the memory device of source disk or produces in server.
202, according to residual quantity bitmap and the described current backup moment snapshot of a upper backup time establishment, incremental backup is carried out; Described residual quantity bitmap is that a backup time creates on described, and changed with the data in source disk before described establishment current backup moment snapshot and upgrade.
Particularly, a upper backup can be incremental backup, also can be full backup.
Further, before 201, also comprise:
At a upper backup time, create a upper backup time snapshot and residual quantity bitmap, in described residual quantity bitmap, each position is initial value;
If there are the data of data block to change in source disk, be then non-initial value by position corresponding with described data block in described residual quantity bitmap.
Usually, initial value can be set to 0.Particularly, the position in residual quantity bitmap and the data block one_to_one corresponding in source disk.The source disk of the present embodiment can be physical disk, also can be virtual disk, as volume, logical block etc.
Particularly, if there are the data of data block to change in described source disk, are then non-initial value by position corresponding with described data block in described residual quantity bitmap, comprise:
When monitoring the write operation to described source disk, obtain the address of described write operation;
Determine at least one data block corresponding with the address of described write operation;
Be non-initial value by least one position corresponding with at least one data block described in described residual quantity bitmap.
Particularly, between twice backup, often monitor once to the write operation of described source disk, just perform above-mentioned steps.Usually, described non-initial value can be set to 1.
Alternatively, under the scene of difference incremental backup, when namely described current delta backup is for difference incremental backup, 202 comprise:
The data of the data block corresponding with the position of non-initial value in described residual quantity bitmap are read from described current backup moment snapshot;
Data according to the data block of the position correspondence of described non-initial value carry out incremental backup.
Alternatively, under the scene of cumulative increment backup, namely the backup of described current delta for cumulative increment back up time, 202 comprise:
If a upper backup is full backup, from described current backup moment snapshot, then read the data of the data block corresponding with the position of non-initial value in described residual quantity bitmap, if a upper backup is incremental backup, then obtain the merging residual quantity bitmap from the full backup of the last time to a upper backup, the data of the data block that reading is corresponding with the position of non-initial value in described merging residual quantity bitmap from described current backup moment snapshot;
Data according to the data block of the position correspondence of described non-initial value carry out incremental backup.
Usually, carrying out which kind of incremental backup is determine according to the backup policy pre-set.
Further, the merging residual quantity bitmap that described acquisition is backed up from the full backup of the last time to upper, comprising:
Obtain the residual quantity bitmap that from the full backup of the last time to a upper backup, each backup time creates; The residual quantity bitmap that each backup described creates is merged, obtains the described merging residual quantity bitmap from the full backup of the last time to a upper backup; Or,
Obtain merging residual quantity bitmap that a upper backup time obtains and the residual quantity bitmap that a upper backup time creates; The residual quantity bitmap that the merging residual quantity bitmap obtain a described upper backup time and a upper backup time create merges, and obtains the described merging residual quantity bitmap from the full backup of the last time to a upper backup.
When initial value is 0, when non-initial value is 1, the merging of multiple residual quantity bitmap can be do AND operation respectively to the corresponding positions in the plurality of residual quantity bitmap.
Further, in order to reduce the space consuming storing snapshot and bring, also comprise after 201:
Delete described current delta backup snapshots.
The embodiment of the present invention is by creating residual quantity bitmap at a upper backup time, change according to the data in source disk between twice backup time and upgrade residual quantity bitmap, make the current backup moment can according on one backup time create and a upper backup time and between the current backup moment with in source disk data change and upgrade residual quantity bitmap back up, and generate bitmap without the need to carrying out snapshot comparison in the current backup moment, shorten BACKUP TIME, improve the overall performance of backup.Further, the embodiment of the present invention after current delta has backed up, can also delete described current delta backup snapshots, decreases the space consuming storing snapshot and bring.In addition, snapshot major part in backup is based on Copy on write (CopyonWrite, be called for short COW) snapshot, and all need to be stored in source disk based on the most of data in the snapshot of COW, have a strong impact on the production business of source disk, and after applying the embodiment of the present invention, due to snapshot can be deleted after a backup, therefore also can reduce the impact on production business further.
The another schematic flow sheet of a kind of backup method that Fig. 3 provides for the embodiment of the present invention one.As shown in Figure 3, comprising:
301, this incremental backup starts.
302, this snapshot is created.
303, the renewal to old residual quantity bitmap is stopped.
Particularly, the residual quantity bitmap created when old residual quantity bitmap is last backup.
304, old residual quantity bitmap is added inactive bitmap queue.
Particularly, an inactive bitmap queue can also be created, for preserving the residual quantity bitmap no longer upgraded.
305, create new residual quantity bitmap, all positions in new residual quantity bitmap are initialized as 0.
Particularly, after 304, perform 305 ~ 308 and 309 ~ 312 concurrently.
306, the address of monitor source disk write operation.
307, going out the position in new residual quantity bitmap corresponding to data block that data change according to the address computation of write operation, is 1 by described position.
308, judge whether to carry out new incremental backup, if then perform 301, then perform 306 if not.
309, order obtains in old residual quantity bitmap the snapshot address of the position correspondence being set to 1.
310, from snapshot, data are read according to the snapshot address obtained.
311, judge whether old residual quantity bitmap travels through complete, if then perform 312, then performs 309 if not.
312, this snapshot is deleted.
313, this incremental backup terminates.
Fig. 4 is a kind of backup scenario schematic diagram of the embodiment of the present invention one.Incremental backup in backup scenario shown in Fig. 4 is difference incremental backup, and flow process comprises:
401, the T0 moment, snapshot Snap_T0 is created.
Particularly, T0 is the full backup moment.
402, the T0 moment, residual quantity bitmap Map_T0 is created, by complete for Map_T0 initialization zero.
Particularly, the large data block such as source disk to be divided into, in the corresponding bitmap of every data block one (bit).
403, carry out full backup according to Snap_T0, back up complete deletion Snap_T0.
404, the T1 moment, source disk has data to change, and the bit in bitmap Map_T0 corresponding to the data block changed there being data puts 1.
Particularly, data A becomes A1.
405, the T2 moment, source disk has data to change, and the bit in bitmap Map_T0 corresponding to the data block changed there being data puts 1.
Particularly, data B becomes B2.T1, T2 are the moment that data change occurred between incremental backup moment full backup moment to first time.
406, the T3 moment, snapshot Snap_T3 is created.
Particularly, the T3 moment be after T0 first time incremental backup moment.
407, the T3 moment, stop the change to Map_T0, and create bitmap Map_T3, by complete for Map_T3 initialization zero.
408, carry out the difference incremental backup in T0 moment to T3 moment according to Snap_T3 and residual quantity bitmap Map_T0, back up complete deletion Snap_T3.
It should be noted that, subsequent incremental backup capable of circulation 404 ~ 408.
Fig. 5 is another backup scenario schematic diagram of the embodiment of the present invention one.Incremental backup in backup scenario shown in Fig. 5 is cumulative increment backup, and flow process comprises:
501, the T0 moment, snapshot Snap_T0 and residual quantity bitmap Map_ (1-0) is created, by Map_ (1-0) initialization complete zero; Carry out full backup according to Snap_T0, back up complete deletion Snap_T0.
Particularly, T0 is the full backup moment.Between T0 ~ T1 moment, if source disk has data to change, the bit in bitmap Map_ (1-0) corresponding to the data block changed there being data puts 1.
502, the T1 moment, snapshot Snap_T1 and residual quantity bitmap Map_ (2-1) is created, by Map_ (2-1) initialization complete zero; The cumulative increment carrying out T0 moment to the T1 moment according to Snap_T1 and residual quantity bitmap Map_ (1-0) backs up, and backs up complete deletion Snap_T1, retained bitmap Map_ (1-0).
Particularly, T1 is the incremental backup moment.Between T1 ~ T2 moment, if source disk has data to change, the bit in bitmap Map_ (2-1) corresponding to the data block changed there being data puts 1.
503, the T2 moment, snapshot Snap_T2 and residual quantity bitmap Map_ (3-2) is created, by Map_ (3-2) initialization complete zero; T1, T2 moment residual quantity bitmap Map_ (1-0), Map_ (2-1) is merged, merging residual quantity bitmap Map_ (2-0) that the sigma delta backup obtaining the T2 moment uses by AND operation bit-by-bit; Carry out the cumulative increment in T0 moment to T2 moment according to Snap_T2 and merging residual quantity bitmap Map_ (2-0) to back up, back up complete deletion Snap_T2, retained bitmap Map_ (2-1).
Alternatively, also can not retained bitmap Map_ (2-1) in 503, and delete the bitmap Map_ (1-0) retained in 502, as an alternative, preserve in 503 and merge residual quantity bitmap Map_ (2-0).In such a scenario, next incremental backup moment T3, can merge Map_ (2-0) and Map_ (3-2) by AND operation bit-by-bit, merging residual quantity bitmap Map_ (3-0) that the cumulative increment backup obtaining the T3 moment uses.
One of ordinary skill in the art will appreciate that: all or part of step realizing above-mentioned each embodiment of the method can have been come by the hardware that programmed instruction is relevant.Aforesaid program can be stored in a computer read/write memory medium.This program, when performing, performs the step comprising above-mentioned each embodiment of the method; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
The structural representation of a kind of back-up device 600 that Fig. 6 provides for the embodiment of the present invention two.As shown in Figure 6, back-up device 600 comprises:
Creation module 61, at current delta backup time, creates current backup moment snapshot;
Backup module 62, for according to upper one backup time create residual quantity bitmap and described current backup moment snapshot, carry out incremental backup; Described residual quantity bitmap is that a backup time creates on described, and changed with the data in source disk before described establishment current backup moment snapshot and upgrade.
Further, creation module 61 also for, at a upper backup time, create a upper backup time snapshot and residual quantity bitmap, in described residual quantity bitmap, each position is initial value;
Also comprise: update module, for in described creation module after a upper backup time creates residual quantity bitmap, before current delta backup time creates current backup moment snapshot, if there are the data of data block to change in source disk, be then non-initial value by position corresponding with described data block in described residual quantity bitmap.
Further, described update module specifically for:
When monitoring the write operation to described source disk, obtain the address of described write operation;
Determine at least one data block corresponding with the address of described write operation;
Be non-initial value by least one position corresponding with at least one data block described in described residual quantity bitmap.
Alternatively, described current delta backup is difference incremental backup; Backup module 62 specifically comprises:
First reading unit, for reading the data of the data block corresponding with the position of non-initial value in described residual quantity bitmap from described current backup moment snapshot;
Backup units, the data for the data block of the position correspondence according to described non-initial value carry out incremental backup.
Alternatively, described current delta backup is cumulative increment backup; Backup module 62 specifically comprises:
Second reading unit, if be full backup for a upper backup, from described current backup moment snapshot, then read the data of the data block corresponding with the position of non-initial value in described residual quantity bitmap, if a upper backup is incremental backup, then obtain the merging residual quantity bitmap from the full backup of the last time to a upper backup, the data of the data block that reading is corresponding with the position of non-initial value in described merging residual quantity bitmap from described current backup moment snapshot;
Backup units, the data for the data block of the position correspondence according to described non-initial value carry out incremental backup.
Further, described second reading unit, for obtaining the merging residual quantity bitmap backed up to upper from the full backup of the last time, specifically comprises:
Obtain the residual quantity bitmap that from the full backup of the last time to a upper backup, each backup time creates; The residual quantity bitmap that each backup described creates is merged, obtains the described merging residual quantity bitmap from the full backup of the last time to a upper backup; Or,
Obtain merging residual quantity bitmap that a upper backup time obtains and the residual quantity bitmap that a upper backup time creates; The residual quantity bitmap that the merging residual quantity bitmap obtain a described upper backup time and a upper backup time create merges, and obtains the described merging residual quantity bitmap from the full backup of the last time to a upper backup.
Further, also comprise: removing module, after carrying out incremental backup at backup module 62, delete described current delta backup snapshots.
The embodiment of the present invention is by creating residual quantity bitmap at a upper backup time, change according to the data in source disk between twice backup time and upgrade residual quantity bitmap, make the current backup moment can according on one backup time create and a upper backup time and between the current backup moment with in source disk data change and upgrade residual quantity bitmap back up, and generate bitmap without the need to carrying out snapshot comparison in the current backup moment, shorten BACKUP TIME, improve the overall performance of backup.Further, the embodiment of the present invention after current delta has backed up, can also delete described current delta backup snapshots, decreases the space consuming storing snapshot and bring.In addition, snapshot major part in backup is the snapshot based on COW, and all need to be stored in source disk based on the most of data in the snapshot of COW, have a strong impact on the production business of source disk, and after applying the embodiment of the present invention, due to snapshot can be deleted after a backup, the impact on production business therefore also can be reduced further.
The structural representation of a kind of back-up device 700 that Fig. 7 provides for the embodiment of the present invention three.As shown in Figure 7, back-up device 700 generally comprises at least one processor 710, such as CPU (central processing unit) (CentralProcessingUnit, be called for short CPU), digital signal processor (DigitalSignalProcessor is called for short DSP), at least one port 720, storer 730, and at least one communication bus 740.Communication bus 740 is for realizing the connection communication between these devices.The executable module of processor 710 for storing in execute store 730, such as computer program; Alternatively, back-up device 700 can comprise user interface 750, and user interface 750 includes but not limited to display, keyboard and pointing device, such as mouse, trace ball (trackball), touch-sensitive plate or touch sensitive display screen.Storer 730 may comprise random access memory (RandomAccessMemory is called for short RAM), still may comprise nonvolatile memory (non-volatilememory), such as at least one magnetic disk memory.
In some embodiments, storer 730 stores following element, executable module or data structure, or their subset, or their superset:
Operating system 732, comprises various system program, for realizing various basic business and processing hardware based task;
Application module 734, comprises various application program, for realizing various applied business.
Creation module 61 and backup module 62 is included but not limited in application module 734.Further, application module 734 can also comprise update module, removing module etc.In application module 734, the specific implementation of each module is see the corresponding module in back-up device 600, is not repeated herein.
The embodiment of the present invention is by creating residual quantity bitmap at a upper backup time, change according to the data in source disk between twice backup time and upgrade residual quantity bitmap, make the current backup moment can according on one backup time create and a upper backup time and between the current backup moment with in source disk data change and upgrade residual quantity bitmap back up, and generate bitmap without the need to carrying out snapshot comparison in the current backup moment, shorten BACKUP TIME, improve the overall performance of backup.Further, the embodiment of the present invention after current delta has backed up, can also delete described current delta backup snapshots, decreases the space consuming storing snapshot and bring.In addition, snapshot major part in backup is the snapshot based on COW, and all need to be stored in source disk based on the most of data in the snapshot of COW, have a strong impact on the production business of source disk, and after applying the embodiment of the present invention, due to snapshot can be deleted after a backup, the impact on production business therefore also can be reduced further.
Last it is noted that above each embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to foregoing embodiments to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can upgrade the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein some or all of technical characteristic; And these upgrade or replace, the essence of appropriate technical solution is not made to depart from the scope of various embodiments of the present invention technical scheme.

Claims (10)

1. a backup method, is characterized in that, comprising:
At current delta backup time, create current backup moment snapshot;
The residual quantity bitmap created according to a upper backup time and described current backup moment snapshot, carry out incremental backup; Described residual quantity bitmap is that a backup time creates on described, and changed with the data in source disk before described establishment current backup moment snapshot and upgrade;
Described current delta backup is difference incremental backup; The described residual quantity bitmap according to a upper backup time establishment and described current backup moment snapshot, carry out incremental backup, comprising:
The data of the data block corresponding with the position of non-initial value in described residual quantity bitmap are read from described current backup moment snapshot;
Data according to the data block of the position correspondence of described non-initial value carry out incremental backup;
Described current delta backup is cumulative increment backup; The described residual quantity bitmap according to a upper backup time establishment and described current backup moment snapshot, carry out incremental backup, comprising:
If a upper backup is full backup, from described current backup moment snapshot, then read the data of the data block corresponding with the position of non-initial value in described residual quantity bitmap, if a upper backup is incremental backup, then obtain the merging residual quantity bitmap from the full backup of the last time to a upper backup, the data of the data block that reading is corresponding with the position of non-initial value in described merging residual quantity bitmap from described current backup moment snapshot;
Data according to the data block of the position correspondence of described non-initial value carry out incremental backup.
2. method according to claim 1, is characterized in that, before described establishment current backup moment snapshot, also comprises:
At a upper backup time, create a upper backup time snapshot and residual quantity bitmap, in described residual quantity bitmap, each position is initial value;
If there are the data of data block to change in source disk, be then non-initial value by position corresponding with described data block in described residual quantity bitmap.
3. method according to claim 2, is characterized in that, if there are the data of data block to change in described source disk, are then non-initial value by position corresponding with described data block in described residual quantity bitmap, comprise:
When monitoring the write operation to described source disk, obtain the address of described write operation;
Determine at least one data block corresponding with the address of described write operation;
Be non-initial value by least one position corresponding with at least one data block described in described residual quantity bitmap.
4. method according to claim 1, is characterized in that, the merging residual quantity bitmap that described acquisition is backed up from the full backup of the last time to upper, comprising:
Obtain the residual quantity bitmap that from the full backup of the last time to a upper backup, each backup time creates; The residual quantity bitmap that each backup described creates is merged, obtains the described merging residual quantity bitmap from the full backup of the last time to a upper backup; Or,
Obtain merging residual quantity bitmap that a upper backup time obtains and the residual quantity bitmap that a upper backup time creates; The residual quantity bitmap that the merging residual quantity bitmap obtain a described upper backup time and a upper backup time create merges, and obtains the described merging residual quantity bitmap from the full backup of the last time to a upper backup.
5. the method according to any one of Claims 1 to 4, is characterized in that, described in carry out incremental backup after, also comprise:
Delete described current delta backup snapshots.
6. a back-up device, is characterized in that, comprising:
Creation module, at current delta backup time, creates current backup moment snapshot;
Backup module, for according to upper one backup time create residual quantity bitmap and described current backup moment snapshot, carry out incremental backup; Described residual quantity bitmap is that a backup time creates on described, and changed with the data in source disk before described establishment current backup moment snapshot and upgrade;
Described current delta backup is difference incremental backup; Described backup module specifically comprises:
First reading unit, for reading the data of the data block corresponding with the position of non-initial value in described residual quantity bitmap from described current backup moment snapshot;
Backup units, the data for the data block of the position correspondence according to described non-initial value carry out incremental backup;
Described current delta backup is cumulative increment backup; Described backup module specifically comprises:
Second reading unit, if be full backup for a upper backup, from described current backup moment snapshot, then read the data of the data block corresponding with the position of non-initial value in described residual quantity bitmap, if a upper backup is incremental backup, then obtain the merging residual quantity bitmap from the full backup of the last time to a upper backup, the data of the data block that reading is corresponding with the position of non-initial value in described merging residual quantity bitmap from described current backup moment snapshot;
Backup units, the data for the data block of the position correspondence according to described non-initial value carry out incremental backup.
7. device according to claim 6, is characterized in that, described creation module also for, at a upper backup time, create a upper backup time snapshot and residual quantity bitmap, in described residual quantity bitmap, each position is initial value;
Also comprise: update module, for in described creation module after a upper backup time creates residual quantity bitmap, before current delta backup time creates current backup moment snapshot, if there are the data of data block to change in source disk, be then non-initial value by position corresponding with described data block in described residual quantity bitmap.
8. device according to claim 7, is characterized in that, described update module specifically for:
When monitoring the write operation to described source disk, obtain the address of described write operation;
Determine at least one data block corresponding with the address of described write operation;
Be non-initial value by least one position corresponding with at least one data block described in described residual quantity bitmap.
9. device according to claim 6, is characterized in that, described second reading unit, for obtaining the merging residual quantity bitmap backed up to upper from the full backup of the last time, specifically comprises:
Obtain the residual quantity bitmap that from the full backup of the last time to a upper backup, each backup time creates; The residual quantity bitmap that each backup described creates is merged, obtains the described merging residual quantity bitmap from the full backup of the last time to a upper backup; Or,
Obtain merging residual quantity bitmap that a upper backup time obtains and the residual quantity bitmap that a upper backup time creates; The residual quantity bitmap that the merging residual quantity bitmap obtain a described upper backup time and a upper backup time create merges, and obtains the described merging residual quantity bitmap from the full backup of the last time to a upper backup.
10. the device according to any one of claim 6 ~ 9, is characterized in that, also comprises:
Removing module, after carrying out incremental backup at described backup module, deletes described current delta backup snapshots.
CN201210562431.8A 2012-12-21 2012-12-21 Backup method and device Active CN103019888B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210562431.8A CN103019888B (en) 2012-12-21 2012-12-21 Backup method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210562431.8A CN103019888B (en) 2012-12-21 2012-12-21 Backup method and device

Publications (2)

Publication Number Publication Date
CN103019888A CN103019888A (en) 2013-04-03
CN103019888B true CN103019888B (en) 2016-03-30

Family

ID=47968518

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210562431.8A Active CN103019888B (en) 2012-12-21 2012-12-21 Backup method and device

Country Status (1)

Country Link
CN (1) CN103019888B (en)

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345435B (en) * 2013-06-28 2015-04-22 环境保护部华南环境科学研究所 Destination sever system for data backup
CN104572340A (en) * 2013-10-18 2015-04-29 宇宙互联有限公司 Incremental backup system and method
CN104166606B (en) * 2014-08-29 2018-01-09 华为技术有限公司 File backup method and main storage device
CN104461783A (en) * 2014-12-10 2015-03-25 上海爱数软件有限公司 Virtual machine backup method by tracking sector data change
CN104506619B (en) 2014-12-22 2018-06-05 华为技术有限公司 A kind of data backup, restoration methods and its device, server
CN106708657A (en) * 2015-08-03 2017-05-24 中兴通讯股份有限公司 Metadata management method and apparatus, and distributed file system
CN105260265A (en) * 2015-09-23 2016-01-20 浪潮(北京)电子信息产业有限公司 Fusion snapshot realization method and fusion snapshot realization system
CN107135662B (en) * 2015-12-28 2020-01-03 华为技术有限公司 Differential data backup method, storage system and differential data backup device
CN106126370A (en) * 2016-06-15 2016-11-16 上海爱数信息技术股份有限公司 Based on the Server free backup method and the system that store increment bitmap between snapshot
CN106095622A (en) * 2016-06-22 2016-11-09 上海爱数信息技术股份有限公司 Data back up method and device
CN106331152B (en) * 2016-09-20 2020-02-07 郑州云海信息技术有限公司 Method and device for realizing information synchronization between modules
CN106776150A (en) * 2017-01-04 2017-05-31 上海上讯信息技术股份有限公司 A kind of method and apparatus for obtaining transaction journal dump file information
CN107544870A (en) * 2017-06-14 2018-01-05 新华三云计算技术有限公司 A kind of disk backup method of virtue machine and device
CN107526656B (en) * 2017-08-31 2020-11-20 苏州浪潮智能科技有限公司 Cloud restoration method and device
CN107908755A (en) * 2017-11-21 2018-04-13 郑州云海信息技术有限公司 A kind of snapshot document processing method and processing device
CN110058959B (en) * 2018-01-18 2023-06-16 伊姆西Ip控股有限责任公司 Data backup method, apparatus and computer program product
CN108156264B (en) * 2018-03-06 2021-01-26 爱普(福建)科技有限公司 Data synchronization method oriented to dual-computer redundancy
CN111078464A (en) 2018-10-22 2020-04-28 华为技术有限公司 Method, device and system for backing up data
CN109614055B (en) * 2018-12-21 2022-11-04 杭州宏杉科技股份有限公司 Snapshot creating method and device, electronic equipment and machine-readable storage medium
CN110704239B (en) * 2019-09-03 2022-05-27 杭州宏杉科技股份有限公司 Data copying method and device and electronic equipment
CN112347037A (en) * 2020-10-13 2021-02-09 北京天融信网络安全技术有限公司 Snapshot processing method, device, medium and electronic equipment for storage volume
CN113626256B (en) * 2021-07-16 2023-12-22 济南浪潮数据技术有限公司 Virtual machine disk data backup method, device, terminal and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101078999A (en) * 2006-05-26 2007-11-28 任永坚 Method and system for accomplishing data backup and recovery
CN100458733C (en) * 2004-03-25 2009-02-04 索福帮Bb股份有限公司 Backup system and backup method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04239831A (en) * 1991-01-24 1992-08-27 Okayama Nippon Denki Software Kk Inter processor backup system
CN1331063C (en) * 2003-06-10 2007-08-08 联想(北京)有限公司 On-line data backup method based on data volume snapshot
US8005797B1 (en) * 2008-04-01 2011-08-23 Acronis Inc. File-level continuous data protection with access to previous versions
CN102521083B (en) * 2011-12-13 2015-04-29 广州杰赛科技股份有限公司 Backup method and system of virtual machine in cloud computing system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100458733C (en) * 2004-03-25 2009-02-04 索福帮Bb股份有限公司 Backup system and backup method
CN101078999A (en) * 2006-05-26 2007-11-28 任永坚 Method and system for accomplishing data backup and recovery

Also Published As

Publication number Publication date
CN103019888A (en) 2013-04-03

Similar Documents

Publication Publication Date Title
CN103019888B (en) Backup method and device
CN103034566B (en) Method and device for restoring virtual machine
CN106776147B (en) Differential data backup method and differential data backup device
CN103810058A (en) Backup method, equipment and system for virtual machine
US8065272B2 (en) Systems and methods for tracking changes to a volume
CN104407933A (en) Data backup method and device
EP2425344B1 (en) Method and system for system recovery using change tracking
CN104239166A (en) Method for realizing file backup for running virtual machine
CN104166606A (en) File backup method and main storage device
CN103221925A (en) Data processing method and storage equipment
US10761744B2 (en) Synchronously performing commit records operations
US9189490B2 (en) Fast snapshots
JP2017079053A (en) Methods and systems for improving storage journaling
CN104583930A (en) Method of data migration, controller and data migration apparatus
US10503620B1 (en) Parity log with delta bitmap
US11029849B2 (en) Handling cache and non-volatile storage (NVS) out of sync writes
CN105224422A (en) A kind of data back up method and equipment
US10901646B2 (en) Update of RAID array parity
US11314659B2 (en) Using real segments and alternate segments in non-volatile storage
CN104133742A (en) Data protection method and device
US20190042365A1 (en) Read-optimized lazy erasure coding
CN112119380B (en) Parity check recording with bypass
CN104205097A (en) De-duplicate method device and system
US9104598B2 (en) Systems and methods for medium error reporting and handling in storage devices
CN103064762B (en) Heavily delete restoration methods and the device of Backup Data

Legal Events

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

Effective date of registration: 20220531

Address after: No. 1899 Xiyuan Avenue, high tech Zone (West District), Chengdu, Sichuan 610041

Patentee after: Chengdu Huawei Technologies Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right