Data backup and recovery method

Through multiple independent storage media and pre-analyzed data backup methods, the problem of data irrecoverability caused by storage medium damage or loss in the prior art is solved, and safe data backup and complete recovery of logical relationships are achieved.

CN120448190BActive Publication Date: 2025-09-23BEIJING ANDY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510941029.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-09
Publication Date
2025-09-23
Estimated Expiration
2045-07-09

AI Technical Summary

Technical Problem

Existing data backup and recovery methods cannot effectively recover data when the storage medium is damaged or lost, and there is a risk of data leakage, especially when using a single USB flash drive for backup, the risk of data synchronization loss and loss is high.

Method used

Use multiple independent storage media for backup, with only one medium connected to the computer at a time. The media are physically isolated from each other. By pre-analyzing the file structure and association relationships, the data blocks are ensured to be stored completely. The backup records are uploaded to the cloud, and data can be restored based on the cloud records in case of data loss.

Benefits of technology

It avoids data loss caused by single point failure, ensures that backup data is intact, reduces the need for physical movement, achieves complete recovery of data logical relationships, and avoids space waste and data loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448190B_ABST
    Figure CN120448190B_ABST
Patent Text Reader

Abstract

The present invention discloses a data backup and recovery method, which relates to the technical field of data backup and recovery, and includes the following steps: S1, pre-analysis of data to be backed up; S2, connecting a storage medium; S3, data transmission and backup; S4, data backup recording; S5, data recovery. This data backup and recovery method uses multiple independent storage media, with only one medium connected to a computer at a time, and the media are physically isolated and the data is not interoperable. Even if a certain medium is damaged, the backup data of other media remains intact, avoiding "single point failure". In addition, built-in or fixedly connected storage media are used to reduce the need for physical movement to prevent the loss of storage media. By pre-analyzing the file structure and association relationship, it can ensure that all data blocks of a single file are completely stored in the same medium, ensuring that related files are stored centrally, and that the logical relationship of the data can be completely restored during recovery, avoiding association failure caused by decentralized storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data backup and recovery, and in particular to a data backup and recovery method. Background Art

[0002] With the deepening of digital transformation, the amount of data held by enterprises, institutions, and individuals is growing exponentially. Data has become a core asset (such as customer information, financial records, scientific research data, etc.). However, the security threats facing data are becoming increasingly complex. Therefore, it is necessary to use storage media to back up important file data so that data can be restored in a timely manner in the event of accidental damage or loss to avoid losses.

[0003] Existing data backup and recovery methods mostly use "local backup" or "multiple copies of the same medium" modes, such as copying data to different partitions of the same hard disk, or using a single USB flash drive for backup. If the storage medium is damaged (such as a hard disk head failure), infected with a virus, or physically damaged, all backup data will be lost synchronously and cannot be restored. In addition, USB flash drives, as removable backup storage facilities, are easily lost, resulting in loss of user data and risks of leaks. Summary of the Invention

[0004] In view of the deficiencies of the prior art, the present invention provides a data backup and recovery method, which solves the problems raised in the above background technology.

