[go: up one dir, main page]

CN111382006A - Operating system recovery method, device, device and medium - Google Patents

Operating system recovery method, device, device and medium Download PDF

Info

Publication number
CN111382006A
CN111382006A CN201811615966.0A CN201811615966A CN111382006A CN 111382006 A CN111382006 A CN 111382006A CN 201811615966 A CN201811615966 A CN 201811615966A CN 111382006 A CN111382006 A CN 111382006A
Authority
CN
China
Prior art keywords
host
systems
operating system
emergency
backed
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.)
Granted
Application number
CN201811615966.0A
Other languages
Chinese (zh)
Other versions
CN111382006B (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.)
China Mobile Communications Group Co Ltd
China Mobile Group Sichuan Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Sichuan 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 China Mobile Communications Group Co Ltd, China Mobile Group Sichuan Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201811615966.0A priority Critical patent/CN111382006B/en
Publication of CN111382006A publication Critical patent/CN111382006A/en
Application granted granted Critical
Publication of CN111382006B publication Critical patent/CN111382006B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/1479Generic software techniques for error detection or fault masking
    • G06F11/1482Generic software techniques for error detection or fault masking by means of middleware or OS functionality

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Hardware Redundancy (AREA)

Abstract

本发明实施例提供一种操作系统的恢复方法、装置、设备及介质。该方法包括:对待备份主机的操作系统进行备份,获得多个操作系统备份;当待备份主机出现故障时,将多个操作系统备份进行翻转,形成多个应急系统;将多个应急系统映射至待恢复主机,使得待恢复主机在启动时通过多个应急系统中的一个进行启动。利用本发明实施例的上述方案,通过把应急系统映射给待恢复主机,使得待恢复主机可以通过应急系统进行直接启动,无需进行数据的传输恢复,极大的节省了系统恢复使用的时间。

Figure 201811615966

Embodiments of the present invention provide a method, apparatus, device, and medium for recovering an operating system. The method includes: backing up the operating system of the host to be backed up to obtain multiple operating system backups; when the host to be backed up fails, flipping the multiple operating system backups to form multiple emergency systems; mapping the multiple emergency systems to The host to be restored, so that the host to be restored is activated through one of multiple emergency systems when it is activated. Using the above solution of the embodiment of the present invention, by mapping the emergency system to the host to be restored, the host to be restored can be directly started through the emergency system without data transmission and restoration, which greatly saves the time for system restoration.

Figure 201811615966

Description

操作系统的恢复方法、装置、设备及介质Operating system recovery method, device, device and medium

技术领域technical field

本发明涉及通信技术领域,尤其涉及一种操作系统的恢复方法、装置、设备及介质。The present invention relates to the field of communication technologies, and in particular, to a method, apparatus, device and medium for restoring an operating system.

背景技术Background technique

现有技术中,对于操作系统的备份和恢复,包括操作系统中的配置信息及已安装的程序文件的保护,一般分为两种方式:In the prior art, the backup and recovery of the operating system, including the configuration information in the operating system and the protection of installed program files, are generally divided into two ways:

第一、基于文件的备份恢复:按照文件的方式进行备份,即将操作系统内的相文件按照目录结构进行整体备份。First, file-based backup and recovery: backup is performed according to the file method, that is, the relative files in the operating system are backed up as a whole according to the directory structure.

系统故障损坏需要进行恢复时,在准备好所需硬件主机的条件下,首先对硬件主机重新安装与原有操作系统平台及版本一致的操作系统软件,并完成补丁安装等操作;然后部署相应的备份软件,通过备份软件读取原有操作系统待备份的数据,将已备份的操作系统内的各个文件通过网络链路恢复到重新安装的操作系统中,最终完成整个系统的恢复。When the system is damaged and needs to be recovered, under the condition that the required hardware host is prepared, first reinstall the operating system software that is consistent with the original operating system platform and version on the hardware host, and complete the patch installation and other operations; then deploy the corresponding hardware host. The backup software reads the data to be backed up in the original operating system through the backup software, restores each file in the backed up operating system to the reinstalled operating system through the network link, and finally completes the recovery of the entire system.

第二、基于祼金属的备份恢复:在对操作系统进行备份时,采集操作系统相关的信息,例如磁盘的分区信息,网络的配置信息等,并建立一个可配置网络的引导镜像。Second, backup and recovery based on bare metal: when backing up the operating system, collect operating system-related information, such as disk partition information, network configuration information, etc., and create a configurable network boot image.

系统故障损坏需要进行恢复时,在准备好所需硬件主机的条件下,由引导镜像将主机引导启动并配置网络,再由备份软件将已备份的操作系统相关的信息进行写入:对新主机的磁盘进行分区,同时进行所有已备份文件的恢复,将整个过程交由备份软件来自动化实现。When the system is damaged and needs to be recovered, under the condition that the required hardware host is prepared, the boot image will boot the host and configure the network, and then the backup software will write the information related to the backed up operating system: to the new host The disk is partitioned, and all the backed up files are restored at the same time, and the whole process is automatically realized by the backup software.

下面对现有的上述两种操作系统备份保护手段存在的缺点进行介绍,具体如下:The shortcomings of the existing two operating system backup protection methods are described below, and the details are as follows:

第一、基于文件的备份恢复,在恢复过程中,需要进行多次重启(操作系统安装、补丁安装、参数修改生产、应用程序安装等),需要多方人员配合并进行现场值守,操作过程复杂而且对整体系统带来的偏差较大,例如,系统或程序的版本、参数设置的具体值等。First, file-based backup and recovery requires multiple restarts (operating system installation, patch installation, parameter modification production, application installation, etc.) The deviation brought to the overall system is relatively large, for example, the version of the system or program, the specific value of parameter settings, etc.

第二、基于祼金属的备份恢复,相对于基于文件的备份恢复来说,节省了部分步骤及时间,避免了大量的人为操作带来的偏差,但基于祼金属的恢复对备份操作维护要求较高,通常需要针对每台不同的物理硬件及操作系统创建一个引导镜像,在恢复的时候需要利用针对性的引导镜像来完成恢复,而且引导镜像需要不断更新,否则在故障出现的时候可能会影响恢复的速度和恢复后的状态。Second, the backup and recovery based on bare metal, compared with the backup and recovery based on files, saves some steps and time, and avoids a large number of deviations caused by human operations, but the recovery based on bare metal requires more backup operation and maintenance. High, usually a boot image needs to be created for each different physical hardware and operating system. During recovery, a targeted boot image needs to be used to complete the recovery, and the boot image needs to be updated continuously, otherwise it may be affected when a fault occurs. The speed of recovery and the state after recovery.

综上所述,在以上两种的操作系统恢复方式下,实际上仍是需要通过手动或自动的方式完成操作系统安装并完成操作系统内的文件恢复,仍然需要进行传输恢复数据,系统的恢复耗时更多的依赖于数据恢复传输的链路带宽。To sum up, under the above two operating system recovery methods, it is still necessary to complete the operating system installation and complete the file recovery in the operating system manually or automatically. It is still necessary to transfer the recovery data and restore the system. The time consuming is more dependent on the link bandwidth for data recovery transmission.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供了一种操作系统的恢复方法、装置、设备及介质,通过把应急系统映射给待恢复主机,使得待恢复主机可以通过应急系统进行直接启动,无需进行数据的传输恢复,极大的节省了系统恢复使用的时间。Embodiments of the present invention provide a method, device, device and medium for restoring an operating system. By mapping the emergency system to the host to be restored, the host to be restored can be directly started through the emergency system without data transmission and restoration. It greatly saves the time for system recovery.

第一方面,本发明实施例提供了一种操作系统的恢复方法,方法包括:In a first aspect, an embodiment of the present invention provides a method for recovering an operating system, including:

对待备份主机的操作系统进行备份,获得多个操作系统备份;Back up the operating system of the host to be backed up to obtain multiple operating system backups;

当所述待备份主机出现故障时,将所述多个操作系统备份进行翻转,形成多个应急系统;When the host to be backed up fails, flip the multiple operating system backups to form multiple emergency systems;

将所述多个应急系统映射至待恢复主机,使得所述待恢复主机在启动时通过所述多个应急系统中的一个进行启动。The multiple emergency systems are mapped to the host to be restored, so that the host to be restored starts up through one of the multiple emergency systems when starting.

