WO2021135530A1 - 数据恢复方法、装置、电子设备及介质 - Google Patents

数据恢复方法、装置、电子设备及介质 Download PDF

Info

Publication number
WO2021135530A1
WO2021135530A1 PCT/CN2020/122256 CN2020122256W WO2021135530A1 WO 2021135530 A1 WO2021135530 A1 WO 2021135530A1 CN 2020122256 W CN2020122256 W CN 2020122256W WO 2021135530 A1 WO2021135530 A1 WO 2021135530A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
storage
backup
mirrored
backed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2020/122256
Other languages
English (en)
French (fr)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2021135530A1 publication Critical patent/WO2021135530A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operations
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operations
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operations
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques

Definitions

  • This application relates to the field of data processing technology, and in particular to a data recovery method, device, electronic equipment, and medium.
  • the existing method is to install an application on the terminal device to back up the data, and use the backup data for data recovery.
  • the application program backs up and restores the data in a layer-by-layer order from files to logical volumes to disk partitions. Increase the complexity of data recovery and reduce the efficiency of data recovery.
  • the first aspect of the present application provides a data recovery method, the data recovery method includes:
  • a second aspect of the present application provides an electronic device including a processor and a memory, and the processor is configured to execute computer-readable instructions stored in the memory to implement the following steps:
  • a third aspect of the present application provides a computer-readable storage medium having at least one computer-readable instruction stored thereon, and the at least one computer-readable instruction is executed by a processor to implement the following steps:
  • a fourth aspect of the present application provides a data recovery device, and the data recovery device includes:
  • the obtaining unit is used to obtain the backup object and the storage object
  • a determining unit configured to obtain the data to be backed up in the backup object, and determine the storage space occupied by the data to be backed up;
  • the detecting unit is configured to detect whether the storage object meets the storage condition according to the storage space;
  • a creating unit configured to create a storage directory in the storage object when it is detected that the storage object meets the storage condition
  • the backup unit is used to perform a mirror backup of the data to be backed up to obtain mirror backup data
  • a transmission unit configured to determine the path of the storage directory, and transmit the mirrored backup data to the path;
  • the determining unit is further configured to determine the data volume of the mirrored backup data when a data recovery request of the mirrored backup data is received;
  • the restoration unit is configured to obtain a plurality of idle threads according to the amount of data, and use the plurality of idle threads to restore the mirrored backup data to the target disk.
  • the application can detect whether the storage object meets the storage conditions according to the storage space.
  • the storage conditions of the data to be backed up ensure that the storage object can store the data to be backed up, and then by creating a storage directory in the storage object, the mirrored backup data of the backup object can be quickly found when the backup object loses data , By transmitting the mirrored backup data to the path, the data to be backed up can be backed up without installing an application program.
  • the data By determining the data volume of the mirrored backup data, the data can be passed through By determining a suitable number of threads, and using idle threads whose number is the number of threads to restore the mirrored backup data to the target disk, the recovery efficiency of the mirrored backup data can be improved.
  • Fig. 1 is a flowchart of a preferred embodiment of the data recovery method of the present application.
  • Fig. 2 is a functional block diagram of a preferred embodiment of the data recovery device of the present application.
  • FIG. 3 is a schematic structural diagram of an electronic device according to a preferred embodiment of the data recovery method according to the present application.
  • FIG. 1 it is a flowchart of a preferred embodiment of the data recovery method of the present application. According to different needs, the order of the steps in the flowchart can be changed, and some steps can be omitted.
  • the data recovery method is applied to one or more electronic devices.
  • the electronic device is a device that can automatically perform numerical calculation and/or information processing in accordance with pre-set or stored instructions. Its hardware includes but is not limited to Microprocessor, Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), Digital Processor (Digital Signal Processor, DSP), embedded equipment, etc.
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • DSP Digital Processor
  • embedded equipment etc.
  • the electronic device may be any electronic product that can interact with a user with a human machine, for example, a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television ( Internet Protocol Television, IPTV), smart wearable devices, etc.
  • a personal computer for example, a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television ( Internet Protocol Television, IPTV), smart wearable devices, etc.
  • PDA personal digital assistant
  • IPTV Internet Protocol Television
  • smart wearable devices etc.
  • the electronic device may also include a network device and/or user equipment.
  • the network device includes, but is not limited to, a single network server, a server group composed of multiple network servers, or a cloud composed of a large number of hosts or network servers based on cloud computing.
  • the network where the electronic device is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN), etc.
  • the backup object refers to an object that needs to be backed up, where the object can be any disk or any client.
  • the storage object refers to an object that stores data on the backup object, where the storage object may be a mounted disk.
  • S11 Obtain the data to be backed up in the backup object, and determine the storage space occupied by the data to be backed up.
  • the data to be backed up refers to data that needs to be backed up.
  • the electronic device may obtain the data to be backed up in the backup object through the FC switch.
  • S12 Detect whether the storage object meets a storage condition according to the storage space.
  • the storage condition refers to whether the data to be backed up can be completely stored in the storage object.
  • the electronic device detecting whether the storage object meets storage conditions according to the storage space includes:
  • the value of the preset ratio is less than 100%.
  • the value of the preset ratio may be set according to the application scenario.
  • the preset ratio may be 90%, and the specific value of the preset ratio The value of this application is not limited.
  • a target storage location is selected according to the storage space.
  • the electronic device creating a storage directory in the storage object includes:
  • the storage directory is created in the storage object with the directory name.
  • the uniqueness of the directory name can be ensured.
  • creating the storage directory in the storage object with the directory name it can be used in the backup object. When data is lost, quickly find the mirrored backup data of the backup object.
  • the above-mentioned mirrored backup data can also be stored in a node of a blockchain.
  • the mirrored backup data refers to data after the data to be backed up is compressed and mirrored.
  • that the electronic device performs a mirror backup of the data to be backed up, and obtaining the mirror backup data includes:
  • the mirrored data is determined to be the mirrored backup data.
  • the speed of the mirroring process can be increased.
  • the backup process of the data to be backed up can be realized without installing an application program. Whether the data after the mirroring process is the same as the data to be backed up can ensure that the mirrored backup data is consistent with the data to be backed up.
  • the electronic device may use the DD command to mirror the compressed data to obtain the mirrored data.
  • the method when it is detected that the mirrored data is different from the data to be backed up, the method further includes:
  • the alarm information is sent to the client terminal of the designated user.
  • the designated user can be reminded in time to ensure that the mirrored backup data is the same as the data to be backed up.
  • S15 Determine the path of the storage directory, and transmit the mirrored backup data to the path.
  • the path refers to the location where the storage directory is located.
  • the electronic device transmitting the mirrored backup data to the path includes:
  • the idle thread is used to transfer the mirrored backup data to the path.
  • the idle thread when the transmission progress is less than the preset progress, the idle thread can be used to transmit the mirror backup data, so as to avoid the thread that transmits the mirror backup data from reducing the transmission rate due to synchronous processing of other requests, thereby improving the mirror backup The data transfer rate.
  • the method further includes:
  • the transmission progress is displayed.
  • the data recovery request may be triggered when a system crash is detected.
  • the data information carried in the data recovery request includes, but is not limited to: request number and so on.
  • S17 Acquire a plurality of idle threads according to the amount of data, and use the plurality of idle threads to restore the mirrored backup data to the target disk.
  • the electronic device acquiring multiple idle threads according to the amount of data includes:
  • the number of idle threads equal to the number of threads is obtained from the preset thread connection pool.
  • the method further includes:
  • the ciphertext is sent to the terminal device of the designated contact in the sending manner.
  • the request level includes, but is not limited to: level one, level two, etc.
  • the sending mode includes, but is not limited to: mail mode, telephone mode, and so on.
  • the designated contact can be notified in time after the data is restored, and at the same time, the security of the prompt information can be improved by encrypting the prompt information.
  • the prompt information can be sent in an appropriate sending mode.
  • the ciphertext The ciphertext.
  • the application can detect whether the storage object meets the storage conditions according to the storage space.
  • the storage conditions of the data to be backed up ensure that the storage object can store the data to be backed up, and then by creating a storage directory in the storage object, the mirrored backup data of the backup object can be quickly found when the backup object loses data , By transmitting the mirrored backup data to the path, the data to be backed up can be backed up without installing an application program.
  • the data By determining the data volume of the mirrored backup data, the data can be passed through By determining a suitable number of threads, and using idle threads whose number is the number of threads to restore the mirrored backup data to the target disk, the recovery efficiency of the mirrored backup data can be improved.
  • the data recovery device 11 includes an acquisition unit 110, a determination unit 111, a detection unit 112, a creation unit 113, a backup unit 114, a transmission unit 115, an encryption unit 116, a recovery unit 117, a generation unit 118, a sending unit 119, and a display unit 120 .
  • the module/unit referred to in this application refers to a series of computer-readable instruction segments that can be executed by the processor 13 and can complete fixed functions, and are stored in the memory 12. In this embodiment, the functions of each module/unit will be described in detail in subsequent embodiments.
  • the obtaining unit 110 obtains the backup object and the storage object.
  • the backup object refers to an object that needs to be backed up, where the object can be any disk or any client.
  • the storage object refers to an object that stores data on the backup object, where the storage object may be a mounted disk.
  • the determining unit 111 obtains the data to be backed up in the backup object, and determines the storage space occupied by the data to be backed up.
  • the data to be backed up refers to data that needs to be backed up.
  • the determining unit 111 may obtain the data to be backed up in the backup object through the FC switch.
  • the detecting unit 112 detects whether the storage object meets the storage condition according to the storage space.
  • the storage condition refers to whether the data to be backed up can be completely stored in the storage object.
  • the detecting unit 112 detecting whether the storage object meets storage conditions according to the storage space includes:
  • the value of the preset ratio is less than 100%.
  • the value of the preset ratio may be set according to the application scenario.
  • the preset ratio may be 90%, and the specific value of the preset ratio The value of this application is not limited.
  • a target storage location is selected according to the storage space.
  • the creating unit 113 creates a storage directory in the storage object.
  • the creating unit 113 creating a storage directory in the storage object includes:
  • the storage directory is created in the storage object with the directory name.
  • the uniqueness of the directory name can be ensured.
  • creating the storage directory in the storage object with the directory name it can be used in the backup object. When data is lost, quickly find the mirrored backup data of the backup object.
  • the backup unit 114 performs a mirror backup of the data to be backed up to obtain mirrored backup data.
  • the above-mentioned mirrored backup data may also be stored in a node of a blockchain.
  • the mirrored backup data refers to data after the data to be backed up is compressed and mirrored.
  • the backup unit 114 performs a mirror backup of the data to be backed up, and obtaining the mirror backup data includes:
  • the mirrored data is determined to be the mirrored backup data.
  • the speed of the mirroring process can be increased.
  • the backup process of the data to be backed up can be realized without installing an application program. Whether the data after the mirroring process is the same as the data to be backed up can ensure that the mirrored backup data is consistent with the data to be backed up.
  • the backup unit 114 may use the DD command to mirror the compressed data to obtain the mirrored data.
  • the determining unit 111 determines that the mirrored data is not the same as the data to be backed up. The same different data;
  • the generating unit 118 generates alarm information according to the abnormal data
  • the sending unit 119 sends the alarm information to the client terminal of the designated user.
  • the designated user can be reminded in time to ensure that the mirrored backup data is the same as the data to be backed up.
  • the transmission unit 115 determines the path of the storage directory, and transmits the mirrored backup data to the path.
  • the path refers to the location where the storage directory is located.
  • the transmitting unit 115 transmitting the mirrored backup data to the path includes:
  • the idle thread is used to transfer the mirrored backup data to the path.
  • the idle thread when the transmission progress is less than the preset progress, the idle thread can be used to transmit the mirror backup data, so as to avoid the thread that transmits the mirror backup data from reducing the transmission rate due to synchronous processing of other requests, thereby improving the mirror backup The data transfer rate.
  • the display unit 120 displays the transmission progress.
  • the data volume of the mirrored backup data is determined.
  • the data recovery request may be triggered when a system crash is detected.
  • the data information carried in the data recovery request includes, but is not limited to: request number and so on.
  • the restoration unit 117 obtains a plurality of idle threads according to the amount of data, and uses the plurality of idle threads to restore the mirrored backup data to the target disk.
  • the recovery unit 117 acquiring multiple idle threads according to the amount of data includes:
  • the number of idle threads equal to the number of threads is obtained from the preset thread connection pool.
  • the obtaining unit 110 obtains the request number of the data restoration request
  • the generating unit 118 generates prompt information according to the request number
  • the encryption unit 116 uses a symmetric encryption algorithm to encrypt the prompt information to obtain a ciphertext
  • the determining unit 111 determines a request level according to the request number, and determines a sending mode according to the request level;
  • the sending unit 119 sends the ciphertext to the terminal device of the designated contact in the sending manner.
  • the request level includes, but is not limited to: level one, level two, etc.
  • the sending mode includes, but is not limited to: mail mode, telephone mode, and so on.
  • the designated contact can be notified in time after the data is restored, and at the same time, the security of the prompt information can be improved by encrypting the prompt information.
  • the prompt information can be sent in an appropriate sending mode.
  • the ciphertext The ciphertext.
  • the application can detect whether the storage object meets the storage conditions according to the storage space.
  • the storage conditions of the data to be backed up ensure that the storage object can store the data to be backed up, and then by creating a storage directory in the storage object, the mirrored backup data of the backup object can be quickly found when the backup object loses data , By transmitting the mirrored backup data to the path, the data to be backed up can be backed up without installing an application program.
  • the data By determining the data volume of the mirrored backup data, the data can be passed through By determining a suitable number of threads, and using idle threads whose number is the number of threads to restore the mirrored backup data to the target disk, the recovery efficiency of the mirrored backup data can be improved.
  • FIG. 3 it is a schematic structural diagram of an electronic device according to a preferred embodiment of the data recovery method of the present application.
  • the electronic device 1 includes, but is not limited to, a memory 12, a processor 13, and computer-readable instructions stored in the memory 12 and running on the processor 13 , Such as data recovery programs.
  • the schematic diagram is only an example of the electronic device 1 and does not constitute a limitation on the electronic device 1. It may include more or less components than those shown in the figure, or a combination of certain components, or different components. Components, for example, the electronic device 1 may also include an input/output device, a network access device, a bus, and the like.
  • the processor 13 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
  • the processor 13 is the computing core and control center of the electronic device 1 and connects the entire electronic device with various interfaces and lines. Each part of 1, and executes the operating system of the electronic device 1, and various installed applications, program codes, etc.
  • the processor 13 executes the operating system of the electronic device 1 and various installed applications.
  • the processor 13 executes the application program to implement the steps in the foregoing data recovery method embodiments, for example, the steps shown in FIG. 1.
  • the processor 13 implements the functions of the modules/units in the foregoing device embodiments when executing the computer-readable instructions, for example:
  • the computer-readable instructions may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 12 and executed by the processor 13 to Complete this application.
  • the one or more modules/units may be a series of computer-readable instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer-readable instructions in the electronic device 1.
  • the computer-readable instructions can be divided into an acquisition unit 110, a determination unit 111, a detection unit 112, a creation unit 113, a backup unit 114, a transmission unit 115, an encryption unit 116, a restoration unit 117, a generation unit 118, and a transmission unit. 119 and display unit 120.
  • the memory 12 may be used to store the computer-readable instructions and/or modules.
  • the processor 13 executes or executes the computer-readable instructions and/or modules stored in the memory 12 and calls the computer-readable instructions and/or modules stored in the memory 12
  • the data inside realizes various functions of the electronic device 1.
  • the memory 12 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may Stores data, etc. created based on the use of electronic devices.
  • the memory 12 may include non-volatile and volatile memories, such as hard disks, memory, plug-in hard disks, smart media cards (SMC), secure digital (SD) cards, flash memory cards (Flash Card), at least one disk storage device, flash memory device, or other storage device.
  • non-volatile and volatile memories such as hard disks, memory, plug-in hard disks, smart media cards (SMC), secure digital (SD) cards, flash memory cards (Flash Card), at least one disk storage device, flash memory device, or other storage device.
  • the memory 12 may be an external memory and/or an internal memory of the electronic device 1. Further, the memory 12 may be a memory in a physical form, such as a memory stick, a TF card (Trans-flash Card), and so on.
  • TF card Trans-flash Card
  • the integrated module/unit of the electronic device 1 may be stored in a computer-readable storage medium, which may be non-easy.
  • a volatile storage medium can also be a volatile storage medium.
  • the computer-readable instruction includes computer-readable instruction code
  • the computer-readable instruction code may be in the form of source code, object code, executable file, or some intermediate form.
  • the computer-readable medium may include: any entity or device capable of carrying the computer-readable instruction code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory, etc.
  • the blockchain referred to in this application is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • the memory 12 in the electronic device 1 stores multiple computer-readable instructions to implement a data recovery method
  • the processor 13 can execute the multiple computer-readable instructions to implement:
  • modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional modules in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional modules.

