CN106648987A - Virtual machine increment backup and recovery method capable of keeping user snapshot setting total - Google Patents
Virtual machine increment backup and recovery method capable of keeping user snapshot setting total Download PDFInfo
- Publication number
- CN106648987A CN106648987A CN201611229796.3A CN201611229796A CN106648987A CN 106648987 A CN106648987 A CN 106648987A CN 201611229796 A CN201611229796 A CN 201611229796A CN 106648987 A CN106648987 A CN 106648987A
- Authority
- CN
- China
- Prior art keywords
- snapshot
- chain
- user
- virtual machine
- incremental
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
- G06F11/1451—Management of the data involved in backup or backup restore by selection of backup contents
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1469—Backup restoration techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/815—Virtual
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a virtual machine increment snapshot backup method capable of keeping a user snapshot setting total. The method comprises the steps that 1, a basic snapshot or an increment snapshot is generated; 2, whether the snapshot is successfully generated or not is determined; 3, whether the total of the snapshots in a snapshot chain exceeds a user set value or not is judged, and when the total of the snapshots exceeds the user set value, the step 4 is executed; 4, the oldest increment snapshot except the basic snapshot in the snapshot chain is merged with the basic snapshot; 5, whether merging is successful or not is determined, if merging is successful, a newly-generated snapshot is added into the snapshot chain, and if merging is not successful, wrong information is output, and backup is finished. Compared with the prior art, the backup method has the advantages that on the basis of original backup, the oldest non-basic snapshot is deleted by adopting a snapshot merging method, compressing and duplication eliminating are conducted on each generated snapshot, therefore, the disk storage space is stored to the maximum limit, and the disk space utilization rate is greatly increased. For a same snapshot chain, the backup number cannot exceed the set value, and then larger storage space can be reserved for other snapshots.
Description
Technical field
The present invention relates to a kind of virtual machine incremental backup and restoration methods, more particularly to a kind of setting of holding user snapshot is always
Several virtual machine incremental backup, restoration methods.
Background technology
When virtual machine incremental backup is done, it is understood that:First snapshot is base snapshot, and other are incremental snapshots, each
Snapshot is only comprising the data changed since the previous snapshot, then how to delete oldest snapshotBase snapshot certainly can not
Delete, if because base snapshot is deleted, we cannot recover any one snapshot in snapshot chain, then we can delete that
Individual oldest snapshotIn fact can not, if we delete that snapshot oldest in addition to base snapshot, then with oldest that snapshot
Connection between two adjacent snapshots is just broken, and we cannot recover any snapshot in addition to base snapshot.
Therefore, it is necessary to using a kind of new virtual machine incremental backup and restoration methods, it is above-mentioned to solve the problems, such as.
The content of the invention
Based on this, it is necessary to provide the virtual machine incremental backup and restoration methods of a kind of raising memory space utilization rate.
For achieving the above object, the present invention is adopted the following technical scheme that:It is a kind of to keep the virtual of user's snapshot setting sum
The method of machine incremental snapshot backup, first step:Produce a base snapshot or incremental snapshot;Second step:It is confirmed whether successfully
A base snapshot or incremental snapshot are produced, if success, third step is performed;If unsuccessful, point out to produce SNAPSHOT INFO mistake,
Then terminate backup;Third step:Judge that whether snapshot sum is beyond user's setting value in snapshot chain, when snapshot sum exceeds user
Setting value, performs four steps;If work as snapshot sum in snapshot chain, without departing from user's setting, is directly added to snapshot chain new snapshot
In;Four steps:Oldest incremental snapshot in addition to base snapshot in snapshot chain is merged with base snapshot;5th step:Confirm to close
And it is whether successful, if merging successfully, the new snapshot for producing is added in snapshot chain;If merging is unsuccessful, output error letter
Cease and terminate backup.Specifically, in above-mentioned four steps, after oldest incremental snapshot is merged into base snapshot, if in snapshot chain
Snapshot sum is still above user's setting value, then the oldest incremental snapshot removed at present after merging after base snapshot is incorporated into again
In base snapshot, until snapshot sum is without departing from user's setting value.
For achieving the above object, the present invention is also adopted the following technical scheme that:A kind of void for keeping the setting of user's snapshot total
The method that plan machine snapshot recovers, first step:Start and recover snapshot;Second step:Confirm whether successful to recover, if success, holds
Row third step;If unsuccessful, point out to start and recover SNAPSHOT INFO mistake, then terminate to recover;Third step:Restarting is virtual
Machine;Four steps:Confirm whether the snapshot for recovering is latest snapshot;If latest snapshot, then directly recover;If not newest fast
According to, then perform the 5th step;5th step:Deleting than the snapshot for being resumed snapshot update, terminate to recover.
Specifically, in above-mentioned 5th step, after any one snapshot recovered in addition to latest snapshot, this quilt
All incremental snapshots after the snapshot of recovery will become invalid, now, be backed up based on current virtual machine snapshot, produce new
Snapshot chain, this snapshot chain for being resumed renewal after snapshot originally will be deleted.
Compared to existing technology,
The backup method of the present invention is that on the basis of original backup, the method using merging snapshot is oldest come " deletion "
Non- base snapshot, and to produce each snapshot be compressed and duplicate removal, disk storage space, pole are so saved to greatest extent
The earth improves the utilization rate of disk space.For same snapshot chain, the quantity of its backup not over setting value, so as to for its
The reserved bigger memory space of its snapshot chain.By the restoration methods of the present invention, it recovers more suitable, meets the fast of user's request
According to, by deleting snapshot that is updating and not meeting user's request, virtual machine memory space is saved, the use of client can be met again
Demand.
Description of the drawings
Fig. 1 is the flow chart of the virtual machine backup that the present invention keeps user's snapshot setting sum;
Fig. 2 is the flow chart that the present invention keeps the virtual machine of user's snapshot setting sum to recover.
Specific embodiment
For the ease of understanding the present invention, the present invention is described more fully below with reference to relevant drawings.In accompanying drawing
Give the better embodiment of the present invention.But, the present invention can be realized by many different forms, however it is not limited under
Embodiment described by face.On the contrary, the purpose for providing these embodiments makes to understand the disclosure
It is more thorough comprehensive.
Referring to the drawings 1, the present invention keeps the method that the virtual machine incremental snapshot of user's snapshot setting sum is backed up as follows:
First step:Produce a base snapshot or incremental snapshot;
Second step:It is confirmed whether successfully to produce snapshot, if success, performs third step;If unsuccessful, point out to produce
SNAPSHOT INFO mistake, then terminate backup;
Third step:Judge that whether snapshot sum is beyond user's setting value in snapshot chain, when snapshot sum sets beyond user
Definite value, performs four steps;If work as snapshot sum in snapshot chain, without departing from user's setting value, is directly added to snapshot chain new snapshot
In;
Four steps:Oldest snapshot in addition to base snapshot in snapshot chain is merged with base snapshot;
Specifically, first snapshot is base snapshot, and other are incremental snapshots, and oldest incremental snapshot is merged into base snapshot
In, so make snapshot chain keep continuous, and the oldest incremental snapshot of energy " deletion ", so that the snapshot of user's setting can be made total not
Become.
After oldest incremental snapshot is merged into base snapshot, if snapshot sum is still above user's setting value in snapshot chain,
Again by present except the oldest incremental snapshot after base snapshot after merging is incorporated into again in base snapshot, until snapshot sum without departing from
Family setting value.
5th step:Confirm whether successful to merge, if merging successfully, the new snapshot for producing is added in snapshot chain;If
Merge it is unsuccessful, then output error message and terminate backup.
If the snapshot sum that user gives is 30, then this method will only retain newest 30 snapshot, and remaining is older
Snapshot will be by " deletion ".That is, oldest snapshot is merged in base snapshot, snapshot chain is so set to keep continuous, and energy
" deletion " oldest snapshot, so that the snapshot sum of user's setting can be made constant.
Existing backup method is compared, the backup method of the present invention is on the basis of original backup, using merging snapshot
Method carry out " deletions " oldest non-base snapshot, and each snapshot to generation is compressed and duplicate removal, so to greatest extent
Disk storage space is saved, the utilization rate of disk space is drastically increased.For same snapshot chain, the quantity of its backup is not
Setting value can be exceeded, so as to reserve bigger memory space for other snapshot chains.
Referring to the drawings 2, the present invention keeps the method for the virtual machine snapshot recovery of user's snapshot setting sum as follows:
First step:Start and recover snapshot;
Second step:Confirm to start and whether successful recover, if success, perform third step;If unsuccessful, point out startup extensive
Multiple SNAPSHOT INFO mistake, then terminate to recover;
Third step:Restarting virtual machine;
Four steps:Confirm whether the snapshot for recovering is latest snapshot;If latest snapshot, then directly recover;If not
Latest snapshot, then perform the 5th step;
5th step:Deleting than the snapshot for being resumed snapshot update, terminate to recover.
Specifically, after any one snapshot recovered in addition to latest snapshot, after this snapshot being resumed
All incremental snapshots will become invalid, now, be backed up based on current virtual machine snapshot, produce new snapshot chain, originally this
The individual snapshot chain updated after snapshot that is resumed will be deleted.
For example:Up to the present 5 snapshots have been generated, are recovered the 3rd now and are shone virtual machine soon, then the 4th He
5th snapshot will be deleted, and we will again produce new snapshot chain based on the 3rd snapshot, and snapshot sum is calculated with this.This
Sample process is also rational, since user selects to return to the 3rd incremental snapshot, rather than the 4th and the 5th increasing for updating
Amount snapshot, illustrates that he is interested in the 3rd incremental snapshot, loses interest in the 4th and the 5th incremental snapshot, it is possible to
Delete the 4th and the 5th incremental snapshot.
During backup, the process to the snapshot sum in snapshot chain is to the process of the snapshot sum in snapshot chain with when recovering
Different.
During backup, a new snapshot is often produced, if the snapshot sum in snapshot chain is less than or equal to the snapshot sum of setting
Value, then directly can back up;If conversely, snapshot total value of the snapshot sum of snapshot chain more than setting, the non-base of that oldest
Snapshot will be integrated into base snapshot, to keep the validity of snapshot chain constant with the snapshot sum of setting.
During recovery, if the snapshot being resumed is not snapshot newest in snapshot chain, then be restored to virtual machine in snapshot
Afterwards, those snapshots for updating after the snapshot will be deleted all, and during backup next time, the new snapshot for backing up again will be based on upper
The snapshot for stating recovery is produced again, and the snapshot sum in snapshot chain will be calculated again.
Hinge structure, by the restoration methods of the present invention, it recovers snapshot that is more suitable, meeting user's request, leads to
Cross and delete snapshot that is updating and not meeting user's request, save the memory space of virtual machine snapshot, making for client can be met again
Use demand.
It is understandable to enable the above objects, features and advantages of the present invention to become apparent from, above in conjunction with accompanying drawing to the present invention
Specific embodiment be described in detail.Elaborate many details in order to fully understand this in superincumbent description
It is bright.But the present invention can be implemented with being much different from alternate manner described above, and those skilled in the art can be not
Similar improvement is done in the case of running counter to intension of the present invention, therefore the present invention is not limited by particular embodiments disclosed above.And
And, each technical characteristic of embodiment described above can be combined arbitrarily, to make description succinct, not in above-described embodiment
The all possible combination of each technical characteristic be all described, if however, there is no contradiction in the combination of these technical characteristics,
All it is considered to be the scope of this specification record.
Embodiment described above only expresses two kinds of embodiments of the present invention, and its description is more concrete and detailed, but and
Therefore the restriction to the scope of the claims of the present invention can not be interpreted as.It should be pointed out that for one of ordinary skill in the art
For, without departing from the inventive concept of the premise, some deformations and improvement can also be made, these belong to the guarantor of the present invention
Shield scope.Therefore, the protection domain of patent of the present invention should be defined by claims.
Claims (4)
1. a kind of method that virtual machine incremental snapshot for keeping the setting of user's snapshot total is backed up, it is characterised in that:
First step:Produce a base snapshot or incremental snapshot;
Second step:It is confirmed whether successfully to produce a base snapshot or incremental snapshot, if success, performs third step;If not into
Work(, then prompting produces SNAPSHOT INFO mistake, then terminate backup;
Third step:Judge that whether snapshot sum is beyond user's setting value in snapshot chain, when snapshot sum exceeds user's setting value,
Perform four steps;If working as snapshot sum in snapshot chain, without departing from user's setting value, to be directly added in snapshot chain new snapshot;
Four steps:Oldest snapshot in addition to base snapshot in snapshot chain is merged with base snapshot;
5th step:Confirm whether successful to merge, if merging successfully, the new snapshot for producing is added in snapshot chain;If merging
It is unsuccessful, then output error message and terminate backup.
2. the method that the virtual machine incremental snapshot for keeping the setting of user's snapshot total as claimed in claim 1 is backed up, its feature
It is:In above-mentioned four steps, after oldest incremental snapshot is merged into base snapshot, if in snapshot chain snapshot sum still above
User's setting value, then the oldest incremental snapshot removed at present after merging after base snapshot is incorporated into again in base snapshot, until snapshot
Sum is without departing from user's setting value.
3. a kind of method that virtual machine snapshot for keeping the setting of user's snapshot total is recovered, it is characterised in that:
First step:Start and recover snapshot;
Second step:Confirm to start and whether successful recover, if success, perform third step;If unsuccessful, point out to start and recover fast
According to information errors, then terminate to recover;
Third step:Restarting virtual machine;
Four steps:Confirm whether the snapshot for recovering is latest snapshot;If latest snapshot, then directly recover;If not newest
Snapshot, then perform the 5th step;
5th step:Deleting than the snapshot for being resumed snapshot update, terminate to recover.
4. the method that the virtual machine snapshot for keeping the setting of user's snapshot total as claimed in claim 3 is recovered, it is characterised in that:
In above-mentioned 5th step, after any one snapshot recovered in addition to latest snapshot, after this snapshot being resumed
All incremental snapshots will become invalid, now, backed up based on current virtual machine snapshot, produce new snapshot chain, originally
This is resumed the snapshot chain updated after snapshot and will be deleted.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611229796.3A CN106648987A (en) | 2016-12-27 | 2016-12-27 | Virtual machine increment backup and recovery method capable of keeping user snapshot setting total |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611229796.3A CN106648987A (en) | 2016-12-27 | 2016-12-27 | Virtual machine increment backup and recovery method capable of keeping user snapshot setting total |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106648987A true CN106648987A (en) | 2017-05-10 |
Family
ID=58832994
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611229796.3A Pending CN106648987A (en) | 2016-12-27 | 2016-12-27 | Virtual machine increment backup and recovery method capable of keeping user snapshot setting total |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106648987A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108959614A (en) * | 2018-07-17 | 2018-12-07 | 郑州云海信息技术有限公司 | A kind of snapshot management method, system, device, equipment and readable storage medium storing program for executing |
CN109324870A (en) * | 2018-09-20 | 2019-02-12 | 郑州云海信息技术有限公司 | A kind of method and apparatus for deleting the snapshot disk of virtual machine |
CN109324757A (en) * | 2018-08-22 | 2019-02-12 | 深圳前海微众银行股份有限公司 | Block chain data capacity reduction method, device and storage medium |
CN112860376A (en) * | 2021-02-04 | 2021-05-28 | 北京百度网讯科技有限公司 | Snapshot chain making method and device, electronic equipment and storage medium |
CN113312309A (en) * | 2020-02-26 | 2021-08-27 | 顺丰科技有限公司 | Management method and device of snapshot chain and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100049929A1 (en) * | 2008-08-25 | 2010-02-25 | Nagarkar Kuldeep S | Efficient Management of Archival Images of Virtual Machines Having Incremental Snapshots |
CN103645970A (en) * | 2013-12-13 | 2014-03-19 | 华为技术有限公司 | Realizing method and device for de-weighting increments among multiple snapshots for remote copy |
CN103729264A (en) * | 2013-12-23 | 2014-04-16 | 国云科技股份有限公司 | Method for backing up and restoring Windows virtual machine system disk |
CN103761159A (en) * | 2014-01-23 | 2014-04-30 | 天津中科蓝鲸信息技术有限公司 | Method and system for processing incremental snapshot |
CN105988857A (en) * | 2014-09-12 | 2016-10-05 | 富士施乐株式会社 | Virtual computer system, printer control system and method |
CN106055278A (en) * | 2016-06-03 | 2016-10-26 | 无锡华云数据技术服务有限公司 | Light-weight realization method based on qcow2 format incremental snapshot |
-
2016
- 2016-12-27 CN CN201611229796.3A patent/CN106648987A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100049929A1 (en) * | 2008-08-25 | 2010-02-25 | Nagarkar Kuldeep S | Efficient Management of Archival Images of Virtual Machines Having Incremental Snapshots |
CN103645970A (en) * | 2013-12-13 | 2014-03-19 | 华为技术有限公司 | Realizing method and device for de-weighting increments among multiple snapshots for remote copy |
CN103729264A (en) * | 2013-12-23 | 2014-04-16 | 国云科技股份有限公司 | Method for backing up and restoring Windows virtual machine system disk |
CN103761159A (en) * | 2014-01-23 | 2014-04-30 | 天津中科蓝鲸信息技术有限公司 | Method and system for processing incremental snapshot |
CN105988857A (en) * | 2014-09-12 | 2016-10-05 | 富士施乐株式会社 | Virtual computer system, printer control system and method |
CN106055278A (en) * | 2016-06-03 | 2016-10-26 | 无锡华云数据技术服务有限公司 | Light-weight realization method based on qcow2 format incremental snapshot |
Non-Patent Citations (3)
Title |
---|
JYTHON.LI: "KVM虚拟机快照链创建,合并,删除及回滚研究", 《HTTPS://WWW.CNBLOGS.COM/JYTHON/P/4301954.HTML》 * |
WEIXIN_34413103: "kvm+libvirt虚拟机快照浅析", 《HTTPS://BLOG.CSDN.NET/WEIXIN_34413103/ARTICLE/DETAILS/92360497》 * |
邓换方 等: "一种高效的虚拟机快照管理系统", 《计算机系统应用》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108959614A (en) * | 2018-07-17 | 2018-12-07 | 郑州云海信息技术有限公司 | A kind of snapshot management method, system, device, equipment and readable storage medium storing program for executing |
CN109324757A (en) * | 2018-08-22 | 2019-02-12 | 深圳前海微众银行股份有限公司 | Block chain data capacity reduction method, device and storage medium |
CN109324757B (en) * | 2018-08-22 | 2021-05-21 | 深圳前海微众银行股份有限公司 | Block chain data capacity reduction method and device and storage medium |
CN109324870A (en) * | 2018-09-20 | 2019-02-12 | 郑州云海信息技术有限公司 | A kind of method and apparatus for deleting the snapshot disk of virtual machine |
CN113312309A (en) * | 2020-02-26 | 2021-08-27 | 顺丰科技有限公司 | Management method and device of snapshot chain and storage medium |
CN112860376A (en) * | 2021-02-04 | 2021-05-28 | 北京百度网讯科技有限公司 | Snapshot chain making method and device, electronic equipment and storage medium |
CN112860376B (en) * | 2021-02-04 | 2023-08-01 | 北京百度网讯科技有限公司 | Snapshot chain manufacturing method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106648987A (en) | Virtual machine increment backup and recovery method capable of keeping user snapshot setting total | |
US6665815B1 (en) | Physical incremental backup using snapshots | |
US20190287626A1 (en) | Data overwriting device and data overwriting method | |
US9183236B2 (en) | Low level object version tracking using non-volatile memory write generations | |
CN101477487B (en) | Multiple incremental files backup and recovery method | |
EP1769343B1 (en) | Method and system for in-place updating content stored in a storage device | |
CN102360410B (en) | User operation discovery method of file system and synchronous system utilizing the same | |
CN109508148B (en) | Metadata reconstruction method and device and computer readable storage medium | |
CN100389406C (en) | Method for operating data in non-volatile storage in embedded system | |
CN101316184A (en) | Disaster tolerance switching method, system and device | |
CN102541694A (en) | Method and device for database backup | |
CN107608826A (en) | A kind of fault recovery method, device and the medium of the node of storage cluster | |
CN103294957B (en) | Support data guard method during Data Update in data de-duplication file system | |
CN101739313A (en) | Method for protecting and restoring continuous data | |
CN106155838B (en) | A kind of database back-up data restoration methods and device | |
CN107066349A (en) | A kind of method and system of cluster file system data protection | |
CN111611310A (en) | Block chain data clipping method, node recovery method, device, equipment and medium | |
CN105224423A (en) | Terminal data backup method and device | |
CN102902762A (en) | Method, device and system for deleting repeating data | |
CN109144792A (en) | Data reconstruction method, device and system and computer readable storage medium | |
CN113886143A (en) | Virtual machine continuous data protection method and device and data recovery method and device | |
CN114968111A (en) | Data deleting method, device, equipment and computer readable storage medium | |
CN107992268A (en) | A kind of method and relevant apparatus of bad block mark | |
CN104820625A (en) | A data record, backup, and recovery method oriented to an information management system | |
CN110471796B (en) | File directory-oriented full and incremental backup recovery method |
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 |