CN117492920A - Control method, device, equipment and medium of cloud platform - Google Patents
Control method, device, equipment and medium of cloud platform Download PDFInfo
- Publication number
- CN117492920A CN117492920A CN202311460366.2A CN202311460366A CN117492920A CN 117492920 A CN117492920 A CN 117492920A CN 202311460366 A CN202311460366 A CN 202311460366A CN 117492920 A CN117492920 A CN 117492920A
- Authority
- CN
- China
- Prior art keywords
- partition
- data
- backup
- cloud platform
- file
- 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
- 238000000034 method Methods 0.000 title claims abstract description 94
- 238000005192 partition Methods 0.000 claims abstract description 476
- 238000012545 processing Methods 0.000 claims description 27
- 238000011084 recovery Methods 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 13
- 238000001514 detection method Methods 0.000 claims description 9
- 230000001172 regenerating effect Effects 0.000 claims 1
- 238000005516 engineering process Methods 0.000 description 10
- 238000012217 deletion Methods 0.000 description 5
- 230000037430 deletion Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000009434 installation Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Quality & Reliability (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域Technical field
本发明涉及云平台技术领域,特别是涉及一种云平台的控制方法、装置、设备及介质。The present invention relates to the technical field of cloud platforms, and in particular to a control method, device, equipment and medium for a cloud platform.
背景技术Background technique
云平台也就是云计算平台,它是基于硬件资源和软件资源,用来提供计算、网络和存储能力的服务平台。为了满足不同的应用需求以及实现更高效的云计算服务,需要对云平台系统进行升级。Cloud platform is also a cloud computing platform. It is a service platform based on hardware resources and software resources to provide computing, network and storage capabilities. In order to meet different application requirements and achieve more efficient cloud computing services, the cloud platform system needs to be upgraded.
通常情况下,部署一台云平台系统需要安装较多的软件包,由于云平台的软件包较多,在系统升级时就可能会对每个升级包进行更新。在升级过程中可能会出现升级失败的情况,但是,为了能够使用云平台继续提供服务,需要恢复到升级之前的环境,以继续利用之前的环境提供服务或者是在之前的云环境的基础上重新进行升级。在升级开始到升级失败的过程中改变了升级之前的环境,导致想要恢复到升级之前的环境是非常困难的。Normally, deploying a cloud platform system requires the installation of many software packages. Since the cloud platform has many software packages, each upgrade package may be updated during system upgrades. The upgrade may fail during the upgrade process. However, in order to use the cloud platform to continue to provide services, it is necessary to restore to the environment before the upgrade to continue to use the previous environment to provide services or to re-build based on the previous cloud environment. Make an upgrade. The environment before the upgrade is changed from the start of the upgrade to the failure of the upgrade, making it very difficult to restore the environment to the environment before the upgrade.
由此可见,提供一种云平台的控制方法,使得云平台在升级失败后能够恢复到升级之前的环境是本领域人员亟需解决的技术问题。It can be seen that providing a cloud platform control method so that the cloud platform can be restored to the environment before the upgrade after an upgrade failure is a technical problem that people in the field urgently need to solve.
发明内容Contents of the invention
本发明的目的是提供一种云平台的控制方法、装置、设备及介质,以解决在升级开始到升级失败的过程中改变了升级之前的环境,导致很难恢复到升级之前的环境的技术问题。The purpose of the present invention is to provide a control method, device, equipment and medium for a cloud platform to solve the technical problem that the environment before the upgrade is changed from the start of the upgrade to the failure of the upgrade, making it difficult to restore the environment before the upgrade. .
为解决上述技术问题,本发明提供一种云平台的控制方法,包括:In order to solve the above technical problems, the present invention provides a cloud platform control method, including:
在检测到云平台系统升级之前,获取所述云平台系统的各分区的初始数据;根据各所述分区的存储数据的类型对各所述分区的所述初始数据进行备份,并获取各所述分区的备份数据;Before detecting the upgrade of the cloud platform system, obtain the initial data of each partition of the cloud platform system; back up the initial data of each partition according to the type of storage data of each partition, and obtain the initial data of each partition. Partition backup data;
控制所述云平台系统进行升级并检测所述云平台系统的升级状态;Control the cloud platform system to upgrade and detect the upgrade status of the cloud platform system;
在检测到所述升级状态为升级失败的情况下,利用各所述分区的备份数据对对应的所述分区的当前数据进行恢复。When it is detected that the upgrade status is upgrade failure, the backup data of each partition is used to restore the current data of the corresponding partition.
一方面,在所述根据各所述分区的存储数据的类型对各所述分区的所述初始数据进行备份之前,还包括:On the one hand, before backing up the initial data of each partition according to the type of storage data of each partition, the method further includes:
获取所述云平台系统中用于记录所述云平台系统的所有的所述分区以及各所述分区下对应的挂载目录的文件;Obtain files in the cloud platform system used to record all the partitions of the cloud platform system and the corresponding mounting directories under each partition;
根据所述用于记录所述云平台系统的所有的所述分区以及各所述分区下对应的挂载目录的文件确定所述云平台系统的系统盘的分区信息;Determine the partition information of the system disk of the cloud platform system according to the file used to record all the partitions of the cloud platform system and the corresponding mounting directories under each partition;
根据所述分区信息确定各所述分区的所述存储数据的类型;其中,所述存储数据的类型至少包括存储引导数据的类型、存储用户数据的类型、存储存储时长小于预设值的数据的类型。The type of stored data in each partition is determined according to the partition information; wherein the type of stored data at least includes a type of stored boot data, a type of stored user data, and a type of stored data whose storage duration is less than a preset value. type.
另一方面,在所述根据各所述分区的存储数据的类型对各所述分区的所述初始数据进行备份之前,还包括:On the other hand, before backing up the initial data of each partition according to the type of storage data of each partition, the method further includes:
将所述云平台系统的所有所述分区按照预设的备份顺序进行排列;Arrange all partitions of the cloud platform system in a preset backup order;
所述根据各所述分区的存储数据的类型对各所述分区的所述初始数据进行备份包括:Backing up the initial data of each partition according to the type of storage data of each partition includes:
判断当前分区的所述存储数据的类型是否为所述存储引导数据的类型;其中,所述当前分区为所述云平台系统的所有所述分区中的任意一个分区;Determine whether the type of the stored data in the current partition is the type of the stored boot data; wherein the current partition is any partition among all the partitions of the cloud platform system;
若否,对所述当前分区的所述初始数据做快照处理,以对所述当前分区的所述初始数据进行备份;If not, perform snapshot processing on the initial data of the current partition to back up the initial data of the current partition;
自检测到存在所述分区做快照处理开始,获取完成备份的分区的数量,在检测到所述完成备份的分区的数量小于所有所述分区的数量的情况下,将所述当前分区的下一个所述分区作为新的所述当前分区,并返回所述判断当前分区的所述存储数据的类型是否为所述存储引导数据的类型的步骤;在检测到所述完成备份的分区的数量等于所有所述分区的数量的情况下,确定完成对所有所述分区的所述初始数据的备份;Starting from the detection of the existence of the partition for snapshot processing, the number of partitions that have been backed up is obtained. When it is detected that the number of partitions that have been backed up is less than the number of all the partitions, the next one of the current partition is The partition is regarded as the new current partition, and the step of judging whether the type of the stored data of the current partition is the type of the stored boot data is returned; when it is detected that the number of partitions that have completed backup is equal to all In the case of the number of partitions, it is determined that the backup of the initial data of all the partitions is completed;
若是,则确定所述当前分区为引导分区,并获取所述引导分区的所述初始数据;If so, determine that the current partition is a boot partition, and obtain the initial data of the boot partition;
获取所述云平台系统的根分区,并在所述根分区中创建备份目录;其中,所述备份目录中包含引导目录;Obtain the root partition of the cloud platform system and create a backup directory in the root partition; wherein the backup directory includes a boot directory;
将所述引导分区的所述初始数据备份至所述引导目录;Back up the initial data of the boot partition to the boot directory;
在检测完成将所述引导分区的所述初始数据备份至所述引导目录后,对所述根分区做快照处理,以对所述引导分区的所述初始数据进行备份;返回所述自检测到存在所述分区做快照处理开始,获取完成备份的分区的数量的步骤。After the detection is completed and the initial data of the boot partition is backed up to the boot directory, snapshot processing is performed on the root partition to back up the initial data of the boot partition; return to the self-detected There is a step of starting snapshot processing of the partition and obtaining the number of partitions that have been backed up.
另一方面,所述将所述云平台系统的所有所述分区按照预设的备份顺序进行排列包括:On the other hand, arranging all the partitions of the cloud platform system in a preset backup order includes:
获取所述云平台系统的所有所述分区中所述存储数据的类型为所述存储存储时长小于预设值的数据的类型对应的目标分区;Obtain the target partition corresponding to the type of the stored data in all the partitions of the cloud platform system that stores the data whose storage duration is less than a preset value;
获取所有所述分区中除所述目标分区外的其它分区;Obtain other partitions except the target partition among all the partitions;
将所述其它分区作为所述云平台系统的新的所有的所述分区;Treat the other partitions as all new partitions of the cloud platform system;
将新的所有的所述分区按照预设的备份顺序进行排列。Arrange all new partitions in the preset backup order.
另一方面,在对各所述分区的所述初始数据做快照处理之前,还包括:On the other hand, before performing snapshot processing on the initial data of each partition, it also includes:
生成包含各所述分区和对各所述分区创建的快照的对应关系的备份配置文件;其中,所述备份配置文件中记录有各所述分区的逻辑卷管理以及通用唯一识别码、以及各所述分区对应的所述快照的名称和通用唯一识别码;Generate a backup configuration file that contains the correspondence between each of the partitions and the snapshot created for each of the partitions; wherein the backup configuration file records the logical volume management and universal unique identification code of each of the partitions, as well as the The name and universal unique identification code of the snapshot corresponding to the partition;
将所述备份配置文件放置在所述根分区下的所述备份目录中;Place the backup configuration file in the backup directory under the root partition;
对应地,确定各所述分区的备份数据包括:Correspondingly, determining the backup data of each partition includes:
获取所述备份配置文件中的信息;Obtain the information in the backup configuration file;
将逻辑卷管理快照进行恢复以恢复各所述分区的所述备份数据。The logical volume management snapshot is restored to restore the backup data of each partition.
另一方面,所述分区为所述引导分区,利用所述引导分区的所述备份数据对所述引导分区的所述当前数据进行恢复包括:On the other hand, the partition is the boot partition, and using the backup data of the boot partition to restore the current data of the boot partition includes:
获取所述引导分区的所述备份数据对应的第一文件以及所述引导分区的所述当前数据对应的第二文件;Obtain the first file corresponding to the backup data of the boot partition and the second file corresponding to the current data of the boot partition;
将所述第一文件与所述第二文件进行比对;Compare the first file with the second file;
获取所述第二文件中文件名称与所述第一文件中文件名称相同的文件,以及所述第二文件中文件名称与所述第一文件中文件名称不相同的文件;Obtain the files in the second file whose file names are the same as the file names in the first file, and the files in the second file whose file names are different from the file names in the first file;
利用所述第一文件中文件名称与所述第二文件中文件名称相同的文件对应的所述备份数据覆盖所述第二文件中文件名称与所述第一文件中文件名称相同的文件,以及删除所述第二文件中文件名称与所述第一文件中文件名称不相同的文件;通过引导指令重新生成引导配置文件,以完成对所述引导分区的所述当前数据的恢复。using the backup data corresponding to the file in the first file with the same file name in the second file to overwrite the file in the second file with the same file name in the first file, and Delete the file in the second file whose file name is different from the file name in the first file; regenerate the boot configuration file through the boot instruction to complete the recovery of the current data of the boot partition.
另一方面,在所述利用各所述分区的备份数据对对应的所述分区的当前数据进行恢复之后,还包括:On the other hand, after using the backup data of each partition to restore the current data of the corresponding partition, it also includes:
利用恢复后的所述当前数据对所述云平台系统进行升级;Upgrading the cloud platform system using the recovered current data;
在检测到所述云平台系统升级成功后,获取所述备份目录下的所述备份配置文件;After detecting that the cloud platform system is successfully upgraded, obtain the backup configuration file in the backup directory;
根据所述备份配置文件中的所述分区信息和各所述分区对应的快照信息将各所述分区对应的所述快照信息进行删除;Delete the snapshot information corresponding to each partition according to the partition information in the backup configuration file and the snapshot information corresponding to each partition;
删除所述根分区下的所述备份目录。Delete the backup directory under the root partition.
为了解决上述技术问题,本发明还提供一种云平台的控制装置,包括:In order to solve the above technical problems, the present invention also provides a control device for a cloud platform, including:
获取及备份模块,用于在检测到云平台系统升级之前,获取所述云平台系统的各分区的初始数据;根据各所述分区的存储数据的类型对各所述分区的所述初始数据进行备份,并获取各所述分区的备份数据;The acquisition and backup module is used to obtain the initial data of each partition of the cloud platform system before detecting the upgrade of the cloud platform system; and perform the initial data of each partition according to the type of the storage data of each partition. Back up and obtain the backup data of each partition;
控制及检测模块,用于控制所述云平台系统进行升级并检测所述云平台系统的升级状态;A control and detection module, used to control the upgrade of the cloud platform system and detect the upgrade status of the cloud platform system;
恢复模块,用于在检测到所述升级状态为升级失败的情况下,利用各所述分区的备份数据对对应的所述分区的当前数据进行恢复。A recovery module, configured to use the backup data of each partition to restore the current data of the corresponding partition when it is detected that the upgrade status is upgrade failure.
为了解决上述技术问题,本发明还提供一种云平台的控制设备,包括:In order to solve the above technical problems, the present invention also provides a cloud platform control device, including:
存储器,用于存储计算机程序;Memory, used to store computer programs;
处理器,用于执行所述计算机程序时实现上述的云平台的控制方法的步骤。A processor, configured to implement the steps of the above cloud platform control method when executing the computer program.
为了解决上述技术问题,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述的云平台的控制方法的步骤。In order to solve the above technical problems, the present invention also provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned cloud platform control method are implemented. .
本发明所提供的云平台的控制方法,包括:在检测到云平台系统升级之前,获取云平台系统的各分区的初始数据;根据各分区的存储数据的类型对各分区的初始数据进行备份,并获取各分区的备份数据;检测云平台系统的升级状态;在检测到升级状态为升级失败的情况下,利用各分区的备份数据对对应的分区的当前数据进行恢复。The cloud platform control method provided by the present invention includes: before detecting an upgrade of the cloud platform system, obtaining the initial data of each partition of the cloud platform system; backing up the initial data of each partition according to the type of stored data in each partition, And obtain the backup data of each partition; detect the upgrade status of the cloud platform system; when it is detected that the upgrade status is upgrade failure, use the backup data of each partition to restore the current data of the corresponding partition.
本发明的有益效果在于,在云平台系统升级之前,对各分区的初始数据进行备份,当检测到云平台系统升级失败后,可以通过备份数据对云平台系统升级失败时所对应的环境进行恢复。由于备份数据是用过对初始数据进行备份得到,备份数据即代表了云平台系统升级前的环境,因此,通过备份数据实现了将升级失败的环境恢复到升级之前的环境;另外,相比于对所有分区采用相同的备份策略,本发明中依据各分区的存储数据的类型对各分区的初始数据进行备份,使得备份的方式更加符合各分区的数据特点,且一些备份方式可能并不适用于所有类型的存储数据,如对于引导分区是不能使用快照技术来进行备份,可见,本发明提供的根据分区的存储数据的类型确定的备份方式尽可能地保证了数据备份的成功率。The beneficial effect of the present invention is that before the cloud platform system is upgraded, the initial data of each partition is backed up. When it is detected that the cloud platform system upgrade fails, the environment corresponding to the cloud platform system upgrade failure can be restored through the backup data. . Since the backup data is obtained by backing up the initial data, the backup data represents the environment before the cloud platform system upgrade. Therefore, the backup data can restore the failed upgrade environment to the environment before the upgrade; in addition, compared with The same backup strategy is adopted for all partitions. In the present invention, the initial data of each partition is backed up according to the type of stored data in each partition, so that the backup method is more in line with the data characteristics of each partition, and some backup methods may not be suitable for All types of stored data, such as boot partitions, cannot be backed up using snapshot technology. It can be seen that the backup method provided by the present invention based on the type of stored data in the partition ensures the success rate of data backup as much as possible.
此外,由于用于记录云平台系统的所有的分区以及各分区下对应的挂载目录的文件中记录了云平台系统的所有的分区以及各分区下对应的挂载目录,因此,通过该文件可以快速、清楚地了解到云平台系统的分区信息。In addition, since the file used to record all partitions of the cloud platform system and the corresponding mounting directories under each partition records all the partitions of the cloud platform system and the corresponding mounting directories under each partition, therefore, this file can Quickly and clearly understand the partition information of the cloud platform system.
在对初始数据进行备份时,本发明中对于存储数据的类型为存储引导数据的类型的分区即引导分区单独备份至根目录,然后做快照处理,尽可能地保证了引导数据能够备份成功,且所有分区均做快照处理,保证了云平台系统在升级失败后能够依靠备份数据恢复至升级之前的环境。When backing up the initial data, in the present invention, the partition that stores the data type is the type that stores boot data, that is, the boot partition is backed up to the root directory separately, and then snapshot processing is performed to ensure that the boot data can be backed up successfully as much as possible, and All partitions are snapshotted, ensuring that the cloud platform system can rely on backup data to restore to the environment before the upgrade after an upgrade failure.
由于存储时长小于预设值的数据通常是临时数据,因此,对其所在分区进行备份没有意义,因此,本发明中对所有分区中除存储存储时长小于预设值的数据的类型对应的目标分区进行备份,保证了数据备份的有效性。Since data whose storage duration is less than the preset value is usually temporary data, it is meaningless to back up the partition where it is located. Therefore, in the present invention, all partitions except the target partition corresponding to the type of data whose storage duration is less than the preset value are stored. Perform backup to ensure the effectiveness of data backup.
在备份配置文件中记录各分区的逻辑卷管理以及通用唯一识别码、以及各分区对应的快照的名称和通用唯一识别码,且在备份配置文件中各分区和对各分区对应的快照存在对应关系,故而,可以根据对应关系清楚了解到各分区对应的快照;将备份配置文件放置在根分区的备份目录中,使得在对分区做快照处理时,同时也将备份配置文件进行了备份。Record the logical volume management and universal unique identification code of each partition in the backup configuration file, as well as the name and universal unique identification code of the snapshot corresponding to each partition, and there is a corresponding relationship between each partition and the snapshot corresponding to each partition in the backup configuration file. , therefore, the snapshot corresponding to each partition can be clearly understood based on the corresponding relationship; the backup configuration file is placed in the backup directory of the root partition, so that when the partition is snapshotted, the backup configuration file is also backed up at the same time.
在利用备份数据对系统升级失败时的当前数据进行恢复时,基于文件名对当前数据进行恢复,相比于根据直接将当前数据和备份数据进行比对的方式,本发明提供的方式能够大大提高数据备份的效率;且对整个文件数据进行替换,因此,保证了数据恢复时的准确率。When using backup data to restore the current data when the system upgrade fails, the current data is restored based on the file name. Compared with the method of directly comparing the current data and the backup data, the method provided by the present invention can greatly improve The efficiency of data backup; and the entire file data is replaced, thus ensuring the accuracy of data recovery.
在恢复到升级之前的环境后,当对系统升级成功后,将快照信息、根分区下的备份目录进行删除,减小了数据所占的存储空间。After restoring to the environment before the upgrade, when the system upgrade is successful, the snapshot information and the backup directory under the root partition are deleted to reduce the storage space occupied by the data.
另外,本发明还一种云平台的控制装置、云平台的控制设备以及计算机可读存储介质,与上述提到的云平台的控制方法具有相同或相对应的技术特征,效果同上。In addition, the present invention also provides a cloud platform control device, cloud platform control equipment and computer-readable storage medium, which have the same or corresponding technical features as the above-mentioned cloud platform control method, and have the same effects as above.
附图说明Description of drawings
为了更清楚地说明本发明实施例,下面将对实施例中所需要使用的附图做简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention more clearly, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, As far as workers are concerned, other drawings can also be obtained based on these drawings without exerting creative work.
图1为本发明实施例提供的一种云平台的控制方法的流程图;Figure 1 is a flow chart of a cloud platform control method provided by an embodiment of the present invention;
图2为本发明实施例提供的一种系统备份的方法的流程图;Figure 2 is a flow chart of a system backup method provided by an embodiment of the present invention;
图3为本发明实施例提供的一种系统备份的方法的流程图;Figure 3 is a flow chart of a system backup method provided by an embodiment of the present invention;
图4为本发明实施例提供的一种备份删除的方法的流程图;Figure 4 is a flow chart of a backup and deletion method provided by an embodiment of the present invention;
图5为本发明的一实施例提供的一种云平台的控制装置的结构图;Figure 5 is a structural diagram of a control device of a cloud platform provided by an embodiment of the present invention;
图6为本发明另一实施例提供的云平台的控制设备的结构图。Figure 6 is a structural diagram of a control device of a cloud platform provided by another embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下,所获得的所有其他实施例,都属于本发明保护范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
本发明的核心是提供一种云平台的控制方法、装置、设备及介质,以解决在升级开始到升级失败的过程中改变了升级之前的环境,导致很难恢复到升级之前的环境的技术问题。The core of the present invention is to provide a cloud platform control method, device, equipment and medium to solve the technical problem that the environment before the upgrade is changed from the start of the upgrade to the failure of the upgrade, making it difficult to restore the environment before the upgrade. .
目前云平台所使用的操作系统大多都是Linux系统,即云平台对客户提供服务的软件大多运行在Linux系统。因此,本发明提供的云平台的控制方法主要是针对Linux系统云平台。Linux系统的软件包大多是rpm或deb格式,部署一台Linux的云平台系统需要安装较多的软件包。因为云平台的软件包较多,这样在系统升级是就可能会对每个升级包进行更新,对于升级过程中出现失败,由于在升级开始到升级失败的过程中改变了升级之前的环境,导致想要恢复到升级之前的环境是非常困难的。基于上述问题,本发明实施例提供的对云平台的控制方法中,在云平台系统升级之前,对各分区的初始数据进行备份,当检测到云平台系统升级失败后,可以通过备份数据对云平台系统升级失败时所对应的环境进行恢复。At present, most of the operating systems used by cloud platforms are Linux systems, that is, most of the software provided by cloud platforms to provide services to customers runs on Linux systems. Therefore, the cloud platform control method provided by the present invention is mainly aimed at the Linux system cloud platform. Most of the software packages of Linux systems are in rpm or deb format. Deploying a Linux cloud platform system requires the installation of many software packages. Because the cloud platform has many software packages, each upgrade package may be updated during the system upgrade. If a failure occurs during the upgrade process, the environment before the upgrade has been changed between the start of the upgrade and the failure of the upgrade, resulting in It is very difficult to restore the environment before the upgrade. Based on the above problems, in the method for controlling the cloud platform provided by the embodiment of the present invention, before the cloud platform system is upgraded, the initial data of each partition is backed up. When it is detected that the cloud platform system upgrade fails, the cloud platform can be updated through the backup data. The corresponding environment is restored when the platform system upgrade fails.
为了使本技术领域的人员更好地理解本发明方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。图1为本发明实施例提供的一种云平台的控制方法的流程图,如图1所示,该方法包括:In order to enable those skilled in the art to better understand the solution of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. Figure 1 is a flow chart of a cloud platform control method provided by an embodiment of the present invention. As shown in Figure 1, the method includes:
S10:在检测到云平台系统升级之前,获取云平台系统的各分区的初始数据;根据各分区的存储数据的类型对各分区的初始数据进行备份,并获取各分区的备份数据;S10: Before detecting the upgrade of the cloud platform system, obtain the initial data of each partition of the cloud platform system; back up the initial data of each partition according to the type of stored data in each partition, and obtain the backup data of each partition;
S11:控制云平台系统进行升级并检测云平台系统的升级状态;S11: Control the cloud platform system to upgrade and detect the upgrade status of the cloud platform system;
S12:在检测到升级状态为升级失败的情况下,利用各分区的备份数据对对应的分区的当前数据进行恢复。S12: When it is detected that the upgrade status is upgrade failure, use the backup data of each partition to restore the current data of the corresponding partition.
云平台系统的各分区包含引导分区(/boot分区)、/home分区、/swap分区、/根分区等。为了在检测到云平台系统升级失败后,仍然能够恢复到升级之前的环境(指的是升级之前各个分区的数据),本发明实施例中在云平台系统升级之前对各个分区的初始数据进行备份。初始数据指的是在云平台系统升级之前各个分区的数据。Each partition of the cloud platform system includes the boot partition (/boot partition), /home partition, /swap partition, /root partition, etc. In order to still be able to restore the environment before the upgrade (referring to the data of each partition before the upgrade) after detecting that the cloud platform system upgrade fails, in the embodiment of the present invention, the initial data of each partition is backed up before the cloud platform system is upgraded. . Initial data refers to the data of each partition before the cloud platform system is upgraded.
对于备份的方式不作限定,只要能够将数据进行备份即可。由于快照备份具有快速创建备份的优点,因此,本发明实施例中主要是利用快照技术对初始数据进行备份,在备份后得到备份数据。需要说明的是,在引导分区中存储的数据为内核和引导文件,引导分区不能使用逻辑卷管理(Logical Volume Manager,LVM)技术,故而,若不根据分区的存储数据类型对各分区的初始数据采用不同的备份过程,则可能会导致无法对一些分区的数据进行备份。所以,本发明实施例中,根据各分区的存储数据的类型对各分区的初始数据进行备份,在对各分区的初始数据进行备份后,得到各分区的备份数据。There is no limit to the backup method, as long as the data can be backed up. Since snapshot backup has the advantage of quickly creating a backup, in the embodiment of the present invention, the snapshot technology is mainly used to back up the initial data, and the backup data is obtained after the backup. It should be noted that the data stored in the boot partition is the kernel and boot files. The boot partition cannot use logical volume management (Logical Volume Manager, LVM) technology. Therefore, if the initial data of each partition is not stored according to the storage data type of the partition, Using different backup processes may result in the inability to back up data in some partitions. Therefore, in the embodiment of the present invention, the initial data of each partition is backed up according to the type of data stored in each partition. After the initial data of each partition is backed up, the backup data of each partition is obtained.
在对各个分区的初始数据进行备份的基础上,用户可以下发用于表征控制云平台系统升级的指令,根据升级指令控制云平台系统升级,然后可以根据对云平台系统升级状态的提示信息确定云平台系统的升级状态。可以是通过显示屏上显示的信息或者语音提示等信息确定出云平台的系统的升级状态。具体地,云平台的升级状态包含云平台系统正在升级,云平台系统升级成功、云平台系统升级失败。本发明实施例中是针对云平台系统升级失败后很难恢复到升级之前的环境所提出的解决方案,在当提示信息中提示云平台系统升级失败后,根据利用各分区的备份数据对对应的分区的当前数据进行恢复。当前数据指的是在检测到云平台系统升级失败的情况下,各个分区的数据。当前数据是对初始数据改变后的数据。在使用备份数据对当前数据进行恢复的过程中,可以是参照备份数据对各个当前数据进行恢复,但是由于数据量较大,降低了数据恢复的效率;故而,本发明实施例中基于文件名对当前数据进行恢复,当备份数据文件的文件名称与当前数据文件的文件名称相同,则直接用备份数据文件覆盖当前数据文件;当备份数据文件的文件名称与当前数据文件的文件名称不相同,则直接将当前数据文件删除。在对升级失败的云平台系统的环境恢复到升级之前的环境后,可以根据实际情况继续使用之前的云平台系统,或者继续对云平台系统进行升级。On the basis of backing up the initial data of each partition, the user can issue instructions for controlling the cloud platform system upgrade, control the cloud platform system upgrade according to the upgrade instructions, and then determine the status of the cloud platform system based on the prompt information. The upgrade status of the cloud platform system. The upgrade status of the Izu cloud platform system can be determined through information displayed on the display screen or voice prompts. Specifically, the upgrade status of the cloud platform includes the cloud platform system being upgraded, the cloud platform system being upgraded successfully, and the cloud platform system being upgraded failing. The embodiment of the present invention is a solution proposed for the problem that it is difficult to restore the environment to the environment before the upgrade after the cloud platform system upgrade fails. When the prompt information indicates that the cloud platform system upgrade fails, the corresponding backup data of each partition is used. The current data of the partition is restored. The current data refers to the data of each partition when a cloud platform system upgrade failure is detected. The current data is the data after changes to the initial data. In the process of using the backup data to restore the current data, each current data can be restored with reference to the backup data. However, due to the large amount of data, the efficiency of data recovery is reduced; therefore, in the embodiment of the present invention, the file name is used to restore the current data. The current data is restored. When the file name of the backup data file is the same as the file name of the current data file, the current data file is directly overwritten with the backup data file; when the file name of the backup data file is different from the file name of the current data file, then Directly delete the current data file. After the environment of the cloud platform system that failed to be upgraded is restored to the environment before the upgrade, you can continue to use the previous cloud platform system according to the actual situation, or continue to upgrade the cloud platform system.
本发明实施例所提供的云平台的控制方法,包括:在检测到云平台系统升级之前,获取云平台系统的各分区的初始数据;根据各分区的存储数据的类型对各分区的初始数据进行备份,并获取各分区的备份数据;检测云平台系统的升级状态;在检测到升级状态为升级失败的情况下,利用各分区的备份数据对对应的分区的当前数据进行恢复。即在云平台系统升级之前,对各分区的初始数据进行备份,当检测到云平台系统升级失败后,可以通过备份数据对云平台系统升级失败时所对应的环境进行恢复。由于备份数据是用过对初始数据进行备份得到,备份数据即代表了云平台系统升级前的环境,因此,通过备份数据实现了将升级失败的环境恢复到升级之前的环境;另外,相比于对所有分区采用相同的备份策略,本发明实施例中依据各分区的存储数据的类型对各分区的初始数据进行备份,使得备份的方式更加符合各分区的数据特点,且一些备份方式可能并不适用于所有类型的存储数据,如对于引导分区是不能使用快照技术来进行备份,可见,本发明实施例提供的根据分区的存储数据的类型确定的备份方式尽可能地保证了数据备份的成功率。The control method of the cloud platform provided by the embodiment of the present invention includes: before detecting the upgrade of the cloud platform system, obtaining the initial data of each partition of the cloud platform system; and performing the initial data of each partition according to the type of stored data of each partition. Back up and obtain the backup data of each partition; detect the upgrade status of the cloud platform system; when it is detected that the upgrade status is upgrade failure, use the backup data of each partition to restore the current data of the corresponding partition. That is, before the cloud platform system is upgraded, the initial data of each partition is backed up. When a cloud platform system upgrade failure is detected, the environment corresponding to the cloud platform system upgrade failure can be restored through the backup data. Since the backup data is obtained by backing up the initial data, the backup data represents the environment before the cloud platform system upgrade. Therefore, the backup data can restore the failed upgrade environment to the environment before the upgrade; in addition, compared with The same backup strategy is adopted for all partitions. In the embodiment of the present invention, the initial data of each partition is backed up according to the type of stored data in each partition, so that the backup method is more in line with the data characteristics of each partition, and some backup methods may not be It is applicable to all types of storage data. For example, snapshot technology cannot be used for backup of boot partitions. It can be seen that the backup method determined according to the type of storage data of the partition provided by the embodiment of the present invention ensures the success rate of data backup as much as possible. .
为了获取到云平台系统的分区信息,可以是通过分析云平台的数据信息确定云平台系统的分区,在收集分区的过程中,可能会遗漏某些分区,导致获取的不是云平台系统的所有分区,从而无法将遗漏的分区的数据进行备份以及恢复。因此,在一些实施例中,在根据各分区的存储数据的类型对各分区的初始数据进行备份之前,还包括:In order to obtain the partition information of the cloud platform system, you can determine the partitions of the cloud platform system by analyzing the data information of the cloud platform. During the process of collecting partitions, some partitions may be missed, resulting in not all partitions of the cloud platform system being obtained. , so that the data of the missing partition cannot be backed up and restored. Therefore, in some embodiments, before backing up the initial data of each partition according to the type of storage data of each partition, it also includes:
获取云平台系统中用于记录云平台系统的所有的分区以及各分区下对应的挂载目录的文件;Obtain the files in the cloud platform system used to record all partitions of the cloud platform system and the corresponding mounting directories under each partition;
根据用于记录云平台系统的所有的分区以及各分区下对应的挂载目录的文件确定云平台系统的系统盘的分区信息;Determine the partition information of the system disk of the cloud platform system based on the files used to record all partitions of the cloud platform system and the corresponding mounting directories under each partition;
根据分区信息确定各分区的存储数据的类型;其中,存储数据的类型至少包括存储引导数据的类型、存储用户数据的类型、存储存储时长小于预设值的数据的类型。The type of stored data in each partition is determined according to the partition information; the type of stored data at least includes a type of stored boot data, a type of stored user data, and a type of stored data whose storage duration is less than a preset value.
云平台系统中用于记录云平台系统的所有的分区以及各分区下对应的挂载目录的文件通常为系统/etc/fstab文件。通过该文件的内容获取到对应的LVM分区。存储引导数据的类型的分区对应引导分区,存储用户数据的类型的分区对应/home分区、存储存储时长小于预设值的数据的类型的分区对应的是swap分区。The file used in the cloud platform system to record all partitions of the cloud platform system and the corresponding mounting directories under each partition is usually the system /etc/fstab file. Obtain the corresponding LVM partition through the contents of the file. The partition that stores boot data corresponds to the boot partition, the partition that stores user data corresponds to the /home partition, and the partition that stores data whose storage duration is less than the preset value corresponds to the swap partition.
本实施例提供的方法中,直接读取用于记录云平台系统的所有的分区以及各分区下对应的挂载目录的文件来获取云平台系统的分区信息,使得通过该文件能够方便、快速地获取到云平台系统的所有分区信息。In the method provided by this embodiment, files used to record all partitions of the cloud platform system and the corresponding mounting directories under each partition are directly read to obtain the partition information of the cloud platform system, so that the file can be used to conveniently and quickly Obtain all partition information of the cloud platform system.
在使用LVM快照技术对各分区的数据进行备份时,由于引导分区不能使用LVM快照技术进行备份。为了使得能够通过LVM快照对引导分区的初始数据进行备份,以及能够对所有分区的初始数据进行备份,在一些实施例中,在根据各分区的存储数据的类型对各分区的初始数据进行备份之前,还包括:When using LVM snapshot technology to back up the data of each partition, the boot partition cannot be backed up using LVM snapshot technology. In order to enable the backup of the initial data of the boot partition through LVM snapshots and the backup of the initial data of all partitions, in some embodiments, before backing up the initial data of each partition according to the type of storage data of each partition ,Also includes:
将云平台系统的所有分区按照预设的备份顺序进行排列;Arrange all partitions of the cloud platform system according to the preset backup order;
根据各分区的存储数据的类型对各分区的初始数据进行备份包括:Backing up the initial data of each partition according to the type of data stored in each partition includes:
判断当前分区的存储数据的类型是否为存储引导数据的类型;其中,当前分区为云平台系统的所有分区中的任意一个分区;Determine whether the type of stored data in the current partition is the type of stored boot data; where the current partition is any partition among all partitions of the cloud platform system;
若否,对当前分区的初始数据做快照处理,以对当前分区的初始数据进行备份;If not, take a snapshot of the initial data of the current partition to back up the initial data of the current partition;
自检测到存在分区做快照处理开始,获取完成备份的分区的数量,在检测到完成备份的分区的数量小于所有分区的数量的情况下,将当前分区的下一个分区作为新的当前分区,并返回判断当前分区的存储数据的类型是否为存储引导数据的类型的步骤;在检测到完成备份的分区的数量等于所有分区的数量的情况下,确定完成对所有分区的初始数据的备份;Since detecting the existence of a partition for snapshot processing, obtain the number of partitions that have been backed up. If it is detected that the number of partitions that have been backed up is less than the number of all partitions, the next partition of the current partition will be used as the new current partition, and Return to the step of determining whether the type of stored data in the current partition is the type of stored boot data; when it is detected that the number of partitions that have been backed up is equal to the number of all partitions, determine that the backup of the initial data of all partitions is completed;
若是,则确定当前分区为引导分区,并获取引导分区的初始数据;If so, determine that the current partition is the boot partition and obtain the initial data of the boot partition;
获取云平台系统的根分区,并在根分区中创建备份目录;其中,备份目录中包含引导目录;Obtain the root partition of the cloud platform system and create a backup directory in the root partition; the backup directory contains the boot directory;
将引导分区的初始数据备份至引导目录;Back up the initial data of the boot partition to the boot directory;
在检测完成将引导分区的初始数据备份至引导目录后,对根分区做快照处理,以对引导分区的初始数据进行备份;返回自检测到存在分区做快照处理开始,获取完成备份的分区的数量的步骤。After the detection is completed and the initial data of the boot partition is backed up to the boot directory, snapshot processing is performed on the root partition to back up the initial data of the boot partition; return to the snapshot processing since the detection of the existence of the partition to obtain the number of partitions that have been backed up A step of.
对于预设的备份顺序不作限定,根据实际情况确定。另外,由于存储时长小于预设值的数据通常是临时数据,对其所在分区进行备份没有意义,因此,在一些实施例中,具体地,将云平台系统的所有分区按照预设的备份顺序进行排列包括:There is no limit to the preset backup sequence and it will be determined based on the actual situation. In addition, since data whose storage duration is less than the preset value is usually temporary data, it is meaningless to back up the partition where it is located. Therefore, in some embodiments, specifically, all partitions of the cloud platform system are backed up in a preset order. Arrangements include:
获取云平台系统的所有分区中存储数据的类型为存储存储时长小于预设值的数据的类型对应的目标分区;Obtain the target partition corresponding to the type of data stored in all partitions of the cloud platform system that stores data whose storage duration is less than the preset value;
获取所有分区中除目标分区外的其它分区;Get all partitions except the target partition;
将其它分区作为云平台系统的新的所有的分区;Use other partitions as new all partitions of the cloud platform system;
将新的所有的分区按照预设的备份顺序进行排列。Arrange all new partitions in the preset backup order.
对于预设值不作限定,同样地也是根据实际情况确定。需要说明的是,存储存储时长小于预设值的数据的类型对应的目标分区通常为swap分区,swap分区下存储的数据通常为临时数据,位于该分区的数据是变化的,因此,可以不对swap分区的数据进行备份,对除swap分区外的分区的初始数据进行备份。There is no limit to the preset value, which is also determined based on the actual situation. It should be noted that the target partition corresponding to the type of data whose storage duration is less than the preset value is usually the swap partition. The data stored in the swap partition is usually temporary data. The data located in this partition changes. Therefore, the swap does not need to be configured. Back up the data of the partition and back up the initial data of the partition except the swap partition.
本实施例中对所有分区中除存储存储时长小于预设值的数据的类型对应的目标分区进行备份,保证了数据备份的有效性。In this embodiment, all partitions except the target partition corresponding to the type of data whose storage duration is less than the preset value are backed up, thereby ensuring the effectiveness of the data backup.
为了清楚了解到各分区对应的快照,在一些实施例中,在对各分区的初始数据做快照处理之前,还包括:In order to clearly understand the snapshot corresponding to each partition, in some embodiments, before performing snapshot processing on the initial data of each partition, it also includes:
生成包含各分区和对各分区创建的快照的对应关系的备份配置文件;其中,备份配置文件中记录有各分区的逻辑卷管理以及通用唯一识别码、以及各分区对应的快照的名称和通用唯一识别码;Generate a backup configuration file that contains the correspondence between each partition and the snapshot created for each partition; the backup configuration file records the logical volume management and universal unique identification code of each partition, as well as the name and universal uniqueness of the snapshot corresponding to each partition. Identifier;
将备份配置文件放置在根分区下的备份目录中;Place the backup configuration file in the backup directory under the root partition;
对应地,确定各分区的备份数据包括:Correspondingly, determining the backup data of each partition includes:
获取备份配置文件中的信息;Get the information in the backup configuration file;
将逻辑卷管理快照进行恢复以恢复各分区的备份数据。Restore the logical volume management snapshot to restore the backup data of each partition.
本实施例提供的方法中在备份配置文件中记录各分区的逻辑卷管理以及通用唯一识别码、以及各分区对应的快照的名称和通用唯一识别码,且在备份配置文件中各分区和对各分区对应的快照存在对应关系,使得可以根据对应关系清楚了解到各分区对应的快照;将备份配置文件放置在根分区的备份目录中,使得在对分区做快照处理时,同时也将备份配置文件进行了备份。In the method provided by this embodiment, the logical volume management and universal unique identification code of each partition are recorded in the backup configuration file, as well as the name and universal unique identification code of the snapshot corresponding to each partition, and each partition and each partition are recorded in the backup configuration file. There is a corresponding relationship between the snapshots corresponding to the partitions, so that the snapshots corresponding to each partition can be clearly understood based on the corresponding relationships; the backup configuration file is placed in the backup directory of the root partition, so that when the partition is snapshotted, the configuration file will also be backed up at the same time. A backup was made.
结合上文中描述的内容,系统备份的具体过程包括:Combined with what is described above, the specific process of system backup includes:
1.对于Linux系统云平台升级前首先对系统的数据进行备份,主要涉及引导分区数据备份,和其他LVM分区备份,因为引导分区无法使用LVM进行分区。引导分区主要备份grub引导数据,vmlinuz-*和initramfs-*(内核和引导文件)。将这些数据备份到系统的根分区的一个备份目录中,使用当前云系统的版本标记备份目录。将引导分区需要备份的数据放置在一个LVM分区下,可以让做快照时备份数据,这样升级备份恢复后,再次进行升级时,则不需要再进行备份。1. Before upgrading the Linux system cloud platform, first back up the system data, which mainly involves backup of boot partition data and backup of other LVM partitions, because the boot partition cannot be partitioned using LVM. The boot partition mainly backs up grub boot data, vmlinuz-* and initramfs-* (kernel and boot files). Back up this data to a backup directory on the root partition of the system, and label the backup directory with the version of the current cloud system. Placing the data that needs to be backed up in the boot partition under an LVM partition allows you to back up the data when taking a snapshot. In this way, after the upgrade backup is restored, there is no need to back up again when upgrading again.
2.读取系统/etc/fstab,该文件记录这当前系统的分区和对应的挂载目录。通过该文件的内容获取到对应的LVM分区。2. Read the system/etc/fstab. This file records the current system partition and the corresponding mounting directory. Obtain the corresponding LVM partition through the contents of the file.
3.生成要备份的分区和所创建的快照对应关系的配置文件,该配置文件记录着备份分区的LVM名称和通用唯一识别码(Universally Unique Identifier,UUID),以及对应的快照的名称和UUID。放置在根分区的备份目录中,使得在做LVM快照的时候可以保存备份目录。3. Generate a configuration file corresponding to the partition to be backed up and the created snapshot. The configuration file records the LVM name and Universally Unique Identifier (UUID) of the backup partition, as well as the name and UUID of the corresponding snapshot. Place it in the backup directory of the root partition so that the backup directory can be saved when taking LVM snapshots.
4.对LVM分区分别做快照,创建LVM快照时将设置快照的名称snapshot_[分区lv名称],这样便于识别。4. Take separate snapshots of the LVM partitions. When creating the LVM snapshot, the snapshot name snapshot_[partition lv name] will be set for easy identification.
为了使本技术领域的人员更好地理解本发明实施例提供的系统备份方式,下面结合附图2和具体实施方式对本发明实施例作进一步的详细说明。图2为本发明实施例提供的一种系统备份的方法的流程图,如图2所示,该方法包括:In order to enable those skilled in the art to better understand the system backup method provided by the embodiment of the present invention, the embodiment of the present invention will be further described in detail below with reference to Figure 2 and specific implementation modes. Figure 2 is a flow chart of a system backup method provided by an embodiment of the present invention. As shown in Figure 2, the method includes:
S13:获取记录系统所有分区的文件;S13: Obtain files recording all partitions of the system;
S14:全量备份/引导分区备份至根分区;S14: Full backup/boot partition backup to root partition;
S15:对逻辑卷管理分区进行快照创建;S15: Create a snapshot of the logical volume management partition;
S16:将快照和对应的备份分区信息保存。S16: Save the snapshot and corresponding backup partition information.
需要说明的是,步骤S15中的对逻辑卷管理分区(非swap分区)进行快照创建。It should be noted that in step S15, a snapshot is created of the logical volume management partition (non-swap partition).
如图2所示的备份方法的流程,具体实施过程如下:The process of the backup method is shown in Figure 2. The specific implementation process is as follows:
1.读取系统/etc/fstab,该文件记录这当前系统的分区和对应的挂载目录,获取系统盘分区信息。1. Read the system /etc/fstab. This file records the partitions of the current system and the corresponding mounting directory to obtain the system disk partition information.
2.在根分区(/)创建备份目录,备份引导分区,将目前引导分区下的所有数据,备份至备份目录下的boot目录。2. Create a backup directory in the root partition (/), back up the boot partition, and back up all data under the current boot partition to the boot directory under the backup directory.
3.对LVM分区做快照,快照的名称以snapshot_[分区lv名称]格式进行命名。3. Take a snapshot of the LVM partition, and name the snapshot in the format of snapshot_[partition lv name].
4.将LVM分区的名称和UUID,以及对应快照的名称和UUID记录的备份目录下的备份配置文件中。4. Record the name and UUID of the LVM partition, as well as the name and UUID of the corresponding snapshot, in the backup configuration file in the backup directory.
本发明实施例提供的方法中,在对初始数据进行备份时,对于存储数据的类型为存储引导数据的类型的分区即引导分区单独备份至根目录,然后做快照处理,尽可能地保证了引导数据能够备份成功,且所有分区均做快照处理,保证了云平台系统在升级失败后能够依靠备份数据恢复至升级之前的环境。In the method provided by the embodiment of the present invention, when backing up the initial data, the partition that stores the data type is the type that stores the boot data, that is, the boot partition is backed up separately to the root directory, and then snapshot processing is performed to ensure the booting as much as possible. The data can be backed up successfully, and all partitions are snapshotted, ensuring that the cloud platform system can rely on the backup data to restore to the environment before the upgrade after the upgrade fails.
在检测到系统升级失败后,分区为引导分区,为了能够对当前数据进行恢复,在一些实施例中,利用引导分区的备份数据对引导分区的当前数据进行恢复包括:After detecting a system upgrade failure, the partition is a boot partition. In order to be able to restore the current data, in some embodiments, using the backup data of the boot partition to restore the current data of the boot partition includes:
获取引导分区的备份数据对应的第一文件以及引导分区的当前数据对应的第二文件;Obtain the first file corresponding to the backup data of the boot partition and the second file corresponding to the current data of the boot partition;
将第一文件与第二文件进行比对;Compare the first file with the second file;
获取第二文件中文件名称与第一文件中文件名称相同的文件,以及第二文件中文件名称与第一文件中文件名称不相同的文件;Obtain the files in the second file whose file names are the same as the file names in the first file, and the files in the second file whose file names are different from the file names in the first file;
利用第一文件中文件名称与第二文件中文件名称相同的文件对应的备份数据覆盖第二文件中文件名称与第一文件中文件名称相同的文件,以及删除第二文件中文件名称与第一文件中文件名称不相同的文件;通过引导指令重新生成引导配置文件,以完成对引导分区的当前数据的恢复。Utilize the backup data corresponding to the file in the first file with the same file name in the second file to overwrite the file in the second file with the same file name in the first file, and delete the file in the second file with the same name in the first file. Files with different file names; regenerate the boot configuration file through the boot command to complete the recovery of the current data of the boot partition.
为了使本技术领域的人员更好地理解本发明实施例提供的系统恢复方式,下面结合附图3和具体实施方式对本发明实施例作进一步的详细说明。图3为本发明实施例提供的一种系统备份的方法的流程图,如图3所示,该方法包括:In order to enable those skilled in the art to better understand the system recovery method provided by the embodiment of the present invention, the embodiment of the present invention will be further described in detail below with reference to Figure 3 and specific implementation modes. Figure 3 is a flow chart of a system backup method provided by an embodiment of the present invention. As shown in Figure 3, the method includes:
S17:读取备份配置文件信息;S17: Read backup configuration file information;
S18:将逻辑卷管理快照进行恢复以恢复分区数据;S18: Restore the logical volume management snapshot to restore partition data;
S19:将引导分区备份数据全量覆盖现有的引导分区数据;S19: Completely overwrite the existing boot partition data with the boot partition backup data;
S20:重新生成引导配置文件。S20: Regenerate the boot configuration file.
发明提出的系统恢复,如图2所示,具体实施如下:The system recovery proposed by the invention is shown in Figure 2, and the specific implementation is as follows:
1.当云平台升级的过程中出现问题,为了让系统恢复至升级之前的状态,首先需要对根分区的LVM快照进行恢复,因为根分区放着备份目录。通过LVM的备份恢复指令将整个分区恢复至快照时的状态。1. When a problem occurs during the cloud platform upgrade, in order to restore the system to the state before the upgrade, the LVM snapshot of the root partition needs to be restored first, because the root partition contains the backup directory. Use LVM's backup and restore command to restore the entire partition to the state at the time of the snapshot.
2.读取备份目录中的快照对应关系配置文件,然后将对应的LVM分区恢复至快照状态。2. Read the snapshot correspondence configuration file in the backup directory, and then restore the corresponding LVM partition to the snapshot state.
3.恢复引导分区数据,将引导分区下的数据文件进行对比,使用备份目录下的文件覆盖引导分区下的同名文件,并删除多余文件。3. Restore the boot partition data, compare the data files in the boot partition, use the files in the backup directory to overwrite the files with the same name in the boot partition, and delete redundant files.
4.通过grub2指令重新生成引导配置文件。4. Regenerate the boot configuration file through the grub2 command.
5.恢复至源系统时,就可以开始再次升级,升级时不需要再次进行备份。5. When restoring to the source system, you can start upgrading again. There is no need to back up again during the upgrade.
本实施例提供的方法中,在利用备份数据对系统升级失败时的当前数据进行恢复时,基于文件名对当前数据进行恢复,相比于根据直接将当前数据和备份数据进行比对的方式,本发明实施例提供的方式能够大大提高数据备份的效率;且对整个文件数据进行替换,因此,保证了数据恢复时的准确率。In the method provided by this embodiment, when the backup data is used to restore the current data when the system upgrade fails, the current data is restored based on the file name. Compared with the method of directly comparing the current data and the backup data, The method provided by the embodiment of the present invention can greatly improve the efficiency of data backup and replace the entire file data, thus ensuring the accuracy of data recovery.
在利用各分区的备份数据对对应的分区的当前数据进行恢复之后,还包括:After using the backup data of each partition to restore the current data of the corresponding partition, it also includes:
利用恢复后的当前数据对云平台系统进行升级;Use the restored current data to upgrade the cloud platform system;
在检测到云平台系统升级成功后,获取备份目录下的备份配置文件;After detecting that the cloud platform system upgrade is successful, obtain the backup configuration file in the backup directory;
根据备份配置文件中的分区信息和各分区对应的快照信息将各分区对应的快照信息进行删除;Delete the snapshot information corresponding to each partition based on the partition information in the backup configuration file and the snapshot information corresponding to each partition;
删除根分区下的备份目录。Delete the backup directory under the root partition.
图4为本发明实施例提供的一种备份删除的方法的流程图,如图4所示,该方法包括:Figure 4 is a flow chart of a backup and deletion method provided by an embodiment of the present invention. As shown in Figure 4, the method includes:
S21:读取备份配置文件信息;S21: Read backup configuration file information;
S22:删除逻辑卷管理分区的快照;S22: Delete the snapshot of the logical volume management partition;
S23:删除根目录的备份数据。S23: Delete the backup data of the root directory.
本发明实施例提供的备份删除方法中,当云平台升级完成后,通过读取备份目录下的备份配置文件,根据配置文件中备份分区信息和对应的快照信息,将快照进行删除以及删除根分区下的备份目录,减小了在升级流程中所产生的数据,减小了数据所占的存储空间。In the backup deletion method provided by the embodiment of the present invention, after the cloud platform upgrade is completed, the backup configuration file in the backup directory is read, and the snapshot and the root partition are deleted according to the backup partition information and corresponding snapshot information in the configuration file. The backup directory below reduces the data generated during the upgrade process and reduces the storage space occupied by the data.
综上,本发明实施例对云平台系统升级前备份,在升级过程出现失败后,恢复到升级前的状态,主要针对使用LVM进行磁盘资源管理的云平台使用。通过LVM的快照技术对升级前的云平台进行备份,当升级过程中出现失败,则通过对应分区的快照进行分区恢复。此外还涉及引导分区的备份和恢复,因为引导分区不能使用LVM的快照技术,所以需要单独进行备份和恢复。通过上述的技术,实现了当云平台出现失败的时候,将云平台恢复到升级前的状态。In summary, the embodiment of the present invention backs up the cloud platform system before upgrading and restores it to the pre-upgrade state after the upgrade process fails. This is mainly aimed at cloud platforms that use LVM for disk resource management. Use LVM's snapshot technology to back up the cloud platform before the upgrade. When a failure occurs during the upgrade process, partition recovery is performed through the snapshot of the corresponding partition. In addition, it also involves the backup and recovery of the boot partition. Because the boot partition cannot use LVM's snapshot technology, it needs to be backed up and restored separately. Through the above technology, when the cloud platform fails, the cloud platform can be restored to the state before the upgrade.
在上述实施例中,对于一种云平台的控制方法进行了详细描述,本发明还提供一种云平台的控制装置、云平台的控制设备对应的实施例。需要说明的是,本发明从两个角度对装置部分的实施例进行描述,一种是基于功能模块的角度,另一种是基于硬件的角度。In the above embodiments, a method for controlling a cloud platform is described in detail. The present invention also provides embodiments corresponding to a control device for a cloud platform and a control device for a cloud platform. It should be noted that the present invention describes the embodiments of the device part from two perspectives, one is based on the functional module perspective, and the other is based on the hardware perspective.
图5为本发明的一实施例提供的一种云平台的控制装置的结构图。本实施例基于功能模块的角度,包括:FIG. 5 is a structural diagram of a cloud platform control device according to an embodiment of the present invention. This embodiment is based on the perspective of functional modules, including:
获取及备份模块10,用于在检测到云平台系统升级之前,获取云平台系统的各分区的初始数据;根据各分区的存储数据的类型对各分区的初始数据进行备份,并获取各分区的备份数据;The acquisition and backup module 10 is used to obtain the initial data of each partition of the cloud platform system before detecting the upgrade of the cloud platform system; back up the initial data of each partition according to the type of storage data of each partition, and obtain the initial data of each partition. Back up data;
控制及检测模块11,用于控制云平台系统进行升级并检测云平台系统的升级状态;The control and detection module 11 is used to control the cloud platform system to upgrade and detect the upgrade status of the cloud platform system;
恢复模块12,用于在检测到升级状态为升级失败的情况下,利用各分区的备份数据对对应的分区的当前数据进行恢复。The recovery module 12 is configured to use the backup data of each partition to restore the current data of the corresponding partition when it is detected that the upgrade status is upgrade failure.
在一些实施例中,还包括:In some embodiments, it also includes:
第一获取模块,用于获取云平台系统中用于记录云平台系统的所有的分区以及各分区下对应的挂载目录的文件;The first acquisition module is used to acquire files in the cloud platform system that record all partitions of the cloud platform system and the corresponding mounting directories under each partition;
第一确定模块,用于根据用于记录云平台系统的所有的分区以及各分区下对应的挂载目录的文件确定云平台系统的系统盘的分区信息;The first determination module is used to determine the partition information of the system disk of the cloud platform system based on the files used to record all partitions of the cloud platform system and the corresponding mounting directories under each partition;
第二确定模块,用于根据分区信息确定各分区的存储数据的类型;其中,存储数据的类型至少包括存储引导数据的类型、存储用户数据的类型、存储存储时长小于预设值的数据的类型。The second determination module is used to determine the type of stored data of each partition according to the partition information; wherein the type of stored data at least includes the type of stored boot data, the type of stored user data, and the type of stored data whose storage duration is less than the preset value. .
还包括:Also includes:
第一排列模块,用于将云平台系统的所有分区按照预设的备份顺序进行排列;The first arrangement module is used to arrange all partitions of the cloud platform system according to the preset backup order;
获取及备份模块10中具体包括第一备份模块,第一备份模块用于根据各分区的存储数据的类型对各分区的初始数据进行备份;The acquisition and backup module 10 specifically includes a first backup module, which is used to back up the initial data of each partition according to the type of stored data in each partition;
第一备份模块具体包括:The first backup module specifically includes:
判断模块,用于判断当前分区的存储数据的类型是否为存储引导数据的类型;其中,当前分区为云平台系统的所有分区中的任意一个分区;若否,则依次触发快照处理模块、第二获取模块、第一作为模块、第三确定模块;若是,则依次触发确定及获取模块、获取及创建模块、第二备份模块、第三备份模块;The judgment module is used to judge whether the type of storage data of the current partition is the type of storage boot data; wherein, the current partition is any partition among all partitions of the cloud platform system; if not, trigger the snapshot processing module and the second one in sequence. Obtain module, first as module, and third determination module; if yes, trigger the determination and acquisition module, acquisition and creation module, second backup module, and third backup module in sequence;
快照处理模块具体用于对当前分区的初始数据做快照处理,以对当前分区的初始数据进行备份;The snapshot processing module is specifically used to perform snapshot processing on the initial data of the current partition to back up the initial data of the current partition;
第二获取模块,用于自检测到存在分区做快照处理开始,获取完成备份的分区的数量;The second acquisition module is used to obtain the number of partitions that have been backed up since the snapshot processing of partitions is detected;
第一作为模块,用于在检测到完成备份的分区的数量小于所有分区的数量的情况下,将当前分区的下一个分区作为新的当前分区,并返回触发判断模块;The first is a module, used to use the next partition of the current partition as the new current partition when it is detected that the number of partitions that have been backed up is less than the number of all partitions, and return to the trigger judgment module;
第三确定模块,用于在检测到完成备份的分区的数量等于所有分区的数量的情况下,确定完成对所有分区的初始数据的备份;The third determination module is used to determine that the backup of the initial data of all partitions is completed when it is detected that the number of partitions that have been backed up is equal to the number of all partitions;
确定及获取模块,用于确定当前分区为引导分区,并获取引导分区的初始数据;The determination and acquisition module is used to determine that the current partition is the boot partition and obtain the initial data of the boot partition;
获取及创建模块,用于获取云平台系统的根分区,并在根分区中创建备份目录;其中,备份目录中包含引导目录;The acquisition and creation module is used to obtain the root partition of the cloud platform system and create a backup directory in the root partition; the backup directory includes the boot directory;
第二备份模块,用于将引导分区的初始数据备份至引导目录;The second backup module is used to back up the initial data of the boot partition to the boot directory;
第三备份模块,用于在检测完成将引导分区的初始数据备份至引导目录后,对根分区做快照处理,以对引导分区的初始数据进行备份;返回触发第二获取模块。The third backup module is used to perform snapshot processing on the root partition to back up the initial data of the boot partition after the detection is completed and the initial data of the boot partition is backed up to the boot directory; return triggers the second acquisition module.
第一排列模块包括:The first arrangement module includes:
第三获取模块,用于获取云平台系统的所有分区中存储数据的类型为存储存储时长小于预设值的数据的类型对应的目标分区;The third acquisition module is used to obtain the target partition corresponding to the type of data stored in all partitions of the cloud platform system that stores data whose storage duration is less than the preset value;
第四获取模块,用于获取所有分区中除目标分区外的其它分区;The fourth acquisition module is used to acquire all partitions except the target partition;
第二作为模块,用于将其它分区作为云平台系统的新的所有的分区;The second is a module used to treat other partitions as new all partitions of the cloud platform system;
第二排列模块,用于将新的所有的分区按照预设的备份顺序进行排列。The second arrangement module is used to arrange all new partitions according to the preset backup order.
还包括:Also includes:
生成模块,用于生成包含各分区和对各分区创建的快照的对应关系的备份配置文件;其中,备份配置文件中记录有各分区的逻辑卷管理以及通用唯一识别码、以及各分区对应的快照的名称和通用唯一识别码;The generation module is used to generate a backup configuration file that contains the correspondence between each partition and the snapshot created for each partition; the backup configuration file records the logical volume management and universal unique identification code of each partition, as well as the corresponding snapshot of each partition. name and universal unique identifier;
放置模块,用于将备份配置文件放置在根分区下的备份目录中;The placement module is used to place the backup configuration file in the backup directory under the root partition;
还包括:第四确定模块,用于确定各分区的备份数据;It also includes: a fourth determination module, used to determine the backup data of each partition;
第四确定模块包括:The fourth determination module includes:
第五获取模块,用于获取备份配置文件中的信息;The fifth acquisition module is used to obtain the information in the backup configuration file;
第一恢复模块,用于将逻辑卷管理快照进行恢复以恢复各分区的备份数据。The first recovery module is used to recover the logical volume management snapshot to recover the backup data of each partition.
分区为引导分区,还包括第二恢复模块,用于利用引导分区的备份数据对引导分区的当前数据进行恢复;The partition is a boot partition and also includes a second recovery module, which is used to restore the current data of the boot partition using the backup data of the boot partition;
第二恢复模块包括:The second recovery module includes:
第六获取模块,用于获取引导分区的备份数据对应的第一文件以及引导分区的当前数据对应的第二文件;The sixth acquisition module is used to acquire the first file corresponding to the backup data of the boot partition and the second file corresponding to the current data of the boot partition;
比对模块,用于将第一文件与第二文件进行比对;A comparison module used to compare the first file with the second file;
第七获取模块,用于获取第二文件中文件名称与第一文件中文件名称相同的文件,以及第二文件中文件名称与第一文件中文件名称不相同的文件;The seventh acquisition module is used to acquire files whose file names in the second file are the same as those in the first file, and files whose file names in the second file are different from those in the first file;
覆盖模块,用于利用第一文件中文件名称与第二文件中文件名称相同的文件对应的备份数据覆盖第二文件中文件名称与第一文件中文件名称相同的文件,以及删除第二文件中文件名称与第一文件中文件名称不相同的文件;通过引导指令重新生成引导配置文件,以完成对引导分区的当前数据的恢复。An overwriting module, configured to use the backup data corresponding to the file in the first file with the same file name in the second file to overwrite the file in the second file with the same file name in the first file, and delete the file in the second file. The file name is different from the file name in the first file; regenerate the boot configuration file through the boot command to complete the recovery of the current data of the boot partition.
还包括:Also includes:
升级模块,用于利用恢复后的当前数据对云平台系统进行升级;The upgrade module is used to upgrade the cloud platform system using the current data after recovery;
第八获取模块,用于在检测到云平台系统升级成功后,获取备份目录下的备份配置文件;The eighth acquisition module is used to acquire the backup configuration file in the backup directory after detecting that the cloud platform system upgrade is successful;
第一删除模块,用于根据备份配置文件中的分区信息和各分区对应的快照信息将各分区对应的快照信息进行删除;The first deletion module is used to delete the snapshot information corresponding to each partition according to the partition information in the backup configuration file and the snapshot information corresponding to each partition;
第二删除模块,用于删除根分区下的备份目录。The second deletion module is used to delete the backup directory under the root partition.
由于装置部分的实施例与方法部分的实施例相互对应,因此装置部分的实施例请参见方法部分的实施例的描述,这里暂不赘述。并且具有与上述提到的云平台的控制方法相同的有益效果。Since the embodiments of the device part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the device part, and will not be described again here. And it has the same beneficial effects as the control method of the cloud platform mentioned above.
图6为本发明另一实施例提供的云平台的控制设备的结构图。本实施例基于硬件角度,如图6所示,云平台的控制设备包括:Figure 6 is a structural diagram of a control device of a cloud platform provided by another embodiment of the present invention. This embodiment is based on the hardware perspective. As shown in Figure 6, the control equipment of the cloud platform includes:
存储器20,用于存储计算机程序;Memory 20, used to store computer programs;
处理器21,用于执行计算机程序时实现如上述实施例中所提到的云平台的控制方法的步骤。The processor 21 is configured to implement the steps of the cloud platform control method as mentioned in the above embodiment when executing the computer program.
其中,处理器21可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器21可以采用数字信号处理器(Digital Signal Processor,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable LogicArray,PLA)中的至少一种硬件形式来实现。处理器21也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称中央处理器(CentralProcessing Unit,CPU);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器21可以集成有图形处理器(Graphics Processing Unit,GPU),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器21还可以包括人工智能(Artificial Intelligence,AI)处理器,该AI处理器用于处理有关机器学习的计算操作。The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may adopt at least one hardware form among a digital signal processor (Digital Signal Processor, DSP), a field-programmable gate array (Field-Programmable Gate Array, FPGA), and a programmable logic array (Programmable Logic Array, PLA). accomplish. The processor 21 may also include a main processor and a co-processor. The main processor is a processor used to process data in the wake-up state, also called a central processing unit (Central Processing Unit, CPU); the co-processor is A low-power processor used to process data in standby mode. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (Artificial Intelligence, AI) processor, which is used to process computing operations related to machine learning.
存储器20可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器20还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。本实施例中,存储器20至少用于存储以下计算机程序201,其中,该计算机程序被处理器21加载并执行之后,能够实现前述任一实施例公开的云平台的控制方法的相关步骤。另外,存储器20所存储的资源还可以包括操作系统202和数据203等,存储方式可以是短暂存储或者永久存储。其中,操作系统202可以包括Windows、Unix、Linux等。数据203可以包括但不限于上述所提到的云平台的控制方法所涉及到的数据等。Memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory, and non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201. After the computer program is loaded and executed by the processor 21, the relevant steps of the cloud platform control method disclosed in any of the foregoing embodiments can be implemented. In addition, the resources stored in the memory 20 may also include the operating system 202, data 203, etc., and the storage method may be short-term storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, data involved in the above-mentioned control method of the cloud platform, etc.
在一些实施例中,云平台的控制设备还可包括有显示屏22、输入输出接口23、通信接口24、电源25以及通信总线26。In some embodiments, the control device of the cloud platform may also include a display screen 22, an input and output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
本领域技术人员可以理解,图6中示出的结构并不构成对云平台的控制设备的限定,可以包括比图示更多或更少的组件。Those skilled in the art can understand that the structure shown in Figure 6 does not constitute a limitation on the control device of the cloud platform, and may include more or fewer components than shown in the figure.
本发明实施例提供的云平台的控制设备,包括存储器和处理器,处理器在执行存储器存储的程序时,能够实现如下方法:云平台的控制方法,效果同上。The cloud platform control device provided by the embodiment of the present invention includes a memory and a processor. When the processor executes the program stored in the memory, the following method can be implemented: The cloud platform control method has the same effect as above.
最后,本发明还提供一种计算机可读存储介质对应的实施例。计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如上述方法实施例中记载的步骤。Finally, the present invention also provides a corresponding embodiment of a computer-readable storage medium. The computer program is stored on the computer-readable storage medium. When the computer program is executed by the processor, the steps recorded in the above method embodiments are implemented.
可以理解的是,如果上述实施例中的方法以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。It can be understood that if the methods in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .
本发明提供的计算机可读存储介质包括上述提到的云平台的控制方法,效果同上。The computer-readable storage medium provided by the present invention includes the above-mentioned cloud platform control method, and the effect is the same as above.
以上对本发明所提供的一种云平台的控制方法、装置、设备及介质进行了详细介绍。说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。The above has introduced in detail the control method, device, equipment and media of a cloud platform provided by the present invention. Each embodiment in the specification is described in a progressive manner. Each embodiment focuses on its differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple. For relevant details, please refer to the description in the method section. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the scope of the claims of the present invention.
还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations There is no such actual relationship or sequence between operations. Furthermore, the terms "comprises," "comprises," or any other variations thereof are intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also those not expressly listed other elements, or elements inherent to the process, method, article or equipment. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article, or apparatus that includes the stated element.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311460366.2A CN117492920A (en) | 2023-11-03 | 2023-11-03 | Control method, device, equipment and medium of cloud platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311460366.2A CN117492920A (en) | 2023-11-03 | 2023-11-03 | Control method, device, equipment and medium of cloud platform |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117492920A true CN117492920A (en) | 2024-02-02 |
Family
ID=89684307
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311460366.2A Pending CN117492920A (en) | 2023-11-03 | 2023-11-03 | Control method, device, equipment and medium of cloud platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117492920A (en) |
-
2023
- 2023-11-03 CN CN202311460366.2A patent/CN117492920A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11789823B2 (en) | Selective processing of file system objects for image level backups | |
US6820214B1 (en) | Automated system recovery via backup and restoration of system state | |
US10146640B2 (en) | Recovering a volume table and data sets | |
US6851073B1 (en) | Extensible system recovery architecture | |
CN111625401A (en) | Data backup method and device based on cluster file system and readable storage medium | |
EP1915680B1 (en) | Archiving data in a virtual application environment | |
CN106062742B (en) | System and method for improving snapshot performance | |
CN106951345B (en) | Consistency test method and device for disk data of virtual machine | |
US9367400B2 (en) | System reset | |
US7694169B2 (en) | Restoring a client device | |
US20080082593A1 (en) | Using shrinkable read-once snapshots for online data backup | |
JPH09101912A (en) | Difference backup system | |
CN113886143B (en) | Virtual machine continuous data protection method and device and data recovery method and device | |
US11150981B2 (en) | Fast recovery from failures in a chronologically ordered log-structured key-value storage system | |
CN110209525B (en) | Operating system restoration method and device | |
CN115576743B (en) | Operating system recovery method, operating system recovery device, computer equipment and storage medium | |
CN117112072B (en) | Cross-platform virtual machine drive replacement method, system and storage medium | |
CN117492920A (en) | Control method, device, equipment and medium of cloud platform | |
CN114490176B (en) | Disaster recovery system and disaster recovery method for Linux cross-disk volume group | |
CN114840362A (en) | A cloud host recovery method, device and medium | |
CN118377657B (en) | Data recovery method and device, storage medium and electronic equipment | |
CN119961061A (en) | A virtual machine backup and recovery method, device, equipment and medium | |
CN118427018A (en) | Auxiliary restoration method, device, electronic equipment, storage medium, system and computer program product of operating system | |
CN119179605A (en) | Electromagnetic transient simulation running state snapshot storage and recovery method and related device | |
CN120045272A (en) | Cloud virtual machine recovery method and device |
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 |