CN112148532A - Batch recovery method and device for hard disk data, storage medium and electronic equipment - Google Patents

Batch recovery method and device for hard disk data, storage medium and electronic equipment Download PDF

Info

Publication number
CN112148532A
CN112148532A CN202011110039.0A CN202011110039A CN112148532A CN 112148532 A CN112148532 A CN 112148532A CN 202011110039 A CN202011110039 A CN 202011110039A CN 112148532 A CN112148532 A CN 112148532A
Authority
CN
China
Prior art keywords
data
hard disk
machine
fault
disk data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011110039.0A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011110039.0A priority Critical patent/CN112148532A/en
Publication of CN112148532A publication Critical patent/CN112148532A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Abstract

The invention provides a method and a device for restoring hard disk data in batches, a storage medium and electronic equipment. The invention can guide the user to quickly and orderly start the data recovery work of the batch fault machine in parallel, thereby greatly improving the efficiency and quality of data recovery.

Description

Batch recovery method and device for hard disk data, storage medium and electronic equipment
Technical Field
The invention relates to the technical field of cloud computing, in particular to a method and a device for batch recovery of hard disk data, a storage medium and electronic equipment.
Background
With the development of science and technology, the demand for cloud computing resources is increasing, and the business of many large-scale companies is processed by a large number of servers.
Whereas for the linux system it provides an rm command for deleting a file or directory. Important files of the hard disk are easily deleted by the rm command by mistake due to command writing errors or manual operation. When a large batch of server hard disks are deleted by rm by mistake, how to effectively recover hard disk data of a large batch of fault machines is an urgent problem to be solved in the field.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for restoring hard disk data in bulk, a storage medium, and an electronic device, so as to quickly restore hard disk data of a large number of faulty machines.
In order to achieve the above purpose, the embodiments of the present invention provide the following technical solutions:
a method for bulk recovery of hard disk data, the method comprising:
determining a plurality of fault machines and executing shutdown operation on each fault machine;
according to the operation information of each fault machine, environment resources are built for each fault machine, and the environment resources at least comprise a first resource for data backup and a second resource for data recovery;
backing up original hard disk data of each fault machine based on first resources of each fault machine to obtain corresponding backup hard disk data;
and recovering the original hard disk data or the backup hard disk data of each fault machine based on the second resource of each fault machine to obtain corresponding recovered hard disk data.
An apparatus for bulk recovery of hard disk data, the apparatus comprising:
the fault detection module is used for determining a plurality of fault machines and executing shutdown operation on each fault machine;
the environment building module is used for building environment resources for each fault machine according to the operation information of each fault machine, wherein the environment resources at least comprise first resources for data backup and second resources for data recovery;
the data processing module is used for backing up the original hard disk data of each fault machine based on the first resource of each fault machine to obtain corresponding backup hard disk data; and recovering the original hard disk data or the backup hard disk data of each fault machine based on the second resource of each fault machine to obtain corresponding recovered hard disk data.
A storage medium is characterized in that computer-executable instructions are stored in the storage medium and used for executing the batch recovery method of hard disk data.
An electronic device, comprising: at least one memory and at least one processor; the processor calls the program stored in the memory, and the program is used for realizing the batch recovery method of the hard disk data.
According to the batch recovery method, device, storage medium and electronic equipment for hard disk data, after a large number of fault machines which are deleted by rm by mistake appear, in order to prevent hard disks from being overwritten by data, the fault machines are shut down in batches at the first time, and then the environment resources of the fault machines are built in batches by considering the operation information of the fault machines, so that batch data backup and data recovery of hard disk data of subsequent fault machines are realized. The invention can guide the user to quickly and orderly start the data recovery work of the batch fault machine in parallel, thereby greatly improving the efficiency and quality of data recovery.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a block diagram of a hardware structure of an electronic device according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for bulk recovery of hard disk data according to an embodiment of the present invention;
fig. 3 is a scene schematic diagram of a batch recovery method for hard disk data according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a device for bulk recovery of hard disk data according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Cloud technology refers to a hosting technology for unifying serial resources such as hardware, software, network and the like in a wide area network or a local area network to realize calculation, storage, processing and sharing of data. The cloud technology is a general term of network technology, information technology, integration technology, management platform technology, application technology and the like applied based on a cloud computing business model, can form a resource pool, is used as required, and is flexible and convenient. Cloud computing (cloud computing) technology will become an important support. Background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture-like websites and more web portals. With the high development and application of the internet industry, each article may have its own identification mark and needs to be transmitted to a background system for logic processing, data in different levels are processed separately, and various industrial data need strong system background support and can only be realized through cloud computing.
Cloud computing refers to a delivery and use mode of an IT infrastructure, and refers to acquiring required resources in an on-demand and easily-extensible manner through a network; the generalized cloud computing refers to a delivery and use mode of a service, and refers to obtaining a required service in an on-demand and easily-extensible manner through a network. Such services may be IT and software, internet related, or other services. Cloud Computing is a product of development and fusion of traditional computers and Network technologies, such as Grid Computing (Grid Computing), distributed Computing (distributed Computing), Parallel Computing (Parallel Computing), Utility Computing (Utility Computing), Network storage (Network storage technologies), Virtualization (Virtualization), Load balancing (Load Balance), and the like.
With the development of diversification of internet, real-time data stream and connecting equipment and the promotion of demands of search service, social network, mobile commerce, open collaboration and the like, cloud computing is rapidly developed. Different from the prior parallel distributed computing, the generation of cloud computing can promote the revolutionary change of the whole internet mode and the enterprise management mode in concept.
A distributed cloud storage system (hereinafter, referred to as a storage system) refers to a storage system that integrates a large number of storage devices (storage devices are also referred to as storage nodes) of different types in a network through application software or application interfaces to cooperatively work by using functions such as cluster application, grid technology, and distributed storage file system, and provides a data storage function and a service access function to the outside.
At present, a storage method of a storage system is as follows: logical volumes are created, and when created, each logical volume is allocated physical storage space, which may be the disk composition of a certain storage device or of several storage devices. The client stores data on a certain logical volume, that is, the data is stored on a file system, the file system divides the data into a plurality of parts, each part is an object, the object not only contains the data but also contains additional information such as data Identification (ID), the file system writes each object into a physical storage space of the logical volume, and the file system records storage location information of each object, so that when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.
The process of allocating physical storage space for the logical volume by the storage system specifically includes: physical storage space is divided in advance into stripes according to a group of capacity measures of objects stored in a logical volume (the measures often have a large margin with respect to the capacity of the actual objects to be stored) and Redundant Array of Independent Disks (RAID), and one logical volume can be understood as one stripe, thereby allocating physical storage space to the logical volume.
Under the background, data of related services are stored on a server hard disk, and in order to delete hard disk data of a server in a large scale by rm by mistake (the server deleted by rm by mistake is a fault machine), the invention provides a batch recovery scheme of the hard disk data, which is used for quickly guiding a user to quickly and orderly start data recovery work of the batch fault machine in parallel, and greatly improving the efficiency and quality of data recovery.
It should be noted that the server in the present invention may be an independent physical server, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a CDN, and a big data and artificial intelligence platform. The invention is not limited thereto.
Examples
The batch method of the hard disk data provided by the embodiment of the invention can be applied to electronic equipment. The electronic device may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, or the like, but is not limited thereto. The electronic device and the server may be directly or indirectly connected through wired or wireless communication, and the present invention is not limited thereto.
Fig. 1 is a block diagram of a hardware structure of an electronic device according to an embodiment of the present invention, and referring to fig. 1, the hardware structure of the electronic device may include: at least one processor 11, at least one communication interface 12, at least one memory 13 and at least one communication bus 14;
in the embodiment of the present invention, the number of the processor 11, the communication interface 12, the memory 13 and the communication bus 14 is at least one, and the processor 11, the communication interface 12 and the memory 13 complete the communication with each other through the communication bus 14;
the processor 11 may be a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present invention, etc.;
the memory 13 may include a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory) or the like, such as at least one disk memory;
wherein, the memorizer stores the procedure, the procedure that the processor can call the memorizer to store, the procedure is used for:
determining a plurality of fault machines and executing shutdown operation on each fault machine;
according to the operation information of each fault machine, environment resources are built for each fault machine, and the environment resources at least comprise a first resource for data backup and a second resource for data recovery;
backing up original hard disk data of each fault machine based on first resources of each fault machine to obtain corresponding backup hard disk data;
and recovering the original hard disk data or the backup hard disk data of each fault machine based on the second resource of each fault machine to obtain corresponding recovered hard disk data.
Alternatively, the detailed function and the extended function of the program may be described with reference to the following.
Fig. 2 is a flowchart of a method for restoring hard disk data in bulk according to an embodiment of the present invention, and referring to fig. 2, the method for restoring hard disk data in bulk may include the following steps:
s10, a plurality of fault machines are determined, and a shutdown operation is performed for each fault machine.
In the embodiment of the invention, when the hard disk data of the server is deleted by mistake, the hard disk data is taken as a fault machine, the operating system is in an abnormal survival state, namely, the type of the deleted hard disk data is considered, and the operating system of the fault machine may have expressions such as 'machine cannot log in', 'machine down', 'machine cannot restart', and the like. Thus, by monitoring the state of the operating system, the fault machine can be identified.
And if the online backup cannot be carried out, the fault machine is shut down at the first time for preventing data duplication. If the fault machine can still be backed up online, the data can be stored in a network mode, and at the moment, the data recovery of the fault machine can be temporarily avoided.
And S20, establishing environment resources for each fault machine according to the operation information of each fault machine, wherein the environment resources at least comprise a first resource for data backup and a second resource for data recovery.
In the embodiment of the invention, as for the first resource for data backup, a backup machine can be specifically selected, and the original hard disk data of a failed machine is copied to the backup machine, so that the situation that the original data cannot be obtained after the data is changed by subsequent data recovery operation is prevented.
When the backup machine of the fault machine is selected, the backup machine can be selected by combining the state of the disk of the fault machine, and the selection strategy is as follows:
on one hand, consider the raid structure and IO performance: the server with the raid structure and high IO storage is preferentially selected as the backup machine, because the raid structure can prevent data loss caused by damage of a single disk, and the high IO represents high performance of a hard disk, so that safety and high efficiency of backup can be guaranteed.
And secondly, selecting a server of the noroid with the same model as the fault machine as a backup machine. This is because machines of the same model have high compatibility and facilitate data copying.
On the other hand, consider disk space: and preferentially selecting a server with the same disk space size as the failed machine as a backup machine. This may improve the consistency of the failed machine with the backup machine.
In yet another aspect, consider a software system carried by a disk: the system (OS disk) and the data disk are preferably selected to be deployed in servers of different disks as backup machines, and backup hard disk data obtained by subsequent backups are stored in the data disk. When data recovery is performed subsequently, if a mode that a backup machine runs a recovery tool is adopted, an operating system needs to be installed on a system disk according to the system type of the recovery tool so as to perform data recovery on backup hard disk data in the data disk, the system disk and the data disk are separated, and the change of the system disk can be realized.
Therefore, the invention can provide the schemes in the aspects for the related resources of the fault machine for building backup, thereby improving the efficiency of data backup. The following explains the related concepts:
raid and noroid: raid represents a disk array (Redundant Arrays of Independent Disks) and represents the external provision of read and write services by combining Independent Disks. A disk array can be implemented that has redundancy capabilities and can accept single or multiple disks in the array that are corrupted but not lost. Noraid generally means that without data redundancy capability, each disk operates independently and the corresponding disk loses data upon failure.
The raid structure: the disk array has multiple modes of combining disks, different raid structure effects are different, and selection is performed according to service demand scenarios. For example, raid0 indicates that all disks are provided externally as a large disk array. raid1 indicates that 2 disks are combined into one disk array, and one disk is used as a mirror image to exclusively backup data of the other disk.
High io: the general hard disks are classified into general hard disks and high-performance hard disks (the read-write speed of the magnetic disk is faster), and high io represents the high-performance hard disks.
It should be noted that, a user may consider one or more of the above aspects when selecting a backup machine, and since different application scenarios have different requirements for the environment, the present invention only provides several key aspects in the backup machine selection policy, and does not make any limitation.
In addition, in the embodiment of the present invention, the second resource used for data recovery is specifically a runtime environment machine for preparing a recovery tool. The method comprises the following specific steps:
1) determining the type of system on which the recovery tool depends: it is determined whether windows or linux is required. There is a need to unify the system type of the runtime environment machine with the system type of the recovery tool.
2) Determining an operating environment machine: considering the way of subsequent data recovery, for example, a U disk or a new system disk or a backup machine or a pxe may be selected as the runtime environment machine.
Specifically, if the mode that the USB flash disk guides the fault machine is adopted, the USB flash disk is provided with an operating system according to the system type of the recovery tool.
If the mode of replacing the system disk to start the fault machine is adopted, the system disk which has the same raid structure as the fault machine and the same system type of the operating system and the recovery tool is selected, and therefore system disk interchange is supported. For example, the failure is a system disk composed of 2 disks made of raid1, the recovery tool runs the environment machine, and preferably also is a system disk composed of 2 disks made of raid 1.
If the mode that the backup machine runs the recovery tool is adopted, an operating system of the recovery tool is installed on a system disk of the backup machine, so that data recovery is carried out on backup hard disk data in the data disk.
If the mode that the pxe starts the fault machine is adopted, the pxe is installed with an operating system according to the system type of the recovery tool. pxe does not depend on the failed machine and the backup machine, and essentially belongs to a protocol defined for network boot, and pulls up the operating system of the failed machine by means of a network interface.
The concept of pxe is illustrated below:
pxe: a Preboot eXecution Environment (PXE), also referred to as a Preboot eXecution Environment, provides a mechanism for booting a computer using a Network Interface (Network Interface). This mechanism allows the computer to boot without relying on a local data storage device (e.g., hard disk) or a locally installed operating system.
3) The runtime machine is preferably in communication with both the intranet and the extranet on the network. This is because the operation of the partial recovery tool depends on the network, and the operation of the recovery tool can be guaranteed by deploying the network in advance.
And S30, backing up the original hard disk data of each fault machine based on the first resource of each fault machine to obtain corresponding backup hard disk data.
In the embodiment of the invention, the backup scheme can be selected according to the application scene, so that the original hard disk data of the fault machine is backed up to the disk of the backup machine.
Specifically, the invention provides two backup schemes, wherein one scheme is a mode of copying a disk, and the other scheme is a mode of starting a fault machine by pxe. These two modes are explained below:
1) backing up the original hard disk data of each fault machine in a disk copy-to-copy mode:
the disk of the fault machine is pulled out and inserted into the backup machine, then the original hard disk data in the disk of the fault machine is completely copied to the disk where the data disk of the backup machine is located by dd, after the copying is finished, whether the data copied to the backup machine is consistent with the original hard disk data is verified by a verification method such as MD5, and if so, the disk pair copying is finished.
Therefore, the disks of a plurality of fault machines can be pulled out and inserted into the backup machine, and the data copying of the disks can be initiated in parallel. In the embodiment of the present invention, of course, if the system disk and the data disk of the backup machine are deployed in the same disk, the copied backup hard disk data is located in the space of the data disk.
2) The method comprises the following steps of backing up original hard disk data of each fault machine in a mode that a pxe starts the fault machine:
the pxe pulls up the operating system of the fault machine by means of the network interface, then copies the original hard disk data in the disk of the fault machine to the disk where the data disk of the backup machine is located completely by means of dd, after the copying is completed, checks whether the data copied to the backup machine is consistent with the original hard disk data by means of checking means such as MD5, and if so, completes the disk copy-to-copy.
The method has the advantage that data backup can be completed through remote operation without using a machine room operating machine.
And S40, recovering the original hard disk data or the backup hard disk data of each failed machine based on the second resource of each failed machine to obtain corresponding recovered hard disk data.
In the embodiment of the invention, the system environment of the recovery tool is set up based on the running environment machine of the recovery tool, the recovery tool is further started, and the original hard disk data or the backup hard disk data are recovered through the recovery tool. Specifically, the original hard disk data is restored by adopting any one of the modes of a U disk boot failure machine, a system disk replacement start failure machine and a pxe start failure machine, and the backup hard disk data is restored by adopting the mode of a backup machine running a restoration tool.
In a specific implementation process, for each fault machine, a system environment of a specified recovery tool is established on the fault machine or a backup machine where corresponding backup hard disk data is located, so that the specified recovery tool is started to recover original hard disk data or backup hard disk data of the fault machine.
The following describes the manner of booting a failed machine by a usb disk, replacing a system disk to start the failed machine, running a recovery tool by a backup machine, and starting the failed machine by a pxe, respectively:
1) the mode of guiding the fault machine by adopting the USB flash disk is as follows: and inserting the USB flash disk into the fault machine, pulling up an operating system of the fault machine in a USB interface mode, further running a recovery tool on the fault machine, and performing data recovery on the original hard disk data of the fault machine through the recovery tool.
2) The method for starting the fault machine by replacing the system disk is adopted, and the operating system of the fault machine is in an abnormal survival state, so that the operating system of the fault machine can be started by replacing the system disk of the fault machine, a recovery tool is further operated on the fault machine, and data recovery is carried out on original hard disk data of the fault machine by the recovery tool. This may reduce the copy time of the data backup.
3) And running a recovery tool on a system disk of the backup machine in a mode that the backup machine runs the recovery tool, and performing data recovery on backup hard disk data in the data disk through the recovery tool.
4) The method comprises the steps that a pxe starts a fault machine, the pxe pulls up an operating system of the fault machine in a network port interface mode, a recovery tool runs on the fault machine, and data recovery is conducted on original hard disk data of the fault machine through the recovery tool.
It should be noted that, the recovery tool may be selected according to an actual failure scenario, or a professional data recovery company is introduced, which is not limited in the embodiment of the present invention.
In other embodiments, to prevent the recovered data from being lost, an embodiment of the present invention further provides a data storage scheme, where the environment resource further includes a third resource used for data storage, and accordingly, the method for recovering hard disk data in batches according to the embodiment of the present invention further includes the following steps:
and storing the recovered hard disk data of each failed machine based on the third resource of each failed machine.
In the embodiment of the present invention, as for the third resource used for data storage, specifically, the selection of the storage machine may be as follows:
on one hand, consider the raid structure and IO performance: the server with the raid structure and high IO storage is preferentially selected to serve as a storage machine, and the storage machine has data redundancy capability, so that the recovered data is prevented from being lost.
In another aspect, the network communicates with a runtime environment machine network of the recovery tool. And ensuring that the storage machine can obtain the restored hard disk data.
On the other hand, by deploying the samba service, the recovered hard disk data can be quickly obtained through the text sharing service.
In another aspect, a cos client is deployed and can upload the recovered hard disk data to a cos bucket in the cloud.
The following explains the related concepts:
samba: a free software for realizing SMB protocol (protocol for realizing resource sharing service such as files in local area network) on Linux and UNIX systems is composed of server and client program, and realizes file sharing between Linux and Windows systems.
cos: the Object store (COS) is a distributed Storage service that is pushed by the tengtong Cloud without directory hierarchy, data format restrictions, can accommodate massive data, and supports HTTP or HTTPs protocol access.
It should be noted that, the user may consider one or more of the above aspects when selecting the saving machine, and since different application scenarios have different requirements for the environment, the present invention only provides several key aspects in the saving machine selection policy, and does not make any limitation.
In addition, in order to store the recovery hard disk data of the failed machine to the save machine, the save machine needs to be mounted on the operation environment machine of the recovery tool in advance in a samba manner, and then the recovery tool runs again, so that the recovery hard disk data can be transmitted to the save machine from the operation environment machine in a file sharing manner.
In other embodiments, some of the data recovered by the recovery tool is missing some of the attributes, making it unusable by the client. In order to solve the problem, an embodiment of the present invention further provides a data processing scheme, where the environment resource further includes a fourth resource used for data processing, and correspondingly, the method for restoring hard disk data in batches further includes the following steps:
and performing data processing on the recovered hard disk data of each failed machine based on the fourth resource of each failed machine, wherein the data processing at least comprises at least one processing operation of data filtering and data processing.
In the embodiment of the present invention, as for the fourth resource used for data processing, specifically, a data processing program installed on the saving machine may be selected, and the fourth resource may be selected in combination with an application scenario.
It has at least one of data filtering and data processing functions for the data processing program. For example, for a gz compressed package, it can be checked whether a file is complete through a gunzip command, and through a tar command, a file list in the compressed package can be directly obtained, and a client is helped to quickly filter out what data is needed by the client through a file name or time, etc.
And the data processing comprises renaming of files, splicing of large files and the like. The recovery hard disk data is changed into service data which is useful for the client, so that the client focuses on the recovery of the service, and the energy consumption of effective data screening is reduced.
In addition, in order to improve the readability of the data, the embodiment of the invention can also perform file arrangement on the effective hard disk data acquired through at least one processing operation of data filtering and data processing to obtain a file list. Specifically, a file list in the compressed file can be obtained, and a file list of the entire data can be summarized and sorted, so that a user can search conveniently. The file list records therein related attribute information of the data, such as a name, and further such as a creation time, etc.
Furthermore, the effective hard disk data and the file list can be uploaded to a server for storing the object, namely to a cos bucket, so as to improve service utilization. And determining whether the hard disk data of the fault machine is recovered or not by the service, and feeding back the incomplete data to perform subsequent data processing in other modes.
Of course, the valid hard disk data and the file list can also be uploaded to the cold-standby server. The cold preparation is explained below:
cold preparation: data is backed up, but the backed-up data is generally not used for service operation and is only used for emergency in special situations. Therefore, the cold backup is generally required to be lower, including the storage environment configuration, the backup speed and the like.
In conclusion, the invention provides a complete data batch recovery full-flow scheme, and ensures the data recovery work to be carried out orderly; the efficiency is improved by preposing and parallel resource preparation and environment deployment; the recovered data (recovered hard disk data) is processed in batches and then provided for the service, so that the data quality is improved, and the labor consumption is reduced; the original machine is directly started for data recovery by replacing the system disk, so that the copying time of data backup is reduced; the cos is used for storing the recovered data, the transmission speed of the intranet is high, the cos has high data reliability, and global retrieval and multi-environment downloading are facilitated. From practical results, the data recovery of nearly one hundred T is completed in 7 days, and the efficiency and the quality are reported.
For a clear understanding of the content of the embodiments of the present invention, an application scenario of batch recovery of hard disk data will now be described in detail.
Fig. 3 is a scene schematic diagram of a batch recovery method for hard disk data according to an embodiment of the present invention. After the hard disk data of a large batch of servers are found to be deleted by mistake rm, all fault machines can be shut down at the first time, and data recovery is prepared.
And preparing environment resources for each fault machine, wherein the environment resources comprise four types of resources for preparing data backup, data recovery, data storage and data processing. The original hard disk data is backed up through dd backup under pxe or hard disk copy, and the running environment of the recovery tool can be directly prepared under the condition of backup completion or time emergency; secondly, a system environment for recovering the operation of the tool is built and provided (a USB flash disk starts a fault machine, a system disk is replaced to start the fault machine, a backup machine runs the recovery tool, a pxe starts the fault machine), and then the recovery tool is started; and finally, performing data filtering or processing on the recovered hard disk data, confirming whether effective hard disk data are recovered or not by a service, and feeding back incomplete data. And after the service runs out of data, performing resource cleaning and recovery, thereby ending the recovery period of hard disk data.
Through the scheme, the user can be guided to quickly and orderly start the data recovery work of the batch machines in parallel, and the efficiency and the quality of data recovery are greatly improved.
In the following, the batch recovery device for hard disk data according to the embodiment of the present invention is introduced, and the following described batch recovery device for hard disk data may be considered as a program module that is required to be set by an electronic device to implement the batch recovery method for hard disk data according to the embodiment of the present invention. The following description of the contents of the apparatus for bulk recovery of hard disk data may be referred to in the above description of the contents of the method for bulk recovery of hard disk data.
Fig. 4 is a schematic structural diagram of a device for bulk recovery of hard disk data according to an embodiment of the present invention. Referring to fig. 4, the apparatus for bulk recovery of hard disk data may include:
the fault detection module 10 is used for determining a plurality of fault machines and executing shutdown operation on each fault machine;
the environment building module 20 is configured to build environment resources for each fault machine according to the operation information of each fault machine, where the environment resources at least include a first resource used for data backup and a second resource used for data recovery;
the data processing module 30 is configured to backup original hard disk data of each faulty machine based on the first resource of each faulty machine, so as to obtain corresponding backup hard disk data; and recovering the original hard disk data or the backup hard disk data of each fault machine based on the second resource of each fault machine to obtain corresponding recovered hard disk data.
Further, in the apparatus for restoring hard disk data in bulk according to the embodiment of the present invention, the data processing module 30, configured to backup the original hard disk data of each failed machine based on the first resource of each failed machine, is specifically configured to:
backing up the original hard disk data of each fault machine in a disk copy-to-copy mode;
or
And backing up the original hard disk data of each fault machine in a mode of starting the fault machine by the pre-starting execution environment pxe.
Further, in the apparatus for restoring hard disk data in bulk according to the embodiment of the present invention, the data processing module 30, configured to restore the original hard disk data or the backup hard disk data of each failed machine based on the second resource of each failed machine, is specifically configured to:
and aiming at each fault machine, building a system environment of a specified recovery tool on the fault machine or the backup machine where the corresponding backup hard disk data is located so as to start the specified recovery tool to recover the original hard disk data or the backup hard disk data of the fault machine.
Further, in the batch recovery device for hard disk data provided in the embodiment of the present invention, the data processing module 30, which is used to build a system environment of a specified recovery tool on the faulty machine, is specifically configured to:
the malfunctioning machine is started by replacing its system disk.
Further, in the apparatus for bulk recovery of hard disk data provided in the embodiment of the present invention, the environment resource further includes a third resource for data storage;
the data processing module 30 is further configured to:
and storing the recovered hard disk data of each failed machine based on the third resource of each failed machine.
Further, in the apparatus for restoring hard disk data in bulk according to the embodiment of the present invention, the environment resource further includes a fourth resource for data processing;
the data processing module 30 is further configured to:
and performing data processing on the recovered hard disk data of each failed machine based on the fourth resource of each failed machine, wherein the data processing at least comprises at least one processing operation of data filtering and data processing.
Further, in the apparatus for restoring hard disk data in batches provided in the embodiment of the present invention, the data processing module 30, configured to perform data processing on the restored hard disk data of each failed machine based on the fourth resource of each failed machine, is specifically configured to:
and performing file arrangement on the effective hard disk data acquired through at least one processing operation of data filtering and data processing to obtain a file list.
According to the batch recovery device for hard disk data provided by the embodiment of the invention, after a large number of fault machines which are mistakenly deleted by rm appear, in order to prevent hard disks from being overwritten by data, the fault machines are shut down in batches at the first time, and then the environment resources of the fault machines are built in batches by considering the operation information of the fault machines, so that batch data backup and data recovery of hard disk data of subsequent fault machines are realized. The invention can guide the user to quickly and orderly start the data recovery work of the batch fault machine in parallel, thereby greatly improving the efficiency and quality of data recovery.
The embodiment of the invention provides a storage medium, wherein a computer-executable instruction is stored in the storage medium, and the computer-executable instruction is used for executing the batch recovery method of the hard disk data provided by the embodiment. Alternatively, the detailed function and the extended function of the instruction may be as described above.
The method, the apparatus, the storage medium, and the electronic device for batch recovery of hard disk data provided by the present invention are described in detail above, and a specific example is applied in the present document to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention. In addition, in the above description of the disclosed embodiments, features described in the embodiments in the present specification may be replaced or combined with each other, so that those skilled in the art can implement or use the present application.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include or include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for recovering hard disk data in batches is characterized by comprising the following steps:
determining a plurality of fault machines and executing shutdown operation on each fault machine;
according to the operation information of each fault machine, environment resources are built for each fault machine, and the environment resources at least comprise a first resource for data backup and a second resource for data recovery;
backing up original hard disk data of each fault machine based on first resources of each fault machine to obtain corresponding backup hard disk data;
and recovering the original hard disk data or the backup hard disk data of each fault machine based on the second resource of each fault machine to obtain corresponding recovered hard disk data.
2. The method of claim 1, wherein backing up the original hard disk data of each failed machine based on the first resource of each failed machine comprises:
backing up the original hard disk data of each fault machine in a disk copy-to-copy mode;
or
And backing up the original hard disk data of each fault machine in a mode of starting the fault machine by a pre-starting execution environment.
3. The method of claim 1, wherein the recovering the original hard disk data or the backup hard disk data of each failed machine based on the second resource of each failed machine comprises:
and aiming at each fault machine, building a system environment of a specified recovery tool on the fault machine or the backup machine where the corresponding backup hard disk data is located, so as to start the specified recovery tool to recover the original hard disk data or the backup hard disk data of the fault machine.
4. The method according to claim 3, wherein the building a system environment of specified recovery tools on the fault machine comprises:
the malfunctioning machine is started by replacing its system disk.
5. The method of claim 1, wherein the environmental resources further comprise a third resource for data storage;
the method further comprises the following steps:
and storing the recovered hard disk data of each failed machine based on the third resource of each failed machine.
6. The method of claim 1, wherein the environmental resources further comprise a fourth resource for data processing;
the method further comprises the following steps:
and performing data processing on the recovered hard disk data of each failed machine based on the fourth resource of each failed machine, wherein the data processing at least comprises at least one processing operation of data filtering and data processing.
7. The method of claim 6, wherein the performing data processing on the recovered hard disk data of each failed machine based on the fourth resource of each failed machine comprises:
and performing file arrangement on the effective hard disk data acquired through at least one processing operation of data filtering and data processing to obtain a file list.
8. An apparatus for bulk recovery of hard disk data, the apparatus comprising:
the fault detection module is used for determining a plurality of fault machines and executing shutdown operation on each fault machine;
the environment building module is used for building environment resources for each fault machine according to the operation information of each fault machine, wherein the environment resources at least comprise first resources for data backup and second resources for data recovery;
the data processing module is used for backing up the original hard disk data of each fault machine based on the first resource of each fault machine to obtain corresponding backup hard disk data; and recovering the original hard disk data or the backup hard disk data of each fault machine based on the second resource of each fault machine to obtain corresponding recovered hard disk data.
9. A storage medium, wherein computer-executable instructions are stored in the storage medium, and the computer-executable instructions are used for executing the method for bulk recovery of hard disk data according to any one of claims 1 to 7.
10. An electronic device, comprising: at least one memory and at least one processor; the memory stores a program, and the processor calls the program stored in the memory, wherein the program is used for realizing the batch recovery method of the hard disk data according to any one of claims 1 to 7.
CN202011110039.0A 2020-10-16 2020-10-16 Batch recovery method and device for hard disk data, storage medium and electronic equipment Pending CN112148532A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011110039.0A CN112148532A (en) 2020-10-16 2020-10-16 Batch recovery method and device for hard disk data, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011110039.0A CN112148532A (en) 2020-10-16 2020-10-16 Batch recovery method and device for hard disk data, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112148532A true CN112148532A (en) 2020-12-29