根据本发明实施例所述的操作系统的恢复方法,所述多个操作系统备份中的每一个均包括如下项中的至少一项:According to the method for restoring an operating system according to the embodiment of the present invention, each of the multiple operating system backups includes at least one of the following items:

引导信息、网络配置、磁盘分区和内容文件。Boot information, network configuration, disk partitions, and content files.

根据本发明实施例所述的操作系统的恢复方法,所述将所述多个操作系统备份进行翻转,包括:According to the operating system recovery method according to the embodiment of the present invention, the flipping of the multiple operating system backups includes:

将所述多个操作系统备份的引导信息直接翻转为所述多个应急系统的引导信息;directly inverting the boot information backed up by the multiple operating systems into the boot information of the multiple emergency systems;

将所述多个操作系统备份的网络配置修正翻转为所述多个应急系统的网络配置;reversing the network configurations backed up by the multiple operating systems to the network configurations of the multiple emergency systems;

将所述多个操作系统备份的各个磁盘分区修正翻转为所述多个应急系统的各个磁盘分区;Correcting and flipping each disk partition backed up by the multiple operating systems to each disk partition of the multiple emergency systems;

将所述多个操作系统备份的内容文件直接翻转为所述多个应急系统的内容文件。The content files backed up by the plurality of operating systems are directly reversed to the content files of the plurality of emergency systems.

根据本发明实施例所述的操作系统的恢复方法,所述将所述多个操作系统备份的网络配置修正翻转为所述多个应急系统的网络配置,包括:According to the method for restoring an operating system according to the embodiment of the present invention, the modifying and reversing the network configurations backed up by the multiple operating systems to the network configurations of the multiple emergency systems includes:

基于用户需求,将所述多个操作系统备份的网络配置的媒体访问控制MAC地址、IP地址或网关修正翻转为所述多个应急系统的网络配置的MAC地址、IP地址或网关。Based on user requirements, the media access control MAC addresses, IP addresses or gateways of the network configurations backed up by the multiple operating systems are corrected and reversed to the MAC addresses, IP addresses or gateways of the network configurations of the multiple emergency systems.

根据本发明实施例所述的操作系统的恢复方法,所述将所述多个操作系统备份的各个磁盘分区修正翻转为所述多个应急系统的各个磁盘分区,包括:According to the operating system recovery method according to the embodiment of the present invention, the correction and flipping of each disk partition backed up by the multiple operating systems into the respective disk partitions of the multiple emergency systems includes:

基于所述多个操作系统备份的各个磁盘分区的已使用空间大小和总空间大小,将所述多个操作系统备份的各个磁盘分区修正翻转为所述多个应急系统的各个磁盘分区,使得所述多个应急系统的各个磁盘分区的空间大小大于所述多个操作系统备份的各个磁盘分区的已使用空间大小且小于所述多个操作系统备份的各个磁盘分区的总空间大小。Based on the used space size and the total space size of the respective disk partitions backed up by the multiple operating systems, the respective disk partitions backed up by the multiple operating systems are corrected and flipped to the respective disk partitions of the multiple emergency systems, so that all The space size of each disk partition of the multiple emergency systems is larger than the used space size of each disk partition backed up by the multiple operating systems and smaller than the total space size of each disk partition backed up by the multiple operating systems.

根据本发明实施例所述的操作系统的恢复方法,所述将所述多个应急系统映射至待恢复主机,包括:According to the operating system recovery method according to the embodiment of the present invention, the mapping of the multiple emergency systems to the host to be recovered includes:

基于只读方式,通过交换网络,将所述多个应急系统映射至待恢复主机。In a read-only manner, the multiple emergency systems are mapped to the host to be restored through the switching network.

根据本发明实施例所述的操作系统的恢复方法,所述通过所述多个应急系统中的一个进行启动,包括:According to the method for recovering an operating system according to the embodiment of the present invention, the booting through one of the multiple emergency systems includes:

通过所述多个应急系统中的一个进行启动时,在所述待恢复主机的本地磁盘中创建恢复日志,所述恢复日志用于存放新写入的数据。When starting through one of the multiple emergency systems, a recovery log is created in the local disk of the host to be recovered, and the recovery log is used to store newly written data.

根据本发明实施例所述的操作系统的恢复方法,还包括:The operating system recovery method according to the embodiment of the present invention further includes:

通过反向克隆,将所述多个应急系统中的一个固化至所述待恢复主机的本地磁盘中。Through reverse cloning, one of the multiple emergency systems is solidified into the local disk of the host to be restored.

根据本发明实施例所述的操作系统的恢复方法,所述通过反向克隆,将所述多个应急系统中的一个固化至所述待恢复主机的本地磁盘中,包括:According to the method for recovering an operating system according to the embodiment of the present invention, solidifying one of the multiple emergency systems into the local disk of the host to be recovered by reverse cloning includes:

将所述多个应急系统中的一个的引导信息直接克隆为所述待恢复主机的本地磁盘的引导信息;directly clone the boot information of one of the multiple emergency systems as the boot information of the local disk of the host to be restored;

将所述多个应急系统中的一个的网络配置修正克隆为所述待恢复主机的本地磁盘的网络配置;Correcting and cloning the network configuration of one of the multiple emergency systems into the network configuration of the local disk of the host to be restored;

将所述多个应急系统中的一个的磁盘分区修正克隆为所述待恢复主机的本地磁盘的磁盘分区;Correcting and cloning the disk partition of one of the multiple emergency systems into the disk partition of the local disk of the host to be restored;

将所述多个应急系统中的一个的内容文件直接克隆为所述待恢复主机的本地磁盘的内容文件。The content file of one of the multiple emergency systems is directly cloned into the content file of the local disk of the host to be restored.

根据本发明实施例所述的操作系统的恢复方法,还包括:The operating system recovery method according to the embodiment of the present invention further includes:

将所述待恢复主机重新启动,断开与所述应急系统之间的映射,选择所述待恢复主机的本地磁盘进行引导,以实现恢复。The host to be restored is restarted, the mapping with the emergency system is disconnected, and the local disk of the host to be restored is selected for booting, so as to realize recovery.

第二方面,本发明实施例提供了一种操作系统的恢复装置,装置包括:In a second aspect, an embodiment of the present invention provides an apparatus for restoring an operating system, and the apparatus includes:

操作系统备份模块,用于对待备份主机的操作系统进行备份,获得多个操作系统备份;The operating system backup module is used to back up the operating system of the host to be backed up to obtain multiple operating system backups;

应急系统,用于当所述待备份主机出现故障时,将所述多个操作系统备份进行翻转,形成多个应急系统;an emergency system, used for flipping the multiple operating system backups to form multiple emergency systems when the host to be backed up fails;

映射模块,用于将所述多个应急系统映射至待恢复主机,使得所述待恢复主机在启动时通过所述多个应急系统中的一个进行启动。A mapping module, configured to map the multiple emergency systems to the host to be restored, so that the host to be restored starts up through one of the multiple emergency systems when it is started.

根据本发明实施例所述的操作系统的恢复装置,所述多个操作系统备份中的每一个均包括如下项中的至少一项:According to the apparatus for restoring an operating system according to the embodiment of the present invention, each of the multiple operating system backups includes at least one of the following items:

引导信息、网络配置、磁盘分区和内容文件。Boot information, network configuration, disk partitions, and content files.

根据本发明实施例所述的操作系统的恢复装置,应急系统具体用于:According to the operating system recovery device according to the embodiment of the present invention, the emergency system is specifically used for:

将所述多个操作系统备份的引导信息直接翻转为所述多个应急系统的引导信息;directly inverting the boot information backed up by the multiple operating systems into the boot information of the multiple emergency systems;

将所述多个操作系统备份的网络配置修正翻转为所述多个应急系统的网络配置;reversing the network configurations backed up by the multiple operating systems to the network configurations of the multiple emergency systems;

将所述多个操作系统备份的各个磁盘分区修正翻转为所述多个应急系统的各个磁盘分区;Correcting and flipping each disk partition backed up by the multiple operating systems to each disk partition of the multiple emergency systems;

将所述多个操作系统备份的内容文件直接翻转为所述多个应急系统的内容文件。The content files backed up by the plurality of operating systems are directly reversed to the content files of the plurality of emergency systems.

