CN110188005B - Host creating method, data backup method, device, electronic equipment and storage medium - Google Patents

Host creating method, data backup method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110188005B
CN110188005B CN201910473217.7A CN201910473217A CN110188005B CN 110188005 B CN110188005 B CN 110188005B CN 201910473217 A CN201910473217 A CN 201910473217A CN 110188005 B CN110188005 B CN 110188005B
Authority
CN
China
Prior art keywords
host
mirror image
backed
generation
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910473217.7A
Other languages
Chinese (zh)
Other versions
CN110188005A (en
Inventor
葛淼龙
樊超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201910473217.7A priority Critical patent/CN110188005B/en
Publication of CN110188005A publication Critical patent/CN110188005A/en
Application granted granted Critical
Publication of CN110188005B publication Critical patent/CN110188005B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments

Abstract

The embodiment of the application provides a method and a device for creating a host and backing up data, electronic equipment and a storage medium, and a second-generation mirror image of a first host is obtained by combining a basic mirror image and a light snapshot of the first host, wherein the basic mirror image of the first host is a mirror image formed by operating system data of the first host, the light snapshot of the first host is a snapshot obtained by backing up other data except the operating system data in the first host, and the data of the first host is represented by the basic mirror image of the first host and the light snapshot of the first host; creating a second host according to the second generation mirror image of the first host; wherein, the storage positions of the system disk blocks of the first host and the second host are different. According to the second generation mirror image of the first host, the second host is established, the data and the working state of the first host can be quickly recovered through the second host, and the data recovery among different storage hosts is realized.

Description

Host creating method, data backup method, device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for creating a host and backing up data, an electronic device, and a storage medium.
Background
With the rapid development of internet technology, network services are continuously developing towards complexity and depth. Providers of internet services need to provide more complex and rich services, and accordingly, service systems of the service providers are getting larger and larger.
As the number of service hosts in a service system increases, the number of down or abnormal hosts also increases, the abnormal or down hosts can seriously affect the business requirements, and sometimes the business needs can be moved from one host to another, so that it is desirable to be able to quickly recover the data of a specific host.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for creating a host and backing up data, an electronic device, and a storage medium, so as to achieve fast recovery of data of a specified host. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a host creation method, where the method includes:
the method comprises the steps of obtaining a second-generation mirror image of a first host, wherein the second-generation mirror image of the first host is obtained by combining a basic mirror image and a light snapshot of the first host, the basic mirror image of the first host is a mirror image formed by operating system data of the first host, the light snapshot of the first host is a snapshot obtained by backing up other data except the operating system data in the first host, and the data of the first host is represented by the basic mirror image of the first host and the light snapshot of the first host;
creating a second host according to the second generation mirror image of the first host;
wherein the system disk block storage locations of the first host and the second host are different.
Optionally, the first host is a local host, and the second host is an elastic block storage EBS host;
alternatively, the first and second electrodes may be,
the first host is an EBS host, and the second host is a local host.
Optionally, the acquiring the second-generation image of the first host includes:
acquiring a pre-received second-generation mirror image of the first host;
alternatively, the first and second electrodes may be,
acquiring a pre-stored basic mirror image of the first host and a pre-stored flash of the first host;
and combining the basic mirror image and the flash illumination of the first host to obtain a second generation mirror image of the first host.
Optionally, the creating a second host according to the second generation image of the first host includes:
and importing the second-generation image of the first host into a predetermined server or a predetermined server cluster, so that the predetermined server or the predetermined server cluster loads the second-generation image of the first host to create a second host.
Optionally, the method further includes:
acquiring a second-generation mirror image of a third host, wherein the second-generation mirror image of the third host is obtained by combining a basic mirror image and a light snapshot of the third host, the basic mirror image of the third host is a mirror image formed by operating system data of the third host, the light snapshot of the third host is a snapshot obtained by backing up other data in the third host except the operating system data, and the data of the third host is represented by the basic mirror image of the third host and the light snapshot of the third host;
creating a fourth host according to the second generation mirror image of the third host;
wherein the system disk block storage locations of the third host and the fourth host are the same.
Optionally, the method further includes:
acquiring a light snapshot of a fifth host;
and restoring the running state of the fifth host at the moment of creating the light snapshot by using a sixth host according to the light snapshot of the fifth host, wherein the operating systems of the fifth host and the sixth host are the same, and the storage positions of the system disk blocks of the fifth host and the sixth host are the same.
Optionally, the fifth host and the sixth host are both local hosts, or the fifth host and the sixth host are both EBS hosts.
In a second aspect, an embodiment of the present application provides a data backup method, where the method includes:
backing up other data except the operating system data of the host to be backed up in the host to be backed up to obtain a light snapshot of the host to be backed up, wherein the data of the host to be backed up is represented by a basic mirror image of the host to be backed up and the light snapshot of the host to be backed up together, and the basic mirror image of the host to be backed up is a mirror image formed by the operating system data of the host to be backed up;
merging the basic mirror image and the flash image of the host to be backed up to obtain a second-generation mirror image of the host to be backed up;
and storing the light snapshot of the host to be backed up and the second generation mirror image of the host to be backed up.
Optionally, the storing the light snapshot of the host to be backed up and the second-generation image of the host to be backed up includes:
and sending the light snapshot of the host to be backed up and the second-generation mirror image of the host to be backed up to a mirror image server so that the mirror image server stores the light snapshot of the host to be backed up and the second-generation mirror image of the host to be backed up.
Optionally, the host to be backed up is a local host or an EBS host.
In a third aspect, an embodiment of the present application provides a host creation apparatus, where the apparatus includes:
the second-generation mirror image acquisition module is used for acquiring a second-generation mirror image of a first host, wherein the second-generation mirror image of the first host is obtained by combining a basic mirror image and a light snapshot of the first host, the basic mirror image of the first host is a mirror image formed by operating system data of the first host, the light snapshot of the first host is a snapshot obtained by backing up other data in the first host except the operating system data, and the data of the first host is represented by the basic mirror image of the first host and the light snapshot of the first host;
the host creating module is used for creating a second host according to the second generation mirror image of the first host; wherein the system disk block storage locations of the first host and the second host are different.
Optionally, the first host is a local host, and the second host is an elastic block storage EBS host;
alternatively, the first and second electrodes may be,
the first host is an EBS host, and the second host is a local host.
Optionally, the second generation image obtaining module is specifically configured to:
acquiring a pre-received second-generation mirror image of the first host;
alternatively, the first and second electrodes may be,
acquiring a pre-stored basic mirror image of the first host and a pre-stored flash of the first host; and combining the basic mirror image and the flash illumination of the first host to obtain a second generation mirror image of the first host.
Optionally, the host creating module is specifically configured to:
and importing the second-generation image of the first host into a predetermined server or a predetermined server cluster, so that the predetermined server or the predetermined server cluster loads the second-generation image of the first host to create a second host.
Optionally, the second generation image obtaining module is further configured to: acquiring a second-generation mirror image of a third host, wherein the second-generation mirror image of the third host is obtained by combining a basic mirror image and a light snapshot of the third host, the basic mirror image of the third host is a mirror image formed by operating system data of the third host, the light snapshot of the third host is a snapshot obtained by backing up other data in the third host except the operating system data, and the data of the third host is represented by the basic mirror image of the third host and the light snapshot of the third host;
the host establishing module is also used for establishing a fourth host according to the second generation mirror image of the third host; wherein the system disk block storage locations of the third host and the fourth host are the same.
Optionally, the apparatus further comprises:
the light snapshot obtaining module is used for obtaining a light snapshot of the fifth host;
and the running state restoration module is used for restoring the running state of the fifth host at the moment of creating the light snapshot by using a sixth host according to the light snapshot of the fifth host, wherein the operating systems of the fifth host and the sixth host are the same, and the storage positions of the system disk blocks of the fifth host and the sixth host are the same.
Optionally, the fifth host and the sixth host are both local hosts, or the fifth host and the sixth host are both EBS hosts.
In a fourth aspect, an embodiment of the present application provides a data backup apparatus, where the apparatus includes:
the system comprises a light snapshot generating module, a light snapshot generating module and a backup module, wherein the light snapshot generating module is used for backing up other data in a host to be backed up except operating system data of the host to be backed up to obtain a light snapshot of the host to be backed up, the data of the host to be backed up is represented by a basic mirror image of the host to be backed up and the light snapshot of the host to be backed up together, and the basic mirror image of the host to be backed up is a mirror image formed by the operating system data of the host to be backed up;
the second-generation mirror image generation module is used for merging the basic mirror image and the flash of the host to be backed up to obtain a second-generation mirror image of the host to be backed up;
and the mirror image storage module is used for storing the light snapshot of the host to be backed up and the second-generation mirror image of the host to be backed up.
Optionally, the mirror image storage module is specifically configured to:
and sending the light snapshot of the host to be backed up and the second-generation mirror image of the host to be backed up to a mirror image server so that the mirror image server stores the light snapshot of the host to be backed up and the second-generation mirror image of the host to be backed up.
Optionally, the host to be backed up is a local host or an EBS host.
In a fifth aspect, an embodiment of the present application provides an electronic device, which includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the host creation method according to any one of the first aspect described above when executing the program stored in the memory.
In a sixth aspect, an embodiment of the present application provides an electronic device, which includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the data backup method according to any one of the second aspects when executing the program stored in the memory.
In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program is executed by a processor to implement the host creation method according to any one of the first aspect.
In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the data backup method according to any one of the second aspects.
The method, the device, the electronic equipment and the storage medium for host creation and data backup provided by the embodiment of the application acquire a second-generation mirror image of a first host, wherein the second-generation mirror image of the first host is obtained by combining a basic mirror image and a light snapshot of the first host, the basic mirror image of the first host is a mirror image formed by operating system data of the first host, the light snapshot of the first host is a snapshot obtained by backing up other data except the operating system data in the first host, and the data of the first host is represented by the basic mirror image of the first host and the light snapshot of the first host; creating a second host according to the second generation mirror image of the first host; wherein, the storage positions of the system disk blocks of the first host and the second host are different. According to the second generation mirror image of the first host, the second host is established, the data and the working state of the first host can be quickly recovered through the second host, and the data recovery among different storage hosts is realized. Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a first flowchart illustrating a host creation method according to an embodiment of the present application;
fig. 2 is a second flowchart illustrating a host creation method according to an embodiment of the present application;
fig. 3 is a first flowchart illustrating a data backup method according to an embodiment of the present application;
fig. 4 is a second flowchart of a data backup method according to an embodiment of the present application;
FIG. 5 is a diagram illustrating a host creation apparatus according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a data backup device according to an embodiment of the present application;
fig. 7 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The SNIA (Storage Networking Industry Association) definition for Snapshot is: with respect to a fully available copy of a given data set, the copy includes an image of the corresponding data at some point in time (the point in time at which the copy begins). The snapshot may be a copy of the data it represents or may be a replica of the data.
The snapshot mainly has the function of online data backup and recovery. When the device has application failure or file damage, the data can be quickly recovered, and the data can be recovered to the state of an available time point. The snapshot has another function of providing another data access channel for the storage user, so that when the original data is subjected to online application processing, the user can access the snapshot data and can also utilize the snapshot to perform work such as testing. All storage systems, whether high, medium, and low, are applied to online systems, and then snapshot becomes an indispensable function.
Generally, the snapshot generation is performed through three processing stages, namely initialization, data copying and termination, wherein the data copying is the technical core of the snapshot. Data copying may be achieved by COW (Copy On Write), or ROW (Redirect On Write).
COW snapshot needs to consume storage space to build a snapshot volume. When a snapshot is created for a data volume, the reserved space is used to store old data that is updated with the changed data. The COW snapshot only creates pointer information (metadata) describing the location of the source data block during initialization, rather than copying the source data block completely. Therefore, the initialization process can be completed almost instantaneously, and the influence on the system is small. The COW snapshot keeps track of write operations and data block changes to the data volume. When a certain data block is changed, before the old data is overwritten, the old data of the block is firstly copied to the reserved snapshot volume, and the step is only carried out when the first write operation request occurs at the position of the corresponding data block of the data volume. This process ensures that the data that is snapshotted out is kept completely consistent with the precise point in time at which the snapshot was initiated.
If the snapshot data at a certain time point needs to be accessed, directly reading the unchanged blocks from the data volume; blocks that have changed and copied are then read from the snapshot space. From the moment a snapshot is created, each snapshot keeps track of metadata information that describes block changes.
Another technique in the ROW snapshot implementation technique is I/O redirection (I/O Redirect). I.e. redirect read and write operations to another memory space. During the generation of a snapshot, all write operations are redirected to another medium, and if the read operation requires read redirection, the read redirection must be performed on the position having write redirection according to whether the read position has write redirection since the last snapshot, otherwise, no read redirection is required. When a snapshot is to be created, copying all data in the source medium corresponding to the redirected write data since the last snapshot to generate the snapshot at the time point, and then writing the redirected write data back to the corresponding position in the source medium, thereby completing a snapshot generation process.
From the ROW snapshot process, the key performance impact is four I/O (Input/Output) operations at snapshot generation time: once reading the source medium, once writing the snapshot data, once reading the snapshot medium, once writing the source medium, and the other is the calculation work of redirection. Although this mode seems to have more I/O operations when the snapshot is generated at last, considering that this operation occurs only when the snapshot is generated, particularly, the I/O operations can be sorted when the snapshot is generated, so that reading and writing of the medium can be better optimized, and therefore the influence is small. The computing operation for redirection does not become a performance bottleneck for the current computing power. Such a snapshot implementation has little impact during non-snapshot execution. This approach is therefore well suited to Write-Intensive type storage systems.
In order to achieve fast recovery of data of a specified host, an embodiment of the present application provides a host creation method, which, with reference to fig. 1, includes:
s101, a second-generation mirror image of a first host is obtained, wherein the second-generation mirror image of the first host is obtained by combining a basic mirror image and a light snapshot of the first host, the basic mirror image of the first host is a mirror image formed by operating system data of the first host, the light snapshot of the first host is a snapshot obtained by backing up other data except the operating system data in the first host, and the data of the first host is represented by the basic mirror image of the first host and the light snapshot of the first host.
The host creation method in the embodiment of the present application may be implemented by an electronic device, and specifically, the electronic device may be a host server or a mirror management server. The host in the embodiment of the application may be a virtual machine, and the virtual machine needs to run depending on hardware resources on a host server.
The first host is any virtual machine, the second generation mirror image of the first host is obtained by combining the basic mirror image of the first host and the flash illumination of the first host, and the second generation mirror image of the first host comprises all data at the flash illumination creation moment of the first host. The base image of the first host is pre-established and includes operating system data of the first host. The light snapshot of the first host is generated in the running process of the first host and comprises other data except the operating system data in the first host during the creation of the light snapshot.
S102, creating a second host according to the second generation mirror image of the first host; wherein, the storage positions of the system disk blocks of the first host and the second host are different.
The first host and the second host are different hosts. The disk block storage positions of the first host and the second host are different, so that the light snapshot cannot be used universally, and therefore the second host needs to be created by using a second generation image of the first host.
For example, after a virtual machine (first host) in the local host is abnormal, the data of the abnormal virtual machine needs to be recovered in the EBS host server. One of the standby/load allowed EBS host servers is selected. And the mirror image management server sends the second generation mirror image of the first host to the selected EBS host server. The EBS host server acquires the second-generation mirror image of the first host, and generates a virtual machine (a second host) with the same data as the first host by loading the second-generation mirror image of the first host, so that the data in the abnormal virtual machine is restored to complete the migration of the service of the abnormal virtual machine, and the recovery of the data of the local host by using the EBS host is realized.
In the embodiment of the application, the second host is created according to the second generation mirror image of the first host, the data and the working state of the first host can be quickly recovered through the second host, and data recovery among different storage hosts is realized.
In a possible embodiment, the first host is a local host, and the second host is an elastic block storage EBS host; or, the first host is an EBS host, and the second host is a local host.
The storage locations of the disk blocks of the first host and the second host are different, for example, the first host is a local host, and the second host is an EBS (Elastic Block Store) host; or the first host is an EBS host and the second host is a local host.
In a possible implementation, the obtaining the second generation image of the first host includes:
acquiring a second-generation image of the first host received in advance; or, acquiring a pre-stored basic image of the first host and the soft flash of the first host, and combining the basic image and the soft flash of the first host to obtain a second-generation image of the first host.
The second-generation mirror image of the first host is directly obtained from the electronic equipment, and the basic mirror image and the flash image of the first host can also be obtained and combined to obtain the second-generation mirror image of the first host.
For example, when both the image and the snapshot are managed by an image server, such as a gland server, only the base image, the snapshot and the second generation image of the first host may be stored in the gland server. Of course, in order to save storage space, only the base image and the light snapshot of the first host may be stored, and the second generation image is synthesized when in use.
When the electronic device implementing the host creation method is a host server, the first host can be directly created according to the second-generation image of the first host after the host server obtains the second-generation image of the first host. When the electronic device implementing the host creation method is a mirror image server, creating a second host according to the second generation mirror image of the first host includes:
and importing the second-generation image of the first host into a preset server or a preset server cluster, so that the preset server or the preset server cluster loads the second-generation image of the first host to create a second host.
The light snapshot of the first host and the base image may be stored in an image server, such as a liance server. When the electronic device for realizing the host creation method is a mirror server, the mirror server sends the second-generation mirror image of the first host to the specified host server or host server cluster, so that the specified host server or host server cluster creates a second host by using the second-generation mirror image of the first host after acquiring the second-generation mirror image of the first host.
In a possible implementation manner, the host creation method according to the embodiment of the present application further includes:
step one, acquiring a second-generation mirror image of a third host, wherein the second-generation mirror image of the third host is obtained by combining a basic mirror image and a light snapshot of the third host, the basic mirror image of the third host is a mirror image formed by operating system data of the third host, the light snapshot of the third host is a snapshot obtained by backing up other data in the third host except the operating system data, and the data of the third host is represented by the basic mirror image of the third host and the light snapshot of the third host;
step two, according to the second generation mirror image of the third host, a fourth host is established; and the storage positions of the system disk blocks of the third host and the fourth host are the same.
The system disk block storage locations of the third host and the fourth host are the same, for example, the third host and the fourth host are both local hosts, or the third host and the fourth host are both EBS hosts. The third host and the fourth host may be the same host or different hosts. And the host computer in the storage position of the disk block of the same system can also complete data recovery through the second generation image.
In order to increase the restore speed of the specified host data when the host used for restoring the specified host data is the same as the system disk block storage location of the specified host, in a possible embodiment, referring to fig. 2, the method further includes:
s201, acquiring a light snapshot of a fifth host;
and S202, restoring, by using a sixth host, an operating state of the fifth host at the moment of creating the light snapshot according to the light snapshot of the fifth host, where an operating system of the fifth host is the same as that of the sixth host, and storage locations of system disk blocks of the fifth host and the sixth host are the same.
The fifth host and the sixth host may be the same host or different hosts. Because the operating systems of the fifth host and the sixth host are the same, and the storage positions of the system disk blocks of the fifth host and the sixth host are the same, the fifth host and the sixth host can share the light snapshot, and the sixth host can directly utilize the light snapshot of the fifth host to realize the restoration of the data of the fifth host, thereby greatly increasing the speed of the data restoration of the fifth host.
Specifically, because the storage locations of the system disk blocks of the fifth host and the sixth host are the same, the fifth host and the sixth host may share the same base operating system, that is, the fifth host and the sixth host have a common system disk, and in addition, the fifth host and the sixth host have independent data disks respectively.
Optionally, the fifth host and the sixth host may be both local hosts and EBS hosts, as long as the storage locations of the system disk blocks are the same.
An embodiment of the present application further provides a data backup method, referring to fig. 3, where the method includes:
and S301, backing up other data in the host to be backed up except the operating system data of the host to be backed up to obtain the light snapshot of the host to be backed up, wherein the data of the host to be backed up is represented by a basic mirror image of the host to be backed up and the light snapshot of the host to be backed up together, and the basic mirror image of the host to be backed up is a mirror image formed by the operating system data of the host to be backed up.
The data backup method of the embodiment of the application can be realized through the host server. The host to be backed up may be a local host or an EBS host. The host server obtains other data in the host to be backed up except the operating system data of the host to be backed up for backup, and obtains the light and fast illumination of the host to be backed up.
In a specific implementation manner, the operating system data of the host to be backed up is stored in the system disk, and other data except the operating system data is stored in the data disk, and the host server may directly back up the data in the data disk of the host to be backed up, so as to obtain the light snapshot of the host to be backed up. The data of the host to be backed up is represented by the basic mirror image of the host to be backed up and the flash of the host to be backed up together, the basic mirror image of the host to be backed up is a mirror image formed by the operating system data of the host to be backed up, and the basic mirror image of the host to be backed up can be generated in advance, for example, can be a starting mirror image of the host to be backed up; the basic mirror image of the host to be backed up can also be generated in real time according to the system disk of the host to be backed up.
And S302, merging the basic mirror image and the flash image of the host to be backed up to obtain a second-generation mirror image of the host to be backed up.
The host server merges the basic mirror image of the host to be backed up and the flash of the host to be backed up to obtain a second-generation mirror image of the host to be backed up.
And S303, storing the light snapshot of the host to be backed up and the second-generation mirror image of the host to be backed up.
The host server stores the light snapshot of the host to be backed up and the second generation mirror image of the host to be backed up.
The second-generation mirror image and the light snapshot of the host to be backed up, which are generated in the embodiment of the application, can also be applied to the host creation method.
Generally, in view of the limitation of the storage resources of the host server, and in order to prevent the data loss caused by the down of the host server, the light snapshot of the host to be backed up and the second generation image of the host to be backed up are not stored locally in the host server. In a possible embodiment, referring to fig. 4, the storing the light snapshot of the host to be backed up and the secondary image of the host to be backed up includes:
and sending the light snapshot of the host to be backed up and the second-generation mirror image of the host to be backed up to a mirror image server so that the mirror image server stores the light snapshot of the host to be backed up and the second-generation mirror image of the host to be backed up.
The host server sends the light snapshot of the host to be backed up and the second-generation mirror image of the host to be backed up to the mirror image server, so that the storage pressure of the host server is reduced, the risk of data loss is reduced, and the management of the light snapshot and the second-generation mirror image is facilitated.
An embodiment of the present application provides a host creation apparatus, and referring to fig. 5, the apparatus includes:
a second-generation mirror image obtaining module 501, configured to obtain a second-generation mirror image of a first host, where the second-generation mirror image of the first host is obtained by combining a basic mirror image and a light snapshot of the first host, the basic mirror image of the first host is a mirror image formed by operating system data of the first host, the light snapshot of the first host is a snapshot obtained by backing up other data in the first host except the operating system data, and the data of the first host is represented by the basic mirror image of the first host and the light snapshot of the first host;
a host creating module 502, configured to create a second host according to the second generation image of the first host; wherein the system disk block storage locations of the first host and the second host are different.
Optionally, the first host is a local host, and the second host is an elastic block storage EBS host;
alternatively, the first and second electrodes may be,
the first host is an EBS host, and the second host is a local host.
Optionally, the second generation image obtaining module 501 is specifically configured to:
acquiring a pre-received second-generation mirror image of the first host;
alternatively, the first and second electrodes may be,
acquiring a pre-stored basic mirror image of the first host and a pre-stored flash of the first host; and combining the basic mirror image and the flash illumination of the first host to obtain a second generation mirror image of the first host.
Optionally, the host creating module 502 is specifically configured to:
and importing the second-generation image of the first host into a predetermined server or a predetermined server cluster, so that the predetermined server or the predetermined server cluster loads the second-generation image of the first host to create a second host.
Optionally, the second generation image obtaining module 501 is further configured to: acquiring a second-generation mirror image of a third host, wherein the second-generation mirror image of the third host is obtained by combining a basic mirror image and a light snapshot of the third host, the basic mirror image of the third host is a mirror image formed by operating system data of the third host, the light snapshot of the third host is a snapshot obtained by backing up other data in the third host except the operating system data, and the data of the third host is represented by the basic mirror image of the third host and the light snapshot of the third host;
the host creating module 502 is further configured to create a fourth host according to the second generation image of the third host; wherein the system disk block storage locations of the third host and the fourth host are the same.
Optionally, the apparatus further comprises:
the light snapshot obtaining module is used for obtaining a light snapshot of the fifth host;
and the running state restoration module is used for restoring the running state of the fifth host at the moment of creating the light snapshot by using a sixth host according to the light snapshot of the fifth host, wherein the operating systems of the fifth host and the sixth host are the same, and the storage positions of the system disk blocks of the fifth host and the sixth host are the same.
Optionally, the fifth host and the sixth host are both local hosts, or the fifth host and the sixth host are both EBS hosts.
An embodiment of the present application provides a data backup apparatus, referring to fig. 6, the apparatus includes:
the light snapshot generating module 601 is configured to backup other data in the host to be backed up, except for the operating system data of the host to be backed up, to obtain a light snapshot of the host to be backed up, where the data of the host to be backed up is represented by a basic mirror image of the host to be backed up and the light snapshot of the host to be backed up, and the basic mirror image of the host to be backed up is a mirror image formed by the operating system data of the host to be backed up;
a second-generation mirror image generation module 602, configured to merge the basic mirror image and the snapshot of the host to be backed up to obtain a second-generation mirror image of the host to be backed up;
the mirror image storage module 603 is configured to store the light snapshot of the host to be backed up and the second-generation mirror image of the host to be backed up.
Optionally, the mirror image storage module 603 is specifically configured to:
and sending the light snapshot of the host to be backed up and the second-generation mirror image of the host to be backed up to a mirror image server so that the mirror image server stores the light snapshot of the host to be backed up and the second-generation mirror image of the host to be backed up.
Optionally, the host to be backed up is a local host or an EBS host.
The embodiment of the present application further provides an electronic device, as shown in fig. 7, which includes a processor 701, a communication interface 702, a memory 703 and a communication bus 704, where the processor 701, the communication interface 702, and the memory 703 complete mutual communication through the communication bus 704,
a memory 703 for storing a computer program;
the processor 701 is configured to implement the following steps when executing the program stored in the memory 703:
the method comprises the steps of obtaining a second-generation mirror image of a first host, wherein the second-generation mirror image of the first host is obtained by combining a basic mirror image and a light snapshot of the first host, the basic mirror image of the first host is a mirror image formed by operating system data of the first host, the light snapshot of the first host is a snapshot obtained by backing up other data except the operating system data in the first host, and the data of the first host is represented by the basic mirror image of the first host and the light snapshot of the first host;
creating a second host according to the second generation mirror image of the first host; wherein the system disk block storage locations of the first host and the second host are different.
Optionally, the processor 701 is configured to implement any one of the above-described host creation methods when executing the program stored in the memory 703.
The embodiment of the application also provides an electronic device, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus,
a memory for storing a computer program;
the processor is used for realizing the following steps when executing the program stored in the memory:
backing up other data except the operating system data of the host to be backed up in the host to be backed up to obtain a light snapshot of the host to be backed up, wherein the data of the host to be backed up is represented by a basic mirror image of the host to be backed up and the light snapshot of the host to be backed up together, and the basic mirror image of the host to be backed up is a mirror image formed by the operating system data of the host to be backed up;
merging the basic mirror image and the flash image of the host to be backed up to obtain a second-generation mirror image of the host to be backed up;
and storing the light snapshot of the host to be backed up and the second generation mirror image of the host to be backed up.
Optionally, the processor, when being configured to execute the program stored in the memory, may further implement any of the data backup methods described above.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the following steps:
the method comprises the steps of obtaining a second-generation mirror image of a first host, wherein the second-generation mirror image of the first host is obtained by combining a basic mirror image and a light snapshot of the first host, the basic mirror image of the first host is a mirror image formed by operating system data of the first host, the light snapshot of the first host is a snapshot obtained by backing up other data except the operating system data in the first host, and the data of the first host is represented by the basic mirror image of the first host and the light snapshot of the first host;
creating a second host according to the second generation mirror image of the first host; wherein the system disk block storage locations of the first host and the second host are different.
Optionally, the computer program may be executed by a processor to implement any of the host creation methods described above.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the following steps:
backing up other data except the operating system data of the host to be backed up in the host to be backed up to obtain a light snapshot of the host to be backed up, wherein the data of the host to be backed up is represented by a basic mirror image of the host to be backed up and the light snapshot of the host to be backed up together, and the basic mirror image of the host to be backed up is a mirror image formed by the operating system data of the host to be backed up;
merging the basic mirror image and the flash image of the host to be backed up to obtain a second-generation mirror image of the host to be backed up;
and storing the light snapshot of the host to be backed up and the second generation mirror image of the host to be backed up.
Optionally, the computer program may further implement any of the data backup methods when executed by a processor.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the electronic device, and the storage medium, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (22)

1. A host creation method, the method comprising:
the method comprises the steps of obtaining a second-generation mirror image of a first host, wherein the second-generation mirror image of the first host is obtained by combining a basic mirror image and a light snapshot of the first host, the basic mirror image of the first host is a mirror image formed by operating system data of the first host, the light snapshot of the first host is a snapshot obtained by backing up other data except the operating system data in the first host, and the data of the first host is represented by the basic mirror image of the first host and the light snapshot of the first host;
creating a second host according to the second generation mirror image of the first host; wherein the system disk block storage locations of the first host and the second host are different;
acquiring a light snapshot of a fifth host;
and restoring the running state of the fifth host at the moment of creating the light snapshot by using a sixth host according to the light snapshot of the fifth host, wherein the operating systems of the fifth host and the sixth host are the same, and the storage positions of the system disk blocks of the fifth host and the sixth host are the same.
2. The method of claim 1, wherein the first host is a local host and the second host is an Elastic Block Storage (EBS) host;
alternatively, the first and second electrodes may be,
the first host is an EBS host, and the second host is a local host.
3. The method of claim 1, wherein obtaining the second-generation image of the first host comprises:
acquiring a pre-received second-generation mirror image of the first host;
alternatively, the first and second electrodes may be,
acquiring a pre-stored basic mirror image of the first host and a pre-stored flash of the first host;
and combining the basic mirror image and the flash illumination of the first host to obtain a second generation mirror image of the first host.
4. The method of claim 1, wherein creating a second host from the second generation image of the first host comprises:
and importing the second-generation image of the first host into a predetermined server or a predetermined server cluster, so that the predetermined server or the predetermined server cluster loads the second-generation image of the first host to create a second host.
5. The method of claim 1, further comprising:
acquiring a second-generation mirror image of a third host, wherein the second-generation mirror image of the third host is obtained by combining a basic mirror image and a light snapshot of the third host, the basic mirror image of the third host is a mirror image formed by operating system data of the third host, the light snapshot of the third host is a snapshot obtained by backing up other data in the third host except the operating system data, and the data of the third host is represented by the basic mirror image of the third host and the light snapshot of the third host;
creating a fourth host according to the second generation mirror image of the third host;
wherein the system disk block storage locations of the third host and the fourth host are the same.
6. The method of claim 1, wherein the fifth host and the sixth host are both local hosts or the fifth host and the sixth host are both EBS hosts.
7. The method of claim 1, wherein prior to said obtaining the second-generation image of the first host, the method further comprises:
backing up data in a data disk of a host to be backed up to obtain a light snapshot of the host to be backed up, wherein the data of the host to be backed up is represented by a basic mirror image of the host to be backed up and the light snapshot of the host to be backed up together, the basic mirror image of the host to be backed up is a mirror image formed by operating system data of the host to be backed up, the operating system data of the host to be backed up is stored in the system disk, and other data except the operating system data is stored in the data disk;
merging the basic mirror image and the flash image of the host to be backed up to obtain a second-generation mirror image of the host to be backed up;
and storing the light snapshot of the host to be backed up and the second generation mirror image of the host to be backed up.
8. The method of claim 7, wherein the storing the light snapshot of the host to be backed up and the second generation image of the host to be backed up comprises:
and sending the light snapshot of the host to be backed up and the second-generation mirror image of the host to be backed up to a mirror image server so that the mirror image server stores the light snapshot of the host to be backed up and the second-generation mirror image of the host to be backed up.
9. The method according to claim 7 or 8, wherein the host to be backed up is a local host or an EBS host.
10. A host creation apparatus, the apparatus comprising:
the second-generation mirror image acquisition module is used for acquiring a second-generation mirror image of a first host, wherein the second-generation mirror image of the first host is obtained by combining a basic mirror image and a light snapshot of the first host, the basic mirror image of the first host is a mirror image formed by operating system data of the first host, the light snapshot of the first host is a snapshot obtained by backing up other data in the first host except the operating system data, and the data of the first host is represented by the basic mirror image of the first host and the light snapshot of the first host;
the host creating module is used for creating a second host according to the second generation mirror image of the first host; wherein the system disk block storage locations of the first host and the second host are different;
the light snapshot obtaining module is used for obtaining a light snapshot of the fifth host;
and the running state restoration module is used for restoring the running state of the fifth host at the moment of creating the light snapshot by using a sixth host according to the light snapshot of the fifth host, wherein the operating systems of the fifth host and the sixth host are the same, and the storage positions of the system disk blocks of the fifth host and the sixth host are the same.
11. The apparatus of claim 10, wherein the first host is a local host and the second host is an Elastic Block Storage (EBS) host;
alternatively, the first and second electrodes may be,
the first host is an EBS host, and the second host is a local host.
12. The apparatus of claim 10, wherein the second generation image acquisition module is specifically configured to:
acquiring a pre-received second-generation mirror image of the first host;
alternatively, the first and second electrodes may be,
acquiring a pre-stored basic mirror image of the first host and a pre-stored flash of the first host; and combining the basic mirror image and the flash illumination of the first host to obtain a second generation mirror image of the first host.
13. The apparatus of claim 10, wherein the host creation module is specifically configured to:
and importing the second-generation image of the first host into a predetermined server or a predetermined server cluster, so that the predetermined server or the predetermined server cluster loads the second-generation image of the first host to create a second host.
14. The apparatus of claim 10, wherein the second generation image obtaining module is further configured to: acquiring a second-generation mirror image of a third host, wherein the second-generation mirror image of the third host is obtained by combining a basic mirror image and a light snapshot of the third host, the basic mirror image of the third host is a mirror image formed by operating system data of the third host, the light snapshot of the third host is a snapshot obtained by backing up other data in the third host except the operating system data, and the data of the third host is represented by the basic mirror image of the third host and the light snapshot of the third host;
the host establishing module is also used for establishing a fourth host according to the second generation mirror image of the third host; wherein the system disk block storage locations of the third host and the fourth host are the same.
15. The apparatus of claim 10, wherein the fifth host and the sixth host are both local hosts or the fifth host and the sixth host are both EBS hosts.
16. The apparatus of claim 10, further comprising:
the system comprises a light snapshot generating module, a data storage module and a data storage module, wherein the light snapshot generating module is used for backing up data in a data disk of a host to be backed up before the second-generation mirror image of a first host is acquired, so as to obtain a light snapshot of the host to be backed up, the data of the host to be backed up is represented by a basic mirror image of the host to be backed up and the light snapshot of the host to be backed up, the basic mirror image of the host to be backed up is a mirror image formed by operating system data of the host to be backed up, the operating system data of the host to be backed up is stored in the system disk, and other data except the operating system data is stored in the data disk;
the second-generation mirror image generation module is used for merging the basic mirror image and the flash of the host to be backed up to obtain a second-generation mirror image of the host to be backed up;
and the mirror image storage module is used for storing the light snapshot of the host to be backed up and the second-generation mirror image of the host to be backed up.
17. The apparatus of claim 16, wherein the mirror storage module is specifically configured to:
and sending the light snapshot of the host to be backed up and the second-generation mirror image of the host to be backed up to a mirror image server so that the mirror image server stores the light snapshot of the host to be backed up and the second-generation mirror image of the host to be backed up.
18. The apparatus according to claim 16 or 17, wherein the host to be backed up is a local host or an EBS host.
19. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the host creation method according to any one of claims 1 to 6 when executing the program stored in the memory.
20. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor, when executing the program stored in the memory, implementing the method of any of claims 7-9.
21. A computer-readable storage medium, in which a computer program is stored, which, when executed by a processor, implements the host creation method of any one of claims 1 to 6.
22. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 7 to 9.
CN201910473217.7A 2019-05-31 2019-05-31 Host creating method, data backup method, device, electronic equipment and storage medium Active CN110188005B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910473217.7A CN110188005B (en) 2019-05-31 2019-05-31 Host creating method, data backup method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910473217.7A CN110188005B (en) 2019-05-31 2019-05-31 Host creating method, data backup method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110188005A CN110188005A (en) 2019-08-30
CN110188005B true CN110188005B (en) 2022-03-04

Family

ID=67719749

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910473217.7A Active CN110188005B (en) 2019-05-31 2019-05-31 Host creating method, data backup method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110188005B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446826A (en) * 2014-06-30 2016-03-30 国际商业机器公司 Virtual machine backup and recovery method and device
CN106445563A (en) * 2016-11-24 2017-02-22 合肥中科云巢科技有限公司 Operation system mirror image manufacturing method and device
CN107885580A (en) * 2017-11-22 2018-04-06 深信服科技股份有限公司 A kind of cloud moving method, device, equipment and storage medium
CN108572888A (en) * 2017-03-14 2018-09-25 阿里巴巴集团控股有限公司 Disk snapshot creation method and disk snapshot creating device
CN108763405A (en) * 2018-05-22 2018-11-06 深信服网络科技(深圳)有限公司 A kind of business datum moving method, device, system and readable storage medium storing program for executing

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104407931A (en) * 2014-10-28 2015-03-11 国云科技股份有限公司 Method for obtaining mirror image of damaged system disk of virtual machine
US20160125059A1 (en) * 2014-11-04 2016-05-05 Rubrik, Inc. Hybrid cloud data management system
CN105335253B (en) * 2015-10-28 2019-01-15 北京百度网讯科技有限公司 The method and apparatus for creating virtual machine system disk snapshot
CN107092538B (en) * 2017-03-14 2019-12-24 平安科技(深圳)有限公司 Virtual machine data backup method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446826A (en) * 2014-06-30 2016-03-30 国际商业机器公司 Virtual machine backup and recovery method and device
CN106445563A (en) * 2016-11-24 2017-02-22 合肥中科云巢科技有限公司 Operation system mirror image manufacturing method and device
CN108572888A (en) * 2017-03-14 2018-09-25 阿里巴巴集团控股有限公司 Disk snapshot creation method and disk snapshot creating device
CN107885580A (en) * 2017-11-22 2018-04-06 深信服科技股份有限公司 A kind of cloud moving method, device, equipment and storage medium
CN108763405A (en) * 2018-05-22 2018-11-06 深信服网络科技(深圳)有限公司 A kind of business datum moving method, device, system and readable storage medium storing program for executing

Also Published As

Publication number Publication date
CN110188005A (en) 2019-08-30

Similar Documents

Publication Publication Date Title
US10169167B2 (en) Reduced recovery time in disaster recovery/replication setup with multitier backend storage
US9959063B1 (en) Parallel migration of multiple consistency groups in a storage system
US10055148B1 (en) Storing application data as an enhanced copy
AU2012347883B2 (en) System and method for restoring application data
US9678680B1 (en) Forming a protection domain in a storage architecture
US9635109B2 (en) Enhancing reliability of a storage system by strategic replica placement and migration
US9760450B2 (en) Restoring a clone point-in-time copy
US20210326271A1 (en) Stale data recovery using virtual storage metadata
CN110188005B (en) Host creating method, data backup method, device, electronic equipment and storage medium
AU2021268828B2 (en) Secure data replication in distributed data storage environments
US10048890B1 (en) Synchronizing catalogs of virtual machine copies
CN109324931B (en) Method for realizing vmware mount recovery in data de-duplication system
US11675931B2 (en) Creating vendor-neutral data protection operations for vendors' application resources
US10884874B1 (en) Federated restore of availability group database replicas
CN112346913A (en) Data recovery method, device, equipment and storage medium
CN108733460B (en) Method and apparatus for maintaining sessions for network storage devices
CN111858158A (en) Data processing method and device and electronic equipment
US9886354B1 (en) Handling aborts of backup operations
US11593498B2 (en) Distribution of user specific data elements in a replication environment
US11526534B2 (en) Replicating data changes through distributed invalidation
US11755425B1 (en) Methods and systems for synchronous distributed data backup and metadata aggregation
US11372732B2 (en) Systems and methods for agentless and accelerated backup of a database
US11520668B2 (en) Vendor-neutral models of vendors' application resources
US10241698B2 (en) Preservation of a golden copy that stores consistent data during a recovery process in an asynchronous copy environment
US20200110819A1 (en) Low cost fast recovery index in storage class memory

Legal Events

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