Hard disk data batch recovery method, device, storage medium and electronic device

By determining the faulty machine in the cloud computing environment and building a data backup and recovery environment, the problem of error deletion of large-scale server hard disk data is solved, and fast and efficient data recovery is achieved.

CN112148532BActive Publication Date: 2025-05-06TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202011110039.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-16
Publication Date
2025-05-06
Estimated Expiration
2040-10-16

AI Technical Summary

Technical Problem

In a cloud computing environment, how to quickly and effectively recover the data of large-scale server hard disks caused by misuse of rm commands in Linux systems after being accidentally deleted?

Method used

By determining the faulty machine and shutting down the machine, we build environmental resources based on the operating information of each faulty machine, including resources for data backup and recovery, and batch data backup and recovery are performed.

Benefits of technology

The data recovery work of the batch failure machine is realized in a fast and orderly parallel startup, greatly improving the efficiency and quality of data recovery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112148532B_ABST
    Figure CN112148532B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, storage medium and electronic device for batch recovery of hard disk data. When a large number of faulty machines are mistakenly deleted by RM, in order to prevent the hard disk from being overwritten by data, the faulty machines are shut down in batches at the first time, and then the environmental resources of the faulty machines are built in batches considering the operation information of the faulty machines, so as to realize batch data backup and data recovery of the hard disk data of the subsequent faulty machines. Based on the present invention, users can be guided to quickly and orderly start the data recovery work of batch faulty machines in parallel, greatly improving the efficiency and quality of data recovery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cloud computing, and more specifically, to a method, device, storage medium and electronic device for batch recovery of hard disk data. Background Art

[0002] With the development of science and technology, the demand for cloud computing resources is increasing, and many large companies use a large number of servers to process their business.

[0003] The Linux system provides an rm command for deleting files or directories. Due to incorrect command writing or human operation, it is easy to cause important files on the hard disk to be accidentally deleted by the rm command. When a large number of server hard disks are accidentally deleted by rm, how to effectively recover the hard disk data of a large number of faulty machines is an urgent problem to be solved in this field. Summary of the invention

[0004] In view of this, the present invention provides a method, device, storage medium and electronic device for batch recovery of hard disk data, so as to realize rapid recovery of hard disk data of a large number of faulty machines.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0006] A method for recovering hard disk data in batches, the method comprising:

[0007] Identify multiple faulty machines and shut down each of them;

[0008] Building environmental resources for each faulty machine according to the operation information of each faulty machine, wherein the environmental resources at least include a first resource for data backup and a second resource for data recovery;

[0009] Backing up the original hard disk data of each faulty machine based on the first resource of each faulty machine to obtain corresponding backup hard disk data;

[0010] The original hard disk data or the backup hard disk data of each faulty machine is restored based on the second resource of each faulty machine to obtain corresponding restored hard disk data.

[0011] A batch recovery device for hard disk data, the device comprising:

[0012] A fault detection module is used to identify multiple faulty machines and shut down each faulty machine;

[0013] An environment building module, used to build environment resources for each faulty machine according to the operation information of each faulty machine, wherein the environment resources at least include a first resource for data backup and a second resource for data recovery;

[0014] The data processing module is used to back up the original hard disk data of each faulty machine based on the first resource of each faulty machine to obtain corresponding backup hard disk data; and to restore the original hard disk data or backup hard disk data of each faulty machine based on the second resource of each faulty machine to obtain corresponding restored hard disk data.

[0015] A storage medium, characterized in that the storage medium stores computer executable instructions, and the computer executable instructions are used to execute the batch recovery method of hard disk data.

[0016] An electronic device, characterized in that it comprises: at least one memory and at least one processor; the memory stores a program, the processor calls the program stored in the memory, and the program is used to implement the batch recovery method of hard disk data.

