CN107273247A - A kind of method and device for recovering hardware device - Google Patents

A kind of method and device for recovering hardware device Download PDF

Info

Publication number
CN107273247A
CN107273247A CN201710571927.4A CN201710571927A CN107273247A CN 107273247 A CN107273247 A CN 107273247A CN 201710571927 A CN201710571927 A CN 201710571927A CN 107273247 A CN107273247 A CN 107273247A
Authority
CN
China
Prior art keywords
hardware device
restored
partition table
image file
current hardware
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
Application number
CN201710571927.4A
Other languages
Chinese (zh)
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710571927.4A priority Critical patent/CN107273247A/en
Publication of CN107273247A publication Critical patent/CN107273247A/en
Pending legal-status Critical Current

Links

Classifications

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

Abstract

The invention provides a kind of method and device for recovering hardware device, recovering the method for hardware device includes:At least one corresponding image file of at least one hardware device is preserved, wherein, image file includes:Mirrored partition table and backup information;From at least one hardware device, at least one hardware device to be restored is determined;For each hardware device to be restored at least one hardware device to be restored, perform:From at least one image file, it is determined that the target image file for recovering current hardware device to be restored;Mirrored partition table in target image file, it is determined that the partition table of current hardware device to be restored;According to the partition table of current hardware device to be restored, current hardware device to be restored is recovered using the backup information in target image file.Recovering the device of hardware device includes:Memory module, determining module and recovery module.The technical scheme that the present invention is provided can improve the efficiency for recovering hardware device.

Description