Landscapes

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

Abstract

一种数据恢复方法、装置、电子设备及介质。该方法能够获取备份对象、存储对象、待备份数据,并在检测到存储对象满足存储条件时,在存储对象中创建存储目录,对待备份数据进行镜像备份,得到镜像备份数据,传输镜像备份数据传输至所述存储目录的路径中,当接收到镜像备份数据的数据恢复请求时,确定镜像备份数据的数据量,根据数据量获取多个闲置线程,利用多个闲置线程将镜像备份数据恢复至目标磁盘中。该方法不仅能够在无需安装应用程序的情况下,对数据进行备份,还能够提高数据恢复的效率。此外,该方法还涉及区块链技术,所述镜像备份数据可存储于区块链中。

Description

数据恢复方法、装置、电子设备及介质
本申请要求于2020年07月21日提交中国专利局,申请号为202010706040.3,发明名称为“数据恢复方法、装置、电子设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据处理技术领域,尤其涉及一种数据恢复方法、装置、电子设备及介质。
背景技术
随着云计算及大数据中心的不断发展,信息安全的重要性日趋明显,数据库作为信息安全的一个重要内容也逐渐被重视。为了保障终端设备在运行中遇到系统崩溃或者其他不可修复的故障时能够恢复业务,现有的方式是通过在终端设备上安装应用程序对数据进行备份,并利用备份数据进行数据恢复。然而,发明人意识到这种方式需要提前在终端设备上安装好应用程序,同时,应用程序是通过从文件到逻辑卷再到磁盘分区依照一层一层的顺序对数据进行备份及恢复的,加大了数据恢复的复杂度,降低了数据恢复的效率。
发明内容
鉴于以上内容,有必要提供一种数据恢复方法、装置、电子设备及介质,不仅能够在无需安装应用程序的情况下,对数据进行备份,还能够提高数据恢复的效率。
本申请的第一方面提供一种数据恢复方法,所述数据恢复方法包括:
获取备份对象及存储对象;
获取所述备份对象中的待备份数据,并确定所述待备份数据所占的存储空间;
根据所述存储空间检测所述存储对象是否满足存储条件;
当检测到所述存储对象满足所述存储条件时,在所述存储对象中创建存储目录;
对所述待备份数据进行镜像备份,得到镜像备份数据;
确定所述存储目录的路径,并将所述镜像备份数据传输至所述路径中;
当接收到所述镜像备份数据的数据恢复请求时,确定所述镜像备份数据的数据量;
根据所述数据量获取多个闲置线程,并利用所述多个闲置线程将所述镜像备份数据恢复至所述目标磁盘中。
本申请的第二方面提供一种电子设备,所述电子设备包括处理器和存储器,所述处理器用于执行所述存储器中存储的计算机可读指令以实现以下步骤:
获取备份对象及存储对象;
获取所述备份对象中的待备份数据,并确定所述待备份数据所占的存储空间;
根据所述存储空间检测所述存储对象是否满足存储条件;
当检测到所述存储对象满足所述存储条件时,在所述存储对象中创建存储目录;
对所述待备份数据进行镜像备份,得到镜像备份数据;
确定所述存储目录的路径,并将所述镜像备份数据传输至所述路径中;
当接收到所述镜像备份数据的数据恢复请求时,确定所述镜像备份数据的数据量;
根据所述数据量获取多个闲置线程,并利用所述多个闲置线程将所述镜像备份数据恢复至所述目标磁盘中。
本申请的第三方面提供一种计算机可读存储介质,所述计算机可读存储介质上存储有至少一个计算机可读指令,所述至少一个计算机可读指令被处理器执行以实现以下步骤:
获取备份对象及存储对象;
获取所述备份对象中的待备份数据,并确定所述待备份数据所占的存储空间;
根据所述存储空间检测所述存储对象是否满足存储条件;
当检测到所述存储对象满足所述存储条件时,在所述存储对象中创建存储目录;
对所述待备份数据进行镜像备份,得到镜像备份数据;
确定所述存储目录的路径,并将所述镜像备份数据传输至所述路径中;
当接收到所述镜像备份数据的数据恢复请求时,确定所述镜像备份数据的数据量;
根据所述数据量获取多个闲置线程,并利用所述多个闲置线程将所述镜像备份数据恢复至所述目标磁盘中。
本申请的第四方面提供一种数据恢复装置,所述数据恢复装置包括:
获取单元,用于获取备份对象及存储对象;
确定单元,用于获取所述备份对象中的待备份数据,并确定所述待备份数据所占的存储空间;
检测单元,用于根据所述存储空间检测所述存储对象是否满足存储条件;
创建单元,用于当检测到所述存储对象满足所述存储条件时,在所述存储对象中创建存储目录;
备份单元,用于对所述待备份数据进行镜像备份,得到镜像备份数据;
传输单元,用于确定所述存储目录的路径,并将所述镜像备份数据传输至所述路径中;
所述确定单元,还用于当接收到所述镜像备份数据的数据恢复请求时,确定所述镜 像备份数据的数据量;
恢复单元,用于根据所述数据量获取多个闲置线程,并利用所述多个闲置线程将所述镜像备份数据恢复至所述目标磁盘中。
由以上技术方案可以看出,本申请通过确定所述待备份数据所占的存储空间,并根据所述存储空间检测所述存储对象是否满足存储条件,能够通过检测所述存储对象是否满足所述待备份数据的存储条件,确保所述存储对象能够存入所述待备份数据,进而通过在所述存储对象中创建存储目录,能够在备份对象丢失数据时,快速查找到备份对象的镜像备份数据,通过将所述镜像备份数据传输至所述路径,能够在无需安装应用程序的情况下,实现对所述待备份数据的备份,通过确定所述镜像备份数据的数据量,能够通过所述数据量确定出合适的线程数量,并利用数量为所述线程数量的闲置线程将所述镜像备份数据恢复至所述目标磁盘中,能够提高所述镜像备份数据的恢复效率。
附图说明
图1是本申请数据恢复方法的较佳实施例的流程图。
图2是本申请数据恢复装置的较佳实施例的功能模块图。
图3是本申请实现数据恢复方法的较佳实施例的电子设备的结构示意图。
具体实施方式
为了使本申请的目的、技术方案和优点更加清楚,下面结合附图和具体实施例对本申请进行详细描述。
如图1所示,是本申请数据恢复方法的较佳实施例的流程图。根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。
所述数据恢复方法应用于一个或者多个电子设备中,所述电子设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。
所述电子设备可以是任何一种可与用户进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理(Personal Digital Assistant,PDA)、游戏机、交互式网络电视(Internet Protocol Television,IPTV)、智能式穿戴式设备等。
所述电子设备还可以包括网络设备和/或用户设备。其中,所述网络设备包括,但不限于单个网络服务器、多个网络服务器组成的服务器组或基于云计算(Cloud Computing)的由大量主机或网络服务器构成的云。
所述电子设备所处的网络包括但不限于互联网、广域网、城域网、局域网、虚拟专用网络(Virtual Private Network,VPN)等。
S10,获取备份对象及存储对象。
在本申请的至少一个实施例中,所述备份对象是指需要进行备份的对象,其中,所述对象可以是任意磁盘,也可以是任意客户端。
在本申请的至少一个实施例中,所述存储对象是指存储所述备份对象上的数据的对象,其中,所述存储对象可以是挂载磁盘。
S11,获取所述备份对象中的待备份数据,并确定所述待备份数据所占的存储空间。
在本申请的至少一个实施例中,所述待备份数据是指需要进行备份的数据。
在本申请的至少一个实施例中,所述电子设备可以通过FC交换机获取所述备份对象中的待备份数据。
S12,根据所述存储空间检测所述存储对象是否满足存储条件。
在本申请的至少一个实施例中,所述存储条件是指所述待备份数据是否能够完整存储于所述存储对象中。
在本申请的至少一个实施例中,所述电子设备根据所述存储空间检测所述存储对象是否满足存储条件包括:
获取所述存储对象的剩余空间;
将所述剩余空间乘以预设比例,得到目标空间;
当所述存储空间小于所述目标空间时,确定所述存储对象满足所述存储条件;或者
当所述存储空间大于或者等于所述目标空间时,确定所述存储对象不满足所述存储条件。
其中,所述预设比例的取值小于100%,此外,所述预设比例的取值可以根据应用场景设置,例如,所述预设比例可以是90%,所述预设比例的具体取值本申请不作限制。
通过将所述剩余空间乘以预设比例,能够避免所述存储对象因占满而溢出。
在本申请的至少一个实施例中,在确定所述存储对象不满足所述存储条件之后,根据所述存储空间选取目标存储位置。
S13,当检测到所述存储对象满足所述存储条件时,在所述存储对象中创建存储目录。
在本申请的至少一个实施例中,所述电子设备在所述存储对象中创建存储目录包括:
确定所述待备份数据的获取时间;
获取所述备份对象的网际协议地址及主机名称;
拼接所述获取时间、所述网际协议地址及所述主机名称,得到目录名称;
以所述目录名称在所述存储对象中创建所述存储目录。
通过拼接所述获取时间、所述网际协议地址及所述主机名称,能够确保所述目录名称的唯一性,通过以所述目录名称在所述存储对象中创建所述存储目录,能够在备份对象丢失数据时,快速查找到备份对象的镜像备份数据。
S14,对所述待备份数据进行镜像备份,得到镜像备份数据。
需要强调的是,为进一步保证上述镜像备份数据的私密和安全性,上述镜像备份数据还 可以存储于一区块链的节点中。
在本申请的至少一个实施例中,所述镜像备份数据是指对所述待备份数据进行压缩并经过镜像处理后的数据。
在本申请的至少一个实施例中,所述电子设备对所述待备份数据进行镜像备份,得到镜像备份数据包括:
对所述待备份数据进行压缩处理,得到压缩数据;
对所述压缩数据进行镜像处理,得到镜像处理后的数据;
检测所述镜像处理后的数据是否与所述待备份数据相同;
当检测到所述镜像处理后的数据与所述待备份数据相同时,将所述镜像处理后的数据确定为所述镜像备份数据。
通过对所述待备份数据进行压缩,能够提高镜像处理的速度,通过对所述压缩数据进行镜像处理,能够在无需安装应用程序的情况下,实现对所述待备份数据的备份处理,通过检测所述镜像处理后的数据与所述待备份数据是否相同,能够确保所述镜像备份数据与所述待备份数据一致。
具体地,所述电子设备可以利用DD命令对所述压缩数据进行镜像处理,得到所述镜像处理后的数据。
在本申请的至少一个实施例中,当检测到所述镜像处理后的数据与所述待备份数据不相同时,所述方法还包括:
确定所述镜像处理后的数据与所述待备份数据不相同的异样数据;
根据所述异样数据生成警报信息;
将所述警报信息发送至指定用户的客户端。
通过上述实施方式,能够在检测到所述镜像备份数据与所述待备份数据不同时,及时提醒所述指定用户,进而确保所述镜像备份数据与所述待备份数据相同。
S15,确定所述存储目录的路径,并将所述镜像备份数据传输至所述路径中。
在本申请的至少一个实施例中,所述路径是指所述存储目录所在的位置。
在本申请的至少一个实施例中,所述电子设备将所述镜像备份数据传输至所述路径中包括:
获取所述镜像备份数据传输至所述路径的传输进度;
当在预设时间内所述传输进度小于预设进度时,从预设线程连接池中获取空闲线程;
利用所述空闲线程将所述镜像备份数据传输至所述路径中。
通过上述实施方式,能够在传输进行小于预设进行时,利用空闲线程传输所述镜像备份数据,避免传输所述镜像备份数据的线程因同步处理其他请求而降低传输速率,进而提高所述镜像备份数据的传输速率。
在本申请的至少一个实施例中,所述方法还包括:
显示所述传输进度。
通过显示传输进度,以便用户快速查看传输进度。
S16,当接收到所述镜像备份数据的数据恢复请求时,确定所述镜像备份数据的数据量。
在本申请的至少一个实施例中,所述数据恢复请求可以在检测到系统崩溃时触发。
进一步地,所述数据恢复请求中携带的数据信息包括,但不限于:请求编号等。
S17,根据所述数据量获取多个闲置线程,并利用所述多个闲置线程将所述镜像备份数据恢复至所述目标磁盘中。
在本申请的至少一个实施例中,所述电子设备根据所述数据量获取多个闲置线程包括:
获取所述预设线程连接池中所有线程的处理速率;
根据所述处理速率确定所述所有线程的平均处理速度;
将所述数据量除以所述平均处理速度,并将得到的结果除以预设时间,得到处理所述数据量所需的线程数量;
从所述预设线程连接池中获取数量为所述线程数量的闲置线程。
通过上述实施方式,能够确定出合适的线程数量,进而能够在避免资源浪费的情况下,提高数据的恢复效率。
在本申请的至少一个实施例中,在利用所述多个闲置线程将所述镜像备份数据恢复至所述目标磁盘中之后,所述方法还包括:
获取所述数据恢复请求的请求编号;
根据所述请求编号生成提示信息;
采用对称加密算法加密所述提示信息,得到密文;
根据所述请求编号确定请求等级,并根据所述请求等级确定发送方式;
以所述发送方式将所述密文发送至指定联系人的终端设备。
其中,所述请求等级包括,但不限于:等级一、等级二等。
进一步地,所述发送方式包括,但不限于:邮件方式、电话方式等。
通过上述实施方式,能够在数据恢复后,及时通知所述指定联系人,同时,通过对所述提示信息进行加密处理,提高所述提示信息的安全性,此外,还能够以合适的发送方式发送所述密文。
由以上技术方案可以看出,本申请通过确定所述待备份数据所占的存储空间,并根据所述存储空间检测所述存储对象是否满足存储条件,能够通过检测所述存储对象是否满足所述待备份数据的存储条件,确保所述存储对象能够存入所述待备份数据,进而通过在所述存储对象中创建存储目录,能够在备份对象丢失数据时,快速查找到备份对象的镜像备份数据,通过将所述镜像备份数据传输至所述路径,能够在无需安装应用程序的情况下,实现对所述待备份数据的备份,通过确定所述镜像备份数据的数据量,能够通过所述数据量确定出合适的线程数量,并利用数量为所述线程数量的闲置线程将所述镜像备份数据恢复至所述目标磁 盘中,能够提高所述镜像备份数据的恢复效率。
如图2所示,是本申请数据恢复装置的较佳实施例的功能模块图。所述数据恢复装置11包括获取单元110、确定单元111、检测单元112、创建单元113、备份单元114、传输单元115、加密单元116、恢复单元117、生成单元118、发送单元119及显示单元120。本申请所称的模块/单元是指一种能够被处理器13所执行,并且能够完成固定功能的一系列计算机可读指令段,其存储在存储器12中。在本实施例中,关于各模块/单元的功能将在后续的实施例中详述。
获取单元110获取备份对象及存储对象。
在本申请的至少一个实施例中,所述备份对象是指需要进行备份的对象,其中,所述对象可以是任意磁盘,也可以是任意客户端。
在本申请的至少一个实施例中,所述存储对象是指存储所述备份对象上的数据的对象,其中,所述存储对象可以是挂载磁盘。
确定单元111获取所述备份对象中的待备份数据,并确定所述待备份数据所占的存储空间。
在本申请的至少一个实施例中,所述待备份数据是指需要进行备份的数据。
在本申请的至少一个实施例中,所述确定单元111可以通过FC交换机获取所述备份对象中的待备份数据。
检测单元112根据所述存储空间检测所述存储对象是否满足存储条件。
在本申请的至少一个实施例中,所述存储条件是指所述待备份数据是否能够完整存储于所述存储对象中。
在本申请的至少一个实施例中,所述检测单元112根据所述存储空间检测所述存储对象是否满足存储条件包括:
获取所述存储对象的剩余空间;
将所述剩余空间乘以预设比例,得到目标空间;
当所述存储空间小于所述目标空间时,确定所述存储对象满足所述存储条件;或者
当所述存储空间大于或者等于所述目标空间时,确定所述存储对象不满足所述存储条件。
其中,所述预设比例的取值小于100%,此外,所述预设比例的取值可以根据应用场景设置,例如,所述预设比例可以是90%,所述预设比例的具体取值本申请不作限制。
通过将所述剩余空间乘以预设比例,能够避免所述存储对象因占满而溢出。
在本申请的至少一个实施例中,在确定所述存储对象不满足所述存储条件之后,根据所述存储空间选取目标存储位置。
当检测到所述存储对象满足所述存储条件时,创建单元113在所述存储对象中创建存储目录。
在本申请的至少一个实施例中,所述创建单元113在所述存储对象中创建存储目录包括:
确定所述待备份数据的获取时间;
获取所述备份对象的网际协议地址及主机名称;
拼接所述获取时间、所述网际协议地址及所述主机名称,得到目录名称;
以所述目录名称在所述存储对象中创建所述存储目录。
通过拼接所述获取时间、所述网际协议地址及所述主机名称,能够确保所述目录名称的唯一性,通过以所述目录名称在所述存储对象中创建所述存储目录,能够在备份对象丢失数据时,快速查找到备份对象的镜像备份数据。
备份单元114对所述待备份数据进行镜像备份,得到镜像备份数据。
需要强调的是,为进一步保证上述镜像备份数据的私密和安全性,上述镜像备份数据还可以存储于一区块链的节点中。
在本申请的至少一个实施例中,所述镜像备份数据是指对所述待备份数据进行压缩并经过镜像处理后的数据。
在本申请的至少一个实施例中,所述备份单元114对所述待备份数据进行镜像备份,得到镜像备份数据包括:
对所述待备份数据进行压缩处理,得到压缩数据;
对所述压缩数据进行镜像处理,得到镜像处理后的数据;
检测所述镜像处理后的数据是否与所述待备份数据相同;
当检测到所述镜像处理后的数据与所述待备份数据相同时,将所述镜像处理后的数据确定为所述镜像备份数据。
通过对所述待备份数据进行压缩,能够提高镜像处理的速度,通过对所述压缩数据进行镜像处理,能够在无需安装应用程序的情况下,实现对所述待备份数据的备份处理,通过检测所述镜像处理后的数据与所述待备份数据是否相同,能够确保所述镜像备份数据与所述待备份数据一致。
具体地,所述备份单元114可以利用DD命令对所述压缩数据进行镜像处理,得到所述镜像处理后的数据。
在本申请的至少一个实施例中,当检测到所述镜像处理后的数据与所述待备份数据不相同时,所述确定单元111确定所述镜像处理后的数据与所述待备份数据不相同的异样数据;
生成单元118根据所述异样数据生成警报信息;
发送单元119将所述警报信息发送至指定用户的客户端。
通过上述实施方式,能够在检测到所述镜像备份数据与所述待备份数据不同时,及时提醒所述指定用户,进而确保所述镜像备份数据与所述待备份数据相同。
传输单元115确定所述存储目录的路径,并将所述镜像备份数据传输至所述路径中。
在本申请的至少一个实施例中,所述路径是指所述存储目录所在的位置。
在本申请的至少一个实施例中,所述传输单元115将所述镜像备份数据传输至所述路径 中包括:
获取所述镜像备份数据传输至所述路径的传输进度;
当在预设时间内所述传输进度小于预设进度时,从预设线程连接池中获取空闲线程;
利用所述空闲线程将所述镜像备份数据传输至所述路径中。
通过上述实施方式,能够在传输进行小于预设进行时,利用空闲线程传输所述镜像备份数据,避免传输所述镜像备份数据的线程因同步处理其他请求而降低传输速率,进而提高所述镜像备份数据的传输速率。
在本申请的至少一个实施例中,显示单元120显示所述传输进度。
通过显示传输进度,以便用户快速查看传输进度。
当接收到所述镜像备份数据的数据恢复请求时,确定所述镜像备份数据的数据量。
在本申请的至少一个实施例中,所述数据恢复请求可以在检测到系统崩溃时触发。
进一步地,所述数据恢复请求中携带的数据信息包括,但不限于:请求编号等。
恢复单元117根据所述数据量获取多个闲置线程,并利用所述多个闲置线程将所述镜像备份数据恢复至所述目标磁盘中。
在本申请的至少一个实施例中,所述恢复单元117根据所述数据量获取多个闲置线程包括:
获取所述预设线程连接池中所有线程的处理速率;
根据所述处理速率确定所述所有线程的平均处理速度;
将所述数据量除以所述平均处理速度,并将得到的结果除以预设时间,得到处理所述数据量所需的线程数量;
从所述预设线程连接池中获取数量为所述线程数量的闲置线程。
通过上述实施方式,能够确定出合适的线程数量,进而能够在避免资源浪费的情况下,提高数据的恢复效率。
在本申请的至少一个实施例中,在利用所述多个闲置线程将所述镜像备份数据恢复至所述目标磁盘中之后,所述获取单元110获取所述数据恢复请求的请求编号;
所述生成单元118根据所述请求编号生成提示信息;
加密单元116采用对称加密算法加密所述提示信息,得到密文;
所述确定单元111根据所述请求编号确定请求等级,并根据所述请求等级确定发送方式;
所述发送单元119以所述发送方式将所述密文发送至指定联系人的终端设备。
其中,所述请求等级包括,但不限于:等级一、等级二等。
进一步地,所述发送方式包括,但不限于:邮件方式、电话方式等。
通过上述实施方式,能够在数据恢复后,及时通知所述指定联系人,同时,通过对所述提示信息进行加密处理,提高所述提示信息的安全性,此外,还能够以合适的发送方式发送所述密文。
由以上技术方案可以看出,本申请通过确定所述待备份数据所占的存储空间,并根据所述存储空间检测所述存储对象是否满足存储条件,能够通过检测所述存储对象是否满足所述待备份数据的存储条件,确保所述存储对象能够存入所述待备份数据,进而通过在所述存储对象中创建存储目录,能够在备份对象丢失数据时,快速查找到备份对象的镜像备份数据,通过将所述镜像备份数据传输至所述路径,能够在无需安装应用程序的情况下,实现对所述待备份数据的备份,通过确定所述镜像备份数据的数据量,能够通过所述数据量确定出合适的线程数量,并利用数量为所述线程数量的闲置线程将所述镜像备份数据恢复至所述目标磁盘中,能够提高所述镜像备份数据的恢复效率。
如图3所示,是本申请实现数据恢复方法的较佳实施例的电子设备的结构示意图。
在本申请的一个实施例中,所述电子设备1包括,但不限于,存储器12、处理器13,以及存储在所述存储器12中并可在所述处理器13上运行的计算机可读指令,例如数据恢复程序。
本领域技术人员可以理解,所述示意图仅仅是电子设备1的示例,并不构成对电子设备1的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述电子设备1还可以包括输入输出设备、网络接入设备、总线等。
所述处理器13可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,所述处理器13是所述电子设备1的运算核心和控制中心,利用各种接口和线路连接整个电子设备1的各个部分,及执行所述电子设备1的操作系统以及安装的各类应用程序、程序代码等。
所述处理器13执行所述电子设备1的操作系统以及安装的各类应用程序。所述处理器13执行所述应用程序以实现上述各个数据恢复方法实施例中的步骤,例如图1所示的步骤。
或者,所述处理器13执行所述计算机可读指令时实现上述各装置实施例中各模块/单元的功能,例如:
获取备份对象及存储对象;
获取所述备份对象中的待备份数据,并确定所述待备份数据所占的存储空间;
根据所述存储空间检测所述存储对象是否满足存储条件;
当检测到所述存储对象满足所述存储条件时,在所述存储对象中创建存储目录;
对所述待备份数据进行镜像备份,得到镜像备份数据;
确定所述存储目录的路径,并将所述镜像备份数据传输至所述路径中;
当接收到所述镜像备份数据的数据恢复请求时,确定所述镜像备份数据的数据量;
根据所述数据量获取多个闲置线程,并利用所述多个闲置线程将所述镜像备份数据恢复 至所述目标磁盘中。
示例性的,所述计算机可读指令可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器12中,并由所述处理器13执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令段,该指令段用于描述所述计算机可读指令在所述电子设备1中的执行过程。例如,所述计算机可读指令可以被分割成获取单元110、确定单元111、检测单元112、创建单元113、备份单元114、传输单元115、加密单元116、恢复单元117、生成单元118、发送单元119及显示单元120。
所述存储器12可用于存储所述计算机可读指令和/或模块,所述处理器13通过运行或执行存储在所述存储器12内的计算机可读指令和/或模块,以及调用存储在存储器12内的数据,实现所述电子设备1的各种功能。所述存储器12可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据等。存储器12可以包括非易失性和易失性存储器,例如:硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他存储器件。
所述存储器12可以是电子设备1的外部存储器和/或内部存储器。进一步地,所述存储器12可以是具有实物形式的存储器,如内存条、TF卡(Trans-flash Card)等等。
所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中,所述计算机可读存储介质可以是非易失性的存储介质,也可以是易失性的存储介质。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一计算机可读存储介质中,该计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。
其中,所述计算机可读指令包括计算机可读指令代码,所述计算机可读指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存储器等。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
结合图1,所述电子设备1中的所述存储器12存储多个计算机可读指令以实现一种数据恢复方法,所述处理器13可执行所述多个计算机可读指令从而实现:
获取备份对象及存储对象;
获取所述备份对象中的待备份数据,并确定所述待备份数据所占的存储空间;
根据所述存储空间检测所述存储对象是否满足存储条件;
当检测到所述存储对象满足所述存储条件时,在所述存储对象中创建存储目录;
对所述待备份数据进行镜像备份,得到镜像备份数据;
确定所述存储目录的路径,并将所述镜像备份数据传输至所述路径中;
当接收到所述镜像备份数据的数据恢复请求时,确定所述镜像备份数据的数据量;
根据所述数据量获取多个闲置线程,并利用所述多个闲置线程将所述镜像备份数据恢复至所述目标磁盘中。
具体地,所述处理器13对上述指令的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。