根据本发明实施例所述的操作系统的恢复装置,应急系统具体用于:According to the operating system recovery device according to the embodiment of the present invention, the emergency system is specifically used for:

基于用户需求,将所述多个操作系统备份的网络配置的媒体访问控制MAC地址、IP地址或网关修正翻转为所述多个应急系统的网络配置的MAC地址、IP地址或网关。Based on user requirements, the media access control MAC addresses, IP addresses or gateways of the network configurations backed up by the multiple operating systems are corrected and reversed to the MAC addresses, IP addresses or gateways of the network configurations of the multiple emergency systems.

根据本发明实施例所述的操作系统的恢复装置,应急系统具体用于:According to the operating system recovery device according to the embodiment of the present invention, the emergency system is specifically used for:

基于所述多个操作系统备份的各个磁盘分区的已使用空间大小和总空间大小,将所述多个操作系统备份的各个磁盘分区修正翻转为所述多个应急系统的各个磁盘分区,使得所述多个应急系统的各个磁盘分区的空间大小大于所述多个操作系统备份的各个磁盘分区的已使用空间大小且小于所述多个操作系统备份的各个磁盘分区的总空间大小。Based on the used space size and the total space size of the respective disk partitions backed up by the multiple operating systems, the respective disk partitions backed up by the multiple operating systems are corrected and flipped to the respective disk partitions of the multiple emergency systems, so that all The space size of each disk partition of the multiple emergency systems is larger than the used space size of each disk partition backed up by the multiple operating systems and smaller than the total space size of each disk partition backed up by the multiple operating systems.

根据本发明实施例所述的操作系统的恢复装置,映射模块具体用于:According to the operating system recovery device according to the embodiment of the present invention, the mapping module is specifically used for:

基于只读方式,通过交换网络,将所述多个应急系统映射至待恢复主机。In a read-only manner, the multiple emergency systems are mapped to the host to be restored through the switching network.

根据本发明实施例所述的操作系统的恢复装置,启动模块具体用于:According to the operating system recovery device according to the embodiment of the present invention, the startup module is specifically used for:

通过所述多个应急系统中的一个进行启动时,在所述待恢复主机的本地磁盘中创建恢复日志,所述恢复日志用于存放新写入的数据。When starting through one of the multiple emergency systems, a recovery log is created in the local disk of the host to be recovered, and the recovery log is used to store newly written data.

根据本发明实施例所述的操作系统的恢复装置,还包括:The operating system recovery device according to the embodiment of the present invention further includes:

固化模块,用于通过反向克隆,将所述多个应急系统中的一个固化至所述待恢复主机的本地磁盘中。The solidification module is used to solidify one of the multiple emergency systems into the local disk of the host to be restored by reverse cloning.

根据本发明实施例所述的操作系统的恢复装置,固化模块具体用于:According to the operating system recovery device according to the embodiment of the present invention, the curing module is specifically used for:

将所述多个应急系统中的一个的引导信息直接克隆为所述待恢复主机的本地磁盘的引导信息;directly clone the boot information of one of the multiple emergency systems as the boot information of the local disk of the host to be restored;

将所述多个应急系统中的一个的网络配置修正克隆为所述待恢复主机的本地磁盘的网络配置;Correcting and cloning the network configuration of one of the multiple emergency systems into the network configuration of the local disk of the host to be restored;

将所述多个应急系统中的一个的磁盘分区修正克隆为所述待恢复主机的本地磁盘的磁盘分区;Correcting and cloning the disk partition of one of the multiple emergency systems into the disk partition of the local disk of the host to be restored;

将所述多个应急系统中的一个的内容文件直接克隆为所述待恢复主机的本地磁盘的内容文件。The content file of one of the multiple emergency systems is directly cloned into the content file of the local disk of the host to be restored.

根据本发明实施例所述的操作系统的恢复装置,还包括:The operating system recovery device according to the embodiment of the present invention further includes:

引导模块,用于将所述待恢复主机重新启动,断开与所述应急系统之间的映射,选择所述待恢复主机的本地磁盘进行引导,以实现恢复。The booting module is used for restarting the host to be recovered, disconnecting the mapping with the emergency system, and selecting the local disk of the host to be recovered for booting, so as to realize recovery.

本发明实施例提供了一种操作系统的恢复设备,包括:至少一个处理器、至少一个存储器以及存储在存储器中的计算机程序指令,当计算机程序指令被处理器执行时实现如上述实施方式中第一方面的方法。An embodiment of the present invention provides an operating system recovery device, including: at least one processor, at least one memory, and computer program instructions stored in the memory. method on the one hand.

第四方面,本发明实施例提供了一种计算机可读存储介质,其上存储有计算机程序指令,当计算机程序指令被处理器执行时实现如上述实施方式中第一方面的方法。In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the method of the first aspect in the foregoing embodiments is implemented.

本发明实施例提供的操作系统的恢复方法、装置、设备及介质,通过把应急系统映射给待恢复主机,使得待恢复主机可以通过应急系统进行直接启动,无需进行数据的传输恢复,极大的节省了系统恢复使用的时间。The operating system recovery method, device, device, and medium provided by the embodiments of the present invention map the emergency system to the host to be recovered, so that the host to be recovered can be directly started through the emergency system without data transmission and recovery, greatly reducing the need for recovery. Save time for system recovery.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the accompanying drawings required in the embodiments of the present invention will be briefly introduced below. For those of ordinary skill in the art, without creative work, the Additional drawings can be obtained from these drawings.

图1示出了本发明一实施例的操作系统的恢复方法的流程示意图;FIG. 1 shows a schematic flowchart of a method for restoring an operating system according to an embodiment of the present invention;

图2示出了本发明实施例的操作系统的恢复装置的结构示意图;FIG. 2 shows a schematic structural diagram of an apparatus for restoring an operating system according to an embodiment of the present invention;

图3示出了本发明另一实施例的操作系统的恢复方法的示意图;3 shows a schematic diagram of a method for restoring an operating system according to another embodiment of the present invention;

图4示出了本发明实施例的操作系统备份翻转的示意图;FIG. 4 shows a schematic diagram of operating system backup rollover according to an embodiment of the present invention;

图5示出了本发明实施例的应急系统映射的示意图;FIG. 5 shows a schematic diagram of emergency system mapping according to an embodiment of the present invention;

图6示出了本发明实施例的应急系统启动的示意图;FIG. 6 shows a schematic diagram of starting an emergency system according to an embodiment of the present invention;

图7示出了本发明实施例的应急系统反向克隆固化至本地磁盘的示意图;FIG. 7 shows a schematic diagram of the reverse clone of the emergency system according to an embodiment of the present invention being solidified to a local disk;

图8示出了本发明实施例的操作系统的恢复设备的硬件结构示意图。FIG. 8 shows a schematic diagram of a hardware structure of an operating system recovery device according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将详细描述本发明的各个方面的特征和示例性实施例,为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细描述。应理解,此处所描述的具体实施例仅被配置为解释本发明,并不被配置为限定本发明。对于本领域技术人员来说,本发明可以在不需要这些具体细节中的一些细节的情况下实施。下面对实施例的描述仅仅是为了通过示出本发明的示例来提供对本发明更好的理解。The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the objects, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present invention, and are not configured to limit the present invention. It will be apparent to those skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is only intended to provide a better understanding of the present invention by illustrating examples of the invention.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this document, 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 any relationship between these entities or operations. any such actual relationship or sequence exists. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element defined by the phrase "comprises" does not preclude the presence of additional identical elements in a process, method, article, or device that includes the element.

参考图1,图1示出了本发明一实施例的操作系统的恢复方法100的流程示意图,该方法包括:Referring to FIG. 1, FIG. 1 shows a schematic flowchart of a method 100 for recovering an operating system according to an embodiment of the present invention. The method includes:

S110,对待备份主机的操作系统进行备份,获得多个操作系统备份;S110, back up the operating system of the host to be backed up to obtain multiple operating system backups;

S120,当待备份主机出现故障时,将多个操作系统备份进行翻转,形成多个应急系统;S120, when the host to be backed up fails, flip multiple operating system backups to form multiple emergency systems;

