CN103605588B - A kind of disk backup method of virtue machine - Google Patents

A kind of disk backup method of virtue machine Download PDF

Info

Publication number
CN103605588B
CN103605588B CN201310590840.3A CN201310590840A CN103605588B CN 103605588 B CN103605588 B CN 103605588B CN 201310590840 A CN201310590840 A CN 201310590840A CN 103605588 B CN103605588 B CN 103605588B
Authority
CN
China
Prior art keywords
sector
backup
virtual
virtual machine
disk
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
CN201310590840.3A
Other languages
Chinese (zh)
Other versions
CN103605588A (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.)
Shanghai Eisoo Information Technology Co Ltd
Original Assignee
Shanghai Eisoo Information Technology 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 Shanghai Eisoo Information Technology Co Ltd filed Critical Shanghai Eisoo Information Technology Co Ltd
Priority to CN201310590840.3A priority Critical patent/CN103605588B/en
Publication of CN103605588A publication Critical patent/CN103605588A/en
Application granted granted Critical
Publication of CN103605588B publication Critical patent/CN103605588B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

This application discloses a kind of disk backup method of virtue machine, including: the virtual machine on virtual platform is initiated backup by A, backup server;B, backup server and virtual platform communicate, and notice virtual platform performs snapshot operation to described virtual machine;Virtual machine is performed after snapshot operation by C, virtual platform, the stamper of described virtual machine is carried out parsing and obtains the distribution of disk real data sector, and virtual platform returns the distribution of disk real data sector to backup server;D, backup server get the distribution of each disk real data sector, are then backuped in media server by corresponding sector data.The application scheme is so that the duration of Backup and Restore window shortens, reduces and to the resource occupation of virtual platform and save a lot of memory space for client.

Description