[0017] The present invention provides a method, device, storage medium and electronic device for batch recovery of hard disk data. After a large number of faulty machines are mistakenly deleted by rm, in order to prevent the hard disk from being overwritten by data, the faulty machines are shut down in batches at the first time, and then the environmental resources of the faulty machines are built in batches considering the operation information of the faulty machines, so as to realize batch data backup and data recovery of the hard disk data of the subsequent faulty machines. Based on the present invention, users can be guided to quickly and orderly start the data recovery work of batch faulty machines in parallel, greatly improving the efficiency and quality of data recovery. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0019] Figure 1 A hardware structure block diagram of an electronic device provided by an embodiment of the present invention;

[0020] Figure 2 A method flow chart of a method for batch recovery of hard disk data provided by an embodiment of the present invention;

[0021] Figure 3 A schematic diagram of a scenario of a method for recovering hard disk data in batches provided by an embodiment of the present invention;

[0022] Figure 4 A schematic diagram of the structure of a batch recovery device for hard disk data provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0025] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool and be used on demand, which is flexible and convenient. Cloud computing technology will become an important support. The background services of technical network systems require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can only be achieved through cloud computing.

[0026] Cloud computing refers to the delivery and use model of IT infrastructure, which means obtaining required resources through the network in an on-demand and easily scalable manner; in a broad sense, cloud computing refers to the delivery and use model of services, which means obtaining required services through the network in an on-demand and easily scalable manner. This service can be related to IT and software, the Internet, or other services. Cloud computing is the product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing.

[0027] With the development of the Internet, real-time data streams, and the diversification of connected devices, as well as the demand for search services, social networks, mobile commerce, and open collaboration, cloud computing has developed rapidly. Different from the previous parallel distributed computing, the emergence of cloud computing will promote revolutionary changes in the entire Internet model and enterprise management model from a conceptual perspective.

[0028] Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.

[0029] At present, the storage method of the storage system is: create a logical volume, and when creating a logical volume, allocate physical storage space for each logical volume. The physical storage space may be composed of disks of a storage device or several storage devices. The client stores data on a logical volume, that is, stores the data on the file system. The file system divides the data into many parts, each of which is an object. The object contains not only data but also additional information such as data identification (ID, IDentity). The file system writes each object into the physical storage space of the logical volume, and the file system records the 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.

[0030] The process of the storage system allocating physical storage space to a logical volume is as follows: based on the estimated capacity of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of independent redundant disk arrays (RAID, Redundant Array of Independent Disks), the physical storage space is pre-divided into stripes. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.

[0031] In this context, business-related data will be stored on the server hard disk. In order to deal with the hard disk data of a large number of servers being mistakenly deleted by RM (the server mistakenly deleted by RM is a faulty machine), the present invention provides a batch recovery solution for hard disk data, which is used to quickly guide users to quickly and orderly start the data recovery work of a batch of faulty machines in parallel, greatly improving the efficiency and quality of data recovery.

[0032] It should be noted that the server in the present invention can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The present invention is not limited here.

[0033] Example

[0034] The batch method for hard disk data provided in the embodiment of the present invention can be applied to electronic devices. The electronic device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The electronic device and the server can be directly or indirectly connected via wired or wireless communication, and the present invention does not limit this.

[0035] Figure 1 A hardware structure block diagram of an electronic device provided by an embodiment of the present invention, referring to Figure 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;

[0036] 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 communicate with each other through the communication bus 14;

[0037] 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 the embodiments of the present invention;

[0038] The memory 13 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;

[0039] The memory stores a program, and the processor can call the program stored in the memory, and the program is used to:

[0040] Identify multiple faulty machines and shut down each of them;

[0041] Building environmental resources for each faulty machine according to the operation information of each faulty machine, the environmental resources at least including a first resource for data backup and a second resource for data recovery;

[0042] Backing up the original hard disk data of each faulty machine based on the first resource of each faulty machine to obtain corresponding backup hard disk data;

[0043] The original hard disk data or the backup hard disk data of each faulty machine is restored based on the second resource of each faulty machine to obtain corresponding restored hard disk data.

[0044] Optionally, the detailed and extended functions of the program can be referred to the description below.

[0045] Figure 2 A method flow chart of a method for batch recovery of hard disk data provided by an embodiment of the present invention, referring to Figure 2 , the batch recovery method of hard disk data may include the following steps:

