CN107544871A - A kind of disk backup method of virtue machine and device - Google Patents

A kind of disk backup method of virtue machine and device Download PDF

Info

Publication number
CN107544871A
CN107544871A CN201710602324.6A CN201710602324A CN107544871A CN 107544871 A CN107544871 A CN 107544871A CN 201710602324 A CN201710602324 A CN 201710602324A CN 107544871 A CN107544871 A CN 107544871A
Authority
CN
China
Prior art keywords
built
backup
file
snapshot
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
CN201710602324.6A
Other languages
Chinese (zh)
Other versions
CN107544871B (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.)
New H3C Cloud Technologies Co Ltd
Original Assignee
New H3C Cloud 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 New H3C Cloud Technologies Co Ltd filed Critical New H3C Cloud Technologies Co Ltd
Priority to CN201710602324.6A priority Critical patent/CN107544871B/en
Publication of CN107544871A publication Critical patent/CN107544871A/en
Application granted granted Critical
Publication of CN107544871B publication Critical patent/CN107544871B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention, which provides a kind of disk backup method of virtue machine and device, methods described, to be included:When needing to carry out Disk Backup to target virtual machine, built-in snapshot document corresponding to the target virtual machine is obtained;Wherein, inode number of the built-in disk mirroring file of the file header of snapshot document including Disk Backup type and the target virtual machine in shared-file system;Inode number of the disk mirroring file of the target virtual machine included according to the file header of the built-in snapshot document in shared-file system obtains the disk mirroring file of the target virtual machine;According to the Disk Backup type, it is described built in the disk mirroring file of snapshot document and the target virtual machine to the target virtual machine carry out Disk Backup.The server free Disk Backups to virtual machine can be realized in the case where application memory does not support SCSI extension copy commands using the embodiment of the present invention.

Description