A kind of method and device for recovering hardware device
Technical field
The present invention relates to field of computer technology, more particularly to a kind of method and device for recovering hardware device.
Background technology
As cloud computing and big data technology are applied more and more extensively in the live and work of people, Various types of data center Build just progress like a raging fire.Each data center includes substantial amounts of hardware device cluster, how management service cluster As focus of concern.
It is traditionally square when being grasped when multiple hardware devices and severely subnormal occur, and the normal operation of cluster being impacted Formula is, it is necessary to operation maintenance personnel reinstalls deployment operation system to each abnormal hardware device, and in the base of operating system The installation configuration of related software service is carried out on plinth.
Traditional approach rely on manual reversion hardware device, it is necessary to operation maintenance personnel to hardware device by platform recover, reduce extensive The efficiency of multiple hardware device.
The content of the invention
The embodiments of the invention provide a kind of method and device for recovering hardware device, it is possible to increase recovers hardware device Efficiency.
In a first aspect, the invention provides a kind of method for recovering hardware device, preserving at least one hardware device correspondence At least one image file, wherein, the image file includes:Mirrored partition table and backup information;Including:
From at least one described hardware device, at least one hardware device to be restored is determined;
For each hardware device to be restored at least one described hardware device to be restored, perform:
From at least one described image file, it is determined that the target mirror picture text for recovering current hardware device to be restored Part;
The mirrored partition table in the target image file, determines point of the current hardware device to be restored Area's table;
According to the partition table of the current hardware device to be restored, believed using the backup in the target image file Breath recovers to the current hardware device to be restored.
Preferably, the mirrored partition table in the target image file, is determined described current to be restored The partition table of hardware device, including:
Judge whether the target image file matches with the current hardware device to be restored, if it is, A1 is performed, Otherwise, A2 is performed;
A1:Using the mirrored partition table as the current hardware device to be restored partition table;
A2:According to the hard disk information of the current hardware device to be restored, the mirrored partition table is adjusted, after adjustment The mirrored partition table as the current hardware device to be restored partition table.
Preferably, further comprise:
The network card configuration script for each hardware device being pre-created at least one described hardware device;
In the partition table according to the current hardware device to be restored, described in the target image file After backup information recovers to the current hardware device to be restored, further comprise:
For each hardware device to be restored at least one described hardware device to be restored, perform:
From at least one described network card configuration script, the corresponding mesh of network interface card of the current hardware device to be restored is determined Mark network card configuration script;
The target network interface card configuration script is sent to the current hardware device to be restored;
The target network interface card configuration script is performed, it is described current to be restored hard using target network interface card configuration script configuration The network card configuration of part equipment.
Preferably, at least one mirror image text of each hardware device in described at least one hardware device of preservation Before part, further comprise:
From at least one described hardware device, at least one hardware device to be backed up is determined;
For each hardware device to be backed up at least one described hardware device to be backed up, perform:
Read the main boot data and the mirrored partition table of current hardware device to be backed up;
According to the main boot data and the mirrored partition table, accordingly searching the current hardware device to be backed up is It is no to there is partition information;If it is, according to the partition information, for the number to be backed up in the current hardware device to be backed up According to the generation backup information;
According to the backup information and the mirrored partition table, the image file is generated.
Preferably, the partition table according to the current hardware device to be restored, using in the target image file The backup information the current hardware device to be restored is recovered, including:
According to the partition table of the current hardware device to be restored, the current hardware device to be restored is carried out at subregion Reason, at least one subregion is generated in the current hardware device to be restored;
According to the partition table of the current hardware device to be restored, the backup information is returned into each subregion In.
Second aspect the embodiments of the invention provide it is a kind of recover hardware device device, including:Memory module, determine mould Block and recovery module;
The memory module, at least one mirror for preserving each hardware device at least one hardware device As file, wherein, the image file includes:Mirrored partition table and backup information;
The determining module, for from least one described hardware device, determining at least one hardware device to be restored;
The recovery module, for at least one hardware device to be restored described in determining module determination Each hardware device to be restored, is performed:
From at least one described image file, it is determined that the target mirror picture text for recovering current hardware device to be restored Part;
The mirrored partition table in the target image file, determines point of the current hardware device to be restored Area's table;
According to the partition table of the current hardware device to be restored, believed using the backup in the target image file Breath recovers to the current hardware device to be restored.
Preferably, the recovery module, including:Judging unit;
The judging unit, for judge the target image file and the current hardware device to be restored whether Match somebody with somebody, if it is, performing A1, otherwise, perform A2;
A1:Using the mirrored partition table as the current hardware device to be restored partition table;
A2:According to the hard disk information of the current hardware device to be restored, the mirrored partition table is adjusted, after adjustment The mirrored partition table as the current hardware device to be restored partition table.
Preferably, further comprise:Script creation module and network card configuration module;
The script creation module, the net for creating each hardware device at least one described hardware device Card configuration script;
The network card configuration module, for for each described to be restored at least one described hardware device to be restored Hardware device, is performed:
From at least one network card configuration script described in the script creation module is created, determine described current to be restored The corresponding target network interface card configuration script of network interface card of hardware device;
The target network interface card configuration script is sent to the current hardware device to be restored;
The target network interface card configuration script is performed, it is described current to be restored hard using target network interface card configuration script configuration The network card configuration of part equipment.
Preferably, further comprise:Backup selecting module and back-up processing module;
The backup selecting module, for from least one described hardware device, determining at least one hardware to be backed up Equipment;
The back-up processing module, for at least one hardware to be backed up described in backup selecting module determination Each hardware device to be backed up in equipment, is performed:
Read the main boot data and the mirrored partition table of current hardware device to be backed up;
According to the main boot data and the mirrored partition table, accordingly searching the current hardware device to be backed up is It is no to there is partition information;If it is, according to the partition information, for the number to be backed up in the current hardware device to be backed up According to the generation backup information;
According to the backup information and the mirrored partition table, the image file is generated.
Preferably, the recovery module, including:Zoning unit and allocation unit;
The zoning unit, for the partition table according to the current hardware device to be restored, to described current to be restored Hardware device carries out multidomain treat-ment, and at least one subregion is generated in the current hardware device to be restored;
The allocation unit, it is for the partition table according to the current hardware device to be restored, the backup information is extensive It is multiple to be obtained to the zoning unit in each described subregion.
The embodiments of the invention provide a kind of method and device for recovering hardware device, by the mirror of at least one hardware device As partition table and backup information are saved at least one corresponding image file of hardware device respectively, carried to recover hardware device Strong support is supplied.At least one hardware device to be restored is first determined, then is used for recovering from the image file selection preserved The target image file of each hardware device to be restored.Each is obtained using the mirrored partition table in target image file afterwards to treat Recover the partition table of hardware device, each hardware to be restored is set with the backup information in target image file further according to partition table It is standby to be recovered.As can be seen here, the present invention can replace operation maintenance personnel to be recovered simultaneously for multiple hardware devices, so as to It is enough to improve the efficiency for recovering hardware device.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are the present invention Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis These accompanying drawings obtain other accompanying drawings.
Fig. 1 is a kind of method flow diagram for recovery hardware device that one embodiment of the invention is provided;
Fig. 2 is the method flow diagram for another recovery hardware device that one embodiment of the invention is provided;
Fig. 3 is a kind of structural representation of the device for recovery hardware device that one embodiment of the invention is provided;
Fig. 4 is the structural representation of the device for another recovery hardware device that one embodiment of the invention is provided;
Fig. 5 is the structural representation of the device for another recovery hardware device that one embodiment of the invention is provided;
Fig. 6 is the structural representation of the device for another recovery hardware device that one embodiment of the invention is provided;
Fig. 7 is that one embodiment of the invention provides also a kind of structural representation for the device for recovering hardware device.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is A part of embodiment of the present invention, rather than whole embodiments, based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained on the premise of creative work is not made, belongs to the scope of protection of the invention.
As shown in figure 1, the embodiments of the invention provide a kind of method for recovering hardware device, comprising the following steps:
Step 101, at least one corresponding image file of at least one hardware device is preserved, wherein, the image file Include:Mirrored partition table and backup information.
Step 102, from least one described hardware device, at least one hardware device to be restored is determined.
Step 103, for each hardware device to be restored at least one described hardware device to be restored, hold OK:From at least one described image file, it is determined that the target image file for recovering current hardware device to be restored;According to The mirrored partition table in the target image file, determines the partition table of the current hardware device to be restored;According to institute The partition table of current hardware device to be restored is stated, is currently treated to described using the backup information in the target image file Recover hardware device to be recovered.
The embodiments of the invention provide a kind of method for recovering hardware device, by the mirrored partition of at least one hardware device Table and backup information are saved at least one corresponding image file of hardware device respectively, have been provided to recover hardware device The support of power.At least one hardware device to be restored is first determined, then is treated from the image file selection preserved for recovering each Recover the target image file of hardware device.Each to be obtained using the mirrored partition table in target image file to be restored hard afterwards The partition table of part equipment, is carried out further according to partition table with the backup information in target image file to each hardware device to be restored Recover.As can be seen here, the present invention can replace operation maintenance personnel to be recovered simultaneously for multiple hardware devices, so as to improve Recover the efficiency of hardware device.
Because partition table records the storage size and each partition size of the hard disk of a hardware device, therefore divide Area's table can instruct whole hardware device recovery process.So when recovering hardware device, first having to recover the subregion of the hard disk Table.If a hardware device does not have image file, the hardware device can be recovered with other image files, mirror at this moment occurs The problem of being differed as the occupancy memory space of file and the storage size of the hardware device, in order to solve the problem, Whether in one embodiment of the present of invention, it is to be generated by current hardware device to be restored to judge target image file, if it is, Then the mirrored partition table in target image file is exactly the partition table of current hardware device to be restored;If it is not, then adjustment mesh Mark the mirrored partition table in image file so that the occupancy memory space of the image file in mirrored partition table and the hardware device Storage size it is the same.Amended partition table can be for doing the partition table of current hardware device to be restored.
For example, being hardware in hardware device B image file, the partition table of image file when recovering hardware device A The memory space of equipment B hard disk is 150G, and partitioning scenario is three areas, and the memory space in each area is 50G, and hardware device The memory space of A hard disk is 120G, then the memory space in three areas is adjusted into 40G in partition table, if instead extensive It is hardware device A image file during multiple hardware device B, then will adjusts the memory space in three areas in partition table For 50G.
, it is necessary to configure network interface card to hardware device after the recovery of hardware device operation system, in the implementation of the present invention In example, the network card configuration script of hardware device is pre-created, after the system of current hardware device to be restored is recovered, it is determined that currently treating Recover the corresponding target network interface card configuration script of network interface card of hardware device, then target network interface card configuration script is sent to current to be restored On hardware device, finally perform network card configuration script and utilize the current hardware device to be restored of target network interface card configuration script configuration Network card configuration.
For example, when recovering hardware device A network card configurations, first selecting a mesh from the network card configuration script being pre-created Network card configuration script is marked, then target network interface card configuration script is sent to hardware device A, performance objective network card configuration script.Target Network card configuration script is according to network card configuration IP address of the network card configuration file to hardware device A, subnet recovered in hardware device A Mask and gateway.
In an embodiment of the invention, from least one hardware device, at least one hardware device to be backed up is selected. For each hardware device to be backed up, the main boot data and mirrored partition table of current hardware device to be backed up are read, wherein The institutional framework of the hard disk of main boot data and mirrored partition table comprising hardware device;Draw in the master of current hardware device to be backed up Search whether there is partition information in derivative evidence and mirrored partition table, if it is, according to partition information, for current to be backed up hard Data to be backed up generation backup information in part equipment.Finally, given birth to according to obtained file backup information and mirrored partition table It is mirrored into file.
During hardware device is recovered, in order to ensure the accuracy recovered, in one embodiment of the invention, according to The partition table of current hardware device to be restored, carries out subregion, afterwards further according to current to the hard disk of current hardware device to be restored The partition table of hardware device to be restored, backup information is returned in each subregion, so as to realize the purpose for recovering hardware device.
For example, in the currently corresponding target image files of hardware device A to be restored, following information is contained in partition table: Hard disk is divided into C areas, D areas, three, F areas subregion, wherein C areas storage file 1, D areas storage file 2 and E areas storage file 3.Recover When, current hardware device A to be restored hard disk is first divided into C areas, D areas, three, F areas subregion, then file 1,2,3 is respectively put into In C areas, D areas, three, F areas subregion.
When recovering multiple hardware devices, the present invention needs simultaneously to recover each hardware device, in order to more preferable Ground illustrates the embodiment of the present invention, as shown in Fig. 2 one embodiment of the invention provides a kind of method for recovering hardware device, with Recover exemplified by a hardware device, comprise the following steps:
Step 201, a hardware device to be backed up is determined;
In embodiments of the present invention, it can both select to back up each hardware device, a counterweight can also be selected The hardware device wanted is backed up.
Step 202, the main boot data and mirrored partition table of hardware device to be backed up are read;
In embodiments of the present invention, main boot data are bootstrap, and which subregion is the bootstrap can determine to draw Subregion is led, and the startup program (namely booting operating system sector) of the subregion is called in internal memory in EP (end of program) and is held OK;Partition table record partitioning information, such as hard disk divide several areas altogether, and which area is main partition, and which area is extension subregion.
Step 203, according to main boot data and mirrored partition table, accordingly search hardware device to be backed up with the presence or absence of point Area's information, if it is, performing step 204, otherwise, performs step 217
Step 204, according to partition information, backup information is generated for the data to be backed up in hardware device to be backed up.
In embodiments of the present invention, the information that three subregions are set up on hard disk is generally required when linux system is installed, i.e., Boot subregions, swap subregions, root partition.In backup, different backup lattice can be selected according to the file system of data to be backed up Formula, conventional backup format has:Partclone backup modes, partImage backup modes, ntfsclone backup modes, dd Backup mode.
Step 205, according to backup information and mirrored partition table, image file is generated.
In embodiments of the present invention, the image file of generation can be stored in specified file.
Step 206, at least one corresponding image file of hardware device is preserved,
In embodiments of the present invention, step 205 is once backed up, in practical application, for important hardware device Such as one hour backup of repeatedly backup can be carried out once.
Step 207, a hardware device to be restored is determined;
Step 208, from least one image file, it is determined that the target mirror picture text for recovering hardware device to be restored Part.
In embodiments of the present invention, target image file can not be by the mirror image text of current hardware device generation to be restored Part, for example, when recovering hardware device A, hardware device B image file can be used, or it is identical for multiple operating systems Hardware server only needs to an image file.
Step 209, judge whether target image file matches with hardware device to be restored, if it is, performing step 210; Otherwise, step 211 is performed.
Step 210, using mirrored partition table as hardware device to be restored partition table.
Step 211, according to the hard disk information of hardware device to be restored, mirrored partition table is adjusted, by the mirror image after adjustment point Area's table as current hardware device to be restored partition table.
In embodiments of the present invention, according to the memory space of current hardware device to be restored, in adjustment mirrored partition table Partition size, for example, being hard in hardware device B image file, the partition table of image file when recovering hardware device A The memory space of part equipment B hard disk is 120G, and partitioning scenario is three areas, and the memory space in each area is 40G, and hardware is set The memory space of standby A hard disk is 150G, then the memory space in three areas is adjusted into 50G in partition table.
Step 212, according to the partition table of hardware device to be restored, at least one point is generated in hardware device to be restored Area.
Step 213, according to the partition table of hardware device to be restored, backup information is assigned in each subregion respectively.
Step 214, from least one the network card configuration script being pre-created, the network interface card pair of hardware device to be restored is determined The target network interface card configuration script answered.
Step 215, target network interface card configuration script is sent to hardware device to be restored.
Step 216, performance objective network card configuration script, hardware device to be restored is configured using target network interface card configuration script Network interface card.
Step 217, the hardware information of hardware device to be backed up is stored, and terminates current process.
As shown in figure 3, the embodiments of the invention provide a kind of device for recovering hardware device, including:Memory module 301, Determining module 302 and recovery module 303;
Memory module 301, at least one mirror for preserving each hardware device at least one hardware device As file, wherein, the image file includes:Mirrored partition table and backup information;
Determining module 302, for from least one described hardware device, determining at least one hardware device to be restored;
Recovery module 303, for for every at least one hardware device to be restored described in the determination of determining module 302 The individual hardware device to be restored, is performed:
From at least one image file described in the storage of memory module 301, it is determined that for recovering current hardware to be restored The target image file of equipment;
The mirrored partition table in the target image file, determines point of the current hardware device to be restored Area's table;
According to the partition table of the current hardware device to be restored, believed using the backup in the target image file Breath recovers to the current hardware device to be restored.
As shown in figure 4, the embodiments of the invention provide the device of another recovery hardware device, recovery module 303, bag Include:Judging unit 3031;
Judging unit 3031, for judge the target image file and the current hardware device to be restored whether Match somebody with somebody, if it is, performing A1, otherwise, perform A2;
A1:Using the mirrored partition table as the current hardware device to be restored partition table;
A2:According to the hard disk information of the current hardware device to be restored, the mirrored partition table is adjusted, after adjustment The mirrored partition table as the current hardware device to be restored partition table.
As shown in figure 5, the embodiments of the invention provide the device that another recovers hardware device, further comprising:Script Creation module 501 and network card configuration module 502;
Script creation module 501, the net for creating each hardware device at least one described hardware device Card configuration script;
Network card configuration module 502, for for each described to be restored at least one described hardware device to be restored Hardware device, is performed:
From at least one network card configuration script described in script creation module 501 is created, determine described current to be restored The corresponding target network interface card configuration script of network interface card of hardware device;
The target network interface card configuration script is sent to the current hardware device to be restored;
The target network interface card configuration script is performed, it is described current to be restored hard using target network interface card configuration script configuration The network card configuration of part equipment.
As shown in fig. 6, the embodiments of the invention provide the device that another recovers hardware device, further comprising:Backup Selecting module 601, back-up processing module 602;
Backup selecting module 601, for from least one described hardware device, determining that at least one hardware to be backed up is set It is standby;
Back-up processing module 602, for being set at least one hardware to be backed up described in the determination of backup selecting module 601 Each hardware device to be backed up in standby, is performed:
Read the main boot data and the mirrored partition table of current hardware device to be backed up;
According to the main boot data and the mirrored partition table, accordingly searching the current hardware device to be backed up is It is no to there is partition information;If it is, according to the partition information, for the number to be backed up in the current hardware device to be backed up According to the generation backup information;
According to the backup information and the mirrored partition table, the image file is generated.
As shown in fig. 7, the embodiments of the invention provide also a kind of device for recovering hardware device, recovery module 303, bag Include:Zoning unit 3032 and allocation unit 3033;
Zoning unit 3032, in the partition table according to the current hardware device to be restored, currently treating extensive to described Multiple hardware device carries out multidomain treat-ment, and at least one subregion is generated in the current hardware device to be restored;
Allocation unit 3033, it is for the partition table according to the current hardware device to be restored, the backup information is extensive In multiple each described subregion obtained to zoning unit 3032.
The contents such as the information exchange between each unit, implementation procedure in said apparatus, due to implementing with the inventive method Example is based on same design, and particular content can be found in the narration in the inventive method embodiment, and here is omitted.
The embodiments of the invention provide a kind of computer-readable recording medium, including execute instruction, when the computing device of storage control During the execute instruction, the storage control performs a kind of recovery hardware device provided in any one embodiment of the invention Method.
The embodiments of the invention provide a kind of storage control, including:Processor, memory and bus;
The memory is used to store execute instruction, and the processor is connected with the memory by the bus, when During the storage control operation, the execute instruction of memory storage described in the computing device, so that the storage The method that controller performs a kind of recovery hardware device provided in any one embodiment of the invention.
In summary, each embodiment of the invention at least has the advantages that:
1st, in one embodiment of the invention, the mirrored partition table and backup information of at least one hardware device are preserved respectively Into at least one corresponding image file of hardware device, strong support is provided to recover hardware device.First determine at least One hardware device to be restored, then select to recover the target mirror of each hardware device to be restored from the image file preserved As file.The partition table of each hardware device to be restored, then root are obtained using the mirrored partition table in target image file afterwards Each hardware device to be restored is recovered with the backup information in target image file according to partition table.As can be seen here, this hair It is bright operation maintenance personnel to be replaced to be recovered simultaneously for multiple hardware devices, so as to improve the effect for recovering hardware device Rate.
2nd, in one embodiment of the invention, by adjusting the partition table of image file, the occupancy for solving image file is deposited The problem of storage space and the storage size of the hardware device are differed, realizes by specifying other mirror images text to recover not having The hardware device of image file, so as to further improve the efficiency for recovering hardware device.
3rd, in one embodiment of the invention, by the way that the network card configuration script for being pre-created hardware device is sent to corresponding On hardware device to be restored and perform, realize and network interface card is reconfigured to the hardware device recovered by tableland instead of operation maintenance personnel, So as to so as to further improve the efficiency for recovering hardware device.
It should be noted that herein, such as first and second etc relational terms are used merely to an entity Or operation makes a distinction with another entity or operation, and not necessarily require or imply exist between these entities or operation Any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant be intended to it is non- It is exclusive to include, so that process, method, article or equipment including a series of key elements not only include those key elements, But also other key elements including being not expressly set out, or also include solid by this process, method, article or equipment Some key elements.In the absence of more restrictions, the key element limited by sentence " including one ", is not arranged Except also there is other identical factor in the process including the key element, method, article or equipment.
It is last it should be noted that:Presently preferred embodiments of the present invention is the foregoing is only, the skill of the present invention is merely to illustrate Art scheme, is not intended to limit the scope of the present invention.Any modification for being made within the spirit and principles of the invention, Equivalent substitution, improvement etc., are all contained in protection scope of the present invention.

