Automated adaptive archiving method and system for file restore after periodic backup to tape

By generating and assembling archive directory sets, the problem of files not being read correctly in traditional tape backups is solved, enabling the restoration of incremental backups to the local file system and automatic adaptation of periodic backups, ensuring the accuracy of file recovery.

CN115480958BActive Publication Date: 2026-02-17INFORMATION2 SOFTWARE SHANGHAI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211251799.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-13
Publication Date
2026-02-17
Estimated Expiration
2042-10-13

AI Technical Summary

Technical Problem

Traditional file backups to tape for regular backups can only be restored using tape dumps, and restoration requires traversing multiple archive paths, which can lead to files not being read correctly.

Method used

Before backup, an archive directory is generated as the starting position identifier. During recovery, the backup result record is read and the archive directory set is assembled. The tape position is automatically adapted, and the correct reading of files is achieved through the generation, reading, parsing and positioning units.

Benefits of technology

It enables incremental backups to be restored to the local file system, and files that are periodically backed up to tape are automatically adapted to the location identifier during restoration to ensure that the files are read correctly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115480958B_ABST
    Figure CN115480958B_ABST
Patent Text Reader

Abstract

The application discloses an automatic adaptation archiving method in file periodic backup to tape recovery, comprising the following steps: S1, before backup, generating an archiving directory for identifying the starting position of the present backup on the tape; S2, when the recovery starts, reading the backup result record, parsing the record of successful backup one by one, from the present backup time point needing recovery to the latest full backup time point; S3, sequentially reading the backup file from the tape, judging whether the file belongs to the present archiving; S4, in S3, if the read file does not belong to the present archiving directory, closing the present session of reading the tape, and reopening a new session to read again. The application focuses on how to automatically adapt the archiving path during the periodic backup, so that the incremental backup can be restored to the local file system, and the file periodically backed up to the tape can automatically adapt the position identification thereof during the recovery, thereby realizing correct reading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer disaster recovery and backup, and more specifically, it relates to an automatic adaptation archiving method and system for restoring files after they have been periodically backed up to tape. Background Technology

[0002] Traditional file backups are based on the operating system's file system. To meet customers' needs for backing up files to tape, an archiving function is provided, which allows customers to back up files to tape during regular backups. However, archiving has two limitations: first, it only applies to regular backups; second, file recovery can only be performed using tape dumps, not the usual file restoration.

[0003] To better meet customer needs, support for using tape as a backup storage device has been added, and the aforementioned limitations have been removed. Based on the characteristics of tape storage, traditionally, reading and writing tapes requires the tape library serial number, tape barcode, tape pool name, tape name, and tape serial number to determine the starting position for reading or writing files on the tape. Of these, only the tape serial number is relatively fixed, and the tape serial number is essentially an auto-incrementing constant variable during recovery. To provide a more user-friendly experience, a creative method has been implemented that maps internal archive paths to tape serial numbers, eliminating the need for customers to concern themselves with this parameter.

[0004] During regular backups, each backup process requires a different archive path (i.e., tape number) to identify a different storage starting location. Because recovery requires traversing all backup files from the full file to the current incremental backup for a complete recovery, regular backup recovery involves multiple archive paths, making it impossible to read files on the tape correctly. Summary of the Invention

[0005] The purpose of this invention is to address the shortcomings of existing technologies by focusing on how to automatically adapt the archive path during periodic backups, so that incremental backups can be restored to the local file system, and files that are periodically backed up to tape can be automatically adapted to their location identifiers during recovery, thereby completing correct reading. The proposed method and system for automatic archive adaptation during the recovery of files that are periodically backed up to tape are as follows.

[0006] To achieve the above objectives, the present invention provides the following technical solution: an automatic adaptation archiving method for restoring files after periodic backup to tape, comprising the following steps:

[0007] S1. Before backup, generate an archive directory to identify the starting position of this backup on the tape, and select the archive directory with the common prefix of the backup files.

[0008] S2. When the recovery begins, read the backup result records, parse the records of successful backups one by one, from the backup time point that needs to be restored to the time point of the most recent full backup, combine the rules issued by the work machine, and construct the set of all archive directories required for this restoration, and save them.

[0009] S3. Read backup files sequentially from the tape and determine whether the file belongs to the current archive.

[0010] S4. In S3, if the file being read does not belong to the current archive directory, the current session for reading the tape is closed, and a new session is opened before reading again.

[0011] Preferably, in S1, the archive directory needs to meet the following characteristics:

[0012] Uniqueness: It is a unique identifier for each backup;

[0013] Reversibility: The archive directory can be restored from the backup result record;

[0014] Ease of tracing: Ideally, one should be able to determine whether a file belongs to the current archive from its absolute path.

[0015] Preferably, in S3, the archive directory is variable, and the current archive directory is set to the archive directory to which the first file belongs when the recovery begins.