A kind of disk backup method of virtue machine and device
Technical field
The present invention relates to technical field of data processing, more particularly to a kind of disk backup method of virtue machine and device.
Background technology
At present, magnetic disk of virtual machine backup mainly includes three kinds of backup modes:Full backup, incremental backup and difference are standby Part.Wherein:
Full backup refers to back up whole disk completely;
Incremental backup refers to that data that are increased or/and changing back up after being backed up to the last time;
Differential backup refers to back up data that are increased after last full backup or/and changing.
In order to reduce influence of the magnetic disk of virtual machine backup to application server where virtual machine, application server generally use Server free (server free) mode carries out magnetic disk of virtual machine backup scenario, that is, standby when carrying out magnetic disk of virtual machine backup Part data are not passed through the bus and internal memory of application server, and its main realization principle is:When application server uses SAN File Server Storage (file server storage) space of (Storage Area Network, storage area network), And when needing to carry out magnetic disk of virtual machine backup, application server sends SCSI (Small to File Server Storage Computer System Interface, small computer system interface) extension copy command, by File Server Storage extends copy command according to the SCSI and completes data backup with backup storage, so as to reduce backup application server CPU (Center Process Unit, CPU), the resource such as internal memory consumption.
But practice is found, in existing server free backup scenarios, it is necessary to File Server Storage ( It is properly termed as application memory) SCSI extension copy commands are supported, limit the scope of application of scheme.
The content of the invention
The present invention provides a kind of disk backup method of virtue machine and device, to solve existing server free backup scenarios In due to need application memory support SCSI extension copy command caused by the restricted problem of the scheme scope of application.
According to the first aspect of the invention, there is provided a kind of disk backup method of virtue machine, applied to backup server, the party Method includes:
When needing to carry out Disk Backup to target virtual machine, built-in snapshot text corresponding to the target virtual machine is obtained Part;Wherein, the file header of the built-in snapshot document includes the disk mirroring of Disk Backup type and the target virtual machine Inode number of the file in shared-file system;
The disk mirroring file of the target virtual machine included according to the file header of the built-in snapshot document is altogether Enjoy the disk mirroring file that the inode number in file system obtains the target virtual machine;
According to the Disk Backup type, it is described built in the disk mirroring file of snapshot document and the target virtual machine Disk Backup is carried out to the target virtual machine.
According to the second aspect of the invention, there is provided a kind of disk backup method of virtue machine, applied to application server, the party Method includes:
When needing to carry out Disk Backup to target virtual machine, built-in snapshot corresponding to the target virtual machine is created;
Built-in snapshot document corresponding to the built-in snapshot generation according to corresponding to the target virtual machine, and will be described built-in fast Preserved according to file to shared-file system;Wherein, the file header of the built-in snapshot document include Disk Backup type, it is described in Put the disk mirroring of index node inode number and the target virtual machine of the snapshot document in the shared-file system Inode number of the file in the shared-file system;
The file header of the built-in snapshot document is sent to backup server, so that the backup server is according to The built-in index node of the snapshot document in the shared-file system that the file header of built-in snapshot document includes Described in inode number of the disk mirroring file of inode number and the target virtual machine in the shared-file system obtains The disk mirroring file of built-in snapshot document and the target virtual machine, and according to the Disk Backup type, it is described built in The disk mirroring file of snapshot document and the target virtual machine carries out Disk Backup to the target virtual machine.
According to the third aspect of the invention we, there is provided a kind of disk backup method of virtue machine, applied to application server, the party Method includes:
When needing to carry out Disk Backup to target virtual machine, built-in snapshot corresponding to the target virtual machine is created;
Built-in snapshot document corresponding to the built-in snapshot generation according to corresponding to the target virtual machine, and will be described built-in fast Preserved according to file to internal memory or local disk;Wherein, the file header of the built-in snapshot document include Disk Backup type and Inode number of the disk mirroring file of the target virtual machine in shared-file system;
The built-in snapshot document is sent to backup server, so that the backup server is according to the built-in snapshot Inode number of the disk mirroring file for the target virtual machine that the file header of file includes in shared-file system obtains The disk mirroring file of the target virtual machine, and according to the Disk Backup type, it is described built in snapshot document and described The disk mirroring file of target virtual machine carries out Disk Backup to the target virtual machine.
According to the fourth aspect of the invention, there is provided a kind of magnetic disk of virtual machine back-up device, applied to backup server, the dress Put including:
Acquiring unit, for when needing to carry out Disk Backup to target virtual machine, it is corresponding to obtain the target virtual machine Built-in snapshot document, the file header of the built-in snapshot document includes the magnetic of Disk Backup type and the target virtual machine Inode number of the disk mirroring file in shared-file system;
The acquiring unit, it is additionally operable to the target virtual machine included according to the file header of the built-in snapshot document Inode number of the disk mirroring file in shared-file system obtain the disk mirroring file of the target virtual machine;
Backup units, for according to the Disk Backup type, it is described built in snapshot document and the target virtual machine Disk mirroring file to the target virtual machine carry out Disk Backup.
According to the fifth aspect of the invention, there is provided a kind of magnetic disk of virtual machine back-up device, applied to application server, the dress Put including:
Creating unit, for when needing to carry out Disk Backup to target virtual machine, it is corresponding to create the target virtual machine Built-in snapshot;
Generation unit, for built-in snapshot document corresponding to the built-in snapshot generation according to corresponding to the target virtual machine; Wherein, the file header of the built-in snapshot document includes Disk Backup type, the built-in snapshot document in the shared file The disk mirroring file of index node inode number and the target virtual machine in system is in the shared-file system Inode number;
Storage unit, for the built-in snapshot document to be preserved to shared-file system;
Transmitting element, for the file header of the built-in snapshot document to be sent into backup server, so that the backup Server according to the file header of the built-in snapshot document include it is described built in snapshot document in the shared-file system In index node inode number and the target virtual machine disk mirroring file in the shared-file system Inode number obtains the disk mirroring file of the built-in snapshot document and the target virtual machine, and standby according to the disk The disk mirroring file of part type, the built-in snapshot document and the target virtual machine carries out magnetic to the target virtual machine Disk backs up.
According to the sixth aspect of the invention, there is provided a kind of magnetic disk of virtual machine back-up device, applied to application server, the dress Put including:
Creating unit, for when needing to carry out Disk Backup to target virtual machine, it is corresponding to create the target virtual machine Built-in snapshot;
Generation unit, for built-in snapshot document corresponding to the built-in snapshot generation according to corresponding to the target virtual machine; Wherein, the file header of the built-in snapshot document includes the disk mirroring file of Disk Backup type and the target virtual machine Inode number in shared-file system;
Storage unit, for the built-in snapshot document to be preserved to internal memory or local disk;
Transmitting element, for the built-in snapshot document to be sent into backup server, so that the backup server root The disk mirroring file of the target virtual machine included according to the file header of the built-in snapshot document is in shared-file system In inode number obtain the disk mirroring file of the target virtual machine, and according to the Disk Backup type, it is described it is built-in soon Disk Backup is carried out to the target virtual machine according to the disk mirroring file of file and the target virtual machine.
Using technical scheme disclosed by the invention, when needing to carry out Disk Backup to target virtual machine, backup server By obtaining built-in snapshot document corresponding to target virtual machine, and the target included according to the file header of the built-in snapshot document The disk mirroring file of inode number acquisition target virtual machine of the disk mirroring file of virtual machine in shared system, and according to It is standby that the disk mirroring file of Disk Backup type, built-in snapshot document and target virtual machine carries out disk to target virtual machine Part, so as to realize the server free magnetic to virtual machine in the case where application memory does not support that SCSI extends copy command Disk backs up.
Brief description of the drawings
Fig. 1 is a kind of system architecture schematic diagram of magnetic disk of virtual machine backup provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic flow sheet of disk backup method of virtue machine provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic flow sheet of disk backup method of virtue machine provided in an embodiment of the present invention;
Fig. 4 is a kind of schematic flow sheet of disk backup method of virtue machine provided in an embodiment of the present invention;
Fig. 5 is a kind of structural representation of magnetic disk of virtual machine back-up device provided in an embodiment of the present invention;
Fig. 6 is a kind of structural representation of magnetic disk of virtual machine back-up device provided in an embodiment of the present invention;
Fig. 7 is a kind of structural representation of magnetic disk of virtual machine back-up device provided in an embodiment of the present invention.
Embodiment
In order that those skilled in the art more fully understand the technical scheme in the embodiment of the present invention, below first to this hair The system architecture that the technical scheme that bright embodiment provides is applicable is briefly described.
Fig. 1 is referred to, for a kind of system architecture schematic diagram of magnetic disk of virtual machine backup provided in an embodiment of the present invention, is such as schemed Shown in 1, in the system architecture, multiple same application memories of application server access, the plurality of application server forms one Shared-file system;Virtual machine is deployed with each application server, magnetic disk of virtual machine is deployed in the shared file in application memory In system;Backup server connects application memory respectively and backup stores.Wherein, the disk mirroring file of virtual machine is QCOW2 Form, snapshot built in support.
It should be noted that in embodiments of the present invention, if non-specified otherwise, mentioned built-in snapshot refers both to built-in magnetic Disk snapshot, the embodiment of the present invention are subsequently no longer repeated.
In order that the above-mentioned purpose of the embodiment of the present invention, feature and advantage can be more obvious understandable, below in conjunction with the accompanying drawings Technical scheme in the embodiment of the present invention is described in further detail.
Fig. 2 is referred to, is a kind of schematic flow sheet of disk backup method of virtue machine provided in an embodiment of the present invention, its In, application server that the disk backup method of virtue machine can apply in said system framework, as shown in Fig. 2 this is virtual Machine Disk Backup method may comprise steps of:
For ease of describing, below so that the executive agent of step 201~step 203 can be destination application server as an example, Wherein, the destination application server and the application server of a certain fixation is not specific to, but may refer in said system framework Any application server, the embodiment of the present invention subsequently no longer repeats.
Step 201, when needing to carry out Disk Backup to target virtual machine, create built-in fast corresponding to target virtual machine According to.
In the embodiment of the present invention, target virtual machine and the virtual machine for being not specific to a certain fixation, but may refer to target and answer With any virtual machine disposed on server, the embodiment of the present invention is subsequently no longer repeated.
In the embodiment of the present invention, when destination application server needs to carry out Disk Backup to target virtual machine, target should Built-in snapshot corresponding to target virtual machine can be first created with server.
Wherein, built-in snapshot corresponding to application server establishment virtual machine refers to the disk mirroring document creation to virtual machine Corresponding built-in snapshot, its specific implementation may refer to existing related realization, and the embodiment of the present invention will not be described here.
Built-in snapshot document corresponding to step 202, the built-in snapshot generation according to corresponding to target virtual machine, and this is built-in Snapshot document is preserved to shared-file system;Wherein, file header of the built-in snapshot document including file header includes Disk Backup The disk mirroring file of the inode number and target virtual machine of type, built-in snapshot document in shared-file system is shared Inode number in file system.
, can be with after destination application server creates built-in snapshot corresponding to target virtual machine in the embodiment of the present invention According to built-in snapshot document corresponding to the built-in snapshot generation, and the built-in snapshot document is preserved to shared-file system.
In the embodiment of the present invention, built-in snapshot document can include file header and file content;Wherein, file header can wrap Include but be not limited to Disk Backup type (such as full backup, incremental backup or differential backup), built-in snapshot document is shared The inode number of inode (index node) numbers of system and the disk mirroring file of target virtual machine in shared-file system etc.; File content can include L1, L2 table of built-in snapshot.
Wherein, the L1 tables of built-in snapshot are an array, each element in the array for a L2 table position letter Breath, the L2 tables according to corresponding to can navigating to the positional information;L2 tables are used for the address offset and Qcow2 texts for recording virtual disk The relation of the address offset of part.
Step 203, the file header of built-in snapshot document is sent to backup server, so that backup server is built in Index node inode number and mesh of the built-in snapshot document that the file header of snapshot document includes in shared-file system Mark snapshot document and target virtual machine built in inode number acquisition of the disk mirroring file of virtual machine in shared-file system Disk mirroring file, and according to the disk mirroring file pair of Disk Backup type, built-in snapshot document and target virtual machine Target virtual machine carries out Disk Backup.
In the embodiment of the present invention, snapshot document built in destination application server generation, and it is saved to shared file system After system, the file header of built-in snapshot document can be sent to backup server, the snapshot built in is literary as backup server The file header of part carries out Disk Backup to target virtual machine.
Wherein, the file header of backup server snapshot document built in carries out the specific of Disk Backup to target virtual machine The associated description that may refer in method flow shown in Fig. 4 is realized, the embodiment of the present invention will not be described here.
Fig. 3 is referred to, is the schematic flow sheet of another disk backup method of virtue machine provided in an embodiment of the present invention, its In, application server that the disk backup method of virtue machine can apply in said system framework, as shown in figure 3, this is virtual Machine Disk Backup method may comprise steps of:
For ease of description, below so that the executive agent of step 301~step 303 can be destination application server as an example.
Step 301, when needing to carry out Disk Backup to target virtual machine, create built-in fast corresponding to target virtual machine According to.
In the embodiment of the present invention, the specific implementation of step 301 may refer to the associated description in step 201, and the present invention is real Example is applied to will not be repeated here.
Built-in snapshot document corresponding to step 302, the built-in snapshot generation according to corresponding to target virtual machine, and this is built-in Snapshot document is preserved to internal memory or local disk;Wherein, it is standby to include disk for file header of the built-in snapshot document including file header Inode number of the disk mirroring file of part type and target virtual machine in shared-file system.
, can be with after destination application server creates built-in snapshot corresponding to target virtual machine in the embodiment of the present invention According to built-in snapshot document corresponding to the built-in snapshot generation, and the built-in snapshot document is preserved to internal memory or local disk.
In the embodiment of the present invention, built-in snapshot document can include file header and file content;Wherein, file header can wrap Include but be not limited to Disk Backup type and inode number of the disk mirroring file of target virtual machine in shared-file system Deng;File content can include L1, L2 table of built-in snapshot.
Step 303, built-in snapshot document is sent to backup server, so that backup server snapshot document built in Inode number of the disk mirroring file of target virtual machine that includes of file header in shared-file system obtain destination virtual The disk mirroring file of machine, and according to the disk mirroring file of Disk Backup type, built-in snapshot document and target virtual machine Disk Backup is carried out to target virtual machine.
In the embodiment of the present invention, snapshot document built in destination application server generation, and it is saved to internal memory or local After disk, built-in snapshot document can be sent to backup server, as backup server built in snapshot document to mesh Mark virtual machine and carry out Disk Backup.
Wherein, backup server snapshot document built in the specific implementation of Disk Backup is carried out to target virtual machine can be with Associated description in method flow shown in Figure 4, the embodiment of the present invention will not be described here.
Fig. 4 is referred to, is a kind of schematic flow sheet of disk backup method of virtue machine provided in an embodiment of the present invention, its In, backup server that the disk backup method of virtue machine can apply in said system framework, as shown in figure 4, this is virtual Machine Disk Backup method may comprise steps of:
Step 401, when need to target virtual machine carry out Disk Backup when, obtain target virtual machine corresponding to built-in snapshot File;Wherein, the file header of built-in snapshot document includes Disk Backup type and the disk mirroring file of target virtual machine exists Inode number in shared-file system.
In the one of embodiment of the present invention, built-in snapshot document corresponding to above-mentioned acquisition target virtual machine, it can wrap Include:
The file header of built-in snapshot document corresponding to the target virtual machine that application server is sent is received, wherein, this is built-in The file header of snapshot document also includes built-in inode number of the snapshot document in shared-file system;
Inode number of the built-in snapshot document included according to the file header of built-in snapshot document in shared-file system Obtain built-in snapshot document corresponding to target virtual machine.
In this embodiment, the specific implementation of the file header of snapshot document built in application server to backup server transmission The associated description in method flow shown in Fig. 2 is may refer to, the embodiment of the present invention will not be repeated here.
In another embodiment, snapshot document built in above-mentioned acquisition, can include:
Receive built-in snapshot document corresponding to the target virtual machine that application server is sent.
In this embodiment, the specific implementation of snapshot document may refer to built in application server to backup server transmission Associated description in method flow shown in Fig. 3, the embodiment of the present invention will not be repeated here.
The disk mirroring file for the target virtual machine that step 402, the file header of snapshot document built in include is altogether Enjoy the disk mirroring file that the inode number in file system obtains target virtual machine.
, can be according to the built-in snapshot text after backup server gets built-in snapshot document in the embodiment of the present invention Inode number of the disk mirroring file for the target virtual machine that the file header of part includes in shared-file system is from shared file The disk mirroring file of target virtual machine is obtained in system.
Step 403, according to the disk mirroring file of Disk Backup type, built-in snapshot document and target virtual machine to mesh Mark virtual machine and carry out Disk Backup.
In the embodiment of the present invention, backup server gets the disk mirroring text of built-in snapshot document and target virtual machine , can be according to Disk Backup type, the disk mirroring file of the built-in snapshot document and target virtual machine that get after part Disk Backup is carried out to target virtual machine.
In the embodiment of the present invention, when Disk Backup type difference, it is necessary to which the data of backup are also incomplete same, for example, When Disk Backup type is full backup, then all data in the disk of backup target virtual machine are needed;Work as Disk Backup When type is incremental backup, then the magnetic of block modification occurs when needing to back up relative to the last time in the disk of backup target virtual machine Data in disk block;When Disk Backup type is differential backup, then need in the disk of backup target virtual machine relative to upper The data in the disk block of block modification occur during full backup.
Wherein, the disk block that block modification occurs refers to newly-increased data or/and changed the disk block of data.
Correspondingly, in embodiments of the present invention, after backup server gets built-in snapshot document, this can be obtained The Disk Backup type that built-in snapshot document includes, and according to the Disk Backup type to magnetic corresponding to target virtual machine execution Disk backup operation.
It is above-mentioned according to Disk Backup when Disk Backup type is full backup in the one of embodiment of the present invention The disk mirroring file of type, built-in snapshot document and target virtual machine backs up to target virtual machine, can include:
L1, L2 table for the built-in snapshot that the file content of snapshot document built in acquisition includes;
All data blocks are read from the disk mirroring file of target virtual machine according to L1, L2 table of built-in snapshot, and Full backup file is generated according to the data block;
Built-in snapshot document and full backup file are preserved to backup and stored.
In this embodiment, backup server can obtain the built-in snapshot of this backup from built-in snapshot document L1, L2 table (L1, L2 table for the built-in snapshot that the file content of i.e. built-in snapshot document includes).Due to the L1 of built-in snapshot, Distribution of all data blocks in disk mirroring file in the disk of target virtual machine, therefore, backup services are have recorded in L2 tables Device can read all data blocks, and root according to L1, L2 table of built-in snapshot from the disk mirroring file of target virtual machine Corresponding backup file (referred to herein as full backup file) is generated according to the data block.
, can be by the built-in snapshot of this backup after backup server generates the full backup file of this Disk Backup File and full backup file are preserved into backup storage, to complete the full backup to the disk of target virtual machine.
In another embodiment, when Disk Backup type is incremental backup, the file of built-in snapshot document The mark of built-in snapshot when also including last backup in head, it is above-mentioned according to Disk Backup type, built-in snapshot document and The disk mirroring file of target virtual machine backs up to target virtual machine, can include:
L1, L2 table for the built-in snapshot that the file content of snapshot document built in acquisition includes;
The mark of built-in snapshot when being backed up according to the last time obtains built-in snapshot document during last backup, and obtains L1, L2 table of built-in snapshot during the last backup that the file content of the built-in snapshot document includes;
L1, L2 table of built-in snapshot when relatively this time L1, L2 table of the built-in snapshot of backup back up with the last time, with true Surely the block number of the disk block of block modification occurs;
Data block corresponding to the block number for the disk block changed is read from the disk mirroring file of target virtual machine, and Incremental backup file is generated according to the data block;
Built-in snapshot document and incremental backup file are preserved to backup and stored.
In this embodiment, on the one hand backup server can obtain fast built in this time backup from built-in snapshot document According to L1, L2 table, it is on the other hand, fast built in during the last backup that can be included according to the file header of built-in snapshot document According to mark, the built-in snapshot document preserved when obtaining last backup in being stored from backup, and then, the last time can be got L1, L2 table of built-in snapshot during backup.
Built in when backup server can be backed up by L1, L2 table and last time of the built-in snapshot relatively this time backed up L1, L2 table of snapshot, to determine to occur the block number of the disk block of block modification, and read from the disk mirroring file of target virtual machine Go out data block corresponding to the block number for the disk block changed, and then, according to backup file corresponding to data block generation (herein In be referred to as incremental backup file).
, can be by the built-in snapshot of this backup after backup server generates the incremental backup file of this Disk Backup File and incremental backup file are preserved into backup storage, to complete the incremental backup to the disk of target virtual machine.
In another embodiment of the invention, when Disk Backup type is differential backup, the file of built-in snapshot document The mark of built-in snapshot when also including last full backup in head, it is above-mentioned according to Disk Backup type, built-in snapshot document And the disk mirroring file of target virtual machine backs up to target virtual machine, can include:
L1, L2 table for the built-in snapshot that the file content of snapshot document built in acquisition includes;
Built-in snapshot text during last full backup is obtained according to the mark of built-in snapshot during last full backup Part, and the file content for obtaining the built-in snapshot document include last full backup when built-in snapshot L1, L2 table;
L1, L2 table of L1, L2 table of the built-in snapshot relatively this time backed up and built-in snapshot during last full backup, To determine to occur the block number of the disk block of block modification;
Data block corresponding to the block number for the disk block changed is read from the disk mirroring file of target virtual machine, and Differential backup file is generated according to the data block;
Built-in snapshot document and the differential backup file is preserved to backup and stored.
In this embodiment, on the one hand backup server can obtain fast built in this time backup from built-in snapshot document According to L1, L2 table, on the other hand, can be according in during the last full backup that the file header of built-in snapshot document includes The mark of snapshot is put, the built-in snapshot document preserved when obtaining last full backup in being stored from backup, and then, it can obtain To L1, L2 table of built-in snapshot during last full backup.
Backup server can pass through relatively this time L1, L2 table of the built-in snapshot of backup and during last full backup L1, L2 table of built-in snapshot, to determine to occur the block number of the disk block of block modification, and from the disk mirroring file of target virtual machine Data block corresponding to the middle block number for reading the disk block changed, and then, according to backup file corresponding to data block generation (referred to herein as differential backup file).
, can be by the built-in snapshot of this backup after backup server generates the differential backup file of this Disk Backup File and differential backup file are preserved into backup storage, to complete the differential backup to the disk of target virtual machine.
What deserves to be explained is in embodiments of the present invention, when carrying out differential backup, in the file header of built-in snapshot document Including can also be last differential backup when built-in snapshot mark, correspondingly, backup server is by comparing this L1, L2 table of built-in snapshot when L1, L2 table of built-in snapshot during backup and last differential backup determine that there occurs block to repair After the block number of the disk block changed, it is also necessary to enter with the block number of the disk block of the generation block modification determined during last differential backup Row merge, with determine this differential backup relatively last full backup when occur block modification disk block block number, and then, from Data block corresponding to the block number of the disk block changed is read in the disk mirroring file of target virtual machine, and according to the number Differential backup file is generated according to block, its specific implementation does not repeat herein.
Preferably, in embodiments of the present invention, in order to avoid visit of the backup server to the file in shared-file system The service impact of application server is asked, backup server can be connected to application memory in a manner of block device, and not as altogether Enjoy file system clustered node.
In order that those skilled in the art more fully understand technical scheme provided in an embodiment of the present invention, with reference to specific Example technical scheme provided in an embodiment of the present invention is illustrated.
Embodiment one,
In this embodiment, so that application server 1 in system shown in Figure 1 framework carries out magnetic disk of virtual machine backup as an example, its In, it is assumed that shared-file system is ocfs2 shared-file systems.It is as follows that it implements flow:
First, full backup
1st, application server creates the built-in snapshot snap1 of target virtual machine, the built-in snapshot according to corresponding to being generated snap1 File snap1file1, and snap1file1 is stored in ocfs2 shared-file systems;
Wherein, snap1file1 file formats are as follows:
File header:
Check code
Type of backup:Full backup
Inode numbers of the snap1file1 in Ocfs2 file system:inode_snap1file1
Magnetic disk of virtual machine image file title:file1.qcow2
Inode numbers of the file1.qcow2 in Ocfs2 file system:inode_file1
Basic snap:Nothing
File content:
Snap1 L1, L2 table.
Wherein, check code verifies for backup server to the legitimacy of snap1file1 files, hereinafter no longer Repeat.
2nd, snap1file1 file header is sent to backup server by application server 1;
3rd, inode_snap1file1 of the backup server on the one hand in snap1file1 file header is total to from ocfs2 Enjoy and snap1file1 is obtained in file system, read L1, L2 table of the snap1 in snap1file1 file content;The opposing party Face obtains file1.qcow2 according to the inode_file1 in snap1file1 file header from ocfs2 shared-file systems;
4th, backup server will be located in snap1 L1, L2 table according to snap1 L1, L2 table in file1.qcow2 Data block is all read, and generates full backup file f ullbackfile1 according to the data block of reading;
5th, snap1file1 and fullbackfile1 are preserved to backup and stored by backup server.
By above-mentioned steps, the full backup to the disk of target virtual machine is completed.
2nd, incremental backup
In this embodiment, by taking the incremental backup after full backup as an example.
1st, application server creates the built-in snapshot snap2 of target virtual machine, the built-in snapshot according to corresponding to being generated snap2 File snap2file1, and snap2file1 is stored in ocfs2 shared-file systems;
Wherein, snap2file1 file formats are as follows:
File header:
Check code
Type of backup:Incremental backup
Inode numbers of the snap2file1 in Ocfs2 file system:inode_snap2file1
Magnetic disk of virtual machine image file title:file1.qcow2
Inode numbers of the file1.qcow2 in Ocfs2 file system:inode_file1
Basic snap when last full backup (i.e. snap):snap1
File content:
Snap2 L1, L2 table.
2nd, snap2file1 file header is sent to backup server by application server 1;
3rd, backup server according to the inode_snap2file1 in snap2file1 file header from ocfs2 shared files Snap2file1 is obtained in system, reads L1, L2 table of the snap2 in snap2file1 file content;
4th, backup server obtains corresponding in being stored according to the built-in snapshot (i.e. snap1) of last full backup from backup Built-in snapshot document (i.e. snap1file1), read L1, L2 table of the snap1 in snap1file1 file content;
5th, backup server compares snap2 L1, L2 table and snap1 L1, L2 table, it is determined that the disk block of block modification occurs Block number;
6th, backup server according to the inode_file1 in snap2file1 file header from ocfs2 shared-file systems Middle acquisition file1.qcow2;
7th, the block number for the disk block that backup server generation block determined by is changed is read corresponding from file1.qcow2 Data block, and incremental backup file incbackfile1 is generated according to the data block of reading;
8th, snap2file1 and incbackfile1 are preserved to backup and stored by backup server.
3rd, differential backup
In this embodiment, by taking the differential backup after full backup as an example.
1st, application server creates the built-in snapshot snap3 of target virtual machine, the built-in snapshot according to corresponding to being generated snap3 File snap3file1, and snap3file1 is stored in ocfs2 shared-file systems;
Wherein, snap3file1 file formats are as follows:
File header:
Check code
Type of backup:Differential backup
Inode numbers of the Snap3file1 in Ocfs2 file system:inode_snap3file1
Magnetic disk of virtual machine image file title:file1.qcow2
Inode numbers of the file1.qcow2 in Ocfs2 file system:inode_file1
Basic snap when last full backup (i.e. snap):snap1
File content:
Snap3 L1, L2 table.
2nd, snap3file1 file header is sent to backup server by application server 1;
3rd, backup server according to the inode_snap3file1 in snap3file1 file header from ocfs2 shared files Snap3file1 is obtained in system, reads L1, L2 table of the snap3 in snap3file1 file content;
4th, backup server obtains corresponding in being stored according to the built-in snapshot (i.e. snap1) of last full backup from backup Built-in snapshot document (i.e. snap1file1), read L1, L2 table of the snap1 in snap1file1 file content;
5th, backup server compares snap3 L1, L2 table and snap1 L1, L2 table, it is determined that the disk block of block modification occurs Block number;
6th, backup server according to the inode_file1 in snap3file1 file header from ocfs2 shared-file systems Middle acquisition file1.qcow2;
7th, the block number for the disk block that backup server generation block determined by is changed is read corresponding from file1.qcow2 Data block, and incremental backup file diffbackfile1 is generated according to the data block of reading;
8th, snap3file1 and diffbackfile1 are preserved to backup and stored by backup server.
Embodiment two,
In this embodiment, so that application server 1 in system shown in Figure 1 framework carries out magnetic disk of virtual machine backup as an example, its In, it is assumed that shared-file system is ocfs2 shared-file systems.It is as follows that it implements flow:
First, full backup
1st, application server creates the built-in snapshot snap1 of target virtual machine, the built-in snapshot according to corresponding to being generated snap1 File snap1file1, and snap1file1 is preserved to internal memory or local disk;
Wherein, snap1file1 file formats are as follows:
File header:
Check code
Type of backup:Full backup
Magnetic disk of virtual machine image file title:file1.qcow2
Inode numbers of the file1.qcow2 in Ocfs2 file system:inode_file1
Basic snap:Nothing
File content:
Snap1 L1, L2 table.
Wherein, check code verifies for backup server to the legitimacy of snap1file1 files, hereinafter no longer Repeat.
2nd, snap1file1 is sent to backup server by application server 1;
3rd, backup server according to the inode_file1 in snap1file1 file header from ocfs2 shared-file systems Middle acquisition file1.qcow2;
4th, backup server will be located in snap1 L1, L2 table according to snap1 L1, L2 table in file1.qcow2 Data block is all read, and generates full backup file f ullbackfile1 according to the data block of reading;
5th, snap1file1 and fullbackfile1 are preserved to backup and stored by backup server.
By above-mentioned steps, the full backup to the disk of target virtual machine is completed.
2nd, incremental backup
In this embodiment, by taking the incremental backup after full backup as an example.
1st, application server creates the built-in snapshot snap2 of target virtual machine, the built-in snapshot according to corresponding to being generated snap2 File snap2file1, and snap2file1 is preserved to internal memory or local disk;
Wherein, snap2file1 file formats are as follows:
File header:
Check code
Type of backup:Incremental backup
Magnetic disk of virtual machine image file title:file1.qcow2
Inode numbers of the file1.qcow2 in Ocfs2 file system:inode_file1
Basic snap when last full backup (i.e. snap):snap1
File content:
Snap2 L1, L2 table.
2nd, snap2file1 is sent to backup server by application server 1;
3rd, backup server reads L1, L2 table of the snap2 in snap2file1 file content;
4th, backup server obtains corresponding in being stored according to the built-in snapshot (i.e. snap1) of last full backup from backup Built-in snapshot document (i.e. snap1file1), read L1, L2 table of the snap1 in snap1file1 file content;
5th, backup server compares snap2 L1, L2 table and snap1 L1, L2 table, it is determined that the disk block of block modification occurs Block number;
6th, backup server according to the inode_file1 in snap2file1 file header from ocfs2 shared-file systems Middle acquisition file1.qcow2;
7th, the block number for the disk block that backup server generation block determined by is changed is read corresponding from file1.qcow2 Data block, and incremental backup file incbackfile1 is generated according to the data block of reading;
8th, snap2file1 and incbackfile1 are preserved to backup and stored by backup server.
3rd, differential backup
In this embodiment, by taking the differential backup after full backup as an example.
1st, application server creates the built-in snapshot snap3 of target virtual machine, the built-in snapshot according to corresponding to being generated snap3 File snap3file1, and snap3file1 is preserved to internal memory or local disk;
Wherein, snap3file1 file formats are as follows:
File header:
Check code
Type of backup:Differential backup
Magnetic disk of virtual machine image file title:file1.qcow2
Inode numbers of the file1.qcow2 in Ocfs2 file system:inode_file1
Basic snap when last full backup (i.e. snap):snap1
File content:
Snap3 L1, L2 table.
2nd, snap3file1 is sent to backup server by application server 1;
3rd, backup server reads L1, L2 table of the snap3 in snap3file1 file content;
4th, backup server obtains corresponding in being stored according to the built-in snapshot (i.e. snap1) of last full backup from backup Built-in snapshot document (i.e. snap1file1), read L1, L2 table of the snap1 in snap1file1 file content;
5th, backup server compares snap3 L1, L2 table and snap1 L1, L2 table, it is determined that the disk block of block modification occurs Block number;
6th, backup server according to the inode_file1 in snap3file1 file header from ocfs2 shared-file systems Middle acquisition file1.qcow2;
7th, the block number for the disk block that backup server generation block determined by is changed is read corresponding from file1.qcow2 Data block, and incremental backup file diffbackfile1 is generated according to the data block of reading;
8th, snap3file1 and diffbackfile1 are preserved to backup and stored by backup server.
By above description as can be seen that in technical scheme provided in an embodiment of the present invention, when needing to destination virtual When machine carries out Disk Backup, backup server is and built-in according to this by obtaining built-in snapshot document corresponding to target virtual machine Inode number of the disk mirroring file for the target virtual machine that the file header of snapshot document includes in shared system obtains target The disk mirroring file of virtual machine, and according to the disk mirroring of Disk Backup type, built-in snapshot document and target virtual machine File carries out Disk Backup to target virtual machine, so as to be realized in the case where application memory does not support that SCSI extends copy command To the server free Disk Backups of virtual machine.
Fig. 5 is referred to, a kind of structural representation of magnetic disk of virtual machine back-up device is provided for the embodiment of the present invention, wherein, The backup server that the device can apply in above method embodiment, as shown in figure 5, the device can include:
Acquiring unit 510, for when needing to carry out Disk Backup to target virtual machine, obtaining the target virtual machine pair The built-in snapshot document answered, the file header of the built-in snapshot document include Disk Backup type and the target virtual machine Inode number of the disk mirroring file in shared-file system;
The acquiring unit 510, the target for being additionally operable to be included according to the file header of the built-in snapshot document are empty Inode number of the disk mirroring file of plan machine in shared-file system obtains the disk mirroring file of the target virtual machine;
Backup units 520, for according to the Disk Backup type, it is described built in snapshot document and the destination virtual The disk mirroring file of machine carries out Disk Backup to the target virtual machine.
In an alternative embodiment, the acquiring unit 510, the target void sent specifically for receiving application server Built-in snapshot document corresponding to plan machine;Or,
The acquiring unit 510, it is built-in corresponding to the target virtual machine of application server transmission specifically for receiving The file header of snapshot document, wherein, the file header of the built-in snapshot document also includes built-in snapshot document in the shared text Inode number in part system;According to the file header of the built-in snapshot document include it is described built in snapshot document described Inode number in shared-file system obtains the built-in snapshot document.
In an alternative embodiment, the acquiring unit 510, it is additionally operable to when the Disk Backup type is full backup, Obtain L1, L2 table for the built-in snapshot that the file content of the built-in snapshot document includes;
The backup units 520, the magnetic specifically for L1, L2 table according to the built-in snapshot from the target virtual machine All data blocks are read in disk mirroring file, and full backup file is generated according to the data block;By the built-in snapshot text Part and the full backup file are preserved to backup and stored.
In an alternative embodiment, the acquiring unit 510, it is additionally operable to when the Disk Backup type is incremental backup, Obtain L1, L2 table for the built-in snapshot that the file content of the built-in snapshot document includes;
The acquiring unit 510, it is additionally operable to obtain the last time according to the mark of built-in snapshot during the last backup Built-in snapshot document during backup, and the file content for obtaining the built-in snapshot document include last backup when it is built-in L1, L2 table of snapshot;
The backup units 520, built in when L1, L2 table and last time specifically for the built-in snapshot back up L1, L2 table of snapshot, to determine to occur the block number of the disk block of block modification;From the disk mirroring file of the target virtual machine Data block corresponding to the block number of the disk block changed is read, and incremental backup file is generated according to the data block;Will The built-in snapshot document and the incremental backup file are preserved to backup and stored.
In an alternative embodiment, the acquiring unit 510, in the file content for being additionally operable to obtain the built-in snapshot document Including built-in snapshot L1, L2 table;
The acquiring unit 510, it is additionally operable to be obtained according to the mark of built-in snapshot during the last full backup Built-in snapshot document during full backup, and the last full dose that the file content for obtaining the built-in snapshot document includes L1, L2 table of built-in snapshot during backup;
The backup units 520, specifically for the built-in snapshot L1, L2 table with during last full backup L1, L2 table of built-in snapshot, to determine to occur the block number of the disk block of block modification;From the disk mirroring text of the target virtual machine Data block corresponding to the block number of the disk block changed is read in part, and differential backup text is generated according to the data block Part;The built-in snapshot document and the differential backup file are preserved to backup and stored.
Fig. 6 is referred to, a kind of structural representation of magnetic disk of virtual machine back-up device is provided for the embodiment of the present invention, wherein, The application server that the device can apply in above method embodiment, as shown in fig. 6, the device can include:
Creating unit 610, for when needing to carry out Disk Backup to target virtual machine, creating the target virtual machine pair The built-in snapshot answered;
Generation unit 620, for built-in snapshot text corresponding to the built-in snapshot generation according to corresponding to the target virtual machine Part;Wherein, the file header of the built-in snapshot document includes Disk Backup type, the built-in snapshot document in the shared text The disk mirroring file of index node inode number and the target virtual machine in part system is in the shared-file system In inode number;
Storage unit 630, for the built-in snapshot document to be preserved to shared-file system;
Transmitting element 640, for the file header of the built-in snapshot document to be sent into backup server, so that described standby Part server according to the file header of the built-in snapshot document include it is described built in snapshot document in the shared file system The disk mirroring file of index node inode number and the target virtual machine in system is in the shared-file system Inode number obtains the disk mirroring file of the built-in snapshot document and the target virtual machine, and standby according to the disk The disk mirroring file of part type, the built-in snapshot document and the target virtual machine carries out magnetic to the target virtual machine Disk backs up.
Fig. 7 is referred to, a kind of structural representation of magnetic disk of virtual machine back-up device is provided for the embodiment of the present invention, wherein, The application server that the device can apply in above method embodiment, as shown in fig. 7, the device can include:
Creating unit 710, for when needing to carry out Disk Backup to target virtual machine, creating the target virtual machine pair The built-in snapshot answered;
Generation unit 720, for built-in snapshot text corresponding to the built-in snapshot generation according to corresponding to the target virtual machine Part;Wherein, the file header of the built-in snapshot document includes the disk mirroring of Disk Backup type and the target virtual machine Inode number of the file in shared-file system;
Storage unit 730, for the built-in snapshot document to be preserved to internal memory or local disk;
Transmitting element 740, for the built-in snapshot document to be sent into backup server, so that the backup server The disk mirroring file of the target virtual machine included according to the file header of the built-in snapshot document is in shared file system Inode number in system obtains the disk mirroring file of the target virtual machine, and according to the Disk Backup type, it is described built in The disk mirroring file of snapshot document and the target virtual machine carries out Disk Backup to the target virtual machine.
The function of unit and the implementation process of effect specifically refer to and step are corresponded in the above method in said apparatus Implementation process, it will not be repeated here.
For device embodiment, because it corresponds essentially to embodiment of the method, so related part is real referring to method Apply the part explanation of example.Device embodiment described above is only schematical, wherein described be used as separating component The unit of explanation can be or may not be physically separate, can be as the part that unit is shown or can also It is not physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to reality Need to select some or all of module therein to realize the purpose of the present invention program.Those of ordinary skill in the art are not paying In the case of going out creative work, you can to understand and implement.
As seen from the above-described embodiment, when needing to carry out Disk Backup to target virtual machine, backup server passes through acquisition Built-in snapshot document corresponding to target virtual machine, and the target virtual machine included according to the file header of the built-in snapshot document Inode number of the disk mirroring file in shared system obtains the disk mirroring file of target virtual machine, and according to Disk Backup The disk mirroring file of type, built-in snapshot document and target virtual machine carries out Disk Backup to target virtual machine, so that Application memory is not supported to realize the server free Disk Backups to virtual machine in the case of SCSI extension copy commands.
Those skilled in the art will readily occur to the present invention its after considering specification and putting into practice invention disclosed herein Its embodiment.The application be intended to the present invention any modification, purposes or adaptations, these modifications, purposes or Person's adaptations follow the general principle of the present invention and including undocumented common knowledges in the art of the invention Or conventional techniques.Description and embodiments are considered only as exemplary, and true scope and spirit of the invention are by following Claim is pointed out.
It should be appreciated that the invention is not limited in the precision architecture for being described above and being shown in the drawings, and And various modifications and changes can be being carried out without departing from the scope.The scope of the present invention is only limited by appended claim.