[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions: a data backup and recovery method, the data backup and recovery method comprising the following steps:

[0006] S1. Pre-analysis of data to be backed up:

[0007] For data that needs to be backed up in the computer system, first identify and analyze all files to be backed up to ensure the integrity of each file;

[0008] S2. Connect storage media:

[0009] Several storage media are connected to the computer system;

[0010] S3, data transmission backup:

[0011] The computer system scans and collects data information of the files to be backed up according to the results of the pre-analysis. Based on the association relationship between the files in the pre-analysis, the processor starts the timer to transfer the associated file data to the corresponding storage medium.

[0012] S4. Data backup records:

[0013] When scanning and collecting files that need to be backed up, record the file name suffix and the specific location in the computer system, and transfer the backup record along with the file to the storage medium for backup;

[0014] S5. Data recovery:

[0015] When data is lost or damaged in a computer system, a search is performed based on the backup record information in the cloud at the location where the data is lost or damaged. After the backup record corresponding to the lost or damaged location is retrieved, the storage medium number where the lost or damaged data is backed up and the specific location in the storage medium are displayed in association. The processor then controls the switching of the numbered storage medium to connect with the computer system and performs data recovery.

[0016] Furthermore, in step S1, the recognition analysis is used to identify the size, structure, and association relationship information of each file, and all associated files are regarded as a complete file group.

[0017] Furthermore, in step S2, a corresponding storage medium is selected from among several storage media and connected to the computer system at a specified time according to a schedule, and only one storage medium is connected to the computer system at the same time.

[0018] Furthermore, in step S2, the storage media are independently set and do not interfere with each other.

[0019] Furthermore, in step S2, the storage medium includes but is not limited to USB, SATA, and SD, and the storage medium is connected to the computer system via a wired or wireless manner.

[0020] Furthermore, in step S3, when the processor starts the timer, based on the pre-analyzed sum of the associated file sizes, if the sum is greater than the remaining capacity of the corresponding storage medium, the timer switches to a storage medium with sufficient remaining capacity to connect it to the computer system and perform the backup operation.

[0021] Furthermore, in step S3, after the timer is started, if the transmission time reaches the timer preset value but the transmission is not completed, the timer trigger signal is ignored to postpone the switching of the storage medium until the file transfer backup is completed and verified to be correct, and then the storage medium is switched.

[0022] Furthermore, in step S4, the storage medium uploads the backup record to the cloud when receiving the backup data, wherein the backup record is associated with the corresponding file data location in the storage medium and is also associated with the corresponding storage medium number.

[0023] Furthermore, in step S5, during data recovery, based on the normal data names before and after the lost or damaged data in the computer system, the processor retrieves the corresponding backed-up data names in the storage medium, and restores the backed-up lost or damaged data between the two data names to the computer system.

[0024] The present invention provides a data backup and recovery method, which has the following beneficial effects:

[0025] This data backup and recovery method uses multiple independent storage media, with only one medium connected to the computer at a time. The media are physically isolated and the data is not interoperable. Even if one medium is damaged, the backup data of other media remains intact, avoiding "single point failure". In addition, the use of built-in or fixedly connected storage media (such as SATA hard drives) reduces the need for physical movement to prevent storage media loss.

[0026] This data backup and recovery method ensures that all data blocks of a single file are completely stored on the same medium by pre-analyzing the file structure and association relationship. For cross-file associated data (such as database tables and project engineering files), a group storage strategy can be formulated after analysis to ensure that related files are stored in a centralized manner. During recovery, the logical relationship of the data can be completely restored to avoid association failure caused by decentralized storage. In addition, large files can be stored preferentially on high-capacity media, and small files on small-capacity media, avoiding space waste caused by "large files occupying small media". BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A schematic diagram of the system framework of a data backup and recovery method of the present invention;

[0028] Figure 2 The figure is a flowchart of the steps of a data backup and recovery method of the present invention. DETAILED DESCRIPTION

[0029] The following embodiments of the present invention are described in further detail with reference to the accompanying drawings and examples. The following examples are used to illustrate the present invention but are not intended to limit the scope of the present invention.

[0030] like Figure 1-Figure 2 As shown, the present invention provides a technical solution: a data backup and recovery method, the data backup and recovery method includes the following steps:

[0031] S1. Pre-analysis of data to be backed up:

[0032] For data that needs to be backed up in the computer system, first identify and analyze all files to be backed up to ensure the integrity of each file;

[0033] Identification analysis is used to identify the size, structure, and relationship information of each file, and treat all related files as a complete file group;

[0034] After starting the backup program, the system automatically starts the data scanning module, which will traverse all storage areas of the server, including local disks, shared folders, network mapped disks, etc., and conduct a comprehensive scan of the files and folders therein. During the scanning process, the module obtains basic file information such as file path, file name, file type, etc. through the file system interface, and creates an initial list of all files to be backed up;

[0035] The number of bytes occupied by each file on the disk is read through the API function provided by the operating system to determine the file size. For a file group containing multiple files, the sum of the sizes of all files in the file group is calculated to provide a basis for subsequent storage media selection;

[0036] For text files, the directory structure and internal hierarchical relationships of the files will be parsed. For example, for source code files, the inclusion relationships between different code packages and class files will be identified, as well as the association between configuration files and code files.

[0037] For non-text files such as images and PDFs that may be included, their header information and internal data organization will be analyzed. For example, for PDF files, their page structure and bookmark directory will be parsed to understand the overall structure of the file;

[0038] Accurately determine the file type based on the file extension (such as .docx, .xlsx, .py, etc.) or the magic number (a specific byte sequence used to identify the file type) within the file. Different file types may have different storage requirements and association characteristics. For example, project development source code files are closely related, while financial report files are relatively independent. Identifying the file type facilitates subsequent targeted analysis.

[0039] If multiple files are located in the same subfolder and the folder name has a specific meaning (such as classification by customer or project), these files are considered to be associated. For example, in a customer order document, all order files in the same customer folder are considered to be an associated file group because they are all related to the customer.

[0040] For project development source code, determine the associations between files by analyzing references and function call relationships within the code. For example, if one class file calls a method from another class file, then the two files are closely related and should be backed up as a complete file group. For financial statements, if data references exist between different reports (for example, the balance sheet references data from the income statement), these reports are also considered related files.

[0041] From a business perspective, determine the relevance between files. For example, in a customer order document, a customer's order documents, contract documents, and communication records may be stored in different directories or have different file types. However, based on business logic, they are all related to the customer and should be grouped together.

[0042] Based on the determination of the above association relationships, all files to be backed up are divided into different file groups. For example, customer order documents can be divided into multiple customer file groups, financial statements can be divided into independent file groups by quarter, and project development source code can be divided into one or more code file groups.

[0043] S2. Connect storage media:

[0044] A plurality of storage media are connected to the computer system. The corresponding storage medium is selected at a specified time according to a schedule and connected to the computer system. Only one storage medium is connected to the computer system at a time. The storage media are independently set and do not interfere with each other. The storage media include but are not limited to USB, SATA, and SD. The storage medium is connected to the computer system via wired or wireless means.

[0045] S3, data transmission backup:

[0046] The computer system scans and collects data information of the files to be backed up according to the results of the pre-analysis. Based on the association relationship between the files in the pre-analysis, the processor starts the timer to transfer the associated file data to the corresponding storage medium.

[0047] When the processor starts the timer, based on the pre-analyzed sum of the sizes of the associated files, if the sum is greater than the remaining capacity of the corresponding storage medium, the timer switches to a storage medium with sufficient remaining capacity, connects it to the computer system, and performs the backup operation. After the timer is started, if the transfer time reaches the timer's preset value but the transfer has not yet ended, the timer trigger signal is ignored to postpone the switching of the storage medium until the file transfer and backup are completed and verified to be correct.

[0048] S4. Data backup records:

[0049] When scanning and collecting files that need to be backed up, record the file name suffix and the specific location in the computer system, and transfer the backup record along with the file to the storage medium for backup;

[0050] When receiving the backup data, the storage medium uploads the backup record to the cloud, wherein the backup record is associated with the corresponding file data location in the storage medium and is also associated with the corresponding storage medium number;

[0051] S5. Data recovery:

[0052] When data is lost or damaged in a computer system, the system searches for data based on the backup records in the cloud at the location where the data is lost or damaged. After retrieving the backup records corresponding to the location of the data lost or damaged, the system displays the storage medium number where the lost or damaged data is backed up and the specific location of the storage medium in the storage medium. The processor then controls the connection between the storage medium with the number and the computer system to perform data recovery.

[0053] During data recovery, based on the normal data names before and after the lost or damaged data in the computer system, the processor retrieves the corresponding backed-up data names in the storage medium and restores the backed-up lost or damaged data between the two data names to the computer system.

[0054] Implementation example:

[0055] Implementation Background: An office server stores important company business data, including customer order documents, financial statements, and project development source code. To ensure data security, the company adopts this data backup and recovery method, using four storage media for data backup. The storage media are four 1TB SATA hard drives, numbered 001, 002, 003, and 004.

[0056] After the enterprise server started the backup program, it identified and analyzed the data to be backed up on the server. It was found that the customer order documents contained multiple subfolders. Each subfolder contained order files from different years and different customers. These order files were related to each other and were considered a complete file group. The financial statements were divided into four independent files by quarter, each independent. The project development source code contained multiple code files and configuration files, which were related to each other to form a file group.

[0057] At the same time, record the size of each file. For example, the total size of the customer order file group is 300GB, the size of a single financial report file is about 50MB, and the size of the project development source code file group is 150GB. Record the file size, structure, and relationship information of these files.

[0058] Connect four 1TB SATA hard drives, numbered 001, 002, 003, and 004, to the server through a connection controller. Set a schedule: connect to SATA hard drive 001 from 9:00 AM to 11:00 AM, connect to SATA hard drive 002 from 11:00 AM to 1:00 PM, connect to SATA hard drive 003 from 1:00 PM to 3:00 PM, and connect to SATA hard drive 004 from 3:00 PM to 5:00 PM. Only one storage medium is connected to the server at any given time, and the storage media operate independently.

[0059] At 9:00, SATA hard drive No. 001 is connected to the server. According to the pre-analysis results, the server begins to scan and collect the customer order file group data. The processor starts the timer. Since the customer order file group size is 300GB, the remaining capacity of SATA hard drive No. 001 is 800GB, which meets the storage requirement. The data is transferred to the hard drive normally.

[0060] At 11:00, SATA hard drive 002 was connected and began backing up financial report data. When transferring the project development source code file group, the file size was 150GB, while SATA hard drive 002 had only 100GB of remaining capacity. The processor determined that the capacity was insufficient based on the pre-analyzed file size sum and immediately switched to SATA hard drive 003, which had sufficient remaining capacity, to continue the backup operation.

[0061] During a backup process, when transferring a project development source code file group, the timer is preset to 1 hour. If the transfer is not completed after 1 hour, the processor ignores the timer trigger signal and continues to use SATA hard drive number 003 to transfer data until the file transfer and backup are completed. After the data integrity verification is completed, the processor normally switches to SATA hard drive number 003 for subsequent backup at 13:00.

[0062] When scanning and collecting files, record the name suffix of each file (such as .docx for order files and .py for source code files) and the specific location on the server (such as D:\Orders\2024\Customer A\Order1.docx). Transfer these backup records along with the files to the storage medium for backup. After receiving the backup data, each storage medium uploads the backup record to the company's dedicated cloud storage. The backup record is associated with the corresponding file data location on the storage medium, and the storage medium number is also recorded (such as SATA hard drive number 001, SATA hard drive number 002, etc.);

[0063] Then, simulating a situation where part of the data in the customer order file group on the server is lost due to a virus attack, the administrator uses a recovery program to search the cloud backup records based on the location of the data loss. After retrieving the backup record corresponding to the lost data, the administrator associates it with the SATA hard drive numbered 001 and displays its specific location on the hard drive. The processor controls the connection between the SATA hard drive numbered 001 and the server. Based on the names of the normal data before and after the lost data in the computer system (such as the adjacent "Customer B Order 202401.docx" and "Customer C Order 202402.docx"), the administrator retrieves the corresponding backup data from the SATA hard drive numbered 001 and restores the lost data between the two data names to the server, completing the data recovery operation.

[0064] Based on the above description, the present invention uses multiple independent storage media, only one of which is connected to the computer at a time. The media are physically isolated and data cannot be communicated with each other. Even if one medium is damaged, the backup data on other media remains intact, avoiding "single point failure". In addition, the use of built-in or fixedly connected storage media (such as SATA hard drives) reduces the need for physical movement and prevents storage media loss.

[0065] By pre-analyzing the file structure and association relationships, it can ensure that all data blocks of a single file are completely stored on the same medium. For cross-file associated data (such as database tables and project engineering files), a group storage strategy can be formulated after analysis to ensure that related files are stored in a centralized manner. During recovery, the logical relationship of the data can be completely restored to avoid association failure caused by decentralized storage. Large files can be stored preferentially on high-capacity media, and small files can be stored on small-capacity media to avoid space waste caused by "large files occupying small media".

[0066] The embodiments of the present invention are presented for purposes of illustration and description and are not intended to be exhaustive or to limit the invention to the disclosed forms. Many modifications and variations will be apparent to those skilled in the art. The embodiments are chosen and described in order to better illustrate the principles of the invention and its practical application and to enable those skilled in the art to understand the invention and design various embodiments with various modifications as suited for specific applications.

Claims

1. A data backup and recovery method, characterized by: The data backup and recovery method comprises the following steps: S1. Pre-analysis of data to be backed up: For data that needs to be backed up in the computer system, first identify and analyze all files to be backed up to ensure the integrity of each file; S2. Connect storage media: A plurality of storage media are connected to the computer system. In step S2, the plurality of storage media are connected to the computer system at a specified time by selecting a corresponding storage medium according to a schedule. Only one storage medium is connected to the computer system at a time. In step S2, the storage media are independently set and do not interfere with each other. S3, data transmission backup: The computer system scans and collects data information from the files to be backed up according to the pre-analysis results. Based on the association relationship between the files analyzed in the pre-analysis, the processor starts a timer to transfer the associated file data to the corresponding storage medium. In step S3, when the processor starts the timer, based on the sum of the sizes of the associated files analyzed in the pre-analysis, if the sum is greater than the remaining capacity of the corresponding storage medium, the timer switches to a storage medium with sufficient remaining capacity, connects it to the computer system, and performs the backup operation. S4. Data backup records: When scanning and collecting files to be backed up, the file name suffix and the specific location in the computer system are recorded, and the backup record is transferred along with the file to the storage medium for backup. In step S4, the storage medium uploads the backup record to the cloud when receiving the backup data, wherein the backup record is associated with the corresponding file data location in the storage medium and is also associated with the corresponding storage medium number; S5. Data recovery: When data is lost or damaged in a computer system, a search is performed based on the backup record information in the cloud at the location where the data is lost or damaged. After the backup record corresponding to the lost or damaged location is retrieved, the storage medium number where the lost or damaged data is backed up and the specific location in the storage medium are displayed in association. The processor then controls the switching of the numbered storage medium to connect with the computer system and performs data recovery.

2. A data backup and recovery method according to claim 1, characterized in that: In step S1, the recognition analysis is used to identify the size, structure, and association relationship information of each file, and all associated files are regarded as a complete file group.

3. The data backup and recovery method according to claim 1, wherein: In step S2, the storage medium includes USB, SATA, and SD, and the storage medium is connected to the computer system via a wired or wireless method.

4. The data backup and recovery method according to claim 1, wherein: In step S3, after the timer is started, if the transmission time reaches the timer preset value but the transmission is not completed, the timer trigger signal is ignored to postpone the switching of the storage medium until the file transfer backup is completed and verified to be correct, and then the storage medium is switched.

5. The data backup and recovery method according to claim 1, wherein: In step S5, when restoring data, based on the normal data names before and after the lost or damaged data in the computer system, the processor retrieves the corresponding backed-up data names in the storage medium, and restores the backed-up lost or damaged data between the two data names to the computer system.

Citation Information

Patent Citations

  • Data backup and recovery method, system, equipment and medium

    CN118132343A

  • Data backup and recovery method and device, storage medium and computer equipment

    CN119105913A