Cold archive management method and system for database point-in-time recovery
By parsing database recovery semantic information to generate candidate recoverable time windows and mapping them to cold archive packages, the problem of cold archive systems being unable to determine the integrity of recovery at the target time point is solved, enabling precise cold archive management and reducing the risk of data being unrecoverable.
Patent Information
- Application Number
- CN202611392132.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-09
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2046-09-09
AI Technical Summary
Existing cold archiving systems cannot determine whether a specified target time meets the conditions for complete recovery, and it is difficult to predict the impact of operations such as migration or deletion on the recoverable time window, leading to the risk of data being unrecoverable.
By acquiring the repository object stream of the database backup and recovery tool, parsing the database recovery semantic information, generating candidate recoverable time windows, and using these as boundaries to map the repository object set to cold archive packages, performing verification and index generation, simulating the impact of lifecycle operations, and outputting operation decisions.
The cold archiving system enables precise management of recovery semantics without modifying the database backup and recovery tool repository format, reducing the risk of unrecoverable point-in-time recovery due to accidental deletion or migration, and improving the system's reliability and maintainability.
Smart Images

Figure CN122903377B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a cold archive management method and system for database point-in-time recovery. Background Technology
[0002] In the field of database backup and recovery, relational databases typically use a basic backup plus write-ahead log approach to achieve point-in-time recovery. The accompanying database backup and recovery tools can uniformly manage backup metadata, archive write-ahead logs, backup lists and recovery configurations, and also support storing the entire backup repository to backend media.
[0003] For business scenarios involving long-term backup data retention, various objects within the backup repository often need to be migrated from hot storage to cold media such as object storage tiers, deep archive storage, and tape libraries to reduce storage costs. Currently, mainstream cold archiving systems use individual storage objects, object prefixes, backup sets, archive packages, or lifecycle rules as management units, and their management granularity does not match the semantic requirements of database point-in-time recovery. Specifically, whether a database can be recovered to a specific target time depends on a complex combination of information such as the base backup, backup dependency chain, timeline history, write-ahead log segment continuity, log sequence number range, and recovery time. Cold archiving systems lack the ability to perceive these recovery semantics. This results in two problems: firstly, even if a cold archiving system stores several backup objects, it cannot determine whether data at a specific target time is completely recoverable; secondly, when performing migration, deletion, deep archiving, or package rewriting operations, it is impossible to pre-assess which recoverable time intervals will be damaged by the operation. Summary of the Invention
[0004] The main purpose of this application is to provide a cold archive management method and system for database point-in-time recovery, which solves the technical problems of existing cold archive systems that make it difficult to determine whether a specified target time has the conditions for complete recovery and that it is difficult to predict the impact of operations such as migration or deletion on the recoverable time window.
[0005] To achieve the above objectives, this application proposes a cold archive management method for database point-in-time recovery, the method comprising: Obtain the repository object stream for the database backup and recovery tool; Database recovery semantic information is parsed from the repository object stream; Based on the database recovery semantic information, a candidate recoverable time window for database point-in-time recovery is generated; Determine the set of warehouse objects required within the candidate recoverable time window, and map the objects in the set of warehouse objects to the cold archive package using the candidate recoverable time window as the boundary of the cold archive package; The set of warehouse objects for the candidate recoverable time window is validated, and the index information associated with the cold archive package is generated after the validation is passed. Based on the index information, a counterfactual continuity and recall pre-check is performed on the triggered lifecycle operations, and an operation decision is output based on the pre-check results.
[0006] In one embodiment, the repository object stream includes at least one of the following: backup information file, archive information file, basic backup tags, backup list, write-ahead log archive object key, and timeline history file; the step of parsing database recovery semantic information from the repository object stream includes: At least one of the following is parsed from the repository object stream: database system identifier, backup namespace, basic backup tag, backup dependency chain, basic backup end log sequence number, basic backup end time, write-ahead log segment key, timeline identifier, and timeline history summary, as the database recovery semantic information.
[0007] In one embodiment, generating candidate recoverable time windows for database point-in-time recovery based on the database recovery semantic information includes: Perform a continuity check operation based on the database recovery semantic information to obtain the continuity of the write-ahead log segments and the continuity of the log sequence numbers; Based on the basic backup end log sequence number, the backup dependency chain, the timeline history summary, the continuity of the write-ahead log segment, and the continuity of the log sequence number, a candidate recoverable time window for the database point-in-time recovery is generated. The starting point of the candidate recoverable time window is determined based on the basic backup end log sequence number, the basic backup end time, and the first write-ahead log segment after the basic backup; the ending point of the candidate recoverable time window is determined based on the last write-ahead log segment that passes continuity verification on the same timeline or based on the switch log sequence number and switch time in the timeline history file.
[0008] In one embodiment, the step of performing a counterfactual continuity and recall pre-check on the triggered lifecycle operation based on the index information, and outputting an operation decision based on the pre-check result, includes: Based on the index information, a counterfactual continuity and recall pre-check is performed on the lifecycle operation to obtain the continuity and recall status of the affected time window set. Based on the continuity and recall status of the affected time window set, an operational decision is determined; The lifecycle operations include at least one of lifecycle switching, deletion, deep archiving, archive migration, and archive rewriting.
[0009] In one embodiment, after performing counterfactual continuity and recall pre-checks on lifecycle operations based on the index information, the method further includes: Record at least one of the following after the pre-check operation: the set of missing write-ahead log segments, the reason for the timeline interruption, the necessary archive recall status, and the alternative lifecycle plan.
[0010] In one embodiment, the index information includes a time window index, an archive package index, and a recall index; the step of validating the set of warehouse objects for the candidate recoverable time windows, and generating the index information associated with the cold archive package after the validation passes, includes: Perform continuity and integrity checks on the set of warehouse objects within the candidate recoverable time window; If both continuity and integrity checks pass, then a time window index, an archive index, and a recall index are generated. The time window index includes at least one of the following: database system identifier, backup namespace, basic backup label, backup dependency chain, timeline identifier, timeline history summary, start write-ahead log segment, end write-ahead log segment, start log sequence number, end log sequence number, recovery start time, recovery end time, repository object set, archive package set, cold media location set, continuity status, recall status, and index generation. The archive package index includes at least one of the following: archive package identifier, original object key corresponding to the object in the repository object set, offset, length, check value, compression status, encryption status, and cold media location; The recallability index is used to record the recall status of the cold archive package.
[0011] In one embodiment, after performing continuity and integrity checks on the set of warehouse objects for the candidate recoverable time windows, the method further includes: If the continuity check fails or the integrity check fails, the candidate recoverable time window is marked as unrecoverable and breakpoint information is output. The breakpoint information includes at least one of the following: missing object key, missing write-ahead log segment, checksum abnormal object, reason for inconsistency in timeline history summary, log sequence number break interval, affected recovery time interval, and repair prompt for rescanning or rebuilding archive package.
[0012] In one embodiment, determining the required set of warehouse objects within the candidate recoverable time window, and mapping the objects in the set of warehouse objects to the cold archive using the candidate recoverable time window as the boundary of the cold archive, includes: At least one of the following is taken as the set of repository objects required within the candidate recoverable time window: the basic backup object, dependent backup object, backup list object, write-ahead log segment object, timeline history file, and metadata object required for the recovery semantics of the database backup and recovery tool. Using the candidate recoverable time window as the boundary of the cold archive package, the objects in the repository object set are mapped to the cold archive package to establish a mapping relationship between the archive package identifier, offset, length, and check value of the object and the cold archive package.
[0013] In one embodiment, it further includes: When the repository metadata version changes, the cold archive is rewritten, or the preset lifecycle strategy changes in the database backup and recovery tool, a new index generation is generated.
[0014] Furthermore, to achieve the above objectives, this application also proposes a cold archiving management system for database point-in-time recovery, the cold archiving management system for database point-in-time recovery comprising: The acquisition module is used to acquire the repository object stream of the database backup and recovery tool; The parsing module is used to parse database recovery semantic information from the repository object stream; The time window generation module is used to generate candidate recoverable time windows for database time point recovery based on the database recovery semantic information. The cold archive generation module is used to determine the set of warehouse objects required within the candidate recoverable time window, and to map the objects in the set of warehouse objects to the cold archive using the candidate recoverable time window as the boundary of the cold archive; The index generation module is used to verify the set of warehouse objects for the candidate recoverable time window, and generate the index information associated with the cold archive package after the verification is passed. The pre-inspection module is used to perform counterfactual continuity and recall pre-inspection on the triggered lifecycle operations based on the index information, and output operation decisions based on the pre-inspection results.
[0015] Furthermore, to achieve the above objectives, this application also proposes a cold archive management device for database point-in-time recovery, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the cold archive management method for database point-in-time recovery as described above.
[0016] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the cold archive management method for database point-in-time recovery as described above.
[0017] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the cold archive management method for database point-in-time recovery as described above.
[0018] This application provides a cold archive management method and system for database point-in-time recovery. The method includes: acquiring a repository object stream of a database backup and recovery tool; parsing database recovery semantic information from the repository object stream; generating candidate recoverable time windows for database point-in-time recovery based on the database recovery semantic information; determining the required set of repository objects within the candidate recoverable time windows, and mapping objects in the repository object set to cold archive packages using the candidate recoverable time windows as the boundaries of the cold archive packages; validating the repository object set of the candidate recoverable time windows, and generating index information associated with the cold archive packages after successful validation; performing counterfactual continuity and recall pre-checks on triggered lifecycle operations based on the index information, and outputting operation decisions based on the pre-check results. This application no longer uses ordinary storage objects, object prefixes, backup sets, or lifecycle rules as boundaries for recovery integrity judgment. Instead, it uses the recoverable time window of relational database point-in-time recovery as the boundary of cold archive packages. By using index information, it associates information such as repository object sets and archive packages. The cold archive system can complete verification and archive management without modifying the repository format of the database backup and recovery tool. In addition, before the execution of lifecycle operations, it performs counterfactual continuity and recall pre-checks on the triggered lifecycle operations based on index information. Based on the pre-check results, it outputs operation decisions, thereby reducing the risk of point-in-time recovery being unrecoverable due to accidental deletion, accidental migration, or deep archiving. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A flowchart illustrating an embodiment of the cold archive management method for database point-in-time recovery in this application; Figure 2 This is a schematic diagram of an index information structure provided in an embodiment of this application; Figure 3 This is a schematic diagram of a pre-inspection process provided in an embodiment of this application; Figure 4 This is a schematic diagram of the module structure of a cold archiving management system for database point-in-time recovery, as described in an embodiment of this application. Figure 5 This is a schematic diagram of the hardware operating environment involved in the cold archiving management method for database point-in-time recovery in this application embodiment.
[0022] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0023] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0024] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0025] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone; or an electronic device, big data service platform, or cold archive management system for database point-in-time recovery capable of the above functions. The following description uses a cold archive management system for database point-in-time recovery as an example to illustrate this embodiment and the subsequent embodiments.
[0026] In relational database backup and recovery scenarios, whether a target recovery time is achievable does not depend on the existence of a particular object or a few objects, but rather on whether the base backup, backup dependency chain, write-ahead log segment continuity, timeline historical consistency, and log sequence number range meet the recovery requirements. If a cold archiving system performs lifecycle management solely based on object age, object prefix, or backup set name, it may result in the database backup and recovery tool's repository objects, while formally existing, failing to piece together a complete recoverable time range, or discovering after lifecycle operations that some target recovery times are actually unrecoverable.
[0027] This application embodiment constructs a recoverable time window for point-in-time recovery from the repository metadata and write-ahead log archive objects of the database backup and recovery tool, and uses this time window as the boundary and index unit of the cold archive package. This enables the cold archive control plane to perform fine-grained management directly around the recovery semantics of the relational database, reducing the risk of data unrecoverability caused by mismatch between management granularity and recovery semantics.
[0028] Based on this, the embodiments of this application provide a cold archiving management method for database point-in-time recovery, referring to... Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the cold archive management method for database point-in-time recovery provided in this application.
[0029] Step S11: Obtain the repository object stream of the database backup and recovery tool; It should be noted that database backup and recovery tools are specialized tools used to perform backup, recovery, and archiving management of relational databases. They can manage backup metadata, archive write-ahead logs, backup lists, and recovery configurations.
[0030] It should be noted that the repository object stream refers to the collection of metadata objects, backup objects, and write-ahead log archive objects read from the database backup and recovery tool repository. This repository object stream can come from online object storage, file system repository, read-only repository snapshot, or repository scan results awaiting cold archiving.
[0031] In addition, the repository object stream includes backup information files, archive information files, basic backup tags, backup lists, write-ahead log archive object keys, and timeline history files. Backup information files record backup sets and their metadata, including backup type, backup tags, backup start and end times, backup start and end log sequence numbers, and backup dependencies. Archive information files record write-ahead log archive-related metadata, including archive identifiers and archive log sequence number ranges. Basic backup tags uniquely identify a basic backup, which can serve as the starting point for point-in-time recovery. Backup lists record a list of objects included in a backup and verification information for each object, used for subsequent verification of the integrity and consistency of backup objects. Write-ahead log archive object keys are unique identifiers for archived write-ahead log segments in object storage, used to locate and retrieve specified write-ahead log segments. Timeline history files record metadata about database timeline forks and switches, including parent timeline identifiers, child timeline identifiers, switch log sequence numbers, switch times, and timeline history summaries.
[0032] In this embodiment, the method for obtaining the repository object stream can be implemented in various ways depending on the deployment environment. For example, collection can be performed according to the backup namespace dimension, that is, only the repository object stream under the specified backup namespace is obtained. Collection can be performed together according to the database system identifier, timeline identifier, and repository metadata version to avoid erroneous merging of objects from different database instances or different repository generations. Alternatively, the object stream that has changed since the last collection can be obtained, i.e., an incremental acquisition method, to improve collection efficiency.
[0033] Step S12: Parse the database recovery semantic information from the warehouse object stream; It should be noted that database recovery semantic information includes the database system identifier, backup namespace, base backup label, backup dependency chain, base backup end log sequence number, base backup end time, write-ahead log segment key, timeline identifier, and timeline history summary. The database system identifier is the identification information used to uniquely distinguish different relational database clusters. The backup namespace is the namespace used in database backup and recovery tools to distinguish different backup domains. The backup dependency chain is the information used to determine the dependency relationship between differential or incremental backups and the base backup; through this dependency chain, one can trace the full backup and all intermediate incremental backups that an incremental backup depends on. The base backup end log sequence number is the log sequence number corresponding to the end of the base backup, used to define the starting point of the recoverable time window. The base backup end time is the timestamp corresponding to the end of the base backup, used together with the log sequence number to define the time dimension of the starting point of the recoverable time window. The write-ahead log segment key is the unique identifier of the write-ahead log segment in the backup repository, used to determine the storage location and range of the write-ahead log segment. The timeline identifier is the identification information used to distinguish different database timelines, used to determine the log playback path. A timeline history summary is a summary value obtained by hashing or verifying the content of a timeline history file. It is used to verify whether the content of the timeline history file has been replaced, omitted, or tampered with.
[0034] In one embodiment, information such as database system identifier, backup tag, backup type, previous backup, reference backup, backup start log sequence number, backup end log sequence number, backup start time, and backup end time is obtained by reading the backup information file. For example, the following information is parsed from the backup information file: Database System Identifier = 1, Database System Identifier = 7389123456789012345, Database Version = 15, Backup Tag = 20260513-010000F_20260513-013000I, Backup Type = Incremental, Previous Backup = 20260512-010000F, Reference Backup = 20260512-010000F, Backup Start Log Sequence Number = 0 / 70000028, Backup End Log Sequence Number = 0 / 7A0000F0, Backup Start Time = 2026-05-13 01:00:00+08, Backup End Time = 2026-05-13 01:30:00+08. Among them, backup labels are mapped to base backup labels, previous backups and reference backups together form a backup dependency chain, and backup termination log sequence number and backup end time are used to determine the starting point of the recoverable time window.
[0035] Furthermore, information such as the archive identifier and archived log sequence number range can be obtained by reading the archive information file; for example, the archive information file can be parsed to obtain archive identifier = 15-1 and archived log sequence number range from 000000010000000000000070 to 00000001000000000000007A. Information such as timeline number, log number, segment number, and compressed extension information can be obtained by reading the write-ahead log archive object key; the write-ahead log archive object key can be archive / db / 15-1 / 0000000100000000 / 00000001000000000000070- <hash>The files are in .gz format. Additionally, by reading the backup manifest, information such as the backup manifest version, backup tags, file paths, file sizes, and file checksums can be obtained. Furthermore, by reading the timeline history file, information such as the parent timeline identifier, child timeline identifier, switch log sequence number, switch time, and timeline history summary can be obtained.
[0036] Step S13: Based on the database recovery semantic information, generate candidate recoverable time windows for database point-in-time recovery; It should be noted that the candidate recoverable time window for database point-in-time recovery refers to the recovery interval that initially meets the point-in-time recovery conditions at the warehouse metadata level. This candidate recoverable time window is a continuous time interval determined based on the basic backup, the backup dependency chain of the basic backup, the corresponding timeline history, continuous write-ahead log segments, log sequence number intervals, and time intervals. Specifically, the starting point of the candidate recoverable time window is not determined based on the start time of the basic backup, but rather on the end log sequence number of the basic backup, the end time of the basic backup, and the first write-ahead log segment after the basic backup, ensuring that write-ahead logs can be continuously replayed from this starting point. The ending point of the candidate recoverable time window is determined based on the last write-ahead log segment that passes continuity verification on the same timeline, or based on the switch log sequence number and switch time in the timeline history file, ensuring that all write-ahead log segments up to this ending point meet the continuity requirements.
[0037] Optionally, a continuity check is performed based on the parameters in the recovery semantic information to confirm that the write-ahead log segments meet the continuity requirements at both the file level and the content level; based on the log sequence number and write-ahead log segments that pass the continuity check, combined with the backup information file and the timeline history file, a candidate recoverable time window with clear start and end boundaries is generated.
[0038] In addition, as another optional implementation, when a timeline switch occurs, the candidate recoverable time window can be split into multiple sub-time windows based on the parent timeline, child timelines, and switch points recorded in the timeline history file, or the verified status across timelines can be recorded in the same time window index entry. Specifically: if the switch log sequence number in the timeline history file is within the interval formed by the start log sequence number and the end log sequence number of the candidate recoverable time window, then the candidate recoverable time window is split into a parent timeline sub-window and a child timeline sub-window. The parent timeline sub-window records information such as the timeline identifier being the parent timeline identifier, the end log sequence number being the switch log sequence number, and the recovery termination time being the switch time. The child timeline sub-window records information such as the timeline identifier being the child timeline identifier, the start log sequence number being the switch log sequence number, and the recovery start time being the switch time. In addition, if the switch log sequence number is located inside the write-ahead log segment, the write-ahead log segment is included in the repository object collection of both child windows at the same time, and the shared switch write-ahead log segment = true is recorded in the time window index; the continuity status is marked as verified across timelines only when both the parent timeline and the child timeline pass the verification of write-ahead log continuity, timeline history consistency and log sequence number continuity.
[0039] In one feasible embodiment, step S13 includes: Step S131: Perform a continuity check operation based on the database recovery semantic information to obtain the continuity of the write-ahead log segment and the continuity of the log sequence number; It should be noted that the continuity check operation refers to the process of verifying the continuity of file numbering and log sequence number content of write-ahead log segments. Write-ahead log segment continuity refers to whether the file numbers of the write-ahead log segments are consecutive and whether there are any skipped numbers; this is a file-level continuity check. Log sequence number continuity refers to whether the log sequence number intervals recorded within each write-ahead log segment are consecutive and whether there are any overlaps or gaps; this is a content-level continuity check.
[0040] In one embodiment, the segment number of each write-ahead log segment is extracted according to the naming rules of the write-ahead log segment key. The segment number is checked to see if it increases sequentially as expected. If a skipped number exists, the write-ahead log segment continuity check is deemed to have failed. Simultaneously, the start and end log sequence numbers within each write-ahead log segment are read. The end log sequence number of the previous segment and the start log sequence number of the next segment are checked to see if they satisfy a head-to-tail connection. If not, the log sequence number continuity check is deemed to have failed.
[0041] Step S132: Based on the basic backup end log sequence number, the backup dependency chain, the timeline history summary, the continuity of the write-ahead log segment, and the continuity of the log sequence number, generate a candidate recoverable time window for the database point-in-time recovery.
[0042] It should be noted that the generation of candidate recoverable time windows refers to combining the validated continuous write-ahead log segment intervals with basic backup information, backup dependency chain information, and timeline history information after the continuity verification passes, to form a recoverable time interval with clearly defined start and end boundaries. Specifically, the basic backup end log sequence number is used to determine the log sequence number dimension of the start point of the recoverable time window; the basic backup end time is used to determine the time dimension of the start point of the recoverable time window; the backup dependency chain is used to determine the complete backup chain on which the candidate recoverable time window depends; the timeline history summary is used to associate with the corresponding timeline history file and ensure timeline consistency; the continuity of write-ahead log segments ensures that all write-ahead log segments from the start point to the end point are complete at the file level; and the continuity of log sequence numbers ensures that all write-ahead log segments can be continuously replayed at the content level. The start point of the candidate recoverable time window is determined based on the basic backup end log sequence number, the basic backup end time, and the first write-ahead log segment after the basic backup; the end point of the candidate recoverable time window is determined based on the last write-ahead log segment that passes the continuity verification on the same timeline or based on the switch log sequence number and switch time in the timeline history file.
[0043] In this embodiment, the starting point of the candidate recoverable time window can be determined as follows: using the log sequence number of the basic backup end log as the starting point boundary, the time boundary of the basic backup end time as the starting point boundary, and the first write-ahead log segment after the basic backup as the starting file boundary for log playback, to determine the precise starting point of the candidate recoverable time window. The ending point of the candidate recoverable time window can be determined as follows: if there is no timeline switching within the candidate recoverable time window, the ending point is the end position of the last write-ahead log segment that passes continuity verification on the same timeline; if there is timeline switching within the candidate recoverable time window, the ending point is the switching log sequence number and switching time recorded in the timeline history file, and the candidate recoverable time window is split into a parent timeline sub-window and a child timeline sub-window.
[0044] For example, the basic backup end log sequence number = 0 / 7A0000F0, backup dependency chain = 20260512-010000F→20260513-010000F, timeline history summary = sha256:a3f8c2d1e0, the write-ahead log segment key list, and the log sequence number range information are checked for continuity. The system checks that the write-ahead log segment numbers are consecutive without skipping numbers from 000000010000000000000070 to 00000001000000000000007A, that the beginning and end of the log sequence number ranges of each segment are not overlapping, and that the timeline history summary is consistent with the content of the currently read timeline history file. After successful verification, the system generates a candidate recoverable time window W-001. The starting point of this time window is the basic backup end log sequence number 0 / 7A0000F0, the basic backup end time 2026-05-13 01:30:00+08, and the first write-ahead log segment 000000010000000000000070 after the basic backup. The ending point is the end position of the last write-ahead log segment 00000001000000000000007A that passed the continuity verification. The corresponding timeline identifier is 1.
[0045] Step S14: Determine the set of warehouse objects required within the candidate recoverable time window, and map the objects in the set of warehouse objects to the cold archive package using the candidate recoverable time window as the boundary of the cold archive package; It should be noted that the repository object set refers to the collection of all repository objects required by the database backup and recovery tool to perform point-in-time recovery within the candidate recoverable time window. This includes the base backup object, dependent backup objects, backup manifest objects, write-ahead log segment objects, timeline history files, and metadata objects required by the database backup and recovery tool for recovery semantics, corresponding to that candidate recoverable time window. The base backup object refers to the data files contained in the base backup that serves as the starting point for point-in-time recovery. Dependent backup objects refer to the data files contained in the parent backup on which the base backup depends, as well as all intermediate incremental backups, used to ensure the integrity of the backup dependency chain. The backup manifest object is a manifest file that records the list of objects contained in the backup and verification information. The write-ahead log segment object is a write-ahead log segment file that covers the log sequence number range from the start to the end of the candidate recoverable time window. The timeline history file is a metadata file that records the history of timeline forks and switches. The metadata objects required by the database backup and recovery tool for recovery semantics refer to other metadata files required by the database backup and recovery tool during recovery operations, in addition to the objects mentioned above.
[0046] In this embodiment, the base backup object, dependent backup objects, backup manifest object, write-ahead log segment object covering the log sequence number range of the candidate recoverable time window, all timeline history files involved in the timeline identifier corresponding to the time window, and other metadata objects required for recovery are included in the repository object set. Then, using the candidate recoverable time window as the boundary of the cold archive package, all repository objects it depends on are mapped to the cold archive package, and a mapping relationship is established between the object and the archive package identifier, offset, length, and checksum of the cold archive package. Mapping to the cold archive package means writing or associating objects from the repository object set to the corresponding positions in the cold archive package, and recording the physical location information and integrity check information of the object in the cold archive package. By binding the cold archive package boundary to the candidate recoverable time window, one cold archive package or a group of cold archive packages corresponds to a recoverable time interval, rather than just an object prefix or a normal lifecycle directory.
[0047] This embodiment uses candidate recoverable time windows as the boundaries of cold archive packages, mapping the set of warehouse objects belonging to the same recoverable time window to the cold archive package. This aligns the management granularity of the cold archive package with the semantics of database recovery. When archiving, the cold archive system can clearly identify which recoverable time interval each cold archive package serves, effectively solving the technical problem that traditional cold archive systems cannot determine whether the target recovery time is complete and recoverable even if several backup objects are saved.
[0048] Step S15: Verify the set of warehouse objects for the candidate recoverable time window, and generate the index information associated with the cold archive package after the verification is passed; Reference Figure 2 , Figure 2 This is a schematic diagram of the index information structure provided in an embodiment of this application. The index information includes a time window index, an archive package index, and a recall index. The time window index records the mapping relationship between recoverable time windows and the repository object set, the cold archive package set, the cold media location, and the recall status. The archive package index records the mapping relationship between the object key of the original database backup and recovery tool and the offset within the cold archive package. The recall index records the recall status of the cold archive package, including online, offline, in the process of recall, temporary online deadline, failed, missing, and policy blocking, etc. The three types of indexes can be stored in the same index database, or they can be stored separately and associated with the time window identifier, archive package identifier, and repository metadata version of the candidate recoverable time window.
[0049] It should be noted that the time window index includes the database system identifier, backup namespace, base backup label, backup dependency chain, timeline identifier, timeline history summary, start write-ahead log segment, end write-ahead log segment, start log sequence number, end log sequence number, recovery start time, recovery end time, repository object set, archive set, cold media location set, continuity status, recall status, and index generation; the index generation refers to the version identifier information of the index information. It should also be noted that the archive set index includes the archive set identifier, the original object key corresponding to the object in the repository object set, offset, length, checksum, compression status, encryption status, and cold media location. The recall index includes the archive set identifier, status, cold media location, temporary online deadline, recall task identifier, and most recent error code. The archive set in the time window index and the archive set identifier in the archive set index form a many-to-many relationship. The cold media location in the archive set index and the cold media location in the recall index are used together to locate the object storage cold layer, deep archive object version, or other cold media location. For example, a time window index can be mapped to the time window_index of the object storage bypass metadata table, an archive package index can be mapped to the archive package_index, and a recallability index can be mapped to the recallability_index. The time window index.archive package set is associated with the archive package_index.archive package_id, and the archive package index.cold media location and the recallability_index.cold media location together indicate the object storage cold tier, deep archive object version, or other cold media location.
[0050] In this embodiment, the set of repository objects for candidate recoverable time windows undergoes continuity and integrity checks. Optionally, the continuity check may include: extracting the segment number of each pre-written log segment according to the naming rules of the pre-written log segment key, and checking whether the segment number is continuously increasing; reading the start log sequence number and end log sequence number within each pre-written log segment, and checking whether the end log sequence number of the previous segment and the start log sequence number of the next segment satisfy the head-to-tail connection relationship; and verifying whether the content of the currently read timeline history file is consistent with the record based on the timeline history summary. The integrity check may include: traversing each object in the repository object set, searching for the mapping record corresponding to the original object key of the object in the cold archive, and verifying whether the object exists. If both the continuity and integrity checks pass, a time window index, an archive index, and a recall index are generated. Furthermore, if the continuity check or integrity check fails, the candidate recoverable time window is marked as unrecoverable, and breakpoint information is output. The breakpoint information includes at least the missing object key, missing write-ahead log segment, object with abnormal check value, reason for inconsistency in timeline historical summary, log sequence number break interval, affected recovery time interval, and repair prompts for rescanning or rebuilding the archive package. This can prevent the cold archiving system from exposing the error to the outside world and restore its recoverability, and can guide operation and maintenance personnel to locate and repair problems.
[0051] It should be noted that an error code will be output when verification fails, precisely identifying the type and reason for the failure. Each error code carries a timestamp, archive package identifier, object key, and affected time window set. Optionally, when write-ahead logs are missing, the error context includes the time window identifier, expected write-ahead log segment, previous write-ahead log segment, and affected recovery time interval; when checksums do not match, the error context includes the object key, expected checksum, actual checksum, and archive package identifier; when timeline history is inconsistent, the error context includes the timeline identifier, expected summary, actual summary, and switch log sequence number; when cold media recall fails, the error context includes the archive package identifier, cold media location, recall task identifier, and suggested retry time, thus providing operations and maintenance personnel with accurate fault location information.
[0052] This embodiment ensures that only recoverable time windows that pass dual verification can be marked as recoverable by performing continuity and integrity checks on the collection of warehouse objects for candidate recoverable time windows before index generation. At the same time, by outputting detailed breakpoint information when verification fails, it provides precise fault location and repair guidance for operation and maintenance personnel, thereby improving the maintainability and reliability of the cold archiving system.
[0053] Step S16: Based on the index information, perform counterfactual continuity and recall pre-checks on the triggered lifecycle operations, and output operation decisions based on the pre-check results.
[0054] It should be noted that, referring to Figure 3 , Figure 3 This is a schematic diagram of a pre-inspection process provided in an embodiment of this application. Lifecycle operations refer to management operations performed on cold archive packages triggered by storage system lifecycle policies or initiated by administrators. Lifecycle operations include lifecycle switching, deletion, deep archiving, archive package migration, and archive package rewriting. Optionally, lifecycle switching refers to the operation of switching a cold archive package from one storage tier to another, for example, switching from standard cold storage to deep archive storage. Deletion refers to the operation of removing a specified cold archive package from the cold archive system. Deep archiving refers to the operation of migrating a cold archive package from the current storage medium to a deeper archive tier. Archive package migration refers to the operation of migrating a cold archive package from one cold media location to another, for example, migrating from an object storage cold tier to a tape library. Archive package rewriting refers to the operation of regenerating a cold archive package.
[0055] It should be noted that counterfactual continuity and recall pre-checks refer to applying the impact of a lifecycle operation on cold archives, cold media locations, and recall status to index information without actually executing the lifecycle operation, and predicting the impact after the operation is executed through simulation calculations. The affected time window set refers to the set of recoverable time windows where the continuity or recall status will change after a certain lifecycle operation is executed. Operation decisions refer to the operational handling opinions output by the pre-check results, including allow, deny, split, delay, or reschedule. Allow means the pre-check results show that the lifecycle operation will not disrupt the continuity or recall status of any recoverable time windows, and the operation can continue. Deny means the pre-check results show that the lifecycle operation will disrupt the continuity or recall status of some recoverable time windows, and therefore prohibits the operation. Split means the pre-check results show that some cold archives involved in the lifecycle operation will affect some recoverable time windows, but other cold archives will not be affected; the operation can be split and only the safe part executed. Delay means the pre-check results show that executing the operation now will affect some recoverable time windows, and it is recommended to delay execution. Rescheduling means that the pre-inspection results show that the current operation method or timing is inappropriate, and it is recommended to adjust the operation strategy or wait for a more suitable time to re-execute.
[0056] In this embodiment, before the actual execution of the lifecycle operation, the cold archives involved in the lifecycle operation and the recoverable time windows associated with these cold archives are determined through the time window index, archive package index, and recall index in the index information. Through counterfactual simulation, the state of the cold archives after the lifecycle operation, the location of the cold media, and the recall status are applied to the index information to calculate the continuity and recall status of the affected time window set. Furthermore, information such as the missing write-ahead log segment set, the timeline interruption cause, the necessary archive package recall status, and the alternative lifecycle plan corresponding to the prefactual operation can also be recorded. The missing write-ahead log segment set refers to the list of necessary write-ahead log segment identifiers that were lost due to the lifecycle operation in the counterfactual simulation, which were originally used to maintain the continuity of write-ahead log segments and log sequence numbers. The timeline interruption cause refers to the diagnostic conclusion that qualitatively describes the type of continuity disruption caused by the missing write-ahead log segment set. The necessary archive package recall status refers to the accessibility status of the necessary archive package set on the cold media on which the affected recoverable time windows depend after the lifecycle operation in the counterfactual simulation. Alternative lifecycle planning refers to a set of one or more alternative action plans generated when counterfactual prefact checks determine that the original lifecycle operation would result in a continuous interruption of the affected recoverable time window or the irretrievability of necessary archive packages.
[0057] Furthermore, based on the continuity and recall status of the affected time window set, corresponding operational decisions are output. The pre-inspection simulation can be performed according to the following rules: Based on the type and object of the lifecycle operation, all recoverable time windows associated with that operation object are searched in the index information. For each found affected time window, the state changes after the operation are simulated, checking whether the continuity of the write-ahead log, timeline historical consistency, and log sequence number continuity still meet the requirements, and whether the recall status of the cold archive is sufficient to support point-in-time recovery. Based on the simulation results, the time window is marked as an affected time window.
[0058] In one feasible embodiment, step S16 includes: Step S161: Based on the index information, perform counterfactual continuity and recall pre-checks on the lifecycle operations to obtain the continuity and recall status of the affected time window set. Step S162: Determine the operation decision based on the continuity and recall status of the affected time window set; In this embodiment, based on the type and object of the lifecycle operation, all recoverable time windows associated with that operation object are searched in the index information. Then, the state changes after the operation execution are simulated, and the impact is evaluated from multiple dimensions, including write-ahead log continuity, timeline historical consistency, log sequence number continuity, and recallability. Furthermore, the affected recovery time windows are aggregated into an affected time window set, and the continuity and recallability status of each affected time window are recorded. If the pre-check determines that the affected recoverable time window exhibits issues with write-ahead log continuity, timeline historical consistency, or log sequence number continuity, or if the cold archive package is unrecoverable or the recovery time interval is shortened, a rejection, split, delay, or rescheduling decision is output. If the affected time window set still meets the continuity and recall requirements after the pre-check, the lifecycle operation is allowed to continue execution.
[0059] In one feasible embodiment, a new index generation is generated when the repository metadata version in the database backup and recovery tool changes, the cold archive is rewritten, or the preset lifecycle strategy changes.
[0060] It should be noted that the index generation refers to the version identifier information of the index information. In this embodiment, when the repository object stream in the database backup and recovery tool changes (e.g., adding a backup, deleting an expired backup, or adding a write-ahead log archive), the cold archive package is rewritten (e.g., regenerating the archive package due to a change in compression format or an upgrade in encryption algorithm), or the preset lifecycle policy changes (e.g., adjusting the cold archive retention period or changing the storage tier switching rules), the underlying information on which the index information depends has changed, and a new index generation needs to be generated to reflect the current repository status. The old index generation is retained and is not deleted due to the generation of the new generation, for use in auditing and recovery consistency verification. Subsequently, the repository object stream version and index version on which a recovery request, archive package generation result, or lifecycle operation approval result is based can be traced through the index generation.
[0061] In one feasible embodiment, after the time window index, archive package index, and recall index are generated, they can be further extended to subsequent operation and maintenance scenarios such as database backup and recovery tool repository view reconstruction, cold media recall scheduling, or erasure coding layout optimization.
[0062] This embodiment no longer uses ordinary storage objects, object prefixes, backup sets, or lifecycle rules as boundaries for recovery integrity judgment. Instead, it uses the recoverable time window of relational database point-in-time recovery as the boundary of cold archive packages. By using index information, information such as repository object sets and archive packages are associated. The cold archive system can complete verification and archive management without modifying the repository format of the database backup and recovery tool. In addition, before the lifecycle operation is executed, a counterfactual continuity and recall pre-check is performed on the triggered lifecycle operation based on the index information. The operation decision is output based on the pre-check results, thereby reducing the risk of point-in-time recovery being unrecoverable due to accidental deletion, accidental migration, or deep archiving.
[0063] It should be noted that the examples in the figure are only for understanding this application and do not constitute a limitation on the cold archive management method for database point-in-time recovery in this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0064] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0065] This application also provides a cold archive management system for database point-in-time recovery; please refer to [link / reference]. Figure 4 , Figure 4 This is a schematic diagram of the module structure of a cold archiving management system for database point-in-time recovery according to an embodiment of this application; the cold archiving management system for database point-in-time recovery includes: Module 21 is used to obtain the repository object stream of the database backup and recovery tool; Parsing module 22 is used to parse database recovery semantic information from the warehouse object stream; The time window generation module 23 is used to generate candidate recoverable time windows for database time point recovery based on the database recovery semantic information. The cold archive package generation module 24 is used to determine the set of warehouse objects required within the candidate recoverable time window, and to map the objects in the set of warehouse objects to the cold archive package using the candidate recoverable time window as the boundary of the cold archive package; The index generation module 25 is used to verify the set of warehouse objects for the candidate recoverable time window, and generate the index information associated with the cold archive package after the verification is passed. Pre-inspection module 26 is used to perform counterfactual continuity and recall pre-inspection on triggered lifecycle operations based on the index information, and output operation decisions based on the pre-inspection results.
[0066] The cold archiving management system for database point-in-time recovery provided in this application, employing the cold archiving management method for database point-in-time recovery in the above embodiments, can solve the technical problems mentioned in the background art. Compared with the prior art, the beneficial effects of the cold archiving management system for database point-in-time recovery provided in this application are the same as the beneficial effects of the cold archiving management method for database point-in-time recovery provided in the above embodiments, and other technical features in the cold archiving management system for database point-in-time recovery are the same as the features disclosed in the methods of the above embodiments, and will not be repeated here.
[0067] This application provides a cold archive management device for database point-in-time recovery. The cold archive management device for database point-in-time recovery includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the cold archive management method for database point-in-time recovery in the above embodiment 1.
[0068] The following is for reference. Figure 5 , Figure 5 This is a schematic diagram of the hardware operating environment involved in the cold archiving management method for database point-in-time recovery in this application embodiment. The cold archiving management device for database point-in-time recovery in this application embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), vehicle terminals (such as vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The cold archive management device for database point-in-time recovery shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0069] like Figure 5 As shown, a cold archiving management device for database point-in-time recovery may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in read-only memory 1002 or a program loaded from storage device 1003 into random access memory 1004. Random access memory 1004 also stores various programs and data required for the operation of the cold archiving management device for database point-in-time recovery. The processing unit 1001, read-only memory 1002, and random access memory 1004 are interconnected via bus 1005. Input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to input / output interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the cold archive management device for database point-in-time recovery to communicate wirelessly or wiredly with other devices to exchange data. While the figure shows cold archive management devices for database point-in-time recovery with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0070] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0071] The cold archiving management device for database point-in-time recovery provided in this application, employing the cold archiving management method for database point-in-time recovery in the above embodiments, can solve the technical problems mentioned in the background art. Compared with the prior art, the beneficial effects of the cold archiving management device for database point-in-time recovery provided in this application are the same as the beneficial effects of the cold archiving management method for database point-in-time recovery provided in the above embodiments, and other technical features in this cold archiving management device for database point-in-time recovery are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0072] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0073] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0074] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the cold archive management method for database point-in-time recovery as described in the above embodiments.
[0075] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0076] The aforementioned computer-readable storage medium may be included in a cold archive management device for database point-in-time recovery; or it may exist independently and not be assembled into a cold archive management device for database point-in-time recovery.
[0077] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by a cold archive management device for database point-in-time recovery, the cold archive management device for database point-in-time recovery performs the following actions: acquires a repository object stream of a database backup and recovery tool; parses database recovery semantic information from the repository object stream; generates candidate recoverable time windows for database point-in-time recovery based on the database recovery semantic information; determines the required set of repository objects within the candidate recoverable time windows, and maps objects in the repository object set to cold archive packages using the candidate recoverable time windows as cold archive package boundaries; verifies the repository object set of the candidate recoverable time windows, and generates index information associated with the cold archive package after successful verification; performs counterfactual continuity and recall pre-checks on triggered lifecycle operations based on the index information, and outputs operation decisions based on the pre-check results.
[0078] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0079] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0080] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0081] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described cold archive management method for database point-in-time recovery, and can solve the technical problems mentioned in the background art. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the cold archive management method for database point-in-time recovery provided in the above embodiments, and will not be repeated here.
[0082] This application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the cold archive management method for database point-in-time recovery as described above.
[0083] The computer program product provided in this application can solve the technical problems described in the background section. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiments of this application are the same as the beneficial effects of the cold archive management method for database point-in-time recovery provided in the above embodiments, and will not be repeated here.
[0084] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.< / hash>
Claims
1. A cold archive management method for database point-in-time recovery, characterized by, include: Obtain the repository object stream for the database backup and recovery tool; Database recovery semantic information is parsed from the repository object stream, wherein the database recovery semantic information includes at least one of the following: database system identifier, backup namespace, basic backup tag, backup dependency chain, basic backup end log sequence number, basic backup end time, write-ahead log segment key, timeline identifier, and timeline history summary; Based on the database recovery semantic information, a candidate recoverable time window for database point-in-time recovery is generated; Determine the set of warehouse objects required within the candidate recoverable time window, and map the objects in the set of warehouse objects to the cold archive package using the candidate recoverable time window as the boundary of the cold archive package; The set of warehouse objects for the candidate recoverable time window is validated, and the index information associated with the cold archive package is generated after the validation is passed. Based on the index information, a counterfactual continuity and recall pre-check is performed on the triggered lifecycle operation. Based on the pre-check results, an operation decision is output. The counterfactual continuity and recall pre-check refers to applying the impact of the lifecycle operation on the cold archive package, cold media location, and recall status to the index information without actually executing the lifecycle operation, and predicting the impact after the operation is executed through simulation calculation. The step of generating candidate recoverable time windows for database point-in-time recovery based on the database recovery semantic information includes: Perform a continuity check operation based on the database recovery semantic information to obtain the continuity of the write-ahead log segments and the continuity of the log sequence numbers; Based on the basic backup end log sequence number, the backup dependency chain, the timeline history summary, the continuity of the write-ahead log segment, and the continuity of the log sequence number, a candidate recoverable time window for the database point-in-time recovery is generated.
2. The database time point recovery-oriented cold archive management method of claim 1, wherein, The repository object stream includes at least one of the following: backup information file, archive information file, basic backup tag, backup list, write-ahead log archive object key, and timeline history file; The process of parsing database recovery semantic information from the repository object stream includes: At least one of the following is parsed from the repository object stream: database system identifier, backup namespace, basic backup tag, backup dependency chain, basic backup end log sequence number, basic backup end time, write-ahead log segment key, timeline identifier, and timeline history summary, as the database recovery semantic information.
3. The cold archive management method for database time point recovery of claim 2, wherein, The starting point of the candidate recoverable time window is determined based on the basic backup end log sequence number, the basic backup end time, and the first write-ahead log segment after the basic backup; the ending point of the candidate recoverable time window is determined based on the last write-ahead log segment that passes continuity verification on the same timeline or based on the switch log sequence number and switch time in the timeline history file.
4. The cold archiving management method for database point-in-time recovery as described in claim 1, characterized in that, The step of performing counterfactual continuity and recall pre-checks on triggered lifecycle operations based on the index information, and outputting operation decisions based on the pre-check results, includes: Based on the index information, a counterfactual continuity and recall pre-check is performed on the lifecycle operation to obtain the continuity and recall status of the affected time window set. Based on the continuity and recall status of the affected time window set, an operational decision is determined; The lifecycle operations include at least one of lifecycle switching, deletion, deep archiving, archive migration, and archive rewriting.
5. The cold archiving management method for database point-in-time recovery as described in claim 4, characterized in that, After performing counterfactual continuity and recall pre-checks on lifecycle operations based on the index information, the method further includes: Record at least one of the following after the pre-check operation: the set of missing write-ahead log segments, the reason for the timeline interruption, the necessary archive recall status, and the alternative lifecycle plan.
6. The cold archiving management method for database point-in-time recovery as described in claim 1, characterized in that, The index information includes time window index, archive package index, and recall index; The process of validating the set of warehouse objects for the candidate recoverable time windows, and generating the index information associated with the cold archive package after successful validation, includes: Perform continuity and integrity checks on the set of warehouse objects within the candidate recoverable time window; If both continuity and integrity checks pass, then a time window index, an archive index, and a recall index are generated. The time window index includes at least one of the following: database system identifier, backup namespace, basic backup label, backup dependency chain, timeline identifier, timeline history summary, start write-ahead log segment, end write-ahead log segment, start log sequence number, end log sequence number, recovery start time, recovery end time, repository object set, archive package set, cold media location set, continuity status, recall status, and index generation. The archive package index includes at least one of the following: archive package identifier, original object key corresponding to the object in the repository object set, offset, length, check value, compression status, encryption status, and cold media location; The recallability index is used to record the recall status of the cold archive package.
7. The cold archiving management method for database point-in-time recovery as described in claim 6, characterized in that, After performing continuity and integrity checks on the set of warehouse objects for the candidate recoverable time windows, the process further includes: If the continuity check fails or the integrity check fails, the candidate recoverable time window is marked as unrecoverable and breakpoint information is output. The breakpoint information includes at least one of the following: missing object key, missing write-ahead log segment, checksum abnormal object, reason for inconsistency in timeline history summary, log sequence number break interval, affected recovery time interval, and repair prompt for rescanning or rebuilding archive package.
8. The cold archiving management method for database point-in-time recovery as described in claim 1, characterized in that, The step of determining the required set of warehouse objects within the candidate recoverable time window, and mapping the objects in the warehouse object set to the cold archive package using the candidate recoverable time window as the boundary, includes: At least one of the following is taken as the set of repository objects required within the candidate recoverable time window: the basic backup object, dependent backup object, backup list object, write-ahead log segment object, timeline history file, and metadata object required for the recovery semantics of the database backup and recovery tool. Using the candidate recoverable time window as the boundary of the cold archive package, the objects in the repository object set are mapped to the cold archive package to establish a mapping relationship between the archive package identifier, offset, length, and check value of the object and the cold archive package.
9. The cold archiving management method for database point-in-time recovery as described in claim 1, characterized in that, Also includes: When the repository metadata version changes, the cold archive is rewritten, or the preset lifecycle strategy changes in the database backup and recovery tool, a new index generation is generated. Here, the index generation refers to the version identification information of the index information.
10. A cold archiving management system for database point-in-time recovery, characterized in that, include: The acquisition module is used to acquire the repository object stream of the database backup and recovery tool; The parsing module is used to parse database recovery semantic information from the repository object stream, wherein the database recovery semantic information includes at least one of the following: database system identifier, backup namespace, basic backup tag, backup dependency chain, basic backup end log sequence number, basic backup end time, write-ahead log segment key, timeline identifier, and timeline history summary. The time window generation module is used to generate candidate recoverable time windows for database time point recovery based on the database recovery semantic information. The cold archive generation module is used to determine the set of warehouse objects required within the candidate recoverable time window, and to map the objects in the set of warehouse objects to the cold archive using the candidate recoverable time window as the boundary of the cold archive; The index generation module is used to verify the set of warehouse objects for the candidate recoverable time window, and generate the index information associated with the cold archive package after the verification is passed. The pre-inspection module is used to perform counterfactual continuity and recall pre-inspection on the triggered lifecycle operations based on the index information, and output operation decisions based on the pre-inspection results. The counterfactual continuity and recall pre-inspection refers to applying the impact of the lifecycle operation on the cold archive package, cold media location and recall status to the index information without actually executing the lifecycle operation, and predicting the impact results after the operation is executed through simulation calculation. The step of generating candidate recoverable time windows for database point-in-time recovery based on the database recovery semantic information includes: Perform a continuity check operation based on the database recovery semantic information to obtain the continuity of the write-ahead log segments and the continuity of the log sequence numbers; Based on the basic backup end log sequence number, the backup dependency chain, the timeline history summary, the continuity of the write-ahead log segment, and the continuity of the log sequence number, a candidate recoverable time window for the database point-in-time recovery is generated.
Citation Information
Patent Citations
Database recoverable time interval acquisition method, medium and equipment
CN122111764A
Identifying database backup copy chaining
US20220121523A1