Claims (10)

1. a kind of method for recovering hardware device, it is characterised in that
At least one corresponding image file of at least one hardware device is preserved, wherein, the image file includes:Mirror image point Area's table and backup information;
Including:
From at least one described hardware device, at least one hardware device to be restored is determined;
For each hardware device to be restored at least one described hardware device to be restored, perform:
From at least one described image file, it is determined that the target image file for recovering current hardware device to be restored;
The mirrored partition table in the target image file, determines the subregion of the current hardware device to be restored Table;
According to the partition table of the current hardware device to be restored, the backup information pair in the target image file is utilized The current hardware device to be restored is recovered.
2. the method according to claim 1, it is characterised in that
The mirrored partition table in the target image file, determines point of the current hardware device to be restored Area's table, including:
Judge whether the target image file matches with the current hardware device to be restored, if it is, A1 is performed, it is no Then, A2 is performed;
A1:Using the mirrored partition table as the current hardware device to be restored partition table;
A2:According to the hard disk information of the current hardware device to be restored, the mirrored partition table is adjusted, described in after adjustment Mirrored partition table as the current hardware device to be restored partition table.
3. the method according to claim 1, it is characterised in that
Further comprise:
The network card configuration script for each hardware device being pre-created at least one described hardware device;
In the partition table according to the current hardware device to be restored, the backup in the target image file is utilized After information is recovered to the current hardware device to be restored, further comprise:
For each hardware device to be restored at least one described hardware device to be restored, perform:
From at least one described network card configuration script, the corresponding target network of network interface card of the current hardware device to be restored is determined Card configuration script;
The target network interface card configuration script is sent to the current hardware device to be restored;
The target network interface card configuration script is performed, is set using the target network interface card configuration script configuration current hardware to be restored Standby network card configuration.
4. the method according to claim 1, it is characterised in that
Before at least one image file of each hardware device in described at least one hardware device of preservation, enter one Step includes:
From at least one described hardware device, at least one hardware device to be backed up is determined;
For each hardware device to be backed up at least one described hardware device to be backed up, perform:
Read the main boot data and the mirrored partition table of current hardware device to be backed up;
According to the main boot data and the mirrored partition table, accordingly search whether the current hardware device to be backed up is deposited In partition information;If it is, according to the partition information, being given birth to for the data to be backed up in the current hardware device to be backed up Into the backup information;
According to the backup information and the mirrored partition table, the image file is generated.
5. the method according to claim 1, it is characterised in that
The partition table according to the current hardware device to be restored, is believed using the backup in the target image file Breath recovers to the current hardware device to be restored, including:
According to the partition table of the current hardware device to be restored, multidomain treat-ment is carried out to the current hardware device to be restored, At least one subregion is generated in the current hardware device to be restored;
According to the partition table of the current hardware device to be restored, the backup information is returned in each described subregion.
6. a kind of device for recovering hardware device, it is characterised in that including:Memory module, determining module and recovery module;
The memory module, at least one mirror image text for preserving each hardware device at least one hardware device Part, wherein, the image file includes:Mirrored partition table and backup information;
The determining module, for from least one described hardware device, determining at least one hardware device to be restored;
The recovery module, for for each at least one hardware device to be restored described in determining module determination The hardware device to be restored, is performed:
From at least one described image file, it is determined that the target image file for recovering current hardware device to be restored;
The mirrored partition table in the target image file, determines the subregion of the current hardware device to be restored Table;
According to the partition table of the current hardware device to be restored, the backup information pair in the target image file is utilized The current hardware device to be restored is recovered.
7. the device according to claim 6, it is characterised in that
The recovery module, including:Judging unit;
The judging unit, for judging whether the target image file matches with the current hardware device to be restored, such as Fruit is then to perform A1, otherwise, performs A2;
A1:Using the mirrored partition table as the current hardware device to be restored partition table;
A2:According to the hard disk information of the current hardware device to be restored, the mirrored partition table is adjusted, described in after adjustment Mirrored partition table as the current hardware device to be restored partition table.
8. the device according to claim 6, it is characterised in that
Further comprise:Script creation module and network card configuration module;
The script creation module, the network interface card for creating each hardware device at least one described hardware device is matched somebody with somebody Put script;
The network card configuration module, for for each hardware to be restored at least one described hardware device to be restored Equipment, is performed:
From at least one network card configuration script described in the script creation module is created, the current hardware to be restored is determined The corresponding target network interface card configuration script of network interface card of equipment;
The target network interface card configuration script is sent to the current hardware device to be restored;
The target network interface card configuration script is performed, is set using the target network interface card configuration script configuration current hardware to be restored Standby network card configuration.
9. the device according to claim 6, it is characterised in that
Further comprise:Backup selecting module and back-up processing module;
The backup selecting module, for from least one described hardware device, determining at least one hardware device to be backed up;
The back-up processing module, for at least one hardware device to be backed up described in backup selecting module determination In each hardware device to be backed up, perform:
Read the main boot data and the mirrored partition table of current hardware device to be backed up;
According to the main boot data and the mirrored partition table, accordingly search whether the current hardware device to be backed up is deposited In partition information;If it is, according to the partition information, being given birth to for the data to be backed up in the current hardware device to be backed up Into the backup information;
According to the backup information and the mirrored partition table, the image file is generated.
10. the device according to claim 6, it is characterised in that
The recovery module, including:Zoning unit and allocation unit;
The zoning unit, for the partition table according to the current hardware device to be restored, to the current hardware to be restored Equipment carries out multidomain treat-ment, and at least one subregion is generated in the current hardware device to be restored;
The allocation unit, for the partition table according to the current hardware device to be restored, the backup information is returned to In each described subregion that the zoning unit is obtained.
CN201710571927.4A 2017-07-13 2017-07-13 A kind of method and device for recovering hardware device Pending CN107273247A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710571927.4A CN107273247A (en) 2017-07-13 2017-07-13 A kind of method and device for recovering hardware device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710571927.4A CN107273247A (en) 2017-07-13 2017-07-13 A kind of method and device for recovering hardware device