Claims (20)

  1. 一种数据恢复方法,其中,所述数据恢复方法包括:
    获取备份对象及存储对象;
    获取所述备份对象中的待备份数据,并确定所述待备份数据所占的存储空间;
    根据所述存储空间检测所述存储对象是否满足存储条件;
    当检测到所述存储对象满足所述存储条件时,在所述存储对象中创建存储目录;
    对所述待备份数据进行镜像备份,得到镜像备份数据;
    确定所述存储目录的路径,并将所述镜像备份数据传输至所述路径中;
    当接收到所述镜像备份数据的数据恢复请求时,确定所述镜像备份数据的数据量;
    根据所述数据量获取多个闲置线程,并利用所述多个闲置线程将所述镜像备份数据恢复至所述目标磁盘中。
  2. 根据权利要求1所述的数据恢复方法,其中,所述根据所述存储空间检测所述存储对象是否满足存储条件包括:
    获取所述存储对象的剩余空间;
    将所述剩余空间乘以预设比例,得到目标空间;
    当所述存储空间小于所述目标空间时,确定所述存储对象满足所述存储条件;或者
    当所述存储空间大于或者等于所述目标空间时,确定所述存储对象不满足所述存储条件。
  3. 根据权利要求1所述的数据恢复方法,其中,所述在所述存储对象中创建存储目录包括:
    确定所述待备份数据的获取时间;
    获取所述备份对象的网际协议地址及主机名称;
    拼接所述获取时间、所述网际协议地址及所述主机名称,得到目录名称;
    以所述目录名称在所述存储对象中创建所述存储目录。
  4. 根据权利要求1所述的数据恢复方法,其中,所述对所述待备份数据进行镜像备份,得到镜像备份数据包括:
    对所述待备份数据进行压缩处理,得到压缩数据;
    对所述压缩数据进行镜像处理,得到镜像处理后的数据;
    检测所述镜像处理后的数据是否与所述待备份数据相同;
    当检测到所述镜像处理后的数据与所述待备份数据相同时,将所述镜像处理后的数据确定为所述镜像备份数据。
  5. 根据权利要求1所述的数据恢复方法,其中,所述将所述镜像备份数据传输至所述路径中包括:
    获取所述镜像备份数据传输至所述路径的传输进度;
    当在预设时间内所述传输进度小于预设进度时,从预设线程连接池中获取空闲线程;
    利用所述空闲线程将所述镜像备份数据传输至所述路径中。
  6. 根据权利要求5所述的数据恢复方法,其中,所述根据所述数据量获取多个闲置线程包括:
    获取所述预设线程连接池中所有线程的处理速率;
    根据所述处理速率确定所述所有线程的平均处理速度;
    将所述数据量除以所述平均处理速度,并将得到的结果除以预设时间,得到处理所述数据量所需的线程数量;
    从所述预设线程连接池中获取数量为所述线程数量的闲置线程。
  7. 根据权利要求1所述的数据恢复方法,其中,在利用所述多个闲置线程将所述镜像备份数据恢复至所述目标磁盘中之后,所述方法还包括:
    获取所述数据恢复请求的请求编号;
    根据所述请求编号生成提示信息;
    采用对称加密算法加密所述提示信息,得到密文;
    根据所述请求编号确定请求等级,并根据所述请求等级确定发送方式;
    以所述发送方式将所述密文发送至指定联系人的终端设备。
  8. 一种数据恢复装置,其中,所述数据恢复装置包括:
    获取单元,用于获取备份对象及存储对象;
    确定单元,用于获取所述备份对象中的待备份数据,并确定所述待备份数据所占的存储空间;
    检测单元,用于根据所述存储空间检测所述存储对象是否满足存储条件;
    创建单元,用于当检测到所述存储对象满足所述存储条件时,在所述存储对象中创建存储目录;
    备份单元,用于对所述待备份数据进行镜像备份,得到镜像备份数据;
    传输单元,用于确定所述存储目录的路径,并将所述镜像备份数据传输至所述路径中;
    所述确定单元,还用于当接收到所述镜像备份数据的数据恢复请求时,确定所述镜像备份数据的数据量;
    恢复单元,用于根据所述数据量获取多个闲置线程,并利用所述多个闲置线程将所述镜像备份数据恢复至所述目标磁盘中。
  9. 一种电子设备,其中,所述电子设备包括处理器和存储器,所述处理器用于执行存储器中存储的至少一个计算机可读指令以实现以下步骤:
    获取备份对象及存储对象;
    获取所述备份对象中的待备份数据,并确定所述待备份数据所占的存储空间;
    根据所述存储空间检测所述存储对象是否满足存储条件;
    当检测到所述存储对象满足所述存储条件时,在所述存储对象中创建存储目录;
    对所述待备份数据进行镜像备份,得到镜像备份数据;
    确定所述存储目录的路径,并将所述镜像备份数据传输至所述路径中;
    当接收到所述镜像备份数据的数据恢复请求时,确定所述镜像备份数据的数据量;
    根据所述数据量获取多个闲置线程,并利用所述多个闲置线程将所述镜像备份数据恢复至所述目标磁盘中。
  10. 根据权利要求9所述的电子设备,其中,在所述根据所述存储空间检测所述存储对象是否满足存储条件时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:
    获取所述存储对象的剩余空间;
    将所述剩余空间乘以预设比例,得到目标空间;
    当所述存储空间小于所述目标空间时,确定所述存储对象满足所述存储条件;或者
    当所述存储空间大于或者等于所述目标空间时,确定所述存储对象不满足所述存储条件。
  11. 根据权利要求9所述的电子设备,其中,在所述存储对象中创建存储目录时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:
    确定所述待备份数据的获取时间;
    获取所述备份对象的网际协议地址及主机名称;
    拼接所述获取时间、所述网际协议地址及所述主机名称,得到目录名称;
    以所述目录名称在所述存储对象中创建所述存储目录。
  12. 根据权利要求9所述的电子设备,其中,在所述对所述待备份数据进行镜像备份,得到镜像备份数据时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:
    对所述待备份数据进行压缩处理,得到压缩数据;
    对所述压缩数据进行镜像处理,得到镜像处理后的数据;
    检测所述镜像处理后的数据是否与所述待备份数据相同;
    当检测到所述镜像处理后的数据与所述待备份数据相同时,将所述镜像处理后的数据确定为所述镜像备份数据。
  13. 根据权利要求9所述的电子设备,其中,在所述将所述镜像备份数据传输至所述路径中时,所述处理器执行所述至少一个计算机可读指令还用以实现以下步骤:
    获取所述镜像备份数据传输至所述路径的传输进度;
    当在预设时间内所述传输进度小于预设进度时,从预设线程连接池中获取空闲线程;
    利用所述空闲线程将所述镜像备份数据传输至所述路径中。
  14. 根据权利要求13所述的电子设备,其中,在所述根据所述数据量获取多个闲置线程时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:
    获取所述预设线程连接池中所有线程的处理速率;
    根据所述处理速率确定所述所有线程的平均处理速度;
    将所述数据量除以所述平均处理速度,并将得到的结果除以预设时间,得到处理所述数据量所需的线程数量;
    从所述预设线程连接池中获取数量为所述线程数量的闲置线程。
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有至少一个计算机可读指令,所述至少一个计算机可读指令被处理器执行时实现以下步骤:
    获取备份对象及存储对象;
    获取所述备份对象中的待备份数据,并确定所述待备份数据所占的存储空间;
    根据所述存储空间检测所述存储对象是否满足存储条件;
    当检测到所述存储对象满足所述存储条件时,在所述存储对象中创建存储目录;
    对所述待备份数据进行镜像备份,得到镜像备份数据;
    确定所述存储目录的路径,并将所述镜像备份数据传输至所述路径中;
    当接收到所述镜像备份数据的数据恢复请求时,确定所述镜像备份数据的数据量;
    根据所述数据量获取多个闲置线程,并利用所述多个闲置线程将所述镜像备份数据恢复至所述目标磁盘中。
  16. 根据权利要求15所述的存储介质,其中,在所述根据所述存储空间检测所述存储对象是否满足存储条件时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:
    获取所述存储对象的剩余空间;
    将所述剩余空间乘以预设比例,得到目标空间;
    当所述存储空间小于所述目标空间时,确定所述存储对象满足所述存储条件;或者
    当所述存储空间大于或者等于所述目标空间时,确定所述存储对象不满足所述存储条件。
  17. 根据权利要求15所述的存储介质,其中,在所述存储对象中创建存储目录时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:
    确定所述待备份数据的获取时间;
    获取所述备份对象的网际协议地址及主机名称;
    拼接所述获取时间、所述网际协议地址及所述主机名称,得到目录名称;
    以所述目录名称在所述存储对象中创建所述存储目录。
  18. 根据权利要求15所述的存储介质,其中,在所述对所述待备份数据进行镜像备份,得到镜像备份数据时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:
    对所述待备份数据进行压缩处理,得到压缩数据;
    对所述压缩数据进行镜像处理,得到镜像处理后的数据;
    检测所述镜像处理后的数据是否与所述待备份数据相同;
    当检测到所述镜像处理后的数据与所述待备份数据相同时,将所述镜像处理后的数据确定为所述镜像备份数据。
  19. 根据权利要求15所述的存储介质,其中,在所述将所述镜像备份数据传输至所述路径中时,所述至少一个计算机可读指令被处理器执行时还用以实现以下步骤:
    获取所述镜像备份数据传输至所述路径的传输进度;
    当在预设时间内所述传输进度小于预设进度时,从预设线程连接池中获取空闲线程;
    利用所述空闲线程将所述镜像备份数据传输至所述路径中。
  20. 根据权利要求19所述的存储介质,其中,在所述根据所述数据量获取多个闲置线程时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:
    获取所述预设线程连接池中所有线程的处理速率;
    根据所述处理速率确定所述所有线程的平均处理速度;
    将所述数据量除以所述平均处理速度,并将得到的结果除以预设时间,得到处理所述数据量所需的线程数量;
    从所述预设线程连接池中获取数量为所述线程数量的闲置线程。