A kind of disk backup method of virtue machine
Technical field
The application relates to technical field of computer data storage, particularly relates to a kind of disk backup method of virtue machine.
Background technology
Intel Virtualization Technology refer to computing element on the basis of virtual rather than real on the basis of run.Intel Virtualization Technology The capacity of hardware can be expanded, simplify the re-configuration process of software.The Intel Virtualization Technology of CPU can single CPU mould Intend multi-CPU parallel, it is allowed to a platform runs multiple operating system simultaneously, and application program can be the most solely Run in vertical space and be independent of each other, thus significantly improve the work efficiency of computer.
Along with the increasingly maturation of Intel Virtualization Technology, particularly prestige farsighted (vmware) company runs business big and strong, and is proposed one Series virtualizes relevant product, the most well helps user to solve hardware resource waste, IT complex management etc. and is A row difficult problem.Migrate, soon additionally, virtualization more can solve the insurmountable difficult problem of current device, such as DynamicHost Prompt deletion data, unified desktop management, even create the enterprise integration environment etc. of blue screen never.
Bringing under the offensive that can not keep out temptation in virtualization to user, a lot of enterprises and some other organization all open Begin or application moved on virtual platform.Protect the production on virtual platform the most expeditiously Data, so that creation data does not occur destructive loss when by disaster, become with application virtualization Another hot issue.
Vmware self is also in the performance constantly promoting virtual machine Backup and Restore.Vmware introduces for data protection Virtual memory application programming interface (VADP, vStorage API for Data Protection), for back-up application Program provides application programming interface (API, the Application of the standard directly accessing virtual machine file Programming Interface) set.If backup tool manufacturer selects to use VADP, then the change of VADP Block tracer technique enables virtual platform to follow the trail of the data block that after Last Backup completes, virtual machine file changes, when So the most this change block tracer technique will lose efficacy, and the most again magnetic disk of virtual machine being done incremental backup will Perform backup totally.Based on VADP, magnetic disk of virtual machine is backed up, be by calling virtual disk research and development tool kit (VDDK, Virtual Disk Development Kit) API reads the binary content of magnetic disk of virtual machine, not There is the function resolving magnetic disk of virtual machine, therefore can only select one of the following two kinds operation: otherwise by magnetic disk of virtual machine from Head all backs up to all sectors of tail, or gets magnetic disk of virtual machine according to the change block tracer technique of VADP The data block of change, the then corresponding data sector changing block of backup.
Therefore, will there are the following problems the when of virtual machine backup based on VADP: finish full backup and In the case of VADP change block tracer technique lost efficacy, doing incremental backup can be by the number of all sectors of whole virtual disk According to all backing up, even the actual amount of data of magnetic disk of virtual machine is the least, the even situation of blank diskette.The most not only The BACKUP TIME that virtual machine can be made to back up is elongated, and virtual machine backup can affect the property of virtual platform itself for a long time Can, End-Customer also to provide the storage medium of costliness for the most useless data, has an effect on contingent the most extensive Multiple duration.
Summary of the invention
This application provides a kind of disk backup method of virtue machine, so that the duration of Backup and Restore window shortens, subtracts To the resource occupation of virtual platform and save a lot of memory space for client less.
A kind of disk backup method of virtue machine that the embodiment of the present application provides, including:
Virtual machine on virtual platform is initiated backup by A, backup server;
B, backup server and virtual platform communicate, and notice virtual platform performs snapshot to described virtual machine Operation;
Virtual machine is performed after snapshot operation by C, virtual platform, the stamper of described virtual machine is carried out parsing and obtains magnetic Dish real data sector is distributed, and virtual platform returns the distribution of disk real data sector to backup server;
D, backup server get the distribution of each disk real data sector, are then backed up by corresponding sector data In media server.
It is preferred that backup server is to back up completely or VADP the backup that the virtual machine on virtual platform is initiated Change block follows the trail of the incremental backup lost efficacy.
Obtain the distribution of disk real data sector include it is preferred that the stamper of described virtual machine to be carried out parsing:
Read first sector data of the stamper of described virtual machine;
Judge that according to the magic number in described first sector data the stamper of virtual machine is the most effective, if so, according to described Overhead field in first sector data determines master boot sector position;
The partition list of the stamper according to described master boot sector position acquisition virtual machine and the file system of each subregion;
Acquisition of information according to each subregion is distributed to the real data sector of subregion.
It is preferred that described being backuped to by corresponding sector data in media server is:
Tool kit is researched and developed by the virtual disk of virtual memory application programming interface VADP for data protection Corresponding sector data is backuped in media server by VDDK API.
As can be seen from the above technical solutions, resolved before backup and obtain the distribution of disk real data sector, and Accordingly real data is backed up, thus improve backup efficiency, and reduce in backup procedure flat to virtualization The internal memory of platform, network, the I/O read-write consumption of resource and the internal memory of backup server, network, I/O read and write money Source consumes, and saves the memory space of media server.Additionally, due to backup data quantity diminishes, then The when of needing to recover data, the duration of recovery just shortens, and helps user to improve the RTO of recovery.
Accompanying drawing explanation
A kind of disk backup method of virtue machine schematic flow sheet that Fig. 1 the application provides;
The magnetic disk of virtual machine backup that Fig. 2 provides for the embodiment of the present application realizes schematic flow sheet.
Detailed description of the invention
Although the type of magnetic disk of virtual machine has multiple, but it is identical for having a bit, that is, each virtual machine magnetic First sector of dish file can record the information that whole disk structure is relevant.Table 1 shows a kind of magnetic disk of virtual machine first The description of data structure each field of body of individual sector:
Data name Length or type Describe
MagicNumber 4 bytes Evil spirit number, represents that this magnetic disk of virtual machine is the most effective, and " KDMV " is effective
Version 4 bytes Version number
Flags 4 bytes Flag bit, whether mark has redundancy granularity table, if the information such as compression
Capacity 8 bytes The capacity of magnetic disk of virtual machine file, in units of sector
grainSize 8 bytes The size of each granularity, in units of sector
DescriptorOffset 8 bytes Embedded disk describes the initial sector of information
DescriptorSize 8 bytes The size of description information
NumGTEsPerGT 4 bytes Each granularity table has how many granularity entities
RgdOffset 8 bytes The initial sector of redundancy granularity directory
gdOffset 8 bytes The initial sector of granularity directory
overHead 8 bytes The initial sector of data
uncleanShutdown 1 byte It is used for arranging file the most normally to exit last time, normally exits and be set to false, otherwise be true
singleEndLineChar Character It is used for verifying whether file has exception in the transmitting procedure of ftp
nonEndLineChar Character
DoubleEndLineChar1 Character
DoubleEndLineChar2 Character
CompressAlgorithm 2 bytes For judging whether each grain of magnetic disk of virtual machine is compressed
Pad Filler
Wherein, the magic number (MagicNumber) of 4 byte representation magnetic disk of virtual machine of first sector beginning, evil spirit number is Being used for judging that magnetic disk of virtual machine is the most effective, general value then represents it is an effective magnetic disk of virtual machine for " KMDV ", It it is otherwise an invalid magnetic disk of virtual machine.The overhead field of the 64th~72 byte of first sector (overHead), record is the position of initial data sector of magnetic disk of virtual machine, can according to the value in these 8 bytes To determine the position of magnetic disk of virtual machine initial data sector, just can be as resolving common hard disc file after getting this value Equally the content of magnetic disk of virtual machine is resolved.
The application scheme is by resolving the form of magnetic disk of virtual machine, it can be determined that whether current virtual machine disk is one has The virtual disk of effect, if this virtual disk is an effective virtual disk.Just can correctly get this disk All partitioning scenario, and the sector auxiliary information that the file system type of each subregion and this subregion real data are distributed Deng.
The storage organization of magnetic disk of virtual machine and the file system of the same race structure on true hard disk are the same.Resolve true The when of filesystem information on hard disk, point of penetration is MBR district (MBR), then magnetic disk of virtual machine The location determining method of MBR is: read the 64th~72 byte overHead of first sector of vmdk file Field, can navigate to the position of the MBR of magnetic disk of virtual machine by the value of overHead field.MBR totally 512 Individual byte, last 64 bytes are hard disk partition table (Disk Partition Table, DPT), the byte of skew 0x04 Being the file system type of this subregion, 4 bytes that skew 0x08 rises are the sector number that this subregion has used, last 4 Individual byte is the total bytes of this sector.After getting the partition table information of DISK to Image, it is possible to know each subregion Position, initial sector and terminate sector position and this partitioned file system type (a subregion list item account for 16 words Joint, the content of the 1st byte is the guiding mark of subregion, represents whether this subregion is boot partition;2nd~4 word Joint represents the initial magnetic head of subregion, sector, cylinder, can obtain the initial sector of subregion according to the value of these three byte Position;5th byte represents divisional type, and such as 07 represents NTFS partition;6th~the 8 end magnetic representing subregion Head, sector, cylinder, just can obtain the end sector position of subregion according to these three value).Then according to subregion not With file system type, the file system of this subregion is resolved, the institute inside this partitioned file system can be parsed (sector position at the All Files place resolving various file system is one and becomes very much the sector position at some file places Ripe technology, is no longer described in detail).Thus can obtain the description information in magnetic disk of virtual machine and All Files The concrete sector position at place.
A kind of disk backup method of virtue machine flow process that the application provides is as it is shown in figure 1, include:
Step 101: some virtual machine on virtual platform is initiated backup by backup server.
If this type of backup is the incremental backup that backup completely or VADP change block follow the trail of inefficacy, continue executing with Step 102.If other situations, i.e. VADP change block follows the trail of effective incremental backup, then according in prior art Incremental backup method carry out subsequent backup step.
Step 102: the virtual platform virtual machine to back up performs snapshot operation.
When creating snapshot, can be the newly-built sub-disk of each disk of virtual machine, and that original disk is relative to soon According to being exactly stamper for dish.
Step 103: after virtual platform performs snapshot operation to virtual machine, the stamper of described virtual machine is resolved Obtaining the distribution of disk real data sector, virtual platform returns the distribution of disk real data sector to backup server.
It is preferred that this step specifically includes:
Read first sector data of the stamper of described virtual machine;
Judge that according to the magic number in described first sector data the stamper of virtual machine is the most effective, if so, according to described Overhead field in first sector data determines master boot sector position;
The partition list of the stamper according to described master boot sector position acquisition virtual machine and the file system of each subregion;
Acquisition of information according to each subregion is distributed to the real data sector of subregion.
Step 104: backup server gets the distribution of each disk real data sector, then by corresponding sector number According to backuping in media server.
VDDK API provides the interface reading vmdk disk sector, as long as telling this interface vmdk to be read disk Those sectors the most permissible, just can be directly obtained the data message of corresponding sector by this interface.
For making the know-why of technical scheme, feature and technique effect clearer, below in conjunction with concrete real Execute example technical scheme is described in detail.
The magnetic disk of virtual machine backup that Fig. 2 provides for the embodiment of the present application realizes flow process, comprises the steps:
Step 201: select a virtual machine A on virtual platform.
This virtual machine A has two disk disk1 and disk2, disk1 and disk2 Disk Quotas sizes to be 100GB, Disk1 be system disk actual amount of data be 20GB, disk2 be application data disks actual amount of data be 40GB.
Step 202: backup server initiates backup to virtual platform, virtual machine A is performed by notice virtual platform Snapshot.
Step 203: backup server judges whether current type of backup is to back up completely, or VADP change The incremental backup that block tracking technique lost efficacy, if so, continues executing with step 204.
Step 204: female disk of virtual machine A is resolved by backup server, gets the reality of disk1 and disk2 The quantity of data sector, border and position, return result to backup server.
Step 205: after backup server gets the sector auxiliary information of these disks, by the VDDK API of VADP Corresponding sector data is read out, backups in media server.
Step 206: after having backed up, backup server confirms that this backup data quantity size is 60GB.
Technical scheme can realize following Advantageous Effects:
1, in magnetic disk of virtual machine backup procedure, it is only necessary to the size of backup virtual machine disk actual amount of data, it will Improve backup efficiency.
2, owing to having only to the size of the actual amount of data of backup virtual machine disk, relative total backup data volume meeting Reduce, then backup procedure consumes the internal memory of virtual platform, network, I/O read-write resource just minimizing.
3, diminish due to the data volume of backup, then the internal memory of backup server, network, I/O read-write resource disappears Consumption also can reduce, and most notably the data volume of media server storage reduces, and saves more storage for user Space.
4, diminishing due to backup data quantity, then data are recovered by needs when, the duration of recovery is just Shorten, help user to improve target recovery time (RTO, Recovery Time Objective) of recovery.
The foregoing is only the preferred embodiment of the application, not in order to limit the protection domain of the application, Within all spirit in technical scheme and principle, any modification, equivalent substitution and improvement etc. done, Should be included within the scope of the application protection.