[0046] S10, determining multiple faulty machines, and shutting down each faulty machine.

[0047] In the embodiment of the present invention, when the hard disk data of the server is mistakenly deleted by rm, it is a faulty machine, and the operating system will be in an abnormal survival state, that is, considering the type of deleted hard disk data, the operating system of the faulty machine may show performances such as "machine cannot log in", "machine crashes", "machine cannot restart", etc. Therefore, the faulty machine can be identified by monitoring the state of the operating system.

[0048] For the faulty machine, we can further determine whether it can be backed up online. If it cannot be backed up online, the faulty machine should be shut down immediately to prevent data duplication. If the faulty machine can still be backed up online, its data can be stored through the network. At this time, data recovery of the faulty machine is temporarily unnecessary. This is because although the hard disk data of the faulty machine is deleted, some data is still retained in the memory of the faulty machine. If the business operation of the faulty machine does not rely on the hard disk data that was mistakenly deleted by rm, it can still run normally. In this case, online backup can be used for storage.

[0049] S20, building environmental resources for each faulty machine according to the operation information of each faulty machine, where the environmental resources at least include a first resource for data backup and a second resource for data recovery.

[0050] In the embodiment of the present invention, for the first resource used for data backup, a backup machine can be specifically selected to copy the original hard disk data of the failed machine to the backup machine to prevent the original data from being lost after subsequent data recovery operations cause changes to the data.

[0051] When selecting a backup machine for a failed machine, you can choose based on the disk status of the failed machine. The selection strategy is as follows:

[0052] On the one hand, consider the RAID structure and IO performance: give priority to servers with high IO storage with RAID structure as backup machines. This is because the RAID structure can prevent data loss caused by damage to a single disk, and high IO means high performance of the hard disk, which can ensure the security and efficiency of the backup.

[0053] Secondly, choose a Noraid server of the same model as the failed machine as the backup machine. This is because machines of the same model have high compatibility and are convenient for data copying.

[0054] On the other hand, consider disk space: It is preferred to select a server with the same disk space size as the failed machine as the backup machine. This can improve the consistency between the failed machine and the backup machine.

[0055] On the other hand, consider the software system carried by the disk: give priority to selecting a server with the system (OS disk) and data disk deployed on different disks as the backup machine, and the backup hard disk data obtained by subsequent backup will be stored in the data disk. This is because when performing data recovery later, if the backup machine is used to run the recovery tool, it is necessary to install the operating system on the system disk according to the system type of the recovery tool to perform data recovery on the backup hard disk data in the data disk. The system disk and the data disk are separated, so that changes to the system disk can be realized.

[0056] Therefore, the present invention can provide the above solutions for building backup resources for faulty machines, thereby improving the efficiency of data backup. The following is an explanation of the relevant concepts:

[0057] raid and noraid: raid stands for Redundant Arrays of Independent Disks, which means that independent disks are combined to provide read and write services. It can realize a disk array with redundancy, which can accept the damage of one or more disks in the array without losing data. Noraid generally means that there is no data redundancy, each disk works independently, and once a failure occurs, the data of the corresponding disk will be lost.

[0058] RAID structure: There are many ways to combine disks in a disk array. Different RAID structures have different effects. You should choose according to the business demand scenario. For example, RAID0 means that all disks are combined into a large disk array for external use. RAID1 means that two disks are combined into a disk array, and one of the disks is used as a mirror to specifically back up the data of the other disk.

[0059] High io: Generally, hard disks are divided into ordinary hard disks and high-performance hard disks (disks with faster read and write speeds). High io means high-performance hard disks.

[0060] It should be noted that the user may consider one or more of the above aspects when selecting a backup machine. Since different application scenarios have different requirements for the environment, the present invention only provides several key aspects of the backup machine selection strategy and does not make any limitations thereon.

[0061] In addition, in the embodiment of the present invention, the second resource used for data recovery is specifically a machine for preparing the operating environment of the recovery tool. The details are as follows:

[0062] 1) Determine the system type that the recovery tool depends on: Determine whether Windows or Linux is needed. The system type of the operating environment machine needs to be consistent with the system type of the recovery tool.