PCT/CN2020/122256 2020-07-21 2020-10-20 数据恢复方法、装置、电子设备及介质 Ceased WO2021135530A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010706040.3A CN111831485B (zh) 2020-07-21 2020-07-21 数据恢复方法、装置、电子设备及介质
CN202010706040.3 2020-07-21

Publications (1)

Publication Number Publication Date
WO2021135530A1 true WO2021135530A1 (zh) 2021-07-08

Family

ID=72923856

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/122256 Ceased WO2021135530A1 (zh) 2020-07-21 2020-10-20 数据恢复方法、装置、电子设备及介质

Country Status (2)

Country Link
CN (1) CN111831485B (zh)
WO (1) WO2021135530A1 (zh)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672435A (zh) * 2021-07-09 2021-11-19 济南浪潮数据技术有限公司 一种数据恢复方法、装置、设备及存储介质
CN114237870A (zh) * 2021-11-19 2022-03-25 中国建设银行股份有限公司 任务运行方法、装置、计算机设备和存储介质
CN114721876A (zh) * 2022-04-22 2022-07-08 济南浪潮数据技术有限公司 一种数据备份方法、装置、介质
CN114924908A (zh) * 2022-03-17 2022-08-19 青岛海尔科技有限公司 数据的备份方法和装置、存储介质及电子装置
CN115437849A (zh) * 2022-09-21 2022-12-06 梁力 数据处理方法、装置、设备及计算机可读存储介质
CN115586987A (zh) * 2022-08-30 2023-01-10 济南浪潮数据技术有限公司 一种数据备份与恢复方法、装置、设备及介质
CN117056133A (zh) * 2023-10-12 2023-11-14 杭州浩联智能科技有限公司 一种基于分布式物联网架构的数据备份方法、装置及介质
CN117082083A (zh) * 2023-08-30 2023-11-17 杭州浩联智能科技有限公司 一种基于分布式物联网架构的数据存储方法、装置及介质
CN118860751A (zh) * 2024-09-26 2024-10-29 武汉吧哒科技股份有限公司 基于异常检测的数据备份恢复方法及装置
CN119847808A (zh) * 2025-03-20 2025-04-18 苏州元脑智能科技有限公司 基本输入输出系统的异常诊断方法、设备、介质及产品

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113282571A (zh) * 2021-05-26 2021-08-20 北京金山云网络技术有限公司 数据转移方法、装置、电子设备和存储介质
CN113407376B (zh) * 2021-06-18 2024-08-02 北京金山云网络技术有限公司 一种数据恢复方法、装置及电子设备
CN113986620B (zh) * 2021-12-28 2022-04-12 国网浙江省电力有限公司 适用于中台的多区域信息备份验证恢复方法及装置
CN114924911B (zh) * 2022-05-19 2023-04-14 广州鼎甲计算机科技有限公司 Windows操作系统有效数据备份方法、装置、设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130325809A1 (en) * 2012-06-04 2013-12-05 Samsung Electronics Co., Ltd. Method for contents backup and an electronic device thereof
CN103455391A (zh) * 2013-09-06 2013-12-18 南宁博大全讯科技有限公司 一种动态调整的数据保护的装置和方法
CN104331346A (zh) * 2014-11-21 2015-02-04 四川神琥科技有限公司 一种数据保护方法
CN105373453A (zh) * 2015-12-15 2016-03-02 中国农业银行股份有限公司 数据备份方法及系统
CN109062737A (zh) * 2018-08-24 2018-12-21 郑州云海信息技术有限公司 一种快速备份测试数据的方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8914334B2 (en) * 2012-09-12 2014-12-16 International Business Machines Corporation Using a metadata image of a file system and archive instance to restore data objects in the file system
CN106557384B (zh) * 2015-09-25 2020-10-02 南京中兴软件有限责任公司 基于Linux的数据处理方法、装置和系统
US10296368B2 (en) * 2016-03-09 2019-05-21 Commvault Systems, Inc. Hypervisor-independent block-level live browse for access to backed up virtual machine (VM) data and hypervisor-free file-level recovery (block-level pseudo-mount)
CN107665153A (zh) * 2016-07-27 2018-02-06 中兴通讯股份有限公司 一种大数据系统中数据备份方法、恢复方法和装置
CN109492024A (zh) * 2018-10-26 2019-03-19 平安科技(深圳)有限公司 数据处理方法、装置、计算机设备以及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130325809A1 (en) * 2012-06-04 2013-12-05 Samsung Electronics Co., Ltd. Method for contents backup and an electronic device thereof
CN103455391A (zh) * 2013-09-06 2013-12-18 南宁博大全讯科技有限公司 一种动态调整的数据保护的装置和方法
CN104331346A (zh) * 2014-11-21 2015-02-04 四川神琥科技有限公司 一种数据保护方法
CN105373453A (zh) * 2015-12-15 2016-03-02 中国农业银行股份有限公司 数据备份方法及系统
CN109062737A (zh) * 2018-08-24 2018-12-21 郑州云海信息技术有限公司 一种快速备份测试数据的方法

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672435A (zh) * 2021-07-09 2021-11-19 济南浪潮数据技术有限公司 一种数据恢复方法、装置、设备及存储介质
CN114237870A (zh) * 2021-11-19 2022-03-25 中国建设银行股份有限公司 任务运行方法、装置、计算机设备和存储介质
CN114924908A (zh) * 2022-03-17 2022-08-19 青岛海尔科技有限公司 数据的备份方法和装置、存储介质及电子装置
CN114721876A (zh) * 2022-04-22 2022-07-08 济南浪潮数据技术有限公司 一种数据备份方法、装置、介质
CN115586987A (zh) * 2022-08-30 2023-01-10 济南浪潮数据技术有限公司 一种数据备份与恢复方法、装置、设备及介质
CN115437849A (zh) * 2022-09-21 2022-12-06 梁力 数据处理方法、装置、设备及计算机可读存储介质
CN117082083A (zh) * 2023-08-30 2023-11-17 杭州浩联智能科技有限公司 一种基于分布式物联网架构的数据存储方法、装置及介质
CN117056133A (zh) * 2023-10-12 2023-11-14 杭州浩联智能科技有限公司 一种基于分布式物联网架构的数据备份方法、装置及介质
CN117056133B (zh) * 2023-10-12 2024-02-06 杭州浩联智能科技有限公司 一种基于分布式物联网架构的数据备份方法、装置及介质
CN118860751A (zh) * 2024-09-26 2024-10-29 武汉吧哒科技股份有限公司 基于异常检测的数据备份恢复方法及装置
CN119847808A (zh) * 2025-03-20 2025-04-18 苏州元脑智能科技有限公司 基本输入输出系统的异常诊断方法、设备、介质及产品

