Log backup method and apparatus, and storage medium and computer program product

By adding numbering information to the redo log, analyzing the numbering information of the copied redo logs, locating the write position, and saving it locally, the problem of redo log overwriting and loss in MySQL database backup is solved, and the probability of backup failure is reduced.

WO2026153478A1PCT designated stage Publication Date: 2026-07-23CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD
Filing Date
2026-01-16
Publication Date
2026-07-23

AI Technical Summary

Technical Problem

During MySQL database backup, the backup utility for redo log records cannot keep up with the generation pace, causing redo log records to be overwritten and increasing the probability of backup data failure.

Method used

By adding numbering information to the redo log, the numbering information of the copied redo logs is analyzed to locate the position where the redo logs need to be copied and written next. The redo logs that will be overwritten are then compared with the redo log numbering information before they are written to the disk to determine which redo logs will be overwritten and then saved locally and backed up later.

Benefits of technology

This effectively prevents redo logs from being overwritten and lost, reduces the probability of backup data failure, and improves the stability and success rate of the backup process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2026073042_23072026_PF_FP_ABST
    Figure CN2026073042_23072026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a log backup method and apparatus, and a storage medium and a computer program product. The method comprises: on the basis of number information of a copied redo log, determining first number information expected to be read next time; sequentially reading number information of redo logs before the redo logs are written into a disk, and when it is found, by means of reading, that second number information of a first redo log is greater than the first number information, storing the first redo log in an archive file; and after the storage is completed, backing up redo logs in the archive file to a backup node.
Need to check novelty before this filing date? Find Prior Art

Description

A log backup method, apparatus, storage medium, and computer program product

[0001] Cross-references to related applications

[0002] This application is based on and claims priority to Chinese Patent Application No. 2025100730695, filed on January 16, 2025, the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to the field of data processing, and in particular to a log backup method and apparatus, storage medium, and computer program product. Background Technology

[0004] xtrabackup is a MySQL database backup tool that can back up data using InnoDB, XtraDB, and MyISAM storage engines, performing backups at runtime. It can also be used to restore backup data or migrate backup data to another MySQL server. To ensure backup data consistency and fault recovery, Xtrabackup copies the redo log generated simultaneously with the data files during the backup process. Leveraging the disaster recovery capabilities of the redo log, it guarantees the accuracy of the backup data. However, the redo log file size is fixed, and its writing is cyclical. Once the set size is exceeded, MySQL will overwrite the redo log from the beginning.

[0005] Currently, large amounts of backup data files are typically stored in cloud storage. However, due to the slightly slower input / output (IO) speed of cloud storage, during backup operations, MySQL is providing services to the public, and redo logs are constantly being generated. Backup utilities that record redo logs may sometimes fail to keep up with the pace of redo log generation, leading to the loss of redo log records due to overwriting, thus increasing the probability of backup data failure. Summary of the Invention

[0006] This application provides a log backup method, apparatus, storage medium, and computer program product. These can reduce the probability of backup data failure.

[0007] The technical solution of this application is implemented as follows:

[0008] In a first aspect, embodiments of this application propose a log backup method, the method comprising:

[0009] Based on the number information of the copied redo log, determine the first number information to be read next;

[0010] Read the redo log numbers before they are written to disk in sequence, and if the second number of the first redo log is greater than the first number, save the first redo log to the archive file.

[0011] After saving, back up the redo logs from the archive file to the backup node.

[0012] Optionally, before determining the first number information to be read next based on the number information of the copied redo log, the method further includes:

[0013] The first detection indicator value is determined based on the database storage capacity, total backup data volume, change value of redo log number information written to disk per unit time, and disk input / output IO information.

[0014] The step of determining the first number information to be read next based on the number information of the copied redo log includes:

[0015] When the value of the first detection index is greater than the preset threshold, the first number information to be read next is determined based on the number information of the copied redo log.

[0016] Optionally, backing up the redo logs from the archived files to the backup node includes:

[0017] Get the third number information of the second redo log that is currently being copied;

[0018] Compare the third number information with the preset number information;

[0019] Based on the comparison results, the starting copy number information is determined from the archive file, and the redo logs in the archive file are backed up to the backup node starting from the starting copy number information.

[0020] Optionally, determining the starting copy number information from the archived file based on the comparison result includes:

[0021] When the comparison result is that the third number information is less than or equal to the preset number information, the starting copy position is determined to be the preset number information;

[0022] When the comparison result shows that the third number information is greater than the preset number information, the starting copy position is determined to be the third number information.

[0023] Optionally, the preset number information is the first number information in the first array; wherein, the first array is used to store the number information of the redo log files in the archive file.

[0024] Optionally, after saving the first redo log to an archive file, the method further includes:

[0025] Monitor the archived files;

[0026] When a new redo log file is detected from the archived files, the number information of each redo log file is obtained sequentially.

[0027] Store the ID information of each redo log in the first array sequentially.

[0028] Secondly, this application proposes a log backup device, the device comprising:

[0029] The unit is configured to determine the first number information to be read next based on the number information of the copied redo log;

[0030] The storage unit is configured to sequentially read the number information of the redo logs before they are written to the disk, and if the second number information of the first redo log is greater than the first number information, save the first redo log to the archive file.

[0031] The backup unit is configured to back up the redo logs from the archive file to the backup node after saving is complete.

[0032] Thirdly, this application proposes a log backup device, the device comprising: a processor, a memory, and a communication bus; the communication bus is used to realize the connection and communication between the processor and the memory; the processor implements the above-mentioned log backup method when executing the running program stored in the memory.

[0033] Fourthly, this application proposes a storage medium on which a computer program is stored, which, when executed by a processor, implements the above-described log backup method.

[0034] Fifthly, this application proposes a computer program product, including a computer program that implements the above-described log backup method when executed by a processor.

[0035] This application provides a log backup method, apparatus, storage medium, and computer program product. The method includes: determining the first number information to be read next based on the number information of the copied redo logs; sequentially reading the number information of the redo logs before they were written to disk, and if the second number information of the first redo log is greater than the first number information, saving the first redo log to an archive file; and after saving, backing up the redo logs in the archive file to a backup node. By adding number information to the redo logs, analyzing the number information of the copied redo logs, locating the position where the next redo log to be copied and written, and comparing it sequentially with the number information of the redo logs before they were written to disk, the first redo log that will be overwritten is determined. Then, the first redo log is saved locally and subsequently backed up, ensuring that even if the first redo log is overwritten, a backup is still maintained, avoiding the loss of the redo log to be copied due to overwriting, thereby reducing the probability of backup data failure. Attached Figure Description

[0036] Figure 1 is a flowchart of a log backup method provided in an embodiment of this application;

[0037] Figure 2 is a schematic diagram of the structure of an exemplary redo log file provided in an embodiment of this application;

[0038] Figure 3 is a structural diagram of an exemplary log backup device provided in an embodiment of this application;

[0039] Figure 4 is a schematic diagram of the execution flow of an exemplary log management module provided in an embodiment of this application;

[0040] Figure 5 is a schematic diagram of the execution flow of an exemplary log copy module provided in an embodiment of this application;

[0041] Figure 6 is a schematic diagram of the execution flow of an exemplary log monitoring module provided in an embodiment of this application;

[0042] Figure 7 is a schematic diagram of a log backup device provided in an embodiment of this application;

[0043] Figure 8 is a schematic diagram of the structure of a log backup device provided in an embodiment of this application. Detailed Implementation

[0044] In order to gain a more detailed understanding of the features and technical content of the embodiments of this application, the implementation of the embodiments of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not intended to limit the embodiments of this application.

[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0046] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. It is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. It should also be noted that the terms "first, second, third" used in the embodiments of this application are merely for distinguishing similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0047] Currently, increasing the redo log file size parameter can prevent it from being overwritten in a loop. However, this presents two problems: 1. Modifying the redo log size cannot be done online; a restart is required for it to take effect. Furthermore, the size needs to be evaluated and calculated, which may not be accurate in assessing faults. 2. Redo log buffer writes to disk occur beyond the parameter setting. If the setting is too large, it consumes a large amount of I / O at the moment of disk write, causing severe business fluctuations and affecting stability.

[0048] To address the above problems, this application provides a log backup method, as shown in Figure 1, which may include:

[0049] S101. Based on the number information of the copied redo log, determine the first number information to be read next.

[0050] In this embodiment, a first detection index value is first determined based on the database storage capacity, total backup data volume, change value of redo log number information written to disk per unit time, and disk I / O information; then, coverage prediction is performed during the redo log backup process based on the first detection index value.

[0051] It should be noted that the database storage capacity can be the amount of redo log that MySQL can store locally.

[0052] It should be noted that the total backup data volume can be the total amount of data that needs to be backed up.

[0053] It should be noted that the redo log number information can be the log sequence number (LSN) of the redo log; the change in the redo log number information written to disk per unit time can be the difference in the address sequence number of the redo log written to disk per unit time. Specifically, the address sequence number of the redo log written to disk is the result of the log sequence number in the `show engine InnoDB status` command.

[0054] It should be noted that disk I / O information can be expressed as I / O coefficients. These I / O coefficients are related to the disk's I / O rate.

[0055] For example, the IO coefficient of a cloud disk is 10, the IO coefficient of a regular local disk solid state disk (SSD) is 20, and the IO coefficient of a high-speed local disk non-volatile memory express solid state drive (NVME) is 30.

[0056] In this embodiment of the application, the first monitoring index value P can be determined by formula (1).

[0057] Where S is the database storage capacity, D is the total amount of backup data, L2 is the number of the last redo log written to disk within a unit of time, L1 is the number of the first redo log written to disk within a unit of time, and the IO coefficient is the disk IO information.

[0058] In this embodiment of the application, when the value of the first detection index is greater than a preset threshold, the first number information to be read next is determined based on the number information of the copied redo log.

[0059] Optionally, set the preset threshold to 0.

[0060] In one optional embodiment, when the first detection index value is greater than 0, it indicates that a redo log overwriting problem has occurred. In this case, the first number information to be read next is determined based on the number information of the copied redo log.

[0061] Understandably, by using the coverage detection formula (1), the potential coverage detection during redo log backup can be predicted, and the rationality of the current parameter settings can be assessed to determine whether a coverage problem will occur during the backup process. This improves the accuracy of coverage prediction.

[0062] In this embodiment of the application, the numbering information of the redo log files that already exist on the backup node can be scanned to determine the first numbering information that is expected to be read next.

[0063] In this embodiment of the application, the redo log file structure is shown in Figure 2. Each redo log block consists of a redo log header and redo log content. A new block_no is added to the redo log header to store the redo log file number information.

[0064] In this embodiment, the redo log file number can be the LSN of the redo log file. The specific number can be selected based on actual circumstances, and this embodiment does not impose any specific limitations.

[0065] S102. Read the redo log number information before it is written to disk in sequence, and if the second number information of the first redo log is greater than the first number information, save the first redo log to the archive file.

[0066] It should be noted that when the second number of the first redo log is greater than the first number, it indicates that the first redo log may be overwritten during the backup process. In this case, the remote MySQL command is notified to save the first redo log file locally.

[0067] It should be noted that after determining that a redo log overwrite issue will occur based on the first detection metric value, the local environment for the redo log archive file is configured, and the archive file is created. When the second number of the first redo log is greater than the first number, a remote MySQL command is notified to save the first redo log file locally to the aforementioned archive file.

[0068] It should be noted that the archive files are also retrieved from the MySQL configuration, and the system checks in real time whether new redo log files appear in the archive files.

[0069] Specifically, monitor archived files; when a new redo log file is detected in the archived files, obtain the number information of each redo log file in sequence; and store the number information of the new redo log file in the first array in sequence.

[0070] In one optional embodiment, the redo log archive directory is obtained from the MySQL configuration. The system waits for a new redo log file to appear. Once the file appears, it is read into memory in its entirety and divided into units of BLOCK_SIZE (block size). Each block number is then stored in an ordered array redo_block_no (first data). After processing, the system continues to wait for the next new redo log file to appear.

[0071] It should be noted that the new redo log file can be the first redo log file.

[0072] S103. After saving, back up the redo logs in the archive file to the backup node.

[0073] It should be noted that after saving the first redo file in the archive file and copying it to the backup node, the initial sharing status is set to LOG_WRAPPED (log overwrite), and the starting position for copying is determined.

[0074] Understandably, this invention proposes a method for quickly locating redo log archive files. By adding numbering information to the redo log and designing shared state variables for the redo log, and by analyzing the numbering information of the redo log in different states, the method efficiently locates the location where the redo log needs to be copied and saved next time, and performs a full copy, avoiding the loss of redo log to be copied due to overwriting.

[0075] In this embodiment, the third number information of the second redo log currently being copied is obtained; the third number information is compared with the preset number information; the starting copy number information is determined from the archive file according to the comparison result, and the redo log in the archive file is backed up to the backup node starting from the starting copy number information.

[0076] In one optional embodiment, when the comparison result is that the third number information is less than or equal to the preset number information, the starting copy position is determined to be the preset number information; at this time, the redo log in the archive file is backed up to the backup node starting from the preset number information.

[0077] In this embodiment of the application, the preset numbering information is the first numbering information in the first array; wherein, the first array is used to store the numbering information of the redo log files in the archive file.

[0078] It should be noted that when the comparison result is that the third number information is less than or equal to the preset number information, it indicates that the next redo log file will be overwritten. The LSN (first number information) of the first block of redo_block_no (first array) is set to start_lsn (starting copy position) to start copying.

[0079] In another optional embodiment, when the comparison result is that the third number information is greater than the preset number information, the starting copy position is determined to be the third number information; at this time, the redo log in the archive file is backed up to the backup node starting from the third number information.

[0080] It should be noted that when the comparison result shows that the third number information is greater than the preset number information, it indicates that the redo log file has started to be overwritten and a portion of the overwritten redo log has been copied. At this time, the block whose block_no is equal to the redo log (second redo log) being copied is found from redo_block_no, and the lsn (third number information) is obtained from the block as the start_lsn for starting the copy.

[0081] In one embodiment, after determining the starting copy position, the shared state is marked from LOG_NONE (no log) to LOG_MATCHED (log copy), the file to be copied is found, and the state is simultaneously set to LOG_POSITIONED (log position), and then the log copying begins until it is completed.

[0082] It should be noted that, firstly, the address where the MySQL archive log copying begins is confirmed. Then, the block_no of the currently being copied redo log (second redo log) is obtained from the memory where the redo log has not yet been written to disk (including the third number information of the second redo log), and compared with the log that has already been archived by MySQL (i.e., the first element in the ordered array (first array) of redo_block_no).

[0083] It is understandable that adding numbering information to the redo log allows us to analyze the numbering information of the copied redo logs to locate the position where the next redo log to be copied and written can be located. This information is then compared with the numbering information of the redo logs before they were written to disk to determine the first redo log that will be overwritten. The first redo log is then saved locally and backed up subsequently. This ensures that even if the first redo log is overwritten, a backup is still saved, preventing the loss of the redo log to be copied due to overwriting and thus reducing the probability of backup data failure.

[0084] Based on the above embodiments, this application proposes a log backup device, as shown in FIG3. The log backup device includes a log management module, a log copying module, and a log monitoring module. The log management module performs the steps shown in FIG4, the log copying module performs the steps shown in FIG5, and the log monitoring module performs the steps shown in FIG6.

[0085] As shown in Figure 4, the specific steps performed by the log management module include:

[0086] 1. Based on the value of the first detection indicator, a coverage problem was identified.

[0087] 2. Configure the local environment for redo log archive files and create archive files.

[0088] 3. Based on the number information of the copied redo log, determine the first number information to be read next.

[0089] 4. Read the redo log numbers that were not written to disk in sequence.

[0090] 5. If the second number information of the first redo log is greater than the first number information, save the first redo log to the archive file.

[0091] 6. After saving, call the log copy module to back up the redo logs in the archive file to the backup node.

[0092] It should be noted that if the second number information of the first redo log is less than or equal to the first number information, then proceed to step 4.

[0093] As shown in Figure 5, the specific steps performed by the log copy module include:

[0094] 1. Obtain the first number information in the first array from the log listening module; and set the first number information as the preset number information.

[0095] 2. Obtain the third number information of the second redo log that is currently being copied.

[0096] 3. Compare the third number information with the preset number information.

[0097] 4. When the third number information is less than or equal to the preset number information, the starting copy position is determined to be the preset number information;

[0098] 5. When the third number information is greater than the preset number information, the starting copy position is determined to be the third number information.

[0099] 6. Start backing up the redo logs from the archive files to the backup node, beginning with the initial copy number information.

[0100] As shown in Figure 6, the specific steps performed by the log monitoring module include:

[0101] 1. Obtain archived files from the log management module.

[0102] 2. Continuously monitor the archive files for any new redo log files being generated.

[0103] 3. If a new redo log file is detected in the archive, obtain the number information of each redo log file in sequence.

[0104] 4. Store the ID information of each redo log in the first array sequentially.

[0105] 5. After saving, continue to wait for the next new redo log file to appear.

[0106] Understandably, compared to existing techniques that avoid being overwritten by increasing the size of the redo log file, this application avoids the need for the entire process of evaluating, modifying, and restarting redo log parameters in the event of a backup failure. This reduces the backup failure rate and solves the problem of backup failures in cloud database MySQL under high load.

[0107] This application provides a log backup device 1. As shown in FIG7, the log backup device 1 includes:

[0108] Unit 10 is configured to determine the first number information to be read next based on the number information of the copied redo log;

[0109] The storage unit 11 is configured to sequentially read the number information of the redo logs before they are written to the disk, and if the second number information of the first redo log is greater than the first number information, save the first redo log to the archive file.

[0110] Backup unit 12 is configured to back up the redo logs in the archive file to the backup node after saving.

[0111] Optionally, the determining unit 10 is further configured to determine a first detection index value based on the database storage capacity, the total amount of backup data, the change value of the redo log number information written to the disk per unit time, and the disk IO information; when the first detection index value is greater than a preset threshold, the first number information to be read next is determined based on the number information of the redo log that has been copied.

[0112] Optionally, the device further includes: an acquisition unit and a comparison unit;

[0113] The acquisition unit is configured to acquire the third number information of the second redo log that is currently being copied;

[0114] The comparison unit is configured to compare the third number information with preset number information;

[0115] The determining unit 10 is further configured to determine the starting copy number information from the archived file based on the comparison result;

[0116] The backup unit 12 is further configured to back up the redo logs in the archive file to the backup node, starting from the initial copy number information.

[0117] Optionally, the determining unit 10 is further configured to determine the starting copy position as the preset number information when the comparison result is that the third number information is less than or equal to the preset number information; and to determine the starting copy position as the third number information when the comparison result is that the third number information is greater than the preset number information.

[0118] Optionally, the preset number information is the first number information in the first array; wherein, the first array is used to store the number information of the redo log files in the archive file.

[0119] Optionally, the device further includes: a monitoring unit and a storage unit;

[0120] The monitoring unit is configured to monitor the archived files;

[0121] The acquisition unit is further configured to acquire the number information of each redo log file sequentially when a new redo log file is detected from the archive file;

[0122] The storage unit is used to sequentially store the number information of each redo log into the first array.

[0123] This application provides a log backup device that determines the first number information to be read next based on the number information of the copied redo logs; sequentially reads the number information of the redo logs before they were written to disk, and if the second number information of the first redo log is greater than the first number information, saves the first redo log to an archive file; after saving, backs up the redo logs in the archive file to a backup node. Thus, the log backup device proposed in this embodiment adds number information to the redo logs, analyzes the number information of the copied redo logs to locate the position where the redo logs need to be copied next, and compares it sequentially with the number information of the redo logs before they were written to disk to determine the first redo log that will be overwritten. Then, the first redo log is saved locally and subsequently backed up, ensuring that even if the first redo log is overwritten, a backup is still saved, avoiding the loss of the redo logs to be copied due to overwriting, thereby reducing the probability of backup data failure.

[0124] Figure 8 is a schematic diagram of the composition structure of a log backup device 1 provided in an embodiment of this application. In practical applications, based on the same disclosed concept of the above embodiments, as shown in Figure 8, the log backup device 1 of this embodiment includes: a processor 13, a memory 14, and a communication bus 15.

[0125] The processor 13 described above can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), CPU, controller, microcontroller, and microprocessor. It is understood that, for different devices, the electronic device used to implement the above processor function can also be other types, and this embodiment does not specifically limit it.

[0126] In this embodiment, the communication bus 15 is used to establish a connection between the processor 13 and the memory 14; when the processor 13 executes the running program stored in the memory 14, it implements the following log backup method:

[0127] Based on the number information of the copied redo logs, determine the first number information to be read next; sequentially read the number information of the redo logs before they were written to disk, and if the second number information of the first redo log is greater than the first number information, save the first redo log to the archive file; after saving, back up the redo logs in the archive file to the backup node.

[0128] Furthermore, the processor 13 is also configured to determine a first detection index value based on the database storage capacity, the total amount of backup data, the change value of the redo log number information written to the disk per unit time, and the disk I / O information; when the first detection index value is greater than a preset threshold, the processor determines the first number information to be read next based on the number information of the redo log that has been copied.

[0129] Furthermore, the processor 13 is also configured to obtain the third number information of the second redo log currently being copied; compare the third number information with preset number information; determine the starting copy number information from the archive file according to the comparison result; and back up the redo log in the archive file to the backup node starting from the starting copy number information.

[0130] Furthermore, the processor 13 is also configured to determine the starting copy position as the preset number information when the comparison result is that the third number information is less than or equal to the preset number information; and to determine the starting copy position as the third number information when the comparison result is that the third number information is greater than the preset number information.

[0131] Furthermore, the preset number information is the first number information in the first array; wherein, the first array is used to store the number information of the redo log files in the archive file.

[0132] Furthermore, the processor 13 is also configured to monitor the archived files; when a new redo log file is detected from the archived files, the processor sequentially obtains the number information of each redo log file therein; and stores the number information of each redo log file therein into the first array in sequence.

[0133] This application provides a storage medium storing a computer program thereon. The computer-readable storage medium stores one or more programs, which can be executed by one or more processors and applied in a log backup device. The computer program implements the log backup method described above.

[0134] Based on the above embodiments, this application provides a computer program product, including a computer program that can be executed by one or more processors, and the computer program implements the log backup method described above.

[0135] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0136] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause an image display device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this disclosure.

[0137] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.

Claims

1. A log backup method, the method comprising: Based on the number information of the copied redo log, determine the first number information to be read next; Read the redo log numbers before they are written to disk in sequence, and if the second number of the first redo log is greater than the first number, save the first redo log to the archive file. After saving, back up the redo logs from the archive file to the backup node.

2. The method according to claim 1, wherein, Before determining the first number information to be read next based on the number information of the copied redo log, the method further includes: The first detection indicator value is determined based on the database storage capacity, total backup data volume, change value of redo log number information written to disk per unit time, and disk input / output IO information. The step of determining the first number information to be read next based on the number information of the copied redo log includes: When the value of the first detection index is greater than the preset threshold, the first number information to be read next is determined based on the number information of the copied redo log.

3. The method according to claim 1, wherein, The step of backing up the redo logs from the archived files to the backup node includes: Get the third number information of the second redo log that is currently being copied; Compare the third number information with the preset number information; Based on the comparison results, the starting copy number information is determined from the archive file, and the redo logs in the archive file are backed up to the backup node starting from the starting copy number information.

4. The method according to claim 3, wherein, The step of determining the starting copy number information from the archived file based on the comparison result includes: When the comparison result is that the third number information is less than or equal to the preset number information, the starting copy position is determined to be the preset number information; When the comparison result shows that the third number information is greater than the preset number information, the starting copy position is determined to be the third number information.

5. The method according to claim 3 or 4, wherein, The preset number information is the first number information in the first array; wherein, the first array is used to store the number information of the redo log files in the archive file.

6. The method according to claim 1, wherein, After saving the first redo log to an archive file, the method further includes: Monitor the archived files; When a new redo log file is detected from the archived files, the number information of each redo log file is obtained sequentially. Store the ID information of each redo log in the first array sequentially.

7. A log backup device, the device comprising: The unit is configured to determine the first number information to be read next based on the number information of the copied redo log; The storage unit is configured to sequentially read the number information of the redo logs before they are written to the disk, and if the second number information of the first redo log is greater than the first number information, save the first redo log to the archive file. The backup unit is configured to back up the redo logs from the archive file to the backup node after saving is complete.

8. A log backup device, the device comprising: Processor, memory, and communication bus; The communication bus is used to enable communication between the processor and the memory; When the processor executes the running program stored in the memory, it implements the method as described in any one of claims 1-6.

9. A storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as claimed in any one of claims 1-6.

10. A computer program product comprising a computer program that, when executed by a processor, implements the method as described in any one of claims 1-6.