CN107908755A - A kind of snapshot document processing method and processing device - Google Patents
A kind of snapshot document processing method and processing device Download PDFInfo
- Publication number
- CN107908755A CN107908755A CN201711162675.6A CN201711162675A CN107908755A CN 107908755 A CN107908755 A CN 107908755A CN 201711162675 A CN201711162675 A CN 201711162675A CN 107908755 A CN107908755 A CN 107908755A
- Authority
- CN
- China
- Prior art keywords
- snapshot document
- snapshot
- generation
- document
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
- G06F16/128—Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/13—File access structures, e.g. distributed indices
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (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 kind of snapshot document processing method and processing device, including:When receiving snapshot command, snapshot document is generated;Using the snapshot document storage of generation from generation snapshot document to receiving the data that virtual machine produces snapshot command next time.Pass through the embodiment of the present invention, for the snapshot document generated every time, it will be stored from the generation snapshot document to the data that virtual machine produces snapshot command are received next time into the snapshot document, that is the data that virtual machine produces in each snapshot document storage different time sections, the data of repetition will not be so stored between snapshot document, not only reduce snapshot document the space occupied, also so that the data stored in snapshot document will be lacked compared to the data that the snapshot document in correlation technique stores, which reduces store data into time for being spent in snapshot document, so as to improve the efficiency stored data into snapshot document.
Description
Technical field
The present invention relates to virtualization technology, espespecially a kind of snapshot document processing method and processing device.
Background technology
Cloud computing management platform has outstanding stability, compatibility, has obtained the favor of many enterprises.With science skill
The continuous development of art, the version of cloud computing management platform also constantly update, and the function of cloud computing management platform is also just more strengthened
Greatly.Such as cloud computing management platform can be virtual machine generation snapshot document, and the disk file of virtual machine is copied to the life
Into snapshot document in, using the snapshot document to virtual machine carry out data recovery.But the cloud computing management in correlation technique
Platform is embodied in there are some defects:, all can be by all disks of virtual machine after generating snapshot document every time for virtual machine
File is copied in snapshot document, for example, the snapshot document storage data A of generation for the first time, the snapshot document of second of generation
Store data A and data B, snapshot document storage data A, data B and the data C of third time generation, that is to say, that virtual machine
The data much repeated are stored between snapshot document, can so cause snapshot document to take substantial amounts of space.
The content of the invention
An embodiment of the present invention provides a kind of snapshot document processing method and processing device, can reduce the sky that snapshot document takes
Between.
In order to reach the object of the invention, an embodiment of the present invention provides a kind of snapshot document processing method, including:
When receiving snapshot command, snapshot document is generated;
Using the snapshot document storage of generation from generation snapshot document to receiving virtual machine snapshot command next time
The data of generation.
In one alternative, if the snapshot command is not to receive for the first time, after the generation snapshot document,
Snapshot document processing method further includes:
Label is added for the snapshot document of the generation, the label of addition is used to find out the snapshot document in the generation
The snapshot document generated before.
In one alternative, if the snapshot command is to receive for the first time, after the generation snapshot document, soon
Further included according to document handling method:
The snapshot state file of the label of time and the addition when generation is for storing the generation snapshot document.
In one alternative, after the snapshot document for the generation adds label, snapshot document processing method
Further include:
When needing to carry out data recovery to the virtual machine, according to the snapshot state file from user from the generation
The time of middle selection, obtains the snapshot document for being used for carrying out data recovery from the snapshot document of all generations;
Using the snapshot document of acquisition, data recovery is carried out to the virtual machine.
In one alternative, the snapshot document obtained for carrying out data recovery, including:
Determine the snapshot document in the generation of selected time, a part of snapshot document as the acquisition;
The label of definite snapshot document is obtained in the snapshot state file of the generation;
According to the label of acquisition, the snapshot document generated before definite snapshot document is found out, as the acquisition
Another part snapshot document.
In one alternative, after the snapshot document for the generation adds label, snapshot document processing method
Further include:
When needing to delete the snapshot document of the generation, according to the label of the snapshot document of the generation, find out
The snapshot document generated before the snapshot document of the generation, by the snapshot document of the generation and the snapshot document found out into
Row merges;
The snapshot document that merging obtains is copied in the disk file of the virtual machine;
Delete the snapshot document for merging and obtaining.
In one alternative, before the generation snapshot document, if the authority of the disk file of the virtual machine is
Access limit, snapshot document processing method further include:
It is read-only authority by the priority assignation of the disk file of the virtual machine;
It is described by before in the disk file for merging obtained snapshot document and copying to the virtual machine, snapshot document processing
Method further includes:
It is access limit by the priority assignation of the disk file of the virtual machine.
An embodiment of the present invention provides a kind of snapshot document processing unit, including:
First generation module, during for receiving snapshot command, generates snapshot document;
Memory module, is ordered for the snapshot document storage using generation from generation snapshot document to snapshot is received next time
The data that virtual machine produces between order.
In one alternative, if the snapshot command is not to receive for the first time, snapshot document processing unit is also wrapped
Include:
Add module, for adding label for the snapshot document of the generation, the label of addition is used to find out described
The snapshot document generated before the snapshot document of generation.
In one alternative, if the snapshot command is to receive for the first time, snapshot document processing unit further includes:
Second generation module, for generate be used for store it is described generation snapshot document when time and the addition label
Snapshot state file.
In one alternative, snapshot document processing unit further includes:
Acquisition module, for when needing to carry out data recovery to the virtual machine, according to from user from the generation
Snapshot state file in time for selecting, obtained from the snapshot document of all generations and be used to carry out data recovery
Snapshot document;
Recovery module, for using the snapshot document obtained, data recovery to be carried out to the virtual machine.
In one alternative, the acquisition module includes:
Determination unit, for determining the snapshot document in the generation of selected time, the part as the acquisition
Snapshot document;
Acquiring unit, for obtaining the label of definite snapshot document in the snapshot state file of the generation;
Searching unit, for the label according to acquisition, finds out the snapshot document generated before definite snapshot document,
Another part snapshot document as the acquisition.
In one alternative, snapshot document processing unit further includes:
Merging module, for when needing to delete the snapshot document of the generation, according to the snapshot document of the generation
Label, finds out the snapshot document generated before the snapshot document of the generation, by the snapshot document of the generation and lookup
The snapshot document gone out merges;
Replication module, copies in the disk file of the virtual machine for will merge obtained snapshot document;
Removing module, for deleting the snapshot document for merging and obtaining.
In one alternative, snapshot document processing unit further includes:
First setup module, for being read-only authority by the priority assignation of the disk file of the virtual machine;
Second setup module, for being access limit by the priority assignation of the disk file of the virtual machine.
The embodiment of the present invention includes at least:When receiving snapshot command, snapshot document is generated;Utilize the snapshot document of generation
Store from generation snapshot document to receiving the data that virtual machine produces snapshot command next time.Can from the embodiment of the present invention
See, will be from the snapshot document be generated to receiving virtual machine snapshot command next time for the snapshot document generated every time
The data of generation are stored into the snapshot document, that is to say, that the number that each snapshot document storage different time sections virtual machine produces
According to, the data of repetition will not be stored between such snapshot document, not only reduce snapshot document the space occupied, it is also so that fast
To lack compared to the data that the snapshot document in correlation technique stores according to the data stored in file, which reduces by data
The time spent in snapshot document is stored, so as to improve the efficiency stored data into snapshot document.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification
Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by specification, rights
Specifically noted structure is realized and obtained in claim and attached drawing.
Brief description of the drawings
Attached drawing is used for providing further understanding technical solution of the present invention, and a part for constitution instruction, with this
The embodiment of application is used to explain technical scheme together, does not form the limitation to technical solution of the present invention.
Fig. 1 is a kind of flow diagram of snapshot document processing method provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic diagram of change of the virtual machine file when generating snapshot document provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of change of the virtual machine file when deleting snapshot document provided in an embodiment of the present invention;
Fig. 4 is a kind of structure diagram of snapshot document processing unit provided in an embodiment of the present invention;
Fig. 5 is the structure diagram of another snapshot document processing unit provided in an embodiment of the present invention.
Embodiment
For the object, technical solutions and advantages of the present invention are more clearly understood, below in conjunction with attached drawing to the present invention
Embodiment be described in detail.It should be noted that in the case where there is no conflict, in the embodiment and embodiment in the application
Feature can mutually be combined.
Step shown in the flowchart of the accompanying drawings can be in the computer system of such as a group of computer-executable instructions
Perform.Also, although logical order is shown in flow charts, in some cases, can be with suitable different from herein
Sequence performs shown or described step.
The embodiment of the present invention provides a kind of snapshot document processing method, as shown in Figure 1, the snapshot document processing method bag
Include:
Step 101, when receiving snapshot command, generate snapshot document.
It should be noted that the snapshot document processing method is used for cloud computing management platform, for example, cloud computing management platform
Be by US National Aeronautics and Space Administration (National Aeronautics and Space Administration, NASA) and
Rackspace (one of global three big cloud computing centers) R & D Cooperations and the cloud computing management platform project increased income initiated
OpenStack." snapshot " this option is shown in the user interface of cloud computing management platform, when user clicks on " snapshot "
When, illustrate that cloud computing management platform receives snapshot command from the user, generate snapshot document.Snapshot command includes but unlimited
In snapshot command from the user, the snapshot command from the triggering of cloud computing management platform can also be included, for example, cloud computing pipe
Platform periodically triggers snapshot command.
Step 102, using generation snapshot document storage from generation snapshot document to receive next time snapshot command it
Between virtual machine produce data.
If that is, generation snapshot document, the snapshot document of the data storage that virtual machine is produced to the generation
In, untill when receiving snapshot command next time.
For example, virtual machine includes disk file, when not receiving snapshot command from the user, virtual machine is produced
Data A is stored into the disk file, and wherein disk file includes system disk file and data disks file;Receive for the first time fast
During according to order, snapshot document File01-001 is generated, will be fast to second of generation after generation snapshot document File01-001
Stored according to the data B that virtual machine between file produces into snapshot document File01-001;When receiving snapshot command for the second time,
Snapshot document File01-002 is generated, will be after generation snapshot document File01-002 to third time generation snapshot document
The data C that virtual machine produces is stored into snapshot document File01-002, and so on.
In one alternative, on the basis of Fig. 1 corresponds to embodiment, if snapshot command is not to receive for the first time,
After step 101, further include:
Label is added for the snapshot document of generation, the label of addition is used to find out to generate before the snapshot document of generation
Snapshot document.
That is, for not being the snapshot document that generates when receiving snapshot command for the first time, add for the snapshot document
Tag, so when data recovery is carried out, can be gone out before the snapshot document to generate according to the label lookup fast
According to file.Said below for the label of addition for finding out the snapshot document generated before the snapshot document of generation
It is bright, for example, being respectively for the first time snapshot document File01-001, snapshot document File01- to the snapshot document of third time generation
002nd, snapshot document File01-003, after snapshot document File01-003 is generated, according to the mark of snapshot document File01-003
Label, find out the snapshot document File01-002 of the last generation of snapshot document File01-003, according to snapshot document
The label of File01-002, finds out the snapshot document File01-001 of the last generation of snapshot document File01-002, i.e.,
According to the label of snapshot document File01-003, the snapshot document generated before snapshot document File01-003 is found out
File01-002 and snapshot document File01-001.
It should be noted that include for the snapshot document addition label of generation:By the text of the snapshot document of last time generation
Part name is referred to as the label of the snapshot document of the generation;Or the snapshot document of the generation is numbered, the last time is generated
Snapshot document numbering as the generation snapshot document label.For example, for the first time to the snapshot document of third time generation
Respectively snapshot document File01-001, snapshot document File01-002, snapshot document File01-003, snapshot document
The label of File01-002 is the file name of snapshot document File01-001, and the label of snapshot document File01-003 is snapshot
The file name of file File01-002.Or snapshot document File01-001, snapshot text to first time to third time generation
Part File01-002, snapshot document File01-003 are numbered, if the numbering of snapshot document File01-001 is 0000, soon
Numbering according to file File01-002 is 0001, and the numbering of snapshot document File01-003 is 0002, then snapshot document
The label of File01-002 is 0000, and the label of snapshot document File01-003 is 0001.
It should also be noted that, the label of addition can be not only used for finding out what is generated before the snapshot document of generation
Snapshot document, can be also used for, when virtual machine produces data, the production being found in all snapshot documents according to the label
Which snapshot document is raw data are stored into.Of course, it is possible to arrived by label to find the data storage that virtual machine produces
In which snapshot document, can also according to generation snapshot document when time, nearest one is found in all snapshot documents
The snapshot document of secondary generation, the data storage that virtual machine is produced is into the snapshot document of the last time generation.
In one alternative, on the basis of Fig. 1 corresponds to embodiment, if snapshot command is to receive for the first time, walk
After rapid 101, further include:
Generation is used to store the snapshot state file of time when generating snapshot document and the label of addition.
As shown in Fig. 2, when not receiving snapshot command, the data that virtual machine is produced are stored into disk file, should
Disk file includes system disk file and data disks file.When receiving snapshot command for the first time, snapshot state file is generated
And snapshot document.When not being to receive snapshot command for the first time, snapshot document is generated, that is to say, that if not connecing for the first time
Snapshot command is received, snapshot state file will not be generated.Whenever snapshot document is generated, time when will generate the snapshot document
Storage corresponding with the label of the snapshot document is into snapshot state file.When needing to carry out data recovery, from the snapshot state
The time for generating each snapshot document is obtained in file, by the time showing in the user interface of cloud computing management platform, with
Select a time on a user interface for user, time of selection be used for by the data recovery of virtual machine to the selection when
Between in the state of.For example, when the time of generation snapshot document is 9 days 13 November in 2017 for the first time, second of generation snapshot text
When the time of part is 10 days 09 November in 2017, when the time that third time generates snapshot document is 11 days 15 November in 2017, when
When the generated time of user's selection is 10 days 09 November in 2017, then just by the data recovery of virtual machine to November 10 in 2017
In the state of during day 09.The generated time of the label of addition and snapshot document is stored in same file, is being needed to void
When plan machine carries out data recovery, easy to obtain the label of snapshot document.
If it should be noted that receiving snapshot command from the user for the first time, added for the snapshot document of generation
The step of the step of label and generation snapshot state file, does not have sequencing, can be first the snapshot document addition mark of generation
Label, regenerate snapshot state file, can also first generate snapshot state file, then add label for the snapshot document of generation.
In one alternative, on the basis of Fig. 1 corresponds to embodiment, after the snapshot document addition label of generation,
Further include:
When needing to carry out data recovery to virtual machine, according to what is selected from user from the snapshot state file of generation
Time, obtains the snapshot document for being used for carrying out data recovery from the snapshot document of all generations;Use the snapshot text of acquisition
Part, data recovery is carried out to virtual machine.
When needing to carry out data recovery to virtual machine, snapshot state is shown on the display interface of cloud computing management platform
The time of the generation snapshot document stored in file, if selecting the time in the time that user shows on the display interface,
In the state of the time that virtual machine so is returned to the selection.It should be noted that it is used to carry out data recovery obtaining
After snapshot document, it is stored in the snapshot document of disk file and generation, is removed due to the data that virtual machine produces
Need to obtain the snapshot document for being used for carrying out data recovery, it is also necessary to obtain the disk file of virtual machine, pass through the use of acquisition
In the snapshot document and the disk file of virtual machine that carry out data recovery, data recovery is carried out to virtual machine.Virtual machine is carried out
The realization of data recovery can be realized by the way of in correlation technique, implement the protection model being not intended to limit the present invention
Enclose, which is not described herein again.
You need to add is that after data recovery is carried out to virtual machine, the snapshot that will generate after the snapshot document of acquisition
File is deleted.For example, after the 4th time generates snapshot document, if virtual machine needs to return to second of generation snapshot document
State, then using the snapshot document of the disk file of virtual machine, the snapshot document of the first generation and second generation into line number
According to recovery, after data recovery is carried out, the snapshot document of third time generation and the snapshot document of the 4th generation are deleted.
In one alternative, on the basis of Fig. 1 corresponds to embodiment, the snapshot text for being used to carry out data recovery is obtained
Part, including:
Determine the snapshot document in the time generation of selection, a part of snapshot document as acquisition;In the snapshot of generation
The label of definite snapshot document is obtained in status file;According to the label of acquisition, find out before definite snapshot document
The snapshot document of generation, another part snapshot document as acquisition.
For example, after the 4th time generates snapshot document, if user's selection needs virtual machine returning to second of generation
In the state of the time of snapshot document, data are carried out using the snapshot document of first time generation and the snapshot document of second of generation
Recover.
It should be noted that except storing time when generating snapshot document into snapshot state file, will additionally generate
Snapshot document file name with generation snapshot document when time it is correspondings storage into snapshot state file, so basis this
Snapshot state file be assured that selection time generation snapshot document file name, so that it is determined that selection when
Between the snapshot document that generates.
In one alternative, on the basis of Fig. 1 corresponds to embodiment, after the snapshot document addition label of generation,
Further include:
When needing to delete the snapshot document of generation, according to the label of the snapshot document of generation, find out in the fast of generation
According to the snapshot document generated before file, the snapshot document of generation and the snapshot document found out are merged;It will merge
To snapshot document copy to virtual machine disk file in;Delete the snapshot document for merging and obtaining.
As shown in figure 3, virtual machine includes system disk file, data disks file, snapshot document and snapshot state file, when
When needing to delete snapshot document File01-002, due to the upper snapshot text once generated before snapshot document File01-002
Part is snapshot document File01-001, therefore snapshot document File01-002 is merged into snapshot document File01-001.Will
Snapshot document File01-002 is merged into snapshot document File01-001 and specifically includes, by snapshot document File01-002
Content is copied in snapshot document File01-001, and deletes snapshot document File01-002.By the snapshot document after merging
System data in File01-001 is copied in system disk file, is by removing in the snapshot document File01-001 after merging
Data duplication outside data of uniting finally deletes the snapshot document File01-001 being merged into data disks file.
In one alternative, on the basis of Fig. 1 corresponds to embodiment, before step 101, if the disk text of virtual machine
The authority of part is access limit, is further included:
It is read-only authority by the priority assignation of the disk file of virtual machine;The snapshot document that merging obtains is copied to virtually
Before in the disk file of machine, further include:It is access limit by the priority assignation of the disk file of virtual machine.
When not receiving snapshot command from the user, the authority of the disk file of virtual machine is access limit, is being connect
After receiving snapshot command from the user, the authority of the disk file of virtual machine is read-only authority, so avoids generating
There are newly generated data to be written in the disk file of virtual machine during snapshot document.During if necessary to delete snapshot document, according to
The snapshot document deleted is needed, merges snapshot document, is access limit by the priority assignation of the disk file of virtual machine, so as to
Copied to the snapshot document being incorporated into the disk file of virtual machine.
Snapshot document processing method according to embodiments of the present invention, when receiving snapshot command from the user, generation
Empty snapshot document;It is empty snapshot command from generation snapshot document to receiving next time using the snapshot document storage of generation
The data that plan machine produces.From the embodiment of the present invention as it can be seen that snapshot document for generating every time, will from generate the snapshot document to
Receive the data that virtual machine produces between snapshot command next time to store into the snapshot document, that is to say, that each snapshot text
Part stores the data that different time sections virtual machine produces, and the data of repetition will not be stored between such snapshot document, are not only subtracted
Snapshot document the space occupied is lacked, also so that the data stored in snapshot document are deposited compared to the snapshot document in correlation technique
The data of storage will be lacked, and which reduces time for being spent in snapshot document is stored data into, deposit data so as to improve
Store up the efficiency in snapshot document.
The embodiment of the present invention provides a kind of snapshot document processing unit, as shown in figure 4, the snapshot document processing unit 2, bag
Include:
First generation module 21, during for receiving snapshot command, generates snapshot document.
Memory module 22, for the snapshot document storage using generation from generation snapshot document to receiving snapshot next time
The data that virtual machine produces between order.
In one alternative, on the basis of Fig. 4 corresponds to embodiment, if the snapshot command is not to receive for the first time
Arrive, the embodiment of the present invention proposes another snapshot document processing unit, as shown in figure 5, the snapshot document processing unit 2 is also wrapped
Include:
Add module 23, for adding label for the snapshot document of the generation, the label of addition is used to find out in institute
State the snapshot document generated before the snapshot document of generation.
In one alternative, on the basis of Fig. 5 corresponds to embodiment, if the snapshot command is to receive for the first time
Arrive, snapshot document processing unit 2 further includes:
Second generation module 24, for generate be used for store it is described generation snapshot document when time and the addition mark
The snapshot state file of label.
In one alternative, on the basis of Fig. 5 corresponds to embodiment, snapshot document processing unit 2 further includes:
Acquisition module 25, for when needing to carry out data recovery to the virtual machine, according to from user from the life
Into snapshot state file in time for selecting, obtained from the snapshot document of all generations and be used to carry out data recovery
Snapshot document.
Recovery module 26, for using the snapshot document obtained, data recovery to be carried out to the virtual machine.
In one alternative, on the basis of Fig. 5 corresponds to embodiment, the acquisition module 25 includes:
Determination unit 251, for determine the selected time generation snapshot document, one as the acquisition
Divide snapshot document;
Acquiring unit 252, for obtaining the label of definite snapshot document in the snapshot state file of the generation;
Searching unit 253, for the label according to acquisition, finds out the snapshot text generated before definite snapshot document
Part, another part snapshot document as the acquisition.
In one alternative, on the basis of Fig. 5 corresponds to embodiment, snapshot document processing unit 2 further includes:
Merging module 27, for when needing to delete the snapshot document of the generation, according to the snapshot document of the generation
Label, find out the snapshot document generated before the snapshot document of the generation, the snapshot document of the generation and will look into
The snapshot document found out merges;
Replication module 28, copies in the disk file of the virtual machine for will merge obtained snapshot document;
Removing module 29, for deleting the snapshot document for merging and obtaining.
In one alternative, on the basis of Fig. 5 corresponds to embodiment, snapshot document processing unit 2 further includes:
First setup module 210, for being read-only authority by the priority assignation of the disk file of the virtual machine;
Second setup module 211, for being access limit by the priority assignation of the disk file of the virtual machine.
In practical applications, the first generation module 21, memory module 22, add module 23, the second generation module 24, acquisition
Module 25, recovery module 26, merging module 27, replication module 28, removing module 29, the first setup module 210 and second are set
Module 211 can be by the CPU in snapshot document processing unit 2, microprocessor (Micro Processor Unit, MPU), numeral
Signal processor (Digital Signal Processor, DSP) or field programmable gate array (Field Programmable
Gate Array, FPGA) etc. realize.
Snapshot document processing unit according to embodiments of the present invention, when receiving snapshot command, generates snapshot document;Utilize
The snapshot document storage of generation is from generation snapshot document to receiving the data that virtual machine produces snapshot command next time.From
The embodiment of the present invention, will be from the snapshot document be generated to receiving snapshot next time as it can be seen that snapshot document for generating every time
The data that virtual machine produces between order are stored into the snapshot document, that is to say, that each snapshot document storage different time sections
The data that virtual machine produces, the data of repetition will not be stored between such snapshot document, not only reduce snapshot document occupancy
Space, also so that the data that store will be lacked compared to the data of the snapshot document storage in correlation technique in snapshot document, this
Sample just reduces the time for storing data into and being spent in snapshot document, is stored data into so as to improve in snapshot document
Efficiency.
The embodiment of the present invention provides another snapshot document processing unit, the snapshot document processing unit include memory,
Processor and storage on a memory and the computer program that can run on a processor, during processor execution computer program
The step of realizing includes:
When receiving snapshot command, snapshot document is generated;
Using the snapshot document storage of generation from generation snapshot document to receiving virtual machine snapshot command next time
The data of generation.
In one alternative, if the snapshot command is not to receive for the first time, above-mentioned processor performs computer
The step of being realized during program further includes:
Label is added for the snapshot document of the generation, the label of addition is used to find out the snapshot document in the generation
The snapshot document generated before.
In one alternative, if the snapshot command is to receive for the first time, above-mentioned processor performs computer journey
The step of being realized during sequence further includes:
The snapshot state file of the label of time and the addition when generation is for storing the generation snapshot document.
In one alternative, the step of above-mentioned processor is realized when performing computer program, further includes:
When needing to carry out data recovery to the virtual machine, according to the snapshot state file from user from the generation
The time of middle selection, obtains the snapshot document for being used for carrying out data recovery from the snapshot document of all generations;
Using the snapshot document of acquisition, data recovery is carried out to the virtual machine.
In one alternative, the step of above-mentioned processor is realized when performing computer program, specifically includes:
Determine the snapshot document in the generation of selected time, a part of snapshot document as the acquisition;
The label of definite snapshot document is obtained in the snapshot state file of the generation;
According to the label of acquisition, the snapshot document generated before definite snapshot document is found out, as the acquisition
Another part snapshot document.
In one alternative, the step of above-mentioned processor is realized when performing computer program, further includes:
When needing to delete the snapshot document of the generation, according to the label of the snapshot document of the generation, find out
The snapshot document generated before the snapshot document of the generation, by the snapshot document of the generation and the snapshot document found out into
Row merges;
The snapshot document that merging obtains is copied in the disk file of the virtual machine;
Delete the snapshot document for merging and obtaining.
In one alternative, the step of above-mentioned processor is realized when performing computer program, further includes:
It is read-only authority by the priority assignation of the disk file of the virtual machine;
It is access limit by the priority assignation of the disk file of the virtual machine.
Although disclosed herein embodiment as above, the content be only readily appreciate the present invention and use
Embodiment, is not limited to the present invention.Technical staff in any fields of the present invention, is taken off not departing from the present invention
On the premise of the spirit and scope of dew, any modification and change, but the present invention can be carried out in the form and details of implementation
Scope of patent protection, still should be subject to the scope of the claims as defined in the appended claims.
Claims (14)
- A kind of 1. snapshot document processing method, it is characterised in that including:When receiving snapshot command, snapshot document is generated;Using the snapshot document storage of generation, from generation snapshot document, the virtual machine to receiving snapshot command next time produces Data.
- 2. snapshot document processing method according to claim 1, it is characterised in that if the snapshot command is not first It is secondary to receive, after the generation snapshot document, further include:Label is added for the snapshot document of the generation, the label of addition is used to find out before the snapshot document of the generation The snapshot document of generation.
- 3. snapshot document processing method according to claim 2, it is characterised in that if the snapshot command is for the first time Receive, after the generation snapshot document, further include:The snapshot state file of the label of time and the addition when generation is for storing the generation snapshot document.
- 4. snapshot document processing method according to claim 3, it is characterised in that the snapshot document for the generation After adding label, further include:When needing to carry out data recovery to the virtual machine, selected according to from user from the snapshot state file of the generation The time selected, obtains the snapshot document for being used for carrying out data recovery from the snapshot document of all generations;Using the snapshot document of acquisition, data recovery is carried out to the virtual machine.
- 5. snapshot document processing method according to claim 4, it is characterised in that described obtain is used to carry out data recovery Snapshot document, including:Determine the snapshot document in the generation of selected time, a part of snapshot document as the acquisition;The label of definite snapshot document is obtained in the snapshot state file of the generation;According to the label of acquisition, the snapshot document generated before definite snapshot document is found out, as the another of the acquisition A part of snapshot document.
- 6. snapshot document processing method according to claim 2, it is characterised in that the snapshot document for the generation After adding label, further include:When needing to delete the snapshot document of the generation, according to the label of the snapshot document of the generation, find out described The snapshot document generated before the snapshot document of generation, the snapshot document of the generation and the snapshot document found out are closed And;The snapshot document that merging obtains is copied in the disk file of the virtual machine;Delete the snapshot document for merging and obtaining.
- 7. snapshot document processing method according to claim 6, it is characterised in that before the generation snapshot document, such as The authority of the disk file of virtual machine described in fruit is access limit, is further included:It is read-only authority by the priority assignation of the disk file of the virtual machine;It is described by before in the disk file for merging obtained snapshot document and copying to the virtual machine, further include:It is access limit by the priority assignation of the disk file of the virtual machine.
- A kind of 8. snapshot document processing unit, it is characterised in that including:First generation module, during for receiving snapshot command, generates snapshot document;Memory module, for using generation snapshot document storage from generation snapshot document to receive next time snapshot command it Between virtual machine produce data.
- 9. snapshot document processing unit according to claim 8, it is characterised in that if the snapshot command is not first It is secondary to receive, further include:Add module, for adding label for the snapshot document of the generation, the label of addition is used to find out in the generation Snapshot document before generate snapshot document.
- 10. snapshot document processing unit according to claim 9, it is characterised in that if the snapshot command is first It is secondary to receive, further include:Second generation module, for generate be used for store it is described generation snapshot document when time and the addition label it is fast According to status file.
- 11. snapshot document processing unit according to claim 10, it is characterised in that further include:Acquisition module, for when needing to carry out data recovery to the virtual machine, according to from user from the fast of the generation According to the time selected in status file, the snapshot for being used for carrying out data recovery is obtained from the snapshot document of all generations File;Recovery module, for using the snapshot document obtained, data recovery to be carried out to the virtual machine.
- 12. snapshot document processing unit according to claim 11, it is characterised in that the acquisition module includes:Determination unit, for determining the snapshot document in the generation of selected time, a part of snapshot as the acquisition File;Acquiring unit, for obtaining the label of definite snapshot document in the snapshot state file of the generation;Searching unit, for the label according to acquisition, finds out the snapshot document generated before definite snapshot document, as Another part snapshot document of the acquisition.
- 13. snapshot document processing unit according to claim 9, it is characterised in that further include:Merging module, for when needing to delete the snapshot document of the generation, according to the label of the snapshot document of the generation, The snapshot document generated before the snapshot document of the generation is found out, by the snapshot document of the generation and is found out fast Merged according to file;Replication module, copies in the disk file of the virtual machine for will merge obtained snapshot document;Removing module, for deleting the snapshot document for merging and obtaining.
- 14. snapshot document processing unit according to claim 13, it is characterised in that further include:First setup module, for being read-only authority by the priority assignation of the disk file of the virtual machine;Second setup module, for being access limit by the priority assignation of the disk file of the virtual machine.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711162675.6A CN107908755A (en) | 2017-11-21 | 2017-11-21 | A kind of snapshot document processing method and processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711162675.6A CN107908755A (en) | 2017-11-21 | 2017-11-21 | A kind of snapshot document processing method and processing device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107908755A true CN107908755A (en) | 2018-04-13 |
Family
ID=61846807
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711162675.6A Pending CN107908755A (en) | 2017-11-21 | 2017-11-21 | A kind of snapshot document processing method and processing device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107908755A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109189546A (en) * | 2018-07-11 | 2019-01-11 | 新华三云计算技术有限公司 | A kind of production method and device of the online snapshot of virtual machine |
WO2022222602A1 (en) * | 2021-04-23 | 2022-10-27 | International Business Machines Corporation | Vm file management using file-level snapshots |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103019888A (en) * | 2012-12-21 | 2013-04-03 | 华为技术有限公司 | Backup method and device |
CN103034566A (en) * | 2012-12-06 | 2013-04-10 | 华为技术有限公司 | Method and device for restoring virtual machine |
CN103645968A (en) * | 2013-12-02 | 2014-03-19 | 北京奇虎科技有限公司 | Browser status restoration method and device |
CN103645970A (en) * | 2013-12-13 | 2014-03-19 | 华为技术有限公司 | Realizing method and device for de-weighting increments among multiple snapshots for remote copy |
CN104503865A (en) * | 2014-12-10 | 2015-04-08 | 杭州斯凯网络科技有限公司 | Method for rapidly restoring postgreSQL to any point in time |
CN105045541A (en) * | 2015-09-11 | 2015-11-11 | 浪潮(北京)电子信息产业有限公司 | Increment snapshot method and apparatus |
CN105373448A (en) * | 2015-10-27 | 2016-03-02 | 北京百度网讯科技有限公司 | Method and system for recovering failure data in database |
CN106777219A (en) * | 2016-12-23 | 2017-05-31 | 北京亚细亚智业科技有限公司 | For the data processing method and device of Visualized data centre |
US20170279933A1 (en) * | 2016-03-25 | 2017-09-28 | Amazon Technologies, Inc. | Compression dictionary snapshot system and method |
-
2017
- 2017-11-21 CN CN201711162675.6A patent/CN107908755A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103034566A (en) * | 2012-12-06 | 2013-04-10 | 华为技术有限公司 | Method and device for restoring virtual machine |
CN103019888A (en) * | 2012-12-21 | 2013-04-03 | 华为技术有限公司 | Backup method and device |
CN103645968A (en) * | 2013-12-02 | 2014-03-19 | 北京奇虎科技有限公司 | Browser status restoration method and device |
CN103645970A (en) * | 2013-12-13 | 2014-03-19 | 华为技术有限公司 | Realizing method and device for de-weighting increments among multiple snapshots for remote copy |
CN104503865A (en) * | 2014-12-10 | 2015-04-08 | 杭州斯凯网络科技有限公司 | Method for rapidly restoring postgreSQL to any point in time |
CN105045541A (en) * | 2015-09-11 | 2015-11-11 | 浪潮(北京)电子信息产业有限公司 | Increment snapshot method and apparatus |
CN105373448A (en) * | 2015-10-27 | 2016-03-02 | 北京百度网讯科技有限公司 | Method and system for recovering failure data in database |
US20170279933A1 (en) * | 2016-03-25 | 2017-09-28 | Amazon Technologies, Inc. | Compression dictionary snapshot system and method |
CN106777219A (en) * | 2016-12-23 | 2017-05-31 | 北京亚细亚智业科技有限公司 | For the data processing method and device of Visualized data centre |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109189546A (en) * | 2018-07-11 | 2019-01-11 | 新华三云计算技术有限公司 | A kind of production method and device of the online snapshot of virtual machine |
CN109189546B (en) * | 2018-07-11 | 2021-04-06 | 新华三云计算技术有限公司 | Method and device for making online snapshot of virtual machine |
WO2022222602A1 (en) * | 2021-04-23 | 2022-10-27 | International Business Machines Corporation | Vm file management using file-level snapshots |
GB2620540A (en) * | 2021-04-23 | 2024-01-10 | Ibm | VM file management using file-level snapshots |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104866497B (en) | The metadata updates method, apparatus of distributed file system column storage, host | |
US10310904B2 (en) | Distributed technique for allocating long-lived jobs among worker processes | |
CN104714858A (en) | Data backup method, data recovery method and device | |
CN106021016A (en) | Virtual point in time access between snapshots | |
CN106682110B (en) | Image file storage and management system and method based on Hash grid index | |
WO2023082537A1 (en) | Network operating system design method based on mimetic database | |
CN106844682A (en) | Method for interchanging data, apparatus and system | |
CN105930479A (en) | Data skew processing method and apparatus | |
CN110347651A (en) | Method of data synchronization, device, equipment and storage medium based on cloud storage | |
CN105677736A (en) | Method and apparatus for increasing and deleting server nodes | |
US9619322B2 (en) | Erasure-coding extents in an append-only storage system | |
CN108491163A (en) | A kind of big data processing method, device and storage medium | |
CN103942269B (en) | The method and apparatus operated to file system | |
CN106407355A (en) | Data storage method and device | |
CN106997392A (en) | Processing method, device and the read method and device of Docker mirror cache information | |
CN105868216B (en) | A kind of method, apparatus and equipment for realizing the expired operation of object | |
CN105512325B (en) | Update, deletion and the method for building up and device of multi-edition data index | |
CN107908755A (en) | A kind of snapshot document processing method and processing device | |
CN106155838A (en) | A kind of database back-up data restoration methods and device | |
KR101575639B1 (en) | Tile image update system for map service and method thereof | |
CN107368545A (en) | A kind of De-weight method and device based on MerkleTree deformation algorithms | |
CN107992354A (en) | For reducing the method and device of memory load | |
Mays et al. | A persistent store for large shared knowledge bases | |
CN110020272A (en) | Caching method, device and computer storage medium | |
CN106776018A (en) | Host node for distributed system and method for parallel processing and equipment from node |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180413 |
|
RJ01 | Rejection of invention patent application after publication |