Claims (14)

1. a kind of disk backup method of virtue machine, applied to backup server, it is characterised in that methods described includes:
When needing to carry out Disk Backup to target virtual machine, built-in snapshot document corresponding to the target virtual machine is obtained;Its In, the file header of the built-in snapshot document includes Disk Backup type and the disk mirroring file of the target virtual machine exists Inode number in shared-file system;
The disk mirroring file of the target virtual machine included according to the file header of the built-in snapshot document is in shared text Inode number in part system obtains the disk mirroring file of the target virtual machine;
According to the Disk Backup type, it is described built in the disk mirroring file of snapshot document and the target virtual machine to institute State target virtual machine and carry out Disk Backup.
2. according to the method for claim 1, it is characterised in that described to obtain built-in snapshot corresponding to the target virtual machine File, including:
Receive built-in snapshot document corresponding to the target virtual machine that application server is sent;Or,
The file header of built-in snapshot document corresponding to the target virtual machine that application server is sent is received, wherein, it is described interior Putting the file header of snapshot document also includes built-in inode number of the snapshot document in the shared-file system;
According to the file header of the built-in snapshot document include it is described built in snapshot document in the shared-file system Inode number obtain built-in snapshot document corresponding to the target virtual machine.
3. according to the method for claim 1, it is characterised in that described when the Disk Backup type is full backup According to the Disk Backup type, it is described built in the disk mirroring file of snapshot document and the target virtual machine to the mesh Mark virtual machine is backed up, including:
Obtain L1, L2 table for the built-in snapshot that the file content of the built-in snapshot document includes;
All data are read from the disk mirroring file of the target virtual machine according to L1, L2 table of the built-in snapshot Block, and full backup file is generated according to the data block;
The built-in snapshot document and the full backup file are preserved to backup and stored.
4. according to the method for claim 1, it is characterised in that described when the Disk Backup type is incremental backup The mark of built-in snapshot when in the file header of built-in snapshot document also including last backup, it is described according to the Disk Backup The disk mirroring file of type, the built-in snapshot document and the target virtual machine carries out standby to the target virtual machine Part, including:
Obtain L1, L2 table for the built-in snapshot that the file content of the built-in snapshot document includes;
Built-in snapshot document during last backup is obtained according to the mark of built-in snapshot during the last backup, and is obtained L1, L2 table of built-in snapshot during the last backup that the file content of the built-in snapshot document includes;
Compare L1, L2 table of L1, L2 table and built-in snapshot during last back up of the built-in snapshot, repaiied with determining to occur block The block number of the disk block changed;
Data corresponding to the block number of the disk block changed are read from the disk mirroring file of the target virtual machine Block, and incremental backup file is generated according to the data block;
The built-in snapshot document and the incremental backup file are preserved to backup and stored.
5. according to the method for claim 1, it is characterised in that described when the Disk Backup type is differential backup The mark of built-in snapshot when also including last full backup in built-in snapshot document head, it is described according to the Disk Backup class The disk mirroring file of type, the built-in snapshot document and the target virtual machine backs up to the target virtual machine, Including:
Obtain L1, L2 table for the built-in snapshot that the file content of the built-in snapshot document includes;
Built-in snapshot text during last full backup is obtained according to the mark of built-in snapshot during the last full backup Part, and the file content for obtaining the built-in snapshot document include last full backup when built-in snapshot L1, L2 table;
Compare L1, L2 table of L1, L2 table and built-in snapshot during last full backup of the built-in snapshot, to determine to occur The block number of the disk block of block modification;
Data corresponding to the block number of the disk block changed are read from the disk mirroring file of the target virtual machine Block, and differential backup file is generated according to the data block;
The built-in snapshot document and the differential backup file are preserved to backup and stored.
6. a kind of disk backup method of virtue machine, applied to application server, it is characterised in that this method includes:
When needing to carry out Disk Backup to target virtual machine, built-in snapshot corresponding to the target virtual machine is created;
Built-in snapshot document corresponding to the built-in snapshot generation according to corresponding to the target virtual machine, and the built-in snapshot is literary Part is preserved to shared-file system;Wherein, the file header of the built-in snapshot document includes Disk Backup type, described built-in fast According to index node inode number of the file in the shared-file system and the disk mirroring file of the target virtual machine Inode number in the shared-file system;
The file header of the built-in snapshot document is sent to backup server, so that the backup server is according to described built-in The index node inode of the built-in snapshot document in the shared-file system that the file header of snapshot document includes Number and the target virtual machine inode number of the disk mirroring file in the shared-file system obtain it is described built-in The disk mirroring file of snapshot document and the target virtual machine, and according to the Disk Backup type, it is described built in snapshot The disk mirroring file of file and the target virtual machine carries out Disk Backup to the target virtual machine.
7. a kind of disk backup method of virtue machine, applied to application server, it is characterised in that this method includes:
When needing to carry out Disk Backup to target virtual machine, built-in snapshot corresponding to the target virtual machine is created;
Built-in snapshot document corresponding to the built-in snapshot generation according to corresponding to the target virtual machine, and the built-in snapshot is literary Part is preserved to internal memory or local disk;Wherein, the file header of the built-in snapshot document includes Disk Backup type and described Inode number of the disk mirroring file of target virtual machine in shared-file system;
The built-in snapshot document is sent to backup server, so that the backup server is according to the built-in snapshot document Inode number of the disk mirroring file of the target virtual machine that includes of file header in shared-file system obtain described in The disk mirroring file of target virtual machine, and according to the Disk Backup type, it is described built in snapshot document and the target The disk mirroring file of virtual machine carries out Disk Backup to the target virtual machine.
A kind of 8. magnetic disk of virtual machine back-up device, applied to backup server, it is characterised in that described device includes:
Acquiring unit, for when needing to carry out Disk Backup to target virtual machine, obtaining in corresponding to the target virtual machine Snapshot document is put, the file header of the built-in snapshot document includes the disk mirror of Disk Backup type and the target virtual machine As inode number of the file in shared-file system;
The acquiring unit, it is additionally operable to the magnetic of the target virtual machine included according to the file header of the built-in snapshot document Inode number of the disk mirroring file in shared-file system obtains the disk mirroring file of the target virtual machine;
Backup units, for according to the Disk Backup type, it is described built in the magnetic of snapshot document and the target virtual machine Disk mirroring file carries out Disk Backup to the target virtual machine.
9. device according to claim 8, it is characterised in that
The acquiring unit, built-in snapshot text corresponding to the target virtual machine sent specifically for receiving application server Part;Or,
The acquiring unit, built-in snapshot document corresponding to the target virtual machine sent specifically for receiving application server File header, wherein, the file header of the built-in snapshot document also includes built-in snapshot document in the shared-file system Inode number;According to the file header of the built-in snapshot document include it is described built in snapshot document in the shared file Inode number in system obtains the built-in snapshot document.
10. device according to claim 8, it is characterised in that
The acquiring unit, it is additionally operable to when the Disk Backup type is full backup, obtains the built-in snapshot document L1, L2 table for the built-in snapshot that file content includes;
The backup units, the disk mirroring specifically for L1, L2 table according to the built-in snapshot from the target virtual machine All data blocks are read in file, and full backup file is generated according to the data block;Will the built-in snapshot document and The full backup file is preserved to backup and stored.
11. device according to claim 8, it is characterised in that
The acquiring unit, it is additionally operable to when the Disk Backup type is incremental backup, obtains the built-in snapshot document L1, L2 table for the built-in snapshot that file content includes;
The acquiring unit, it is additionally operable to identifying when obtaining last backup according to built-in snapshot during the last backup Built-in snapshot document, and the file content for obtaining the built-in snapshot document include last backup when built-in snapshot L1, L2 table;
The backup units, specifically for L1, L2 table and built-in snapshot during last back up of the built-in snapshot L1, L2 table, to determine to occur the block number of the disk block of block modification;Institute is read from the disk mirroring file of the target virtual machine Data block corresponding to the block number for the disk block changed is stated, and incremental backup file is generated according to the data block;In will be described Put snapshot document and the incremental backup file is preserved to backup and stored.
12. device according to claim 8, it is characterised in that
The acquiring unit, it is additionally operable to obtain L1, L2 of the built-in snapshot that the file content of the built-in snapshot document includes Table;
The acquiring unit, it is additionally operable to obtain last full dose according to the mark of built-in snapshot during the last full backup Built-in snapshot document during backup, and the file content for obtaining the built-in snapshot document include last full backup when L1, L2 table of built-in snapshot;
The backup units, specifically for the built-in snapshot L1, L2 watch with during last full backup built in it is fast According to L1, L2 table, with determine occur block modification disk block block number;Read from the disk mirroring file of the target virtual machine Go out data block corresponding to the block number of the disk block changed, and differential backup file is generated according to the data block;By institute State built-in snapshot document and the differential backup file is preserved to backup and stored.
13. a kind of magnetic disk of virtual machine back-up device, applied to application server, it is characterised in that the device includes:
Creating unit, for when needing to carry out Disk Backup to target virtual machine, creating in corresponding to the target virtual machine Put snapshot;
Generation unit, for built-in snapshot document corresponding to the built-in snapshot generation according to corresponding to the target virtual machine;Wherein, The file header of the built-in snapshot document includes Disk Backup type, the built-in snapshot document in the shared-file system Index node inode number and the target virtual machine inode of the disk mirroring file in the shared-file system Number;
Storage unit, for the built-in snapshot document to be preserved to shared-file system;
Transmitting element, for the file header of the built-in snapshot document to be sent into backup server, so that the backup services Device according to the file header of the built-in snapshot document include it is described built in snapshot document in the shared-file system Inode number of the disk mirroring file of index node inode number and the target virtual machine in the shared-file system Obtain the disk mirroring file of the built-in snapshot document and the target virtual machine, and according to the Disk Backup type, The disk mirroring file of the built-in snapshot document and the target virtual machine carries out Disk Backup to the target virtual machine.
14. a kind of magnetic disk of virtual machine back-up device, applied to application server, it is characterised in that the device includes:
Creating unit, for when needing to carry out Disk Backup to target virtual machine, creating in corresponding to the target virtual machine Put snapshot;
Generation unit, for built-in snapshot document corresponding to the built-in snapshot generation according to corresponding to the target virtual machine;Wherein, The file header of the built-in snapshot document includes the disk mirroring file of Disk Backup type and the target virtual machine altogether Enjoy the inode number in file system;
Storage unit, for the built-in snapshot document to be preserved to internal memory or local disk;
Transmitting element, for the built-in snapshot document to be sent into backup server, so that the backup server is according to institute The disk mirroring file for the target virtual machine that the file header of built-in snapshot document includes is stated in shared-file system Inode number obtains the disk mirroring file of the target virtual machine, and literary according to the Disk Backup type, the built-in snapshot The disk mirroring file of part and the target virtual machine carries out Disk Backup to the target virtual machine.
CN201710602324.6A 2017-07-21 2017-07-21 Virtual machine disk backup method and device Active CN107544871B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710602324.6A CN107544871B (en) 2017-07-21 2017-07-21 Virtual machine disk backup method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710602324.6A CN107544871B (en) 2017-07-21 2017-07-21 Virtual machine disk backup method and device