S130,将多个应急系统映射至待恢复主机,使得待恢复主机在启动时通过多个应急系统中的一个进行启动。S130: Map multiple emergency systems to the host to be restored, so that the host to be restored starts up through one of the multiple emergency systems when it is started.

通过本发明实施例提供的上述方案,通过对备份主机的操作系统进行备份,将多个操作系统备份进行翻转,形成多个应急系统,再将应急系统映射给待恢复主机,使得待恢复主机可以通过应急系统进行直接启动,无需进行数据的传输恢复,极大的节省了系统恢复使用的时间。Through the above solution provided by the embodiment of the present invention, by backing up the operating system of the backup host, flipping multiple operating system backups to form multiple emergency systems, and then mapping the emergency system to the host to be restored, so that the host to be restored can Direct startup through the emergency system does not require data transmission and recovery, which greatly saves the time for system recovery.

参考图2,图2示出了本发明实施例的操作系统的恢复装置200的结构示意图,该装置包括:Referring to FIG. 2, FIG. 2 shows a schematic structural diagram of an operating system recovery apparatus 200 according to an embodiment of the present invention. The apparatus includes:

操作系统备份模块210,用于对待备份主机的操作系统进行备份,获得多个操作系统备份;The operating system backup module 210 is used for backing up the operating system of the host to be backed up to obtain multiple operating system backups;

应急系统220,用于当待备份主机出现故障时,将多个操作系统备份进行翻转,形成多个应急系统;The emergency system 220 is used for flipping multiple operating system backups to form multiple emergency systems when the host to be backed up fails;

映射模块230,用于将多个应急系统映射至待恢复主机,使得待恢复主机在启动时通过多个应急系统中的一个进行启动。The mapping module 230 is configured to map multiple emergency systems to the host to be restored, so that the host to be restored starts up through one of the multiple emergency systems during startup.

通过本发明实施例提供的上述方案,通过对备份主机的操作系统进行备份,将多个操作系统备份进行翻转,形成多个应急系统,再将应急系统映射给待恢复主机,使得待恢复主机可以通过应急系统进行直接启动,无需进行数据的传输恢复,极大的节省了系统恢复使用的时间。Through the above solution provided by the embodiment of the present invention, by backing up the operating system of the backup host, flipping multiple operating system backups to form multiple emergency systems, and then mapping the emergency system to the host to be restored, so that the host to be restored can Direct startup through the emergency system does not require data transmission and recovery, which greatly saves the time for system recovery.

本发明实施例提出的操作系统的快速恢复方法,能够在将操作系统备份至应急恢复平台后,将应急恢复平台中保留的操作系统备份翻转为应急系统,将应急系统直接映射给需要恢复的主机,作为恢复主机的系统磁盘,支撑恢复主机直接启动,避免了数据传输过程,以最快的速度、最简化的步骤完成系统的恢复启动,并且恢复主机启动后可利用磁盘的反向克隆,将该应急系统固化至恢复主机的本地磁盘中。The rapid recovery method of the operating system proposed by the embodiment of the present invention can, after backing up the operating system to the emergency recovery platform, turn the operating system backup retained in the emergency recovery platform into the emergency system, and directly map the emergency system to the host that needs to be recovered , as the system disk of the recovery host, it supports the direct startup of the recovery host, avoids the data transfer process, completes the system recovery startup with the fastest speed and the most simplified steps, and can use the reverse clone of the disk after the recovery host is started. The emergency system is hardened into the local disk of the recovery host.

为了实施本发明实施例的方法,会预先将应急恢复平台的存储空间切割为应急启动区与恢复保留区两部份,下面对应急启动区与恢复保留区进行介绍,具体如下:In order to implement the method of the embodiment of the present invention, the storage space of the emergency recovery platform will be divided into two parts: the emergency startup area and the recovery reserved area in advance. The emergency startup area and the recovery reserved area will be introduced below, and the details are as follows:

应急启动区,用于在操作系统故障时作为应急系统,不需要进行数据恢复传输,直接启动主机,缩短恢复准备时间;The emergency startup area is used as an emergency system when the operating system fails, and it does not need to perform data recovery and transmission, and directly starts the host to shorten the recovery preparation time;

恢复保留区,用于操作系统的历史副本保留,以便在故障情况下选择需要的历史版本进行翻转后应急启动。The recovery reserve area is used for the reservation of historical copies of the operating system, so that in the event of a failure, the required historical version can be selected for emergency startup after rollover.

所有的操作系统备份均写入恢复保留区,在需要进行历史数据的恢复时,将操作系统备份从恢复保留区翻转至应急启动区,在启动后可通过反向克隆将操作系统备份从应急恢复平台固化至恢复主机的本地磁盘,便于后续的启动。All operating system backups are written into the recovery reserve area. When historical data needs to be restored, the operating system backup can be flipped from the recovery reserve area to the emergency boot area. After booting, the operating system backup can be restored from the emergency by reverse cloning. The platform is solidified to the local disk of the recovery host, which is convenient for subsequent startup.

下面结合图3,对本发明实施例的操作系统快速回复方案作详细的阐述,图3示出了本发明另一实施例的操作系统的恢复方法300的示意图,具体如下:The following is a detailed description of an operating system quick recovery scheme according to an embodiment of the present invention with reference to FIG. 3 . FIG. 3 shows a schematic diagram of a method 300 for recovering an operating system according to another embodiment of the present invention, and the details are as follows:

第一步,执行完整系统备份;The first step is to perform a full system backup;

在备份时,将操作系统的相关配置信息进行完整备份,其中配置信息主要包括引导信息、磁盘分区以及内容文件等,形成一个完整的操作系统备份,以下对配置信息的各个组成部分进行介绍,具体如下:When backing up, complete backup of the relevant configuration information of the operating system. The configuration information mainly includes boot information, disk partitions and content files, etc., to form a complete operating system backup. The following describes each component of the configuration information. as follows:

引导信息:用于操作系统硬盘启动时将系统控制转给指定的并在分区表中登记的操作系统(不同的操作系统的引导信息不同)。Boot information: It is used to transfer the system control to the specified operating system and registered in the partition table when the operating system hard disk is started (different operating systems have different boot information).

网络配置:必要的网络端口的配置,包括媒体访问控制(Media Access ControlAddress,MAC)地址、IP信息等。以便于在后续的恢复中进行网络映射启动,以及恢复后的连接验证。Network configuration: configuration of necessary network ports, including media access control (Media Access Control Address, MAC) address, IP information, etc. In order to facilitate network mapping startup in subsequent recovery, and connection verification after recovery.

磁盘分区:操作系统磁盘上的分区或文件系统分布情况,负责说明操作系统中有哪些分区或文件系统,各个分区或文件系统的大小及使用情况。Disk partition: The distribution of partitions or file systems on the operating system disk, which is responsible for describing which partitions or file systems exist in the operating system, the size and usage of each partition or file system.

内容文件:操作系统中各个分区或文件系统中包含了哪些内容,并将这些内容备份下来。Content files: What content is contained in each partition or file system in the operating system, and back up these content.

以上4部分内容将形成一个完整的操作系统备份,该操作系统备份将存入应急恢复平台的恢复保留区中进行保存,保存过程中可以采用通用的重复数据删除技术等。The above four parts will form a complete operating system backup, which will be stored in the recovery reserve area of the emergency recovery platform for preservation. Common data deduplication technology can be used during the preservation process.

参考表1,表1示出了操作系统备份各个组成部分的示意表:Referring to Table 1, Table 1 shows a schematic diagram of the various components of the operating system backup:

表1Table 1

Figure BDA0001925826540000101
Figure BDA0001925826540000101

第二步,故障时选择备份进行翻转;The second step is to select the backup to roll over in case of failure;

通过第一步的完整操作系统备份,记录了操作系统的诸如引导信息、网络配置、磁盘分区以及内容文件等。Through the full operating system backup in the first step, the operating system such as boot information, network configuration, disk partitions, and content files are recorded.

当备份主机出现故障时,可以指定一个其操作系统备份的历史副本,将一个操作系统备份翻转为一个应急系统。When a backup host fails, you can specify a historical copy of its operating system backup to turn an operating system backup into an emergency system.

翻转时,可根据磁盘分区大小及内容大小指定应急系统的分区大小,并在进行异机恢复时可以修改其网络配置。When flipping, the partition size of the emergency system can be specified according to the disk partition size and content size, and its network configuration can be modified during universal recovery.