Claims (3)

1. a disk backup method of virtue machine, it is characterised in that including:
Virtual machine on virtual platform is initiated backup by A, backup server;
B, backup server and virtual platform communicate, and notice virtual platform performs snapshot to described virtual machine Operation;
Virtual machine is performed after snapshot operation by C, virtual platform, the stamper of described virtual machine is carried out parsing and obtains magnetic Dish real data sector is distributed, and virtual platform returns the distribution of disk real data sector to backup server;To described The stamper of virtual machine carry out parsing obtain disk real data sector distribution include:
Read first sector data of the stamper of described virtual machine;
Judge that according to the magic number in described first sector data the stamper of virtual machine is the most effective, if so, according to described Overhead field in first sector data determines master boot sector position;
The partition list of the stamper according to described master boot sector position acquisition virtual machine and the file system of each subregion;
Acquisition of information according to each subregion is distributed to the real data sector of subregion;
D, backup server get the distribution of each disk real data sector, are then backed up by corresponding sector data In media server.
Method the most according to claim 1, it is characterised in that virtual on virtual platform of backup server What machine was initiated backs up the incremental backup following the trail of inefficacy for backup completely or VADP change block.
Method the most according to claim 1, it is characterised in that described corresponding sector data is backuped to medium Server is:
Tool kit is researched and developed by the virtual disk of virtual memory application programming interface VADP for data protection Corresponding sector data is backuped in media server by VDDK API.
CN201310590840.3A 2013-11-21 2013-11-21 A kind of disk backup method of virtue machine Active CN103605588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310590840.3A CN103605588B (en) 2013-11-21 2013-11-21 A kind of disk backup method of virtue machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310590840.3A CN103605588B (en) 2013-11-21 2013-11-21 A kind of disk backup method of virtue machine