[0016] Preferably, in S3, based on the characteristics of magnetic tape storage, before reading the magnetic tape, a session is established, providing the magnetic tape library serial number, magnetic tape barcode, magnetic tape pool name, magnetic tape name, and archive directory to determine the starting position of the magnetic tape. As can be seen from S1, the archive directory is the prefix of the current file. Based on this characteristic, when opening a file, it is determined whether the file belongs to the current archive.

[0017] Preferably, in S4, the read operation steps are as follows:

[0018] S41. Close the current tape reading session;

[0019] S42. Traverse the set of archive directories parsed from S1, matching them with the absolute path of the file as a prefix to find the archive directory of this file;

[0020] S43. Rebuild a new tape session using the searched archive directory, so that the tape can be repositioned and the current file can be read correctly.

[0021] The present invention also provides an automatic adaptation archiving system for the restoration of files after periodic backup to tape, comprising a backup unit, an archive directory generation unit, a reading unit, a parsing unit, a storage unit, a positioning unit, and a processing unit, wherein the backup unit, the archive directory generation unit, the reading unit, the parsing unit, the storage unit, the positioning unit, and the processing unit are connected in sequence.

[0022] Preferably, the backup unit is used to back up files, the archive directory generation unit can generate an archive directory, the archive directory is used to identify the starting position of this backup on the tape, and the archive directory has uniqueness, reversibility and easy searchability.

[0023] Preferably, the reading unit is used to read backup result records and sequentially read backup files from the tape, the parsing unit is used to parse the successfully backed-up records one by one, and splice together all the archive directory sets required for this restoration, and the storage unit can save all the above archive directory sets.

[0024] Preferably, before reading the tape, the positioning unit establishes a session, providing the tape library serial number, tape barcode, tape pool name, tape name, and archive directory to determine the starting position of the tape. The processing unit can process the file read in S3. If the file read does not belong to the current archive directory, the current tape reading session is closed, and a new session is opened before reading again.

[0025] The technical effects and advantages of this invention: The automatic adaptation archiving method for restoring files after periodic backup to tape provided by this invention, compared with the prior art,

[0026] Before backup, this invention generates an archive directory to identify the starting position of the backup on the tape. The archive directory is selected based on the common prefix of the backup files. When recovery begins, the backup result records are read, and each successfully backed-up record is parsed. From the backup time point to be restored to the time point of the most recent full backup, combined with the rules issued by the work machine, a set of all archive directories required for this restoration is constructed and saved. Backup files are read sequentially from the tape, and it is determined whether the file belongs to the current archive. If the read file does not belong to the current archive directory, the current tape reading session is closed, and a new session is opened to read it again. This invention focuses on how to automatically adapt the archive path during periodic backups, so that incremental backups can be restored to the local file system, and files that are periodically backed up to tape can automatically adapt their location identifiers during recovery, thereby completing the correct reading. Attached Figure Description

[0027] Figure 1This is a schematic diagram illustrating the automatic archiving adaptation during the recovery process after the documents of this invention are periodically backed up to tape.

[0028] Figure 2 This is a flowchart of the present invention;

[0029] Figure 3 This is a system block diagram of the present invention. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.

[0031] Please see Figure 1-3 The automatic adaptation archiving method for restoring files after they have been periodically backed up to tape includes the following steps:

[0032] S1. Before backup, generate an archive directory to identify the starting position of this backup on the tape, and select the archive directory with the common prefix of the backup files.

[0033] S2. When the recovery begins, read the backup result records, parse the records of successful backups one by one, from the backup time point that needs to be restored to the time point of the most recent full backup, combine the rules issued by the work machine, and construct the set of all archive directories required for this restoration, and save them.

[0034] S3. Read backup files sequentially from the tape and determine whether the file belongs to the current archive.

[0035] S4. In S3, if the file being read does not belong to the current archive directory, the current session for reading the tape is closed, and a new session is opened before reading again.

[0036] In S1, the archive directory needs to meet the following characteristics:

[0037] Uniqueness: It is a unique identifier for each backup;

[0038] Reversibility: The archive directory can be restored from the backup result record;

[0039] Ease of tracing: Ideally, one should be able to determine whether a file belongs to the current archive from its absolute path.

[0040] In S3, the archive directory is variable; at the start of recovery, the current archive directory is set to the archive directory to which the first file belongs.

[0041] In S3, based on the characteristics of tape storage, a session is established before reading the tape, providing the tape library serial number, tape barcode, tape pool name, tape name, and archive directory to determine the starting position of the tape. As can be seen from S1, the archive directory is the prefix of the current file. Based on this characteristic, when opening a file, it is determined whether the file belongs to the current archive.

[0042] In S4, the steps for rereading are as follows:

[0043] S41. Close the current tape reading session;

[0044] S42. Traverse the set of archive directories parsed from S1, matching them with the absolute path of the file as a prefix to find the archive directory of this file;

[0045] S43. Rebuild a new tape session using the searched archive directory, so that the tape can be repositioned and the current file can be read correctly.

[0046] The present invention also provides an automatic adaptation archiving system for the restoration of files after periodic backup to tape, comprising a backup unit, an archive directory generation unit, a reading unit, a parsing unit, a storage unit, a positioning unit, and a processing unit, wherein the backup unit, the archive directory generation unit, the reading unit, the parsing unit, the storage unit, the positioning unit, and the processing unit are connected in sequence.