应该注意的是,在一些实施例中备份主机与恢复主机可以为同机;在其他实施例中,备份主机与恢复主机可以为异机。It should be noted that, in some embodiments, the backup host and the recovery host may be the same machine; in other embodiments, the backup host and the recovery host may be different machines.

作为一个示例,参考图4,图4示出了本发明实施例的操作系统备份翻转的示意图。As an example, referring to FIG. 4 , FIG. 4 shows a schematic diagram of operating system backup rollover according to an embodiment of the present invention.

在已完成了一个完整操作系统备份,存放于恢复保留区的情况下,现需将一个操作系统备份翻转为一个应急系统并交由一台恢复主机使用,以下介绍操作系统备份的各个组成部分是如何进行翻转的,具体如下:When a complete operating system backup has been completed and stored in the recovery reserve area, it is necessary to turn an operating system backup into an emergency system and hand it over to a recovery host. The following describes the components of the operating system backup: How to flip, as follows:

首先,引导信息,原系统为Linux系统,将其直接翻转为应急系统的引导信息;First, the boot information, the original system is the Linux system, and it is directly turned into the boot information of the emergency system;

其次,网络配置,原系统在MAC地址为1A:2B:3C:4E的网卡上配置的IP地址为192.168.0.100地址,且网关为192.168.0.1;在如图4所示的实施例中,该翻转为异机恢复故进行修正翻转,修正其MAC地址为4E:3C:2B:1A,IP地址为192.168.0.101,网关不变。在其他实施例中,该翻转可以为同机恢复。Secondly, network configuration, the IP address configured by the original system on the network card whose MAC address is 1A:2B:3C:4E is 192.168.0.100, and the gateway is 192.168.0.1; in the embodiment shown in Figure 4, the The flip is a universal recovery, so it is corrected and flipped. The modified MAC address is 4E:3C:2B:1A, the IP address is 192.168.0.101, and the gateway remains unchanged. In other embodiments, the rollover can be co-host recovery.

应该注意的是,图4仅为一个示例。在其他实施例中,可以修正翻转MAC地址、IP地址和网关中的一种或多种。It should be noted that Figure 4 is just an example. In other embodiments, one or more of the rollover MAC address, IP address, and gateway may be modified.

再次,磁盘分区,原系统中划分了3个分区:分区1总空间为10GB,已使用5GB;分区2总空间为20GB,已使用10GB;分区3总空间为30GB,已使用15GB。Third, the disk partition, the original system is divided into 3 partitions: the total space of partition 1 is 10GB, and 5GB has been used; the total space of partition 2 is 20GB, and 10GB has been used; the total space of partition 3 is 30GB, and 15GB has been used.

为了节省应急启动区空间,对磁盘分区进行修正翻转,将分区1划分为8GB【>5GB(大于已使用),<10GB(小于总大小)】;将分区2划分为18GB【>10GB(大于已使用),<20GB(小于总大小)】;将分区3划分为28GB【>15GB(大于已使用),<30GB(小于总大小)】。In order to save the space of the emergency boot area, the disk partition is corrected and flipped, and partition 1 is divided into 8GB [>5GB (greater than used), <10GB (less than the total size)]; partition 2 is divided into 18GB [>10GB (greater than used) used), <20GB (less than total size)]; partition 3 into 28GB [>15GB (more than used), <30GB (less than total size)].

应该注意的是,修正翻转的修正值可以根据需求进行自定义设置。在上述实施例中,出于对应急启动区空间利用率的考虑,对分区大小的修正,不能小于已使用,不能大于总大小。It should be noted that the correction value of the correction rollover can be customized according to the needs. In the above-mentioned embodiment, for consideration of the space utilization rate of the emergency start area, the modification to the partition size cannot be smaller than the used size and cannot be larger than the total size.

最后,内容文件,内容文件将进行直接翻转,无法进行修正。Finally, the content file, the content file will be flipped directly and cannot be corrected.

第三步,映射后直接应急启动;The third step is to start the emergency directly after mapping;

作为一个示例,参考图5,图5示出了本发明实施例的应急系统映射示意图。As an example, referring to FIG. 5 , FIG. 5 shows a schematic diagram of emergency system mapping according to an embodiment of the present invention.

翻转过程将在应急恢复平台内快速完成,翻转完成后形成一个或多个应急系统,可映射给恢复主机直接使用。The rollover process will be completed quickly in the emergency recovery platform. After the rollover is completed, one or more emergency systems will be formed, which can be mapped to the recovery host for direct use.

应急系统可通过多种方式进行只读映射,包括但不限于FC(光纤链路)映射或PXE引导(网络链路),以便通过交换网络将应急系统映射给多个恢复主机进行识别启动。The emergency system can be read-only mapped in various ways, including but not limited to FC (fiber link) mapping or PXE boot (network link), so that the emergency system can be mapped to multiple recovery hosts through a switched network for identification boot.

(1)应急系统映射(1) Emergency system mapping

由不同的操作系统备份翻转出不同的应急系统,通过交换网络将应急系统以诸如只读方式映射给恢复主机,应急系统将作为恢复主机的系统磁盘支撑该恢复主机进行启动。Different emergency systems are backed up by different operating systems, and the emergency system is mapped to the recovery host in a read-only manner through the switching network.

在此过程中无需传输恢复数据。There is no need to transfer recovery data during this process.

在只读的映射方式下同一个应急系统可以映射给多个不同的恢复主机,同时执行启动。In the read-only mapping mode, the same emergency system can be mapped to multiple different recovery hosts and start at the same time.

同一个恢复主机也可以接受不同的应急系统的映射,在启动时可以选择已映射的应急系统中的一个进行启动。The same recovery host can also accept the mapping of different emergency systems, and can select one of the mapped emergency systems to start when starting.

(2)应急系统启动(2) Emergency system activation

参考图6,图6示出了本发明实施例的应急系统启动的示意图。Referring to FIG. 6 , FIG. 6 shows a schematic diagram of starting an emergency system according to an embodiment of the present invention.

作为一个示例,恢复主机在启动时,选择已映射的可用应急系统(例如从通过不同方式映射过来的多个应急系统中选择1个),恢复主机通过应急系统启动时,将在恢复主机的本地磁盘空间中创建恢复日志,该恢复日志用以存放新写入的数据,而应急系统作为处于只读模式保持不变,即可即时恢复主机启动。As an example, when the recovery host starts up, it selects an available emergency system that has been mapped (for example, selects one emergency system from multiple emergency systems mapped in different ways), and when the recovery host starts through the emergency system, it will A recovery log is created in the disk space to store the newly written data, and the emergency system remains unchanged as a read-only mode, and the host can be restarted immediately.

第四步,应急系统反向克隆固化;The fourth step, the emergency system is reverse cloned and solidified;

在恢复主机通过应急系统完成应急启动后,可以将应急系统通过反向克隆固化至恢复主机的本地磁盘中。After the recovery host completes the emergency startup through the emergency system, the emergency system can be solidified into the local disk of the recovery host through reverse cloning.

如图7所示,图7示出了本发明实施例的应急系统反向克隆固化至本地磁盘的示意图。As shown in FIG. 7 , FIG. 7 shows a schematic diagram of a reverse clone of an emergency system according to an embodiment of the present invention and hardened to a local disk.

作为一个示例,以下介绍将应急系统反向克隆固化至本地磁盘时,应急系统各个部分是如何进行反向克隆的,具体如下:As an example, the following describes how each part of the emergency system is reverse cloned when the emergency system is reverse cloned to the local disk, as follows:

首先,引导信息,将引导信息直接克隆为恢复主机的本地磁盘的引导信息;First, the boot information is directly cloned into the boot information of the local disk of the recovery host;

其次,网络配置,由于已完成映射,恢复主机的MAC地址不会修改,而IP地址可以再次进行修正,应急系统中为192.168.0.101,且网关为192.168.0.1;在克隆时,将IP地址修正为192.168.0.103,网关不变。Secondly, the network configuration, since the mapping has been completed, the MAC address of the recovery host will not be modified, but the IP address can be modified again. In the emergency system, it is 192.168.0.101, and the gateway is 192.168.0.1; It is 192.168.0.103, and the gateway remains unchanged.