Family

ID=73952164

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011110039.0A Pending CN112148532A (en) 2020-10-16 2020-10-16 Batch recovery method and device for hard disk data, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112148532A (en)

Similar Documents

Publication Publication Date Title
US9658928B2 (en) File-based cluster-to-cluster replication recovery
EP2494456B1 (en) Backup using metadata virtual hard drive and differential virtual hard drive
US10503604B2 (en) Virtual machine data protection
US10310949B1 (en) Disaster restore of big data application with near zero RTO
US10503616B2 (en) Periodic data replication
US9081732B2 (en) Recovery of a computer that includes virtual disks
EP2652620B1 (en) Failure recovery method in information processing system and corresponding information processing system
US8949188B2 (en) Efficient backup and restore of a cluster aware virtual input/output server (VIOS) within a VIOS cluster
US8868858B2 (en) Method and apparatus of continuous data backup and access using virtual machines
US8533164B2 (en) Method and tool to overcome VIOS configuration validation and restoration failure due to DRC name mismatch
AU2014374256B2 (en) Systems and methods for improving snapshot performance
US8732128B2 (en) Shadow copy bookmark generation
CN111078667B (en) Data migration method and related device
US11003364B2 (en) Write-once read-many compliant data storage cluster
CN115098299B (en) Backup method, disaster recovery method, device and equipment of virtual machine
CN113886143B (en) Virtual machine continuous data protection method and device and data recovery method and device
CN112800019A (en) Data backup method and system based on Hadoop distributed file system
CN114328005B (en) Method and system for incremental backup of container data
CN112148532A (en) Batch recovery method and device for hard disk data, storage medium and electronic equipment
CN110658989B (en) System and method for backup storage garbage collection
US20230315881A1 (en) Universal platform for data protection
CN117667515A (en) Backup management method and device for main and standby clusters, computer equipment and storage medium
CN115481198A (en) Data table synchronization method and device, computer equipment and storage medium
CN116719604A (en) Container migration method and device, storage medium and electronic equipment

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