[0063] 2) Determine the operating environment machine: Consider the subsequent data recovery method, such as choosing a USB flash drive or a new system disk or a backup machine or PXE as the operating environment machine.

[0064] Specifically, if a USB flash drive is used to boot the faulty machine, the operating system is installed on the USB flash drive according to the system type of the recovery tool.

[0065] If you use the method of replacing the system disk to start the faulty machine, you should choose a system disk with the same RAID structure as the faulty machine and the same operating system and recovery tool system type, so that the system disk can be interchanged. For example, if the fault is a system disk composed of two disks in RAID1, then the machine where the recovery tool runs should also be made into a system disk composed of two disks in RAID1.

[0066] If the backup machine is used to run the recovery tool, the operating system of the recovery tool is installed on its system disk to recover the backup hard disk data in the data disk.

[0067] If you use PXE to start the faulty machine, PXE will install the operating system according to the system type of the recovery tool. PXE does not depend on the faulty machine or the backup machine. It is essentially a protocol defined for network startup, which starts the operating system of the faulty machine through the network port interface.

[0068] The following is an explanation of the concept of PXE:

[0069] PXE: Preboot eXecution Environment (PXE), also known as pre-execution environment, provides a mechanism to start a computer using a network interface. This mechanism allows the computer to start without relying on local data storage devices (such as hard disks) or locally installed operating systems.

[0070] 3) The operating environment machine should be connected to both the internal and external networks. This is because the operation of some recovery tools depends on the network. Deploying the network in advance can ensure the operation of the recovery tools.

[0071] S30, backing up the original hard disk data of each faulty machine based on the first resource of each faulty machine to obtain corresponding backup hard disk data.

[0072] In the embodiment of the present invention, a backup solution can be selected according to the application scenario, so as to back up the original hard disk data of the failed machine to the disk of the backup machine.

[0073] Specifically, the present invention provides the following two backup solutions, one is a disk copy method, and the other is a PXE method to start the failed machine. The following describes these two methods respectively:

[0074] 1) Back up the original hard disk data of each failed machine by disk copying:

[0075] Unplug the disk of the faulty machine and insert it into the backup machine. Then use dd to completely copy the original hard disk data in the faulty machine to the disk where the backup machine data disk is located. After the copy is completed, use verification methods such as MD5 to verify whether the data copied to the backup machine is consistent with the original hard disk data. If they are consistent, the disk copy is completed.

[0076] Based on this, the disks of multiple failed machines can be unplugged and plugged into the backup machine to initiate data copying of the disks in parallel. In the embodiment of the present invention, of course, if the system disk and data disk of the backup machine are deployed on the same disk, the copied backup hard disk data is located in the space of the data disk.

[0077] 2) Use PXE to start the faulty machine and back up the original hard disk data of each faulty machine:

[0078] Pxe pulls up the operating system of the faulty machine through the network port interface, and then uses dd to completely copy the original hard disk data in the faulty machine's disk to the disk where the backup machine's data disk is located. After the copy is completed, it verifies whether the data copied to the backup machine is consistent with the original hard disk data through verification methods such as MD5. If they are consistent, the disk copy is completed.

[0079] The advantage of this method is that you don't need to go to the computer room to operate the machine, and data backup can be completed through remote operation.

[0080] S40, restoring the original hard disk data or the backup hard disk data of each faulty machine based on the second resource of each faulty machine to obtain corresponding restored hard disk data.

[0081] In the embodiment of the present invention, a system environment of the recovery tool is built based on the running environment machine of the recovery tool, and then the recovery tool is started, and the original hard disk data or the backup hard disk data is restored through the recovery tool. Specifically, any one of the methods of using a U disk to boot the faulty machine, replacing the system disk to boot the faulty machine, and pxe booting the faulty machine restores the original hard disk data, while the method of using a backup machine to run the recovery tool restores the backup hard disk data.

[0082] In the specific implementation process, for each faulty machine, a system environment of a designated recovery tool is built on the faulty machine or the backup machine where the corresponding backup hard disk data is located, so as to start the designated recovery tool to recover the original hard disk data or the backup hard disk data of the faulty machine.