应该注意的是,图6仅仅是示例性的;在其他实施例中,可以根据需要修正MAC地址、IP地址或网关中的一种或多种。It should be noted that FIG. 6 is merely exemplary; in other embodiments, one or more of the MAC address, IP address, or gateway may be modified as needed.

最后,磁盘分区,应急系统中划分了3个分区:分区1为8GB;分区2为18GB;分区3为28GB。Finally, the disk partition is divided into three partitions in the emergency system: partition 1 is 8GB; partition 2 is 18GB; partition 3 is 28GB.

根据第二步中的恢复保留区中的备份信息,参考表2,表2示出了如图4所示的恢复保留区的操作系统备份各个组成部分的示意表:According to the backup information in the recovery reserved area in the second step, with reference to Table 2, Table 2 shows a schematic table of each component of the operating system backup of the recovery reserved area as shown in Figure 4:

在由应急系统向本地磁盘进行克隆时,可进行修正,将分区1划分为15GB【>5GB(大于已使用),>10GB(大于总大小)】;将分区2划分为20GB【>10GB(大于已使用),=20GB(等于总大小)】;将分区3划分为28GB【>15GB(大于已使用),<30GB(小于总大小)】。When cloning from the emergency system to the local disk, it can be corrected to divide partition 1 into 15GB [>5GB (greater than used), >10GB (greater than total size)]; partition 2 into 20GB [>10GB (greater than the total size) used), = 20GB (equal to total size)]; divide partition 3 into 28GB [>15GB (more than used), <30GB (less than total size)].

表2Table 2

Figure BDA0001925826540000131
Figure BDA0001925826540000131

因此,修正克隆的修正值可以根据需求进行自定义设置,并可以根据具体需求调整网络配置和磁盘分区,以应对不同的恢复目的。Therefore, the correction value of the correction clone can be customized according to the needs, and the network configuration and disk partition can be adjusted according to the specific needs to deal with different recovery purposes.

完成反向克隆,将应急系统固化至本地磁盘后,可以适当的时候将恢复主机重新启动,断开与应急系统的映射,选择本地磁盘进行引导,完成恢复。After the reverse cloning is completed and the emergency system is solidified to the local disk, you can restart the recovery host at an appropriate time, disconnect the mapping with the emergency system, select the local disk for booting, and complete the recovery.

本发明实施例提供的上述方案,通过在备份时对操作系统进行完整备份(例如包括引导信息、网络配置、磁盘分区、内容文件等),形成一个完整的操作系统备份存入应急恢复平台中,在需要恢复时,根据需求将操作系统备份翻转至应急恢复平台的特定区域(例如应急启动区)内,成为一个完整的应急系统,再将该应急系统映射给需要恢复的主机,使得需要恢复的主机可以通过应急系统直接启动。In the above solution provided by the embodiment of the present invention, by performing a complete backup of the operating system (for example, including boot information, network configuration, disk partition, content files, etc.) during backup, a complete operating system backup is formed and stored in the emergency recovery platform, When recovery is required, the operating system backup is rolled over to a specific area of the emergency recovery platform (such as the emergency startup area) as required to become a complete emergency system, and then the emergency system is mapped to the host that needs to be restored, so that the The host can be started directly through the emergency system.

本发明实施例提供的上述方案,不仅避免了大量的重新部署的步骤、时间及环境偏差,也无需维护大量的引导镜像,通过应急系统直接启动主机,无需进行数据的传输恢复,极大的节省了系统恢复使用的时间。The above solution provided by the embodiment of the present invention not only avoids a large number of redeployment steps, time and environment deviation, but also does not need to maintain a large number of boot images, and directly starts the host through the emergency system without data transmission and recovery, which greatly saves time to restore the system to use.

综上所述,当操作系统出现故障后,由专用应急恢复平台的操作系统备份镜像翻转成为应急启动区的应急系统,并将应急系统直接映射给恢复主机,无需传输恢复数据,恢复主机通过应急启动区直接启动。To sum up, when the operating system fails, the operating system backup image of the dedicated emergency recovery platform is turned over to become the emergency system in the emergency boot area, and the emergency system is directly mapped to the recovery host without transferring recovery data. The boot area starts directly.

此外,从恢复保留区翻转至应急启动区,在应急启动区进行启动,并可以将应急启动区反向克隆至恢复主机的本地磁盘。In addition, flip from the recovery reserved area to the emergency boot area, start in the emergency boot area, and reverse clone the emergency boot area to the local disk of the recovery host.

可见,本发明提供的上述方案,不但可以通过备份恢复手段,利用重复数据删除等通用备份技术,在极大程度上保留多个操作系统的历史数据副本;同时通过应急恢复平台内极速翻转后映射、和反向克隆固化的手段,实现了操作系统的快速恢复;并且在翻转和克隆过程中,在保证操作系统无偏差的情况下满足不同的恢复需求和环境,是一个时效、性能、功能都非常平衡的操作系统保护手段。It can be seen that the above solution provided by the present invention can not only retain the historical data copies of multiple operating systems to a great extent by means of backup and recovery methods, but also use general backup technologies such as deduplication; , and reverse cloning to solidify, to achieve rapid recovery of the operating system; and in the process of flipping and cloning, to meet different recovery needs and environments while ensuring that the operating system is not biased, it is a timeliness, performance, and functions. Very balanced means of operating system protection.

本发明提供的上述方案可以取得如下技术效果:The above-mentioned scheme provided by the present invention can achieve the following technical effects:

首先,不需要传统的恢复数据传输过程,操作系统备份在应急恢复平台内极速翻转后映射,支撑恢复主机直接启动,时效性很高。First of all, there is no need for the traditional recovery data transmission process. The operating system backup is quickly flipped and mapped in the emergency recovery platform, which supports the direct startup of the recovery host, with high timeliness.

其次,在恢复保留区能利用通用备份技术保留多个时间节点历史副本,有效的修复各时间点的逻辑错误。Secondly, in the recovery reserve area, the general backup technology can be used to retain the historical copies of multiple time nodes to effectively repair logical errors at each time point.

再次,应急启动区支持多种映射链路和映射方式,在翻转和克隆过程中可以设置修正参数,可以有效对应不同的环境,满足大批量的快速恢复需求。Thirdly, the emergency start area supports a variety of mapping links and mapping methods, and correction parameters can be set during the flipping and cloning process, which can effectively correspond to different environments and meet the needs of rapid recovery in large quantities.

另外,结合图1描述的本发明实施例的操作系统的恢复方法可以由操作系统的恢复设备来实现。图8示出了本发明实施例提供的操作系统的恢复设备的硬件结构示意图。In addition, the method for recovering the operating system according to the embodiment of the present invention described in conjunction with FIG. 1 may be implemented by a device for recovering the operating system. FIG. 8 shows a schematic diagram of a hardware structure of an operating system recovery device provided by an embodiment of the present invention.

操作系统的恢复设备可以包括处理器1003以及存储有计算机程序指令的存储器1004。The recovery device for the operating system may include a processor 1003 and a memory 1004 storing computer program instructions.

图8是示出能够实现根据本发明实施例的通信方法和网络服务器的计算设备的示例性硬件架构的结构图。如图8所示,计算设备1000包括输入设备1001、输入接口1002、处理器1003、存储器1004、输出接口1005、以及输出设备1006。8 is a structural diagram illustrating an exemplary hardware architecture of a computing device capable of implementing a communication method and a network server according to an embodiment of the present invention. As shown in FIG. 8 , computing device 1000 includes input device 1001 , input interface 1002 , processor 1003 , memory 1004 , output interface 1005 , and output device 1006 .

其中,输入接口1002、处理器1003、存储器1004、以及输出接口1005通过总线1010相互连接,输入设备1001和输出设备1006分别通过输入接口1002和输出接口1005与总线1010连接,进而与计算设备1000的其他组件连接。The input interface 1002, the processor 1003, the memory 1004, and the output interface 1005 are connected to each other through the bus 1010, and the input device 1001 and the output device 1006 are respectively connected to the bus 1010 through the input interface 1002 and the output interface 1005, and then to the computing device 1000. other components are connected.