[0047] The backup unit is used to back up files, and the archive directory generation unit can generate an archive directory. The archive directory is used to identify the starting position of this backup on the tape. The archive directory has uniqueness, reversibility and easy searchability.

[0048] The reading unit is used to read backup result records and sequentially read backup files from the tape. The parsing unit is used to parse each successfully backed-up record and assemble all the archive directories required for this restoration. The storage unit can save all the above archive directory sets.

[0049] Before reading the tape, the positioning unit establishes a session, providing the tape library serial number, tape barcode, tape pool name, tape name, and archive directory to determine the starting position of the tape. The processing unit can process the file read in S3. If the file read does not belong to the current archive directory, the current tape reading session is closed, and a new session is opened before reading again.

[0050] In summary, before backup, this invention generates an archive directory to identify the starting position of the backup on the tape, and selects the archive directory based on the common prefix of the backup files. When recovery begins, the backup result records are read, and each successfully backed-up record is parsed. From the backup time point to be restored to the time point of the most recent full backup, combined with the rules issued by the work unit, a set of all archive directories required for this restoration is constructed and saved. Backup files are read sequentially from the tape, and it is determined whether the file belongs to the current archive. In S3, if the read file does not belong to the current archive directory, the current tape reading session is closed, and a new session is opened for reading.

[0051] Previously, regularly backed-up files could only be restored through tape dumps. Before reading files from tape, tape serial number information was required to identify the starting position of the backup file. This invention focuses on how to automatically adapt the archive path during regularly backed-up, so that incremental backups can be restored to the local file system. Files that are regularly backed up to tape can automatically adapt their location identifier during restoration, thereby completing the correct reading.

[0052] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An automatic adaptation archiving method for restoring files after periodic backup to tape, characterized by: Includes the following steps: S1. Before backup, generate an archive directory to identify the starting position of this backup on the tape, and select the archive directory with the common prefix of the backup files. S2. When the recovery begins, read the backup result records, parse the records of successful backups one by one, from the backup time point that needs to be restored to the time point of the most recent full backup, combine the rules issued by the work machine, and construct the set of all archive directories required for this restoration, and save them. S3. Read backup files sequentially from the tape and determine whether the file belongs to the current archive. S4. In S3, if the file being read does not belong to the current archive directory, then close the current tape reading session and open a new session to read it again. In step S4, the re-reading operation steps are as follows: S41. Close the current tape reading session; S42. Traverse the set of archive directories parsed from S2, matching them with the absolute path of the file as a prefix to find the archive directory of this file; S43. Rebuild a new tape session using the searched archive directory, so that the tape can be repositioned and the current file can be read correctly.

2. The automatic adaptation archiving method for restoring files after periodic backup to tape as described in claim 1, characterized in that: In S1, the archive directory needs to meet the following characteristics: Uniqueness: It is a unique identifier for each backup; Reversibility: The archive directory can be restored from the backup result record; Ease of tracing: Ideally, one should be able to determine whether a file belongs to the current archive from its absolute path.

3. The automatic adaptation archiving method for restoring files after periodic backup to tape as described in claim 1, characterized in that: In S3, the archive directory is variable; at the start of recovery, the current archive directory is set to the archive directory to which the first file belongs.

4. The automatic adaptation archiving method for restoring files after periodic backup to tape as described in claim 1, characterized in that: In S3, based on the characteristics of tape storage, a session is established before reading the tape, providing the tape library serial number, tape barcode, tape pool name, tape name, and archive directory to determine the starting position of the tape. As can be seen from S1, the archive directory is the prefix of the current file. Based on this characteristic, when opening a file, it is determined whether the file belongs to the current archive.

5. An automatic adaptation archiving system for restoring files after periodic backup to tape, based on the automatic adaptation archiving method for restoring files after periodic backup to tape according to any one of claims 1-4, characterized in that: It includes a backup unit, an archive directory generation unit, a reading unit, a parsing unit, a storage unit, a positioning unit, and a processing unit, which are connected in sequence. The backup unit is used to back up files, and the archive directory generation unit can generate an archive directory. The archive directory is used to identify the starting position of this backup on the tape. The archive directory has uniqueness, reversibility and easy searchability. The reading unit is used to read backup result records and sequentially read backup files from the tape. The parsing unit is used to parse the successfully backed-up records one by one and piece together all the archive directory sets required for this restoration. The storage unit can save all the above archive directory sets. Before reading the tape, the positioning unit establishes a session, providing the tape library serial number, tape barcode, tape pool name, tape name, and archive directory to determine the starting position of the tape. The processing unit can process the read file. If the read file does not belong to the current archive directory, the current tape reading session is closed, and a new session is opened before reading again.

Citation Information

Patent Citations

  • Database backup and recovery method, apparatus and system

    CN105446828A

  • Backup file recovery method, backup file recovery device and storage medium

    CN111078470A