[0083] The following describes how to boot the faulty machine using a USB disk, replace the system disk to boot the faulty machine, run the recovery tool on the backup machine, and boot the faulty machine using PXE:

[0084] 1) Use a USB flash drive to boot the faulty machine: insert the USB flash drive into the faulty machine, pull up the operating system of the faulty machine through the USB interface, and then run the recovery tool on the faulty machine to recover the original hard disk data of the faulty machine through the recovery tool.

[0085] 2) Replace the system disk to start the faulty machine. Since the operating system of the faulty machine is in an abnormal survival state, the operating system of the faulty machine can be started by replacing the system disk of the faulty machine, and then the recovery tool can be run on the faulty machine to restore the original hard disk data of the faulty machine. This can reduce the copy time of data backup.

[0086] 3) The backup machine is used to run the recovery tool, and the recovery tool is run on the system disk of the backup machine. The backup hard disk data in the data disk is restored through the recovery tool.

[0087] 4) Use PXE to start the faulty machine. PXE pulls up the operating system of the faulty machine through the network port interface, and then runs a recovery tool on the faulty machine to recover the original hard disk data of the faulty machine through the recovery tool.

[0088] It should be noted that the recovery tool may be selected according to the actual failure scenario, or a professional data recovery company may be introduced, which is not limited in the embodiment of the present invention.

[0089] In some other embodiments, in order to prevent the loss of recovered data, the embodiment of the present invention further provides a data storage solution, the environmental resources also include a third resource for data storage, and accordingly, the batch recovery method of hard disk data provided by the embodiment of the present invention also includes the following steps:

[0090] The recovery hard disk data of each failed machine is stored based on the third resource of each failed machine.

[0091] In the embodiment of the present invention, the third resource for data storage may specifically be a storage machine, and the selection strategy is as follows:

[0092] On the one hand, consider the RAID structure and IO performance: give priority to servers with high IO storage in RAID structure as storage machines. The storage machines have data redundancy capabilities to prevent the loss of restored data.

[0093] On the other hand, the network is connected to the machine where the recovery tool is running, ensuring that the storage machine can obtain the recovered hard disk data.

[0094] On the other hand, deploying samba service can quickly recover hard disk data through text sharing service.

[0095] On the other hand, deploying the cos client can upload the recovered hard disk data to the cos storage bucket in the cloud.

[0096] The following explains the relevant concepts:

[0097] samba: A free software that implements the SMB protocol (a protocol for sharing files and other resources within a local area network) on Linux and UNIX systems. It consists of a server and a client program, and implements file sharing between Linux and Windows systems.

[0098] cos: Cloud Object Storage (COS) is a distributed storage service launched by Tencent Cloud that has no directory hierarchy, no data format restrictions, can accommodate massive amounts of data, and supports HTTP or HTTPS protocol access.

[0099] It should be noted that the user may consider one or more of the above aspects when selecting a storage machine. Since different application scenarios have different requirements for the environment, the present invention only provides several key aspects of the storage machine selection strategy and does not make any limitations thereon.

[0100] In addition, in order to store the recovery hard disk data of the faulty machine to the storage machine, it is necessary to mount the storage machine to the recovery tool's operating environment machine through samba in advance, and then run the recovery tool again. In this way, the recovery hard disk data can be transferred from the operating environment machine to the storage machine through file sharing.

[0101] In some other embodiments, some data recovered by the recovery tool loses some attributes, so the client cannot use it directly. To solve this problem, the embodiment of the present invention also provides a data processing solution, the environmental resources also include a fourth resource for data processing, and accordingly, the batch recovery method of hard disk data provided by the embodiment of the present invention also includes the following steps:

[0102] Data processing is performed on the recovery hard disk data of each faulty machine based on the fourth resource of each faulty machine, and the data processing at least includes at least one processing operation of data filtering and data processing.

[0103] In the embodiment of the present invention, the fourth resource for data processing may specifically be a data processing program installed on the storage machine, and the selection may be made in combination with the application scenario.