具体地,输入设备1001接收来自外部的输入信息,并通过输入接口1002将输入信息传送到处理器1003;处理器1003基于存储器1004中存储的计算机可执行指令对输入信息进行处理以生成输出信息,将输出信息临时或者永久地存储在存储器1004中,然后通过输出接口1005将输出信息传送到输出设备1006;输出设备1006将输出信息输出到计算设备1000的外部供用户使用。Specifically, the input device 1001 receives input information from the outside, and transmits the input information to the processor 1003 through the input interface 1002; the processor 1003 processes the input information based on the computer-executable instructions stored in the memory 1004 to generate output information, The output information is temporarily or permanently stored in the memory 1004, and then transmitted to the output device 1006 through the output interface 1005; the output device 1006 outputs the output information to the outside of the computing device 1000 for the user to use.

计算设备1000可以执行本申请上述的通信方法中的各步骤。The computing device 1000 can execute the steps in the communication method described above in this application.

处理器1003可以是一个或多个中央处理器(英文:Central Processing Unit,CPU)。在处理器1003是一个CPU的情况下,该CPU可以是单核CPU,也可以是多核CPU。The processor 1003 may be one or more central processing units (English: Central Processing Unit, CPU). In the case where the processor 1003 is a CPU, the CPU may be a single-core CPU or a multi-core CPU.

存储器1004可以是但不限于随机存储存储器(RAM)、只读存储器(ROM),可擦除可编程只读存储器(EPROM)、光盘只读存储器(CD-ROM)、硬盘等中的一种或多种。存储器1004用于存储程序代码。The memory 1004 may be, but is not limited to, one of random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM), compact disk read only memory (CD-ROM), hard disk, etc. or variety. Memory 1004 is used to store program codes.

可以理解的是,在本申请实施例中,图2提供的操作系统备份模块至启动模块中任一模块或全部模块的功能可以用图8所示的中央处理器1003实现。It can be understood that, in this embodiment of the present application, the functions of any or all modules from the operating system backup module provided in FIG. 2 to the startup module may be implemented by the central processing unit 1003 shown in FIG. 8 .

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用全部或部分地以计算机程序产品的形式实现,所述计算机程序产品包括一个或多个计算机指令。在计算机上加载或执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输)。所述计算机可读取存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘SolidState Disk(SSD))等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in whole or in part in the form of a computer program product, the computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.)). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes an integration of one or more available media. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), among others.

本说明书的各个部分均采用递进的方式进行描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点介绍的都是与其他实施例不同之处。尤其,对于装置和系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例部分的说明即可。Each part of this specification is described in a progressive manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the points that are different from other embodiments. In particular, as for the apparatus and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for related parts, please refer to the descriptions in the method embodiments.

Claims (13)

1.一种操作系统的恢复方法,包括:1. A recovery method for an operating system, comprising: 对待备份主机的操作系统进行备份,获得多个操作系统备份;Back up the operating system of the host to be backed up to obtain multiple operating system backups; 当所述待备份主机出现故障时,将所述多个操作系统备份进行翻转,形成多个应急系统;When the host to be backed up fails, flip the multiple operating system backups to form multiple emergency systems; 将所述多个应急系统映射至待恢复主机,使得所述待恢复主机在启动时通过所述多个应急系统中的一个进行启动。The multiple emergency systems are mapped to the host to be restored, so that the host to be restored starts up through one of the multiple emergency systems when starting. 2.根据权利要求1所述的方法,其特征在于,所述多个操作系统备份中的每一个均包括如下项中的至少一项:2. The method of claim 1, wherein each of the plurality of operating system backups comprises at least one of the following: 引导信息、网络配置、磁盘分区和内容文件。Boot information, network configuration, disk partitions, and content files. 3.根据权利要求2所述的方法,其特征在于,所述将所述多个操作系统备份进行翻转,包括:3. The method according to claim 2, wherein the rolling over the plurality of operating system backups comprises: 将所述多个操作系统备份的引导信息直接翻转为所述多个应急系统的引导信息;directly inverting the boot information backed up by the multiple operating systems into the boot information of the multiple emergency systems; 将所述多个操作系统备份的网络配置修正翻转为所述多个应急系统的网络配置;reversing the network configurations backed up by the multiple operating systems to the network configurations of the multiple emergency systems; 将所述多个操作系统备份的各个磁盘分区修正翻转为所述多个应急系统的各个磁盘分区;Correcting and flipping each disk partition backed up by the multiple operating systems to each disk partition of the multiple emergency systems; 将所述多个操作系统备份的内容文件直接翻转为所述多个应急系统的内容文件。The content files backed up by the plurality of operating systems are directly reversed to the content files of the plurality of emergency systems. 4.根据权利要求3所述的方法,其特征在于,所述将所述多个操作系统备份的网络配置修正翻转为所述多个应急系统的网络配置,包括:4 . The method according to claim 3 , wherein the modifying and reversing the network configurations backed up by the multiple operating systems to the network configurations of the multiple emergency systems comprises: 4 . 基于用户需求,将所述多个操作系统备份的网络配置的媒体访问控制MAC地址、IP地址或网关修正翻转为所述多个应急系统的网络配置的MAC地址、IP地址或网关。Based on user requirements, the media access control MAC addresses, IP addresses or gateways of the network configurations backed up by the multiple operating systems are corrected and reversed to the MAC addresses, IP addresses or gateways of the network configurations of the multiple emergency systems. 5.根据权利要求3所述的方法,其特征在于,所述将所述多个操作系统备份的各个磁盘分区修正翻转为所述多个应急系统的各个磁盘分区,包括:5 . The method according to claim 3 , wherein the modifying and flipping the respective disk partitions backed up by the multiple operating systems to the respective disk partitions of the multiple emergency systems comprises: 5 . 基于所述多个操作系统备份的各个磁盘分区的已使用空间大小和总空间大小,将所述多个操作系统备份的各个磁盘分区修正翻转为所述多个应急系统的各个磁盘分区,使得所述多个应急系统的各个磁盘分区的空间大小大于所述多个操作系统备份的各个磁盘分区的已使用空间大小且小于所述多个操作系统备份的各个磁盘分区的总空间大小。Based on the used space size and the total space size of the respective disk partitions backed up by the multiple operating systems, the respective disk partitions backed up by the multiple operating systems are corrected and flipped to the respective disk partitions of the multiple emergency systems, so that all The space size of each disk partition of the multiple emergency systems is larger than the used space size of each disk partition backed up by the multiple operating systems and smaller than the total space size of each disk partition backed up by the multiple operating systems. 6.根据权利要求1所述的方法,其特征在于,所述将所述多个应急系统映射至待恢复主机,包括:6. The method according to claim 1, wherein the mapping of the plurality of emergency systems to the host to be restored comprises: 基于只读方式,通过交换网络,将所述多个应急系统映射至待恢复主机。In a read-only manner, the multiple emergency systems are mapped to the host to be restored through the switching network. 7.根据权利要求1所述的方法,其特征在于,所述通过所述多个应急系统中的一个进行启动,包括:7. The method of claim 1, wherein the activating by one of the plurality of emergency systems comprises: 通过所述多个应急系统中的一个进行启动时,在所述待恢复主机的本地磁盘中创建恢复日志,所述恢复日志用于存放新写入的数据。When starting through one of the multiple emergency systems, a recovery log is created in the local disk of the host to be recovered, and the recovery log is used to store newly written data. 8.根据权利要求1所述的方法,其特征在于,所述方法还包括:8. The method of claim 1, wherein the method further comprises: 通过反向克隆,将所述多个应急系统中的一个固化至所述待恢复主机的本地磁盘中。Through reverse cloning, one of the multiple emergency systems is solidified into the local disk of the host to be restored. 9.根据权利要求8所述的方法,其特征在于,所述通过反向克隆,将所述多个应急系统中的一个固化至所述待恢复主机的本地磁盘中,包括:9 . The method according to claim 8 , wherein, solidifying one of the multiple emergency systems into the local disk of the host to be restored by reverse cloning, comprising: 10 . 将所述多个应急系统中的一个的引导信息直接克隆为所述待恢复主机的本地磁盘的引导信息;directly clone the boot information of one of the multiple emergency systems as the boot information of the local disk of the host to be restored; 将所述多个应急系统中的一个的网络配置修正克隆为所述待恢复主机的本地磁盘的网络配置;Correcting and cloning the network configuration of one of the multiple emergency systems into the network configuration of the local disk of the host to be restored; 将所述多个应急系统中的一个的磁盘分区修正克隆为所述待恢复主机的本地磁盘的磁盘分区;Correcting and cloning the disk partition of one of the multiple emergency systems into the disk partition of the local disk of the host to be restored; 将所述多个应急系统中的一个的内容文件直接克隆为所述待恢复主机的本地磁盘的内容文件。The content file of one of the multiple emergency systems is directly cloned into the content file of the local disk of the host to be restored. 10.根据权利要求9所述的方法,其特征在于,所述方法还包括:10. The method according to claim 9, wherein the method further comprises: 将所述待恢复主机重新启动,断开与所述应急系统之间的映射,选择所述待恢复主机的本地磁盘进行引导,以实现恢复。The host to be restored is restarted, the mapping with the emergency system is disconnected, and the local disk of the host to be restored is selected for booting, so as to realize recovery. 11.一种操作系统的恢复装置,包括:11. An operating system recovery device, comprising: 操作系统备份模块,用于对待备份主机的操作系统进行备份,获得多个操作系统备份;The operating system backup module is used to back up the operating system of the host to be backed up to obtain multiple operating system backups; 应急系统,用于当所述待备份主机出现故障时,将所述多个操作系统备份进行翻转,形成多个应急系统;an emergency system, used for flipping the multiple operating system backups to form multiple emergency systems when the host to be backed up fails; 映射模块,用于将所述多个应急系统映射至待恢复主机,使得所述待恢复主机在启动时通过所述多个应急系统中的一个进行启动。A mapping module, configured to map the multiple emergency systems to the host to be restored, so that the host to be restored starts up through one of the multiple emergency systems when it is started. 12.一种操作系统的恢复设备,其特征在于,包括:至少一个处理器、至少一个存储器以及存储在所述存储器中的计算机程序指令,当所述计算机程序指令被所述处理器执行时实现如权利要求1-10中任一项所述的方法。12. An operating system recovery device, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, which are implemented when the computer program instructions are executed by the processor The method of any of claims 1-10. 13.一种计算机可读存储介质,其上存储有计算机程序指令,其特征在于,当所述计算机程序指令被处理器执行时实现如权利要求1-10中任一项所述的方法。13. A computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the method of any one of claims 1-10.
CN201811615966.0A 2018-12-27 2018-12-27 Recovery method, device, equipment and medium of operating system Active CN111382006B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811615966.0A CN111382006B (en) 2018-12-27 2018-12-27 Recovery method, device, equipment and medium of operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811615966.0A CN111382006B (en) 2018-12-27 2018-12-27 Recovery method, device, equipment and medium of operating system

