CN-116069552-B - Data recovery method, data recovery device and computer readable storage medium
Abstract
The application discloses a data recovery method, a data recovery device and a computer readable storage medium, wherein the data recovery method comprises the steps of establishing communication connection with a first storage device, responding to the first storage device to operate in an engineering mode, reading storage data of the first storage device, responding to the storage data as logic data, obtaining a logic address of the storage data, and writing the storage data into a second storage device based on the logic address. Through the scheme, the method and the device can autonomously, safely and reliably recover the data of the storage device which cannot normally work, and effectively avoid the loss of key sensitive data.
Inventors
- CHEN ZHENXING
- YIN HUI
Assignees
- 中山市江波龙电子有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20211101
Claims (12)
- 1. A data recovery method for a storage device, the data recovery method comprising: Establishing a communication connection with a first storage device; responding to the short circuit of reserved pins of the first storage device, determining that the first storage device operates in an engineering mode, and acquiring a program control instruction sent by a background computer; Transmitting the program control instruction to the first storage device so as to enable the first storage device to start a data recovery program; Reading the stored data before the first storage device works abnormally; Responding to the stored data as logic data, and acquiring a logic address of the stored data; The stored data is written to a second storage device based on the logical address.
- 2. The data recovery method according to claim 1, wherein the step of reading the stored data of the first storage device includes: Transmitting data recovery firmware to the first storage device to enable the first storage device to run the data recovery firmware; and sending a data reading instruction to the first storage device running the data recovery firmware so as to read the storage data.
- 3. The data recovery method according to claim 1, wherein after the step of reading the stored data of the first storage device, the step of acquiring the logical address and the writing order of the stored data in response to the stored data being logical data, comprises: Reading metadata of the stored data; and judging whether the stored data is logic data or not based on the data attribute of the stored data which is correspondingly recorded in the metadata.
- 4. A data recovery method according to claim 3, wherein the step of obtaining the logical address of the stored data comprises: and acquiring the logic address of the storage data corresponding to the record in the metadata.
- 5. The data recovery method of claim 1, wherein the step of writing the stored data to a second storage device based on the logical address comprises: And writing the storage data into the second storage device at a storage position corresponding to the logic address.
- 6. The data recovery method of claim 1, wherein the step of writing the stored data to a second storage device based on the logical address comprises: acquiring the writing sequence of the storage data; And writing the last written data in the storage data which is written into the first storage device for multiple times and has the same logical address into a storage position corresponding to the logical address in the second storage device according to the writing sequence.
- 7. The data recovery method of claim 1, wherein the step of writing the stored data to a second storage device based on the logical address comprises: Writing the storage data into a corresponding offset position of a set mirror image file according to the logic address; and storing the setting image file to the second storage device.
- 8. The data recovery method according to claim 7, wherein the step of writing the stored data to the corresponding offset position of the set image file according to the logical address includes: acquiring the writing sequence of the storage data; And writing the last written data in the storage data with the same logical address written into the first storage device for multiple times into the offset position corresponding to the logical address in the setting mirror image file according to the writing sequence.
- 9. The data recovery method of claim 1, wherein after the step of establishing a communication connection with a first storage device, the step of reading the stored data of the first storage device in response to the first storage device operating in an engineering mode further comprises: Acquiring characteristic parameters of the first storage device; Judging whether the first storage device is in a preset support list or not based on the characteristic parameters; The step of reading the stored data of the first storage device in response to the first storage device operating in the engineering mode, comprises: And in response to the first storage device being in the preset support list and the first storage device being operating in the engineering mode, reading the stored data in the first storage device.
- 10. The data recovery method according to claim 1, further comprising, after the step of writing the stored data to a second storage device based on the logical address: acquiring the model number of the first storage device and the number of the storage chips included in the first storage device; Judging whether all storage spaces of the first storage device are traversed currently or not based on the model number and the number; and ending the current data recovery flow in response to traversing all the storage spaces of the first storage device.
- 11. A data recovery device, wherein the data recovery device comprises a memory and a processor coupled to each other; the memory stores program data; the processor is configured to execute the program data to implement the data recovery method according to any one of claims 1-10.
- 12. A computer readable storage medium having stored thereon program instructions, which when executed by a processor implement the data recovery method of any of claims 1-10.
Description
Data recovery method, data recovery device and computer readable storage medium Technical Field The present application relates to the field of computer technologies, and in particular, to a data recovery method, a data recovery device, and a computer readable storage medium. Background Nowadays, due to the immaturity of firmware technology in a storage device, NAND (NAND FLASH memory) has poor quality of particles, a firmware is started up and fails, or a master control works abnormally, etc., inevitably, SSD (Solid STATE DISK) cannot work normally. The general manufacturer only needs to choose to return the customer within the range allowed by RMA (Return Material Authorization, main process of returning and checking the bad products and handling the bad products, however, the method can cause the original data loss of the customer, or send the bad SSD back to the technicians in the factory for data recovery, but the method has complicated steps, long period and related data confidentiality. Some critical sensitive data within the SSD may be compromised during return to the factory and there is a significant risk. Disclosure of Invention The application mainly solves the technical problems of complicated steps, long period and larger risk of key sensitive information leakage of the data recovery method in the prior art. In order to solve the problems, a first aspect of the present application provides a recovery writing method of a storage device, wherein the data recovery method includes establishing a communication connection with a first storage device, reading storage data of the first storage device in response to the first storage device operating in an engineering mode, obtaining a logical address of the storage data in response to the storage data being logical data, and writing the storage data to a second storage device based on the logical address. The step of reading the storage data of the first storage device comprises the steps of sending data recovery firmware to the first storage device to enable the first storage device to operate the data recovery firmware, and sending a data reading instruction to the first storage device operating the data recovery firmware to read the storage data. The method comprises the steps of responding to the first storage device to operate in an engineering mode, after the step of reading the storage data of the first storage device, responding to the storage data as logic data, and before the step of acquiring the logic address and the writing sequence of the storage data, reading metadata of the storage data, and judging whether the storage data is logic data or not based on data attributes of the storage data correspondingly recorded in the metadata. The step of obtaining the logical address of the storage data comprises the step of obtaining the logical address of the storage data corresponding to the record in the metadata. The step of writing the storage data to the second storage device based on the logical address comprises the step of writing the storage data to a storage position corresponding to the logical address in the second storage device. The method comprises the steps of obtaining the writing sequence of storage data, and writing last written data in the storage data with the same logical address written in the first storage device into a storage position corresponding to the logical address in the second storage device according to the writing sequence. The step of writing the storage data into the second storage device based on the logical address comprises writing the storage data into a corresponding offset position of the setting mirror image file according to the logical address, and storing the setting mirror image file into the second storage device. The step of writing the storage data into the corresponding offset position of the set mirror image file according to the logic address comprises the steps of obtaining the writing sequence of the storage data, and writing the last written data in the storage data with the same logic address written into the first storage device for multiple times into the offset position corresponding to the logic address in the set mirror image file according to the writing sequence. The method comprises the steps of establishing communication connection with a first storage device, responding to the first storage device operating in an engineering mode, and reading storage data of the first storage device, wherein the method further comprises the steps of acquiring characteristic parameters of the first storage device, judging whether the first storage device is in a preset support list or not based on the characteristic parameters, responding to the first storage device operating in the engineering mode, and reading the storage data of the first storage device, and the method comprises the steps of responding to the first storage device operating in the engineering mode and reading the storage data o