[0104] For data processing programs, they have at least one of the functions of data filtering and data processing. For example, for a gz compressed package, you can use the gunzip command to check whether the file is complete, and use the tar command to directly obtain the file list in the compressed package, and help customers quickly filter out the data they need by file name or time.

[0105] Data processing includes file renaming and large file concatenation, etc. The recovered hard disk data is converted into business data useful to customers, allowing customers to focus on business recovery and reduce the energy consumption of effective data screening.

[0106] In addition, to improve the readability of data, the embodiment of the present invention can also sort the valid hard disk data obtained through at least one of the processing operations of data filtering and data processing to obtain a file list. Specifically, the file list in the compressed file can be obtained, and the file list of the full amount of data can be summarized and sorted to facilitate user retrieval. The file list records the relevant attribute information of the data, such as the name, the creation time, etc.

[0107] Furthermore, the valid hard disk data and file list can be uploaded to the object storage server, that is, uploaded to the cos storage bucket, to improve the use of the business. The business determines whether the hard disk data of the faulty machine is restored and feedbacks the incomplete data for subsequent data processing in other ways.

[0108] Of course, valid hard disk data and file lists can also be uploaded to the cold standby server. The following is an explanation of cold standby:

[0109] Cold backup: back up a copy of the data, but the backed up data is generally not used for business operations, but only for emergency situations. Therefore, cold backup generally has relatively low requirements, including storage environment configuration, backup speed, etc.

[0110] In summary, the present invention provides a complete data batch recovery full-process solution to ensure that data recovery work is carried out in an orderly manner; pre-place and parallel resource preparation and environment deployment to improve efficiency; the recovered first-hand data (recovery of hard disk data) is processed in batches before being provided to the business, which improves data quality and reduces manpower consumption; the original machine is directly started for data recovery by replacing the system disk, which reduces the copy time of data backup; COS is used to save the recovered data, the intranet transmission speed is fast, and COS has high data reliability, which is convenient for global retrieval and multi-environment download. From the practical results, nearly 100T of data recovery was completed in 7 days, with both efficiency and quality reported.

[0111] In order for those skilled in the art to clearly understand the content of the embodiments of the present invention, a detailed introduction is now given from the application scenario of batch recovery of hard disk data.

[0112] Figure 3 A scenario diagram of a method for recovering hard disk data in batches provided by an embodiment of the present invention. When it is found that the hard disk data of a large number of servers is mistakenly deleted by rm, all faulty servers can be shut down immediately and data recovery can be prepared.

[0113] Prepare environmental resources for each faulty machine, including four types of resources: data backup, data recovery, data storage, and data processing. Back up the original hard disk data through dd backup or hard disk copying under PXE. After the backup is completed or in an emergency, you can directly prepare the operating environment of the recovery tool; secondly, build and provide a system environment for the recovery tool to run (boot the faulty machine with a USB disk, replace the system disk to boot the faulty machine, run the recovery tool on the backup machine, and boot the faulty machine with PXE), and then start the recovery tool; finally, perform data filtering or processing on the recovered hard disk data, and the business will confirm whether the valid hard disk data has been restored, and feedback on incomplete data. After the business has used up the data, clean up and recycle the resources, thus completing a hard disk data recovery cycle.

[0114] Through this solution, users can be guided to quickly and orderly start data recovery work for batch machines in parallel, greatly improving the efficiency and quality of data recovery.

[0115] The following is an introduction to the hard disk data batch recovery device provided by the embodiment of the present invention. The hard disk data batch recovery device described below can be considered as a program module that an electronic device needs to set in order to implement the hard disk data batch recovery method provided by the embodiment of the present invention. The content of the hard disk data batch recovery device described below can be cross-referenced with the content of the hard disk data batch recovery method described above.

[0116] Figure 4 A schematic diagram of the structure of a batch recovery device for hard disk data provided by an embodiment of the present invention. Figure 4 , the hard disk data batch recovery device may include:

[0117] A fault detection module 10 is used to determine multiple faulty machines and perform a shutdown operation on each faulty machine;

[0118] An environment building module 20, used to build environment resources for each faulty machine according to the operation information of each faulty machine, and the environment resources at least include a first resource for data backup and a second resource for data recovery;