Publications (2)

Publication Number Publication Date
CN111382006A true CN111382006A (en) 2020-07-07
CN111382006B CN111382006B (en) 2023-04-07

Family

ID=71214503

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811615966.0A Active CN111382006B (en) 2018-12-27 2018-12-27 Recovery method, device, equipment and medium of operating system

Country Status (1)

Country Link
CN (1) CN111382006B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113708981A (en) * 2021-10-28 2021-11-26 广东睿江云计算股份有限公司 Method and system for repairing fault of cloud host system
CN115098469A (en) * 2022-06-28 2022-09-23 中国工商银行股份有限公司 Database migration method and apparatus, electronic device and readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103221924A (en) * 2010-11-22 2013-07-24 蓝弧英国有限公司 File cloning and de-cloning in a data storage system
US20170075765A1 (en) * 2015-09-14 2017-03-16 Prophetstor Data Services, Inc. Hybrid backup and recovery management system for database versioning and virtualization with data transformation
CN106528345A (en) * 2016-11-11 2017-03-22 郑州云海信息技术有限公司 Cloud platform-based node hard disk automated recovery method
CN106648957A (en) * 2015-11-03 2017-05-10 中国移动通信集团安徽有限公司 Operating system backup and recovery method and system
US20170132089A1 (en) * 2015-11-10 2017-05-11 International Business Machines Corporation Scheduling and executing a backup
CN107273246A (en) * 2017-06-15 2017-10-20 郑州云海信息技术有限公司 A kind of server system backup method and device
CN107729177A (en) * 2017-09-18 2018-02-23 中国科学院信息工程研究所 Backup data store management method, device and system based on cloud storage
CN108241550A (en) * 2016-12-23 2018-07-03 研祥智能科技股份有限公司 A kind of operating system backup and reduction method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103221924A (en) * 2010-11-22 2013-07-24 蓝弧英国有限公司 File cloning and de-cloning in a data storage system
US20170075765A1 (en) * 2015-09-14 2017-03-16 Prophetstor Data Services, Inc. Hybrid backup and recovery management system for database versioning and virtualization with data transformation
CN106648957A (en) * 2015-11-03 2017-05-10 中国移动通信集团安徽有限公司 Operating system backup and recovery method and system
US20170132089A1 (en) * 2015-11-10 2017-05-11 International Business Machines Corporation Scheduling and executing a backup
CN106528345A (en) * 2016-11-11 2017-03-22 郑州云海信息技术有限公司 Cloud platform-based node hard disk automated recovery method
CN108241550A (en) * 2016-12-23 2018-07-03 研祥智能科技股份有限公司 A kind of operating system backup and reduction method
CN107273246A (en) * 2017-06-15 2017-10-20 郑州云海信息技术有限公司 A kind of server system backup method and device
CN107729177A (en) * 2017-09-18 2018-02-23 中国科学院信息工程研究所 Backup data store management method, device and system based on cloud storage

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
HONGLIANG YU: ""BIRDS: A Bare-Metal Recovery System for Instant Restoration of Data Services"", 《IEEE TRANSACTIONS ON COMPUTERS》 *
LOSTARK: ""Windows Server Backup 裸机恢复"", 《HTTPS://WWW.CNBLOGS.COM/LIANGWANG/P/6339444.HTML》 *
林森: ""面向NTFS的已损坏文件恢复技术研究"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113708981A (en) * 2021-10-28 2021-11-26 广东睿江云计算股份有限公司 Method and system for repairing fault of cloud host system
CN113708981B (en) * 2021-10-28 2022-04-15 广东睿江云计算股份有限公司 Method and system for repairing fault of cloud host system
CN115098469A (en) * 2022-06-28 2022-09-23 中国工商银行股份有限公司 Database migration method and apparatus, electronic device and readable storage medium

Also Published As

Publication number Publication date
CN111382006B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
US11397648B2 (en) Virtual machine recovery method and virtual machine management device
US9928003B2 (en) Management of writable snapshots in a network storage device
TWI522807B (en) Methods and systems for recovering a computer system using a storage area network
CN103810058B (en) Backup method, equipment and system for virtual machine
US9354907B1 (en) Optimized restore of virtual machine and virtual disk data
CN105446826A (en) Virtual machine backup and recovery method and device
CN103176831B (en) A kind of dummy machine system and management method thereof
JP6455898B2 (en) Data replication method, primary data storage controller, apparatus, system, and program
US20140214769A1 (en) Backup storage system, backup storage apparatus, and method for backing up data
JP2016126443A (en) Electronic device and firmware recovery program
US10509705B2 (en) Application protection through a combined functionality failure manager
RU2653254C1 (en) Method, node and system for managing data for database cluster
EP3848809A1 (en) Data disaster recovery method and site
CN104035837A (en) Method for backing up isomorphic/isomerous UNIX/Linux host on line
US9092375B1 (en) Cloud-based instant volume restore with data source switchover feature
US10496493B1 (en) Method and system for restoring applications of particular point in time
CN111984474A (en) Method, system and equipment for recovering double-control cluster fault
US8880472B2 (en) Method of backing-up, and making available, electronic data and software initially stored on a client server
CN111382006B (en) Recovery method, device, equipment and medium of operating system
US11675673B2 (en) System and method for promoting fractured volumes
CN116601610A (en) Continuous data protection unit, recovery unit for data protection and method thereof
CN107480008A (en) A kind of method and device of batch copy function system
US20150269029A1 (en) Immediate Recovery of an Application from File Based Backups
CN116560904A (en) NAS data backup disaster recovery method, system, terminal and storage medium
US10338849B2 (en) Method and device for processing I/O request in network file system

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