Publications (1)

Publication Number Publication Date
CN107273247A true CN107273247A (en) 2017-10-20

Family

ID=60072871

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710571927.4A Pending CN107273247A (en) 2017-07-13 2017-07-13 A kind of method and device for recovering hardware device

Country Status (1)

Country Link
CN (1) CN107273247A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108776577A (en) * 2018-05-04 2018-11-09 新华三技术有限公司成都分公司 Disk management method, device, electronic equipment and storage medium
CN111600846A (en) * 2020-04-22 2020-08-28 烽火通信科技股份有限公司 Recovery method and recovery system of gateway equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040162955A1 (en) * 2003-02-18 2004-08-19 Jerry Jones Mirrored disk partition with disk partition modification contemporaneous with client application access
CN101122873A (en) * 2006-08-09 2008-02-13 英业达股份有限公司 Data customization backup and restoration method for trans-storage facilities
CN101420326A (en) * 2008-12-02 2009-04-29 华为技术有限公司 Method, system and apparatus for implementing failure restoration and data backup
CN102664758A (en) * 2012-04-28 2012-09-12 沈阳通用软件有限公司 Method for binding and automatically recovering network configuration
CN106201772A (en) * 2016-06-23 2016-12-07 浪潮(北京)电子信息产业有限公司 The backup of a kind of operating system based on data center, restoration methods and device
CN106528345A (en) * 2016-11-11 2017-03-22 郑州云海信息技术有限公司 Cloud platform-based node hard disk automated recovery method
CN106802842A (en) * 2017-02-28 2017-06-06 郑州云海信息技术有限公司 A kind of operating system batch backup restoration methods and device based on cloud platform

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040162955A1 (en) * 2003-02-18 2004-08-19 Jerry Jones Mirrored disk partition with disk partition modification contemporaneous with client application access
CN101122873A (en) * 2006-08-09 2008-02-13 英业达股份有限公司 Data customization backup and restoration method for trans-storage facilities
CN101420326A (en) * 2008-12-02 2009-04-29 华为技术有限公司 Method, system and apparatus for implementing failure restoration and data backup
CN102664758A (en) * 2012-04-28 2012-09-12 沈阳通用软件有限公司 Method for binding and automatically recovering network configuration
CN106201772A (en) * 2016-06-23 2016-12-07 浪潮(北京)电子信息产业有限公司 The backup of a kind of operating system based on data center, restoration methods and device
CN106528345A (en) * 2016-11-11 2017-03-22 郑州云海信息技术有限公司 Cloud platform-based node hard disk automated recovery method
CN106802842A (en) * 2017-02-28 2017-06-06 郑州云海信息技术有限公司 A kind of operating system batch backup restoration methods and device based on cloud platform

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108776577A (en) * 2018-05-04 2018-11-09 新华三技术有限公司成都分公司 Disk management method, device, electronic equipment and storage medium
CN111600846A (en) * 2020-04-22 2020-08-28 烽火通信科技股份有限公司 Recovery method and recovery system of gateway equipment
CN111600846B (en) * 2020-04-22 2022-03-25 烽火通信科技股份有限公司 Recovery method and recovery system of gateway equipment