[0119] The data processing module 30 is used to back up the original hard disk data of each faulty machine based on the first resource of each faulty machine to obtain corresponding backup hard disk data; and to restore the original hard disk data or backup hard disk data of each faulty machine based on the second resource of each faulty machine to obtain corresponding restored hard disk data.

[0120] Furthermore, in the batch recovery device for hard disk data provided by the embodiment of the present invention, the data processing module 30 for backing up the original hard disk data of each faulty machine based on the first resource of each faulty machine is specifically used for:

[0121] Back up the original hard disk data of each failed machine by disk copying;

[0122] or

[0123] The original hard disk data of each faulty machine is backed up by starting the faulty machine through the pre-boot execution environment PXE.

[0124] Further, in the batch recovery device for hard disk data provided by the embodiment of the present invention, the data processing module 30 for recovering the original hard disk data or the backup hard disk data of each faulty machine based on the second resource of each faulty machine is specifically used for:

[0125] For each failed machine, a system environment of a designated recovery tool is built on the failed machine or the backup machine where the corresponding backup hard disk data is located, so as to start the designated recovery tool to recover the original hard disk data or the backup hard disk data of the failed machine.

[0126] Furthermore, in the batch recovery device for hard disk data provided in the embodiment of the present invention, the data processing module 30 for building a system environment of a designated recovery tool on the faulty machine is specifically used for:

[0127] Restart the faulty machine by replacing its system disk.

[0128] Furthermore, in the batch recovery device for hard disk data provided by the embodiment of the present invention, the environmental resources also include a third resource for data storage;

[0129] The data processing module 30 is further used for:

[0130] The recovery hard disk data of each failed machine is stored based on the third resource of each failed machine.

[0131] Furthermore, in the batch recovery device for hard disk data provided by the embodiment of the present invention, the environmental resources also include a fourth resource for data processing;

[0132] The data processing module 30 is further used for:

[0133] Data processing is performed on the recovery hard disk data of each faulty machine based on the fourth resource of each faulty machine, and the data processing at least includes at least one processing operation of data filtering and data processing.

[0134] Further, in the batch recovery device for hard disk data provided by the embodiment of the present invention, the data processing module 30 for processing the recovery hard disk data of each faulty machine based on the fourth resource of each faulty machine is specifically used for:

[0135] The valid hard disk data obtained through at least one of the data filtering and data processing operations is sorted into files to obtain a file list.

[0136] The batch recovery device for hard disk data provided by the embodiment of the present invention can shut down the faulty machines in batches at the first time to prevent the hard disks from being overwritten by data after a large number of faulty machines are mistakenly deleted by RM, and then build the environmental resources of the faulty machines in batches considering the operation information of the faulty machines, so as to realize batch data backup and data recovery of the hard disk data of the subsequent faulty machines. Based on the present invention, users can be guided to quickly and orderly start the data recovery work of batch faulty machines in parallel, greatly improving the efficiency and quality of data recovery.

[0137] An embodiment of the present invention provides a storage medium, in which a computer executable instruction is stored, and the computer executable instruction is used to execute the batch recovery method of hard disk data provided in the above embodiment. Optionally, the detailed function and extended function of the instruction can refer to the above description.

[0138] The above is a detailed introduction to a method, device, storage medium and electronic device for batch recovery of hard disk data provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method and core ideas of the present invention. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention. In addition, for the above description of the disclosed embodiments, the features recorded in each embodiment in this specification can be replaced or combined with each other, so that professional and technical personnel in this field can implement or use this application.

[0139] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0140] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device that includes a series of elements is inherent to the elements, or also includes elements inherent to these processes, methods, articles or devices. In the absence of further restrictions, the elements defined by the sentence "including a..." do not exclude the presence of other identical elements in the process, method, article or device that includes the elements.