Publications (2)

Publication Number Publication Date
CN103605588A CN103605588A (en) 2014-02-26
CN103605588B true CN103605588B (en) 2016-08-17

Family

ID=50123817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310590840.3A Active CN103605588B (en) 2013-11-21 2013-11-21 A kind of disk backup method of virtue machine

Country Status (1)

Country Link
CN (1) CN103605588B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107133131A (en) * 2017-05-31 2017-09-05 广州鼎甲计算机科技有限公司 A kind of virtual machine synthesized backup method based on VMware

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853635A (en) * 2014-03-06 2014-06-11 上海爱数软件有限公司 Virtual machine backup method incapable of influencing performance of virtual machine
CN104102556B (en) * 2014-06-13 2017-03-01 上海爱数信息技术股份有限公司 A kind of magnetic disk of virtual machine data backup and restoration methods
CN104133742A (en) * 2014-08-07 2014-11-05 浪潮(北京)电子信息产业有限公司 Data protection method and device
CN105718377B (en) * 2014-12-05 2019-10-25 华为技术有限公司 The method and device of data in magnetic disk is copied in virtualization applications
CN104407945B (en) * 2014-12-26 2018-03-30 北京奇虎科技有限公司 The method, apparatus and system of data backup
CN105653352B (en) * 2015-12-31 2019-03-15 公安部第三研究所 The method of operating system virtual emulation evidence obtaining
CN107179934B (en) * 2016-03-10 2021-03-05 中标软件有限公司 Method and system for automatically restoring virtual machine in cloud computing environment
CN106250267A (en) * 2016-07-22 2016-12-21 浪潮(北京)电子信息产业有限公司 The data back up method of a kind of virtual machine and device
CN106250274B (en) * 2016-08-16 2019-03-15 浪潮(北京)电子信息产业有限公司 A kind of backup method and device of virtual machine
CN107341072A (en) * 2016-11-18 2017-11-10 新华三技术有限公司 A kind of data back up method and device
CN106598787A (en) * 2016-12-31 2017-04-26 云宏信息科技股份有限公司 Xen-based agent-free backup and recovery method and system
CN108304144B (en) * 2018-01-16 2021-04-30 广州视源电子科技股份有限公司 Data writing-in and reading method and system, and data reading-writing system
CN109062510A (en) * 2018-07-23 2018-12-21 郑州云海信息技术有限公司 A kind of data migration method and system
CN111930569A (en) * 2020-08-13 2020-11-13 上海英方软件股份有限公司 System and method for backup and recovery of whole machine
CN112181729A (en) * 2020-10-15 2021-01-05 上海英方软件股份有限公司 Virtual machine backup control device, system and method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609419A (en) * 2009-06-29 2009-12-23 北京航空航天大学 The data back up method and the device of the migration of virtual machine consistently online
CN103034566A (en) * 2012-12-06 2013-04-10 华为技术有限公司 Method and device for restoring virtual machine
CN103336728A (en) * 2013-05-08 2013-10-02 上海爱数软件有限公司 Disk data recovery method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8438349B2 (en) * 2009-08-21 2013-05-07 Symantec Corporation Proxy backup of virtual disk image files on NAS devices

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609419A (en) * 2009-06-29 2009-12-23 北京航空航天大学 The data back up method and the device of the migration of virtual machine consistently online
CN103034566A (en) * 2012-12-06 2013-04-10 华为技术有限公司 Method and device for restoring virtual machine
CN103336728A (en) * 2013-05-08 2013-10-02 上海爱数软件有限公司 Disk data recovery method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107133131A (en) * 2017-05-31 2017-09-05 广州鼎甲计算机科技有限公司 A kind of virtual machine synthesized backup method based on VMware