Similar Documents

Publication Publication Date Title
US10922191B2 (en) Virtual proxy based backup
CN108694014A (en) For carrying out the method and apparatus of memory headroom reservation and management
EP3101530B1 (en) Data distribution method, data storage method, related apparatus, and system
US20060080425A1 (en) Method and apparatus for remotely configuring network devices
US7757015B2 (en) Device, method and computer program product readable medium for determining the identity of a component
EP1507206A2 (en) Storage operation management program and method and storage management computer
CN111031096A (en) Distributed storage system construction method based on mimicry defense
US10778762B2 (en) Cloud computing service architecture
CN105052111A (en) Service migration across cluster boundaries
US8321617B1 (en) Method and apparatus of server I/O migration management
US9116860B2 (en) Cascading failover of blade servers in a data center
CN105095103A (en) Storage device management method and device used for cloud environment
CN107273247A (en) A kind of method and device for recovering hardware device
CN106612314A (en) System for realizing software-defined storage based on virtual machine
CN106201772A (en) The backup of a kind of operating system based on data center, restoration methods and device
CN104536852B (en) Data recovery method and device
CN108491294A (en) A kind of database backup method, apparatus and system
CN102014131B (en) Device safety check method combining off-line check and central summary
WO2014094296A1 (en) Distributed storage control method, device, and system
CN109274532A (en) Method, apparatus, system, collection control equipment and the readable storage medium storing program for executing of policy distribution
CN106453118B (en) Flow control method and flow control system
EP2093655A2 (en) Storage system and copy method
CN114020457A (en) OpenStack deployment method and device and electronic equipment
US20090172347A1 (en) Data storage device
CN112015520A (en) Data uploading system and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20171020