[0141] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for recovering hard disk data in batches, characterized in that: The method comprises: Identify multiple faulty machines and shut down each faulty machine immediately when it cannot be backed up online; Building environmental resources for each faulty machine according to the operation information of each faulty machine, wherein the environmental resources include at least a first resource for data backup, a second resource for data recovery, a third resource for data storage, and a fourth resource for data processing; Based on the first resource of each faulty machine, the disk of each faulty machine is unplugged and inserted into the backup machine, and then the disk data is copied in parallel by means of disk pair copying, so as to back up the original hard disk data of each faulty machine and obtain the corresponding backup hard disk data; the first resource includes the backup machine, and the backup machine is selected according to the state of the disk of the faulty machine; Based on the second resource of each faulty machine, for each faulty machine, a system environment of a designated recovery tool is built on a backup machine where the backup hard disk data corresponding to the faulty machine is located, so as to start the designated recovery tool to recover the backup hard disk data corresponding to the faulty machine and obtain the corresponding recovery hard disk data; the second resource includes an operating environment machine determined according to the system type on which the recovery tool depends; Based on the third resource of each faulty machine, a storage machine in the third resource is mounted on the operating environment machine of the recovery tool, and the operating environment machine transmits the recovery hard disk data of each faulty machine to the storage machine for storage through file sharing; the third resource includes a storage machine selected by at least one selection strategy; Based on the fourth resource of each faulty machine, data processing is performed on the restored hard disk data of each faulty machine to obtain valid hard disk data; the data processing includes at least one processing operation of data filtering and data processing; the fourth resource includes a data processing program installed on the storage machine.

2. The method according to claim 1, characterized in that The processing of the restored hard disk data of each faulty machine based on the fourth resource of each faulty machine includes: The valid hard disk data obtained through at least one of the data filtering and data processing operations is sorted into files to obtain a file list.

3. A batch recovery device for hard disk data, characterized in that: The device comprises: A fault detection module is used to identify multiple faulty machines and shut down each faulty machine immediately when the faulty machine cannot be backed up online; An environment building module, used to build environment resources for each faulty machine according to the operation information of each faulty machine, wherein the environment resources include at least a first resource for data backup, a second resource for data recovery, a third resource for data storage, and a fourth resource for data processing; Data processing module for: Based on the first resource of each faulty machine, the disk of each faulty machine is unplugged and inserted into the backup machine, and then the disk data is copied in parallel by means of disk pair copying, so as to back up the original hard disk data of each faulty machine and obtain the corresponding backup hard disk data; the first resource includes the backup machine, and the backup machine is selected according to the state of the disk of the faulty machine; Based on the second resource of each faulty machine, for each faulty machine, a system environment of a designated recovery tool is built on a backup machine where the backup hard disk data corresponding to the faulty machine is located, so as to start the designated recovery tool to recover the backup hard disk data corresponding to the faulty machine and obtain the corresponding recovery hard disk data; the second resource includes an operating environment machine determined according to the system type on which the recovery tool depends; Based on the third resource of each faulty machine, a storage machine in the third resource is mounted on the operating environment machine of the recovery tool, and the operating environment machine transmits the recovery hard disk data of each faulty machine to the storage machine for storage through file sharing; the third resource includes a storage machine selected by at least one selection strategy; Based on the fourth resource of each faulty machine, data processing is performed on the restored hard disk data of each faulty machine to obtain valid hard disk data; the data processing includes at least one processing operation of data filtering and data processing; the fourth resource includes a data processing program installed on the storage machine.

4. The device according to claim 3, characterized in that The data processing module is specifically used for: The valid hard disk data obtained through at least one of the data filtering and data processing operations is sorted into files to obtain a file list.

5. A storage medium, characterized in that: The storage medium stores computer executable instructions, and the computer executable instructions are used to execute the batch recovery method for hard disk data according to any one of claims 1-2.

6. An electronic device, characterized in that: Said include: at least one memory and at least one processor; The memory stores a program, and the processor calls the program stored in the memory, and the program is used to implement the batch recovery method for hard disk data according to any one of claims 1-2.

Citation Information

Patent Citations

  • Method, system and apparatus for implementing failure restoration and data backup

    CN101420326A

  • Data protection method

    CN107562576A

  • Method and device for recovering crash of main and standby dual-node databases

    CN111209140A