Also Published As

Publication number Publication date
CN111831485A (zh) 2020-10-27
CN111831485B (zh) 2023-01-13

Similar Documents

Publication Publication Date Title
WO2021135530A1 (zh) 数据恢复方法、装置、电子设备及介质
US10078459B1 (en) Ransomware detection using I/O patterns
US10169167B2 (en) Reduced recovery time in disaster recovery/replication setup with multitier backend storage
US20130080695A1 (en) Restore in cascaded copy environment
JP2021503643A (ja) ブロックチェーン上の大量トランザクション性能を最適化するための方法、装置、コンピュータ・プログラムおよびコンピュータ・プログラムを記録したコンピュータ可読記憶媒体
US10452502B2 (en) Handling node failure in multi-node data storage systems
WO2022179115A1 (zh) 用户认证方法、装置、服务器及存储介质
US11379329B2 (en) Validation of data written via two different bus interfaces to a dual server based storage controller
US20170024232A1 (en) Methods and systems for integrating a volume shadow copy service (vss) requester and/or a vss provider with virtual volumes (vvols)
US11228486B2 (en) Methods for managing storage virtual machine configuration changes in a distributed storage system and devices thereof
CN113050900B (zh) 屏幕分享方法、装置、设备及存储介质
WO2016107219A1 (zh) 数据恢复方法及装置
WO2022048358A1 (zh) 数据处理方法、装置及存储介质
CN111857883B (zh) 页面数据校验方法、装置、电子设备及存储介质
US10757175B2 (en) Synchronization optimization based upon allocation data
US20190354627A1 (en) Synchronization of block based volumes
CN115118738B (zh) 基于rdma的灾备方法、装置、设备及介质
US10079883B2 (en) Primary device selection at operating system initialization
US11176003B2 (en) Restoration of data when point in time copy operations are performed during asynchronous copy
US10114696B2 (en) Tracking data access in a dispersed storage network
CN113064802B (zh) 操作轨迹还原方法、装置、设备及存储介质
CN112486729B (zh) 基于非易失性存储器的操作验证的安全数据提交扫描的调整
CN116743783A (zh) 基于云计算的监控数据存储方法及相关设备
CN115205032A (zh) 征信查询方法、装置、设备及存储介质
CN115712523A (zh) 配置文件备份与恢复方法、装置、交换机及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20908663

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20908663

Country of ref document: EP

Kind code of ref document: A1