Publications (2)

Publication Number Publication Date
CN107544871A true CN107544871A (en) 2018-01-05
CN107544871B CN107544871B (en) 2020-10-02

Family

ID=60970228

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710602324.6A Active CN107544871B (en) 2017-07-21 2017-07-21 Virtual machine disk backup method and device

Country Status (1)

Country Link
CN (1) CN107544871B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101323A (en) * 2018-09-10 2018-12-28 南京铱迅信息技术股份有限公司 Snapshot implementing method based on qcow2 format under virtual machine operating status
CN109117307A (en) * 2018-07-25 2019-01-01 郑州云海信息技术有限公司 A kind of virtual-machine data restoring method and its relevant device
CN109324874A (en) * 2018-09-25 2019-02-12 郑州云海信息技术有限公司 A kind of virutal machine memory snapshot imports the method, system and device of block device
CN109358947A (en) * 2018-10-08 2019-02-19 郑州云海信息技术有限公司 A kind of realization method and system of virtual machine snapshot
CN109388524A (en) * 2018-10-09 2019-02-26 郑州云海信息技术有限公司 The addressing method and computer readable storage medium of virtual disk format
CN110389857A (en) * 2018-04-20 2019-10-29 伊姆西Ip控股有限责任公司 Method, equipment and the computer program product of data backup
CN111625401A (en) * 2020-05-29 2020-09-04 浪潮电子信息产业股份有限公司 Data backup method and device based on cluster file system and readable storage medium
CN111797057A (en) * 2020-06-30 2020-10-20 苏州三六零智能安全科技有限公司 Snapshot difference data generation method, terminal device, storage medium and device
CN112181729A (en) * 2020-10-15 2021-01-05 上海英方软件股份有限公司 Virtual machine backup control device, system and method
CN112988460A (en) * 2021-02-05 2021-06-18 新华三大数据技术有限公司 Data backup method and device for virtual machine
CN113366450A (en) * 2019-02-01 2021-09-07 三菱电机株式会社 Information processing apparatus, backup method, recovery method, and program
CN114036004A (en) * 2021-11-26 2022-02-11 江苏安超云软件有限公司 Data backup method, data recovery method and data recovery device
CN115454723A (en) * 2022-09-28 2022-12-09 安超云软件有限公司 Data backup and recovery method and system based on storage snapshot
CN115509808A (en) * 2022-09-19 2022-12-23 安徽鼎甲计算机科技有限公司 Data backup method and device, computer equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1655146A (en) * 2004-02-12 2005-08-17 国际商业机器公司 Method and apparatus for file system snapshot persistence
CN104407938A (en) * 2014-11-21 2015-03-11 上海爱数软件有限公司 Recovery method for various granularities after mirror-image-level backup of virtual machine
CN104679579A (en) * 2015-03-19 2015-06-03 杭州华三通信技术有限公司 Virtual machine migration method and device in cluster system
US9104634B2 (en) * 2012-11-30 2015-08-11 Red Hat Israel, Ltd. Usage of snapshots prepared by a different host
US20160124972A1 (en) * 2014-11-04 2016-05-05 Rubrik, Inc. Converged search and archival system
CN105912428A (en) * 2016-05-20 2016-08-31 上海数腾软件科技股份有限公司 System and method for converting source data into mirror image of virtual machine in real time
CN106250267A (en) * 2016-07-22 2016-12-21 浪潮(北京)电子信息产业有限公司 The data back up method of a kind of virtual machine and device
CN106293994A (en) * 2015-05-15 2017-01-04 株式会社日立制作所 Virtual machine cloning process in NFS and NFS
US20170004047A1 (en) * 2015-06-30 2017-01-05 Symantec Corporation Consolidated full backup of a restored virtual machine
CN106663047A (en) * 2015-01-13 2017-05-10 森普利维蒂公司 Systems and methods for oprtimized signature comparisons and data replication

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1655146A (en) * 2004-02-12 2005-08-17 国际商业机器公司 Method and apparatus for file system snapshot persistence
US9104634B2 (en) * 2012-11-30 2015-08-11 Red Hat Israel, Ltd. Usage of snapshots prepared by a different host
US20160124972A1 (en) * 2014-11-04 2016-05-05 Rubrik, Inc. Converged search and archival system
CN104407938A (en) * 2014-11-21 2015-03-11 上海爱数软件有限公司 Recovery method for various granularities after mirror-image-level backup of virtual machine
CN106663047A (en) * 2015-01-13 2017-05-10 森普利维蒂公司 Systems and methods for oprtimized signature comparisons and data replication
CN104679579A (en) * 2015-03-19 2015-06-03 杭州华三通信技术有限公司 Virtual machine migration method and device in cluster system
CN106293994A (en) * 2015-05-15 2017-01-04 株式会社日立制作所 Virtual machine cloning process in NFS and NFS
US20170004047A1 (en) * 2015-06-30 2017-01-05 Symantec Corporation Consolidated full backup of a restored virtual machine
CN105912428A (en) * 2016-05-20 2016-08-31 上海数腾软件科技股份有限公司 System and method for converting source data into mirror image of virtual machine in real time
CN106250267A (en) * 2016-07-22 2016-12-21 浪潮(北京)电子信息产业有限公司 The data back up method of a kind of virtual machine and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ERIC BLAKE: "Backing Chain Management in libvirt and qemu", 《KVM FORUM 201508》 *
E-WORKS: "金橙基于IPSAN的存储备份方案", 《ARTICLES.E-WORKS.NET.CN/570/ARTICLE44924.HTM》 *

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110389857A (en) * 2018-04-20 2019-10-29 伊姆西Ip控股有限责任公司 Method, equipment and the computer program product of data backup
CN109117307A (en) * 2018-07-25 2019-01-01 郑州云海信息技术有限公司 A kind of virtual-machine data restoring method and its relevant device
CN109101323A (en) * 2018-09-10 2018-12-28 南京铱迅信息技术股份有限公司 Snapshot implementing method based on qcow2 format under virtual machine operating status
CN109324874A (en) * 2018-09-25 2019-02-12 郑州云海信息技术有限公司 A kind of virutal machine memory snapshot imports the method, system and device of block device
CN109324874B (en) * 2018-09-25 2021-08-31 郑州云海信息技术有限公司 Method, system and device for importing virtual machine memory snapshot into block device
CN109358947A (en) * 2018-10-08 2019-02-19 郑州云海信息技术有限公司 A kind of realization method and system of virtual machine snapshot
CN109358947B (en) * 2018-10-08 2023-01-10 郑州云海信息技术有限公司 Method and system for realizing virtual machine snapshot
CN109388524A (en) * 2018-10-09 2019-02-26 郑州云海信息技术有限公司 The addressing method and computer readable storage medium of virtual disk format
CN113366450A (en) * 2019-02-01 2021-09-07 三菱电机株式会社 Information processing apparatus, backup method, recovery method, and program
CN111625401A (en) * 2020-05-29 2020-09-04 浪潮电子信息产业股份有限公司 Data backup method and device based on cluster file system and readable storage medium
CN111797057B (en) * 2020-06-30 2022-11-04 苏州三六零智能安全科技有限公司 Snapshot difference data generation method, terminal device, storage medium and device
CN111797057A (en) * 2020-06-30 2020-10-20 苏州三六零智能安全科技有限公司 Snapshot difference data generation method, terminal device, storage medium and device
CN112181729A (en) * 2020-10-15 2021-01-05 上海英方软件股份有限公司 Virtual machine backup control device, system and method
CN112988460B (en) * 2021-02-05 2022-05-27 新华三大数据技术有限公司 Data backup method and device for virtual machine
CN112988460A (en) * 2021-02-05 2021-06-18 新华三大数据技术有限公司 Data backup method and device for virtual machine
CN114036004B (en) * 2021-11-26 2022-09-30 江苏安超云软件有限公司 Data backup method, recovery method and device
CN114036004A (en) * 2021-11-26 2022-02-11 江苏安超云软件有限公司 Data backup method, data recovery method and data recovery device
CN115509808A (en) * 2022-09-19 2022-12-23 安徽鼎甲计算机科技有限公司 Data backup method and device, computer equipment and storage medium
CN115454723A (en) * 2022-09-28 2022-12-09 安超云软件有限公司 Data backup and recovery method and system based on storage snapshot

Also Published As

Publication number Publication date
CN107544871B (en) 2020-10-02

Similar Documents

Publication Publication Date Title
CN107544871A (en) A kind of disk backup method of virtue machine and device
CN111625401B (en) Data backup method and device based on cluster file system and readable storage medium
CN102834822B (en) By trooping of sharing of virtual machine quick-full backup
CN100440155C (en) Method and apparatus for creating a virtual data copy
CN100470490C (en) Method, system, and article of manufacture for consistent copying of storage volumes
CN107544870A (en) A kind of disk backup method of virtue machine and device
CN109074362A (en) Fractionation and moving range in distributed system
CN104461768B (en) copy storage device and copy storage method
CN100359479C (en) Storage services and systems
CN103198122B (en) Restart the method and apparatus of memory database
CN102929748A (en) Method and device for data backup
JP2008225616A (en) Storage system, remote copy system and data restoration method
CN100442238C (en) Method and apparatus for asynchronous replication of data
CN104378423A (en) Metadata cluster distribution storage system and storage data reading and writing method
CN104346373A (en) Partition log queue synchronization management method and device
CN103229134A (en) Storage apparatus and control method thereof
CN107438829A (en) Partitioned storage data set redoes log record
CN105589733B (en) A kind of data processing method and device
CN105988901A (en) Data copying method and storage system
WO2007099636A1 (en) File system migration method, program and apparatus
CN105574026A (en) Method and device for service supporting by using non-relational database
CN106354435A (en) Method and device for initializing RAID
CN104331344A (en) Data backup method and device
CN106610788B (en) Hard disk array control method and device
Vallath Oracle real application clusters

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant