CN104461773A - Backup deduplication method of virtual machine - Google Patents
Backup deduplication method of virtual machine Download PDFInfo
- Publication number
- CN104461773A CN104461773A CN201410658983.8A CN201410658983A CN104461773A CN 104461773 A CN104461773 A CN 104461773A CN 201410658983 A CN201410658983 A CN 201410658983A CN 104461773 A CN104461773 A CN 104461773A
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- backup
- copy
- image file
- snapshot document
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Abstract
The invention relates to the field of cloud computing management technologies, in particular to a backup deduplication method of a virtual machine. The method comprises the steps that firstly, an external snapshot file is created and serves as a virtual machine mirror image file for creating the virtual machine; then, in the backup process, back-end IO read-write of the virtual machine is halted, a corresponding virtual machine mirror image file path is queried through the external snapshot file, a virtual machine mirror image file name is acquired, whether the virtual machine mirror image file exists in a backup path is queried, if not, the virtual machine mirror image file is copied into the backup path, and if yes, a copy of the external snapshot file is stored into the backup path; in the recovery process, back-end IO read-write of the virtual machine is halted, the external snapshot file copy needing to be recovered is searched for according to time points, an external snapshot file used currently is replaced with the copy, and back-end IO read-write of the virtual machine is recovered accordingly. The method solves the problems that backup recovery is large in occupied space, low in efficiency and low in safety, and can be applied to virtual machine backups.
Description
Technical field
The present invention relates to cloud computing administrative skill field, refer to the method for a kind of virtual machine backup duplicate removal especially.
Background technology
In the epoch of cloud computing, virtual machine replaces the carrier that physical machine becomes various application operation.Compared with physical machine, it is much easier that virtual machine carries out full backup, due to the data that virtual machine is all, comprises operating system, user data and all can be bundled in an image file, the situation of physical machine is then different, and data are all sporadically distributed in file system.The step of virtual machine backup and recovery is usually as follows:
1, suspend virtual machine rear end IO to read and write;
2, virtual machine image file is copied a copy to alternative document path as backup, and the time point that log file has copied;
3, recover virtual machine rear end IO to read and write;
When 4, needing to recover, search the image file copy needing to recover according to time point, replace the virtual machine image file of current use with copy.
Said method makes backup more easily realize, and can also there is following drawback:
1, producing during backup is all generate full dose copy, and file size is comparatively large, and the time required for backup is longer, and the disk space taken is many;
2, data security does not ensure, be all full backup owing to generating, once be acquired, just can be restored to virtual machine, therefore the data of user are revealed;
The time of 3, recovering is also longer.
Therefore, a kind of virtual machine backup method is fast and safely needed.
Summary of the invention
The technical matters that the present invention solves is to provide a kind of virtual machine to back up the method for duplicate removal, solves the deficiency that classic method exists, provides efficient back-up restoring method, save back up memory space, improve the solution of the security of Backup Data.
The technical scheme that the present invention solves the problems of the technologies described above is:
Described method comprises the steps:
Step 1: for virtual machine image file creates an outside snapshot document, and create a virtual machine with outside snapshot document as virtual machine image file;
Step 2: during backup, first suspends virtual machine rear end IO and reads and writes, and then by the virtual machine image file path that outside snapshot document inquiry is corresponding, obtains virtual machine image file name; Whether there is this virtual machine image file under inquiring about backup path simultaneously, if there is no, perform step 3, if existed, perform step 4;
Step 3: virtual machine image file is copied to backup path;
Step 4: outside snapshot document is copied a copy to backup path, and the time point recording that outside snapshot document copied;
Step 5: when needing to recover, first suspends virtual machine rear end IO and reads and writes, then search the outside snapshot document copy needing to recover according to time point, replace the outside snapshot document of current use with copy, finally recover virtual machine rear end IO and read and write.
In described step 1,
Image file is that specific a series of file is made into single file according to certain form, the mainly mirror image of each type operating system such as Window2003, centos6.4;
Snapshot document, the output of snapping technique is a copy of the data represented by it, also can be a duplicate of data;
Outside snapshot document, refers to the duplicate of specific mirror picture;
Snapping technique, about a complete usable copy of specific data set, this copy comprises the reflection of corresponding data at certain time point (time point that copy starts).
Time-out IO read-write in described step 2 refers to forbids that user carries out input-output operation to virtual machine.
Backup path in described step 3 refers to the path of depositing virtual machine image file that system is specified.
Copy in described step 4, refers to the duplicate of outside snapshot document.
When the present invention is owing to running virtual machine in the mode of outside snapshot, outside snapshot is just relative to a copy of original virtual machine image file change, and the storage space taken is less.This method carries out copying and replacing based on copy, eliminates the part repeated between virtual machine, and the corresponding time used also can be shorter; It is a kind of safe backup method.In addition, the corresponding relation of outside snapshot and original virtual machine image file is difficult to obtain, and also greatly can reduce the probability of leaking data.
Accompanying drawing explanation
Below in conjunction with accompanying drawing, the present invention is further described:
Fig. 1 is process flow diagram of the present invention.
Embodiment
Embodiments of the present invention have multiple, for the embodiment of KVM virtualization, wherein a kind of implementation method are described here, and as shown in Figure 1, specific implementation process is as follows for process flow diagram
1, for virtual machine image file carries out establishment outside snapshot document, and a virtual machine is created with outside snapshot document as virtual machine image file;
Perform " qemu-img create-f qcow2-b female mirror path dummy machine system mirror image name " and create outside snapshot, specific code is as follows:
2, during backup, first suspend virtual machine rear end IO to read and write, then by the virtual machine image file path of outside snapshot document inquiry correspondence, obtain virtual machine image file name, whether there is this virtual machine image file under inquiring about backup path simultaneously, if there is no, perform step 3, if existed, perform step 4;
#virsh list//acquisition needs to suspend virtual machine ID.
#virsh suspend id//time-out virtual machine IO reads and writes, and id is virtual machine id.
3, virtual machine image file is copied to backup path;
#dd if=/sharefiles/images/emi-xxxxxxxx of=/instances/backup/cache//emi-xxxxxx is image file title, backup path after of=
4, outside snapshot document is copied a copy to backup path, and record the time point that outside snapshot document copied;
#dd if=/sharefiles/images/snapshot_xxxxx of=/instances/backup/snap//snapshot_xxxxx is outside snapshot document, backup path after 0f=
When 5, needing to recover, first suspend virtual machine rear end IO and read and write, then search the outside snapshot document copy needing to recover according to time point, replace the outside snapshot document of current use with copy, finally recover virtual machine rear end IO and read and write.
The process of snapshot restore deletes existing snapshot document, and the snapshot document of backup is copied back main service
Device, then recovers the IO read-write of virtual machine.
#virsh restore id//recovery virtual machine IO reads and writes.
Claims (7)
1. a method for virtual machine backup duplicate removal, is characterized in that:
Described method comprises the steps:
Step 1: for virtual machine image file creates an outside snapshot document, and create a virtual machine with outside snapshot document as virtual machine image file;
Step 2: during backup, first suspends virtual machine rear end IO and reads and writes, and then by the virtual machine image file path that outside snapshot document inquiry is corresponding, obtains virtual machine image file name; Whether there is this virtual machine image file under inquiring about backup path simultaneously, if there is no, perform step 3, if existed, perform step 4;
Step 3: virtual machine image file is copied to backup path;
Step 4: outside snapshot document is copied a copy to backup path, and the time point recording that outside snapshot document copied;
Step 5: when needing to recover, first suspends virtual machine rear end IO and reads and writes, then search the outside snapshot document copy needing to recover according to time point, replace the outside snapshot document of current use with copy, finally recover virtual machine rear end IO and read and write.
2. the method for virtual machine backup duplicate removal according to claim 1, is characterized in that: in described step 1,
Image file is that specific a series of file is made into single file according to certain form, the mainly mirror image of each type operating system such as Window2003, centos6.4;
Snapshot document, the output of snapping technique is a copy of the data represented by it, also can be a duplicate of data;
Outside snapshot document, refers to the duplicate of specific mirror picture;
Snapping technique, about a complete usable copy of specific data set, this copy comprises the reflection of corresponding data at certain time point (time point that copy starts).
3. the method for virtual machine backup duplicate removal according to claim 1, is characterized in that: the time-out IO read-write in described step 2 refers to forbids that user carries out input-output operation to virtual machine.
4. the method for virtual machine backup duplicate removal according to claim 2, is characterized in that: the time-out IO read-write in described step 2 refers to forbids that user carries out input-output operation to virtual machine.
5. the method for the virtual machine backup duplicate removal according to any one of Claims 1-4, is characterized in that: the backup path in described step 3 refers to the path of depositing virtual machine image file that system is specified.
6. the method for the virtual machine backup duplicate removal according to any one of Claims 1-4, is characterized in that: the copy in described step 4, refers to the duplicate of outside snapshot document.
7. the method for virtual machine backup duplicate removal according to claim 5, is characterized in that: the copy in described step 4, refers to the duplicate of outside snapshot document.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410658983.8A CN104461773A (en) | 2014-11-18 | 2014-11-18 | Backup deduplication method of virtual machine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410658983.8A CN104461773A (en) | 2014-11-18 | 2014-11-18 | Backup deduplication method of virtual machine |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104461773A true CN104461773A (en) | 2015-03-25 |
Family
ID=52907869
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410658983.8A Pending CN104461773A (en) | 2014-11-18 | 2014-11-18 | Backup deduplication method of virtual machine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104461773A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105376329A (en) * | 2015-12-09 | 2016-03-02 | 国云科技股份有限公司 | Remote online backup method for virtual machine |
CN105739918A (en) * | 2016-01-07 | 2016-07-06 | 杭州华三通信技术有限公司 | Storage online migration method and device of virtual machine |
CN106445643A (en) * | 2016-11-14 | 2017-02-22 | 上海云轴信息科技有限公司 | Method and device for cloning and updating virtual machine |
CN106648830A (en) * | 2016-11-18 | 2017-05-10 | 国云科技股份有限公司 | Method for performing online snapshot on virtual machine disk |
CN107688508A (en) * | 2016-08-03 | 2018-02-13 | 深圳市深信服电子科技有限公司 | A kind of image file space optimization method and system |
CN108984343A (en) * | 2018-07-10 | 2018-12-11 | 西北工业大学 | A kind of virtual machine backup and memory management method based on content analysis |
CN109144776A (en) * | 2018-07-20 | 2019-01-04 | 新华三技术有限公司 | Virtual machine image file processing method and processing device |
CN115454723A (en) * | 2022-09-28 | 2022-12-09 | 安超云软件有限公司 | Data backup and recovery method and system based on storage snapshot |
Citations (5)
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 |
US7644046B1 (en) * | 2005-06-23 | 2010-01-05 | Hewlett-Packard Development Company, L.P. | Method of estimating storage system cost |
CN101777018A (en) * | 2010-02-08 | 2010-07-14 | 北京同有飞骥科技有限公司 | Copying and snapshot combined Windows system protection method |
CN103729264A (en) * | 2013-12-23 | 2014-04-16 | 国云科技股份有限公司 | Method for backing up and restoring Windows virtual machine system disk |
CN103810058A (en) * | 2012-11-12 | 2014-05-21 | 华为技术有限公司 | Backup method, equipment and system for virtual machine |
-
2014
- 2014-11-18 CN CN201410658983.8A patent/CN104461773A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7644046B1 (en) * | 2005-06-23 | 2010-01-05 | Hewlett-Packard Development Company, L.P. | Method of estimating storage system cost |
CN101609419A (en) * | 2009-06-29 | 2009-12-23 | 北京航空航天大学 | The data back up method and the device of the migration of virtual machine consistently online |
CN101777018A (en) * | 2010-02-08 | 2010-07-14 | 北京同有飞骥科技有限公司 | Copying and snapshot combined Windows system protection method |
CN103810058A (en) * | 2012-11-12 | 2014-05-21 | 华为技术有限公司 | Backup method, equipment and system for virtual machine |
CN103729264A (en) * | 2013-12-23 | 2014-04-16 | 国云科技股份有限公司 | Method for backing up and restoring Windows virtual machine system disk |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105376329A (en) * | 2015-12-09 | 2016-03-02 | 国云科技股份有限公司 | Remote online backup method for virtual machine |
CN105739918A (en) * | 2016-01-07 | 2016-07-06 | 杭州华三通信技术有限公司 | Storage online migration method and device of virtual machine |
CN105739918B (en) * | 2016-01-07 | 2019-01-18 | 新华三技术有限公司 | The online moving method of the storage of virtual machine and device |
CN107688508A (en) * | 2016-08-03 | 2018-02-13 | 深圳市深信服电子科技有限公司 | A kind of image file space optimization method and system |
CN106445643A (en) * | 2016-11-14 | 2017-02-22 | 上海云轴信息科技有限公司 | Method and device for cloning and updating virtual machine |
CN106445643B (en) * | 2016-11-14 | 2019-10-22 | 上海云轴信息科技有限公司 | It clones, the method and apparatus of upgrading virtual machine |
CN106648830A (en) * | 2016-11-18 | 2017-05-10 | 国云科技股份有限公司 | Method for performing online snapshot on virtual machine disk |
CN108984343A (en) * | 2018-07-10 | 2018-12-11 | 西北工业大学 | A kind of virtual machine backup and memory management method based on content analysis |
CN109144776A (en) * | 2018-07-20 | 2019-01-04 | 新华三技术有限公司 | Virtual machine image file processing method and processing device |
WO2020015709A1 (en) * | 2018-07-20 | 2020-01-23 | 新华三技术有限公司 | Virtual machine mirror image file processing method and device |
CN115454723A (en) * | 2022-09-28 | 2022-12-09 | 安超云软件有限公司 | Data backup and recovery method and system based on storage snapshot |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104461773A (en) | Backup deduplication method of virtual machine | |
US8281093B1 (en) | Systems and methods for creating consolidated backups of snapshot hierarchies | |
US8856080B2 (en) | Backup using metadata virtual hard drive and differential virtual hard drive | |
US9348827B1 (en) | File-based snapshots for block-based backups | |
US9250824B2 (en) | Backing up method, device, and system for virtual machine | |
US8738883B2 (en) | Snapshot creation from block lists | |
CN103970585B (en) | Create the method and device of virtual machine | |
EP2788876B1 (en) | System and method for restoring application data | |
US8250033B1 (en) | Replication of a data set using differential snapshots | |
US8782005B2 (en) | Pruning previously-allocated free blocks from a synthetic backup | |
US8904125B1 (en) | Systems and methods for creating reference-based synthetic backups | |
US20170344433A1 (en) | Apparatus and method for data migration | |
CN104375877A (en) | Virtual machine online snapshot generating and deleting method | |
CN106547641B (en) | CDP backup method based on volume | |
US20140089266A1 (en) | Information processing system | |
CN103765373B (en) | Date storage method, data storage device and memory device | |
CN110612516B (en) | Improving backup performance after backup failure | |
CN102591790B (en) | Data based on solid state hard disc store snapshot implementing method and solid state hard disc | |
CN111771193A (en) | System and method for backing up eventual consistent databases in a production cluster | |
CN104360914A (en) | Incremental snapshot method and device | |
CN109558213A (en) | The method and apparatus for managing the virtual machine snapshot of OpenStack platform | |
CN103176867A (en) | Fast file differential backup method | |
CN104268097A (en) | Metadata processing method and system | |
CN104572339A (en) | Data backup restoring system and method based on distributed file system | |
US20170293531A1 (en) | Snapshot backup |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150325 |