Also Published As

Publication number Publication date
CN103605588A (en) 2014-02-26

Similar Documents

Publication Publication Date Title
CN103605588B (en) A kind of disk backup method of virtue machine
EP2558949B1 (en) Express-full backup of a cluster shared virtual machine
EP1907935B1 (en) System and method for virtualizing backup images
US20190339883A1 (en) Method and system for implementing writable snapshots in a virtualized storage environment
US9311375B1 (en) Systems and methods for compacting a virtual machine file
US9256374B1 (en) Metadata for managing I/O and storage for a virtualization environment
US7885938B1 (en) Techniques for granular recovery of data from local and remote storage
US9747287B1 (en) Method and system for managing metadata for a virtualization environment
US11099938B2 (en) System and method for creating linked clones of storage objects with surface snapshots
US9372854B2 (en) Load balancing backup jobs in a virtualized storage system having a plurality of physical nodes
Liguori et al. Experiences with Content Addressable Storage and Virtual Disks.
CN103970585A (en) Method and device for creating virtual machine
US11003555B2 (en) Tracking and recovering a disk allocation state
US20070233753A1 (en) Database system management method, database system, database device, and backup program
US8019953B2 (en) Method for providing atomicity for host write input/outputs (I/Os) in a continuous data protection (CDP)-enabled volume using intent log
Son et al. SSD-assisted backup and recovery for database systems
US9251020B1 (en) Systems and methods for file-level replication
US20220342851A1 (en) File system event monitoring using metadata snapshots
US7716184B1 (en) System and method for performing sparse backups
US20220171556A1 (en) Smart de-fragmentation of file systems inside vms for fast rehydration in the cloud and efficient deduplication to the cloud
RU2005129430A (en) METHOD AND SYSTEM FOR SYNTHETIC BACKUP AND DATA RECOVERY
KR20070069295A (en) An implementation method of fat file system which the journaling is applied method
Khan et al. Factors Affecting the Persistence of Deleted Files on Digital Storage Devices

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 201112 Shanghai, Minhang District, United Airlines route 1188, building second layer A-1 unit 8

Applicant after: SHANGHAI EISOO INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 200072 room 3, building 840, No. 101 Middle Luochuan Road, Shanghai, Zhabei District

Applicant before: EISOO SOFTWARE Co.,Ltd.

COR Change of bibliographic data
C14 Grant of patent or utility model
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A Virtual Machine Disk Backup Method

Effective date of registration: 20231115

Granted publication date: 20160817

Pledgee: Bank of Shanghai Limited by Share Ltd. Pudong branch

Pledgor: SHANGHAI EISOO INFORMATION TECHNOLOGY Co.,Ltd.

Registration number: Y2023310000743