Data backup method, device and equipment, readable storage medium and program product

By acquiring and verifying the validity of BCT files during backup, and processing only changed data to determine the backup data, the problem of long scanning time for large data files is solved, achieving efficient data backup.

CN121008960APending Publication Date: 2025-11-25GUANGZHOU DINGJIA COMPUTER TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511050669.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-29
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

Existing technologies often involve long scan times for large data files during backup, resulting in low backup efficiency.

Method used

When the backup conditions are met, the BCT file at the current moment is obtained and its validity is verified. The changed data is then extracted from it, and the backup data is determined based on the changed data and the previous snapshot, thus avoiding scanning the entire data file.

Benefits of technology

It improves data backup efficiency, especially in scenarios with large data volumes. By processing only changed data instead of the entire data file, it significantly improves backup speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121008960A_ABST
    Figure CN121008960A_ABST
Patent Text Reader

Abstract

The invention relates to a data backup method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the steps that when a backup condition is met at the current moment, a current backup operation corresponding to the current moment is started, a current BCT file at the current moment is obtained, and the current backup operation is a non-first backup operation; when it is verified that the current BCT file is in a valid state, obtaining current change data based on the current BCT file; and the backup data corresponding to the current backup operation is determined based on the current change data and the previous snapshot obtained by the previous backup operation, so that the data backup efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a data backup method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] With the rapid development of computer technology, various types of data are experiencing explosive growth in enterprise operations, scientific research, and personal life. The importance of data is increasing day by day, and its security and integrity face many potential threats, such as hardware failures, software vulnerabilities, and malicious attacks. Therefore, data backup is necessary.

[0003] In related technologies, data backup is usually performed by scanning the entire data file. However, if the data file is large, the time spent scanning the data will increase, resulting in a decrease in the efficiency of data backup. Summary of the Invention

[0004] Therefore, it is necessary to provide a data backup method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve data backup efficiency in response to the above-mentioned technical problems.

[0005] Firstly, this application provides a data backup method, including:

[0006] When the backup conditions are met at the current moment, the current backup operation corresponding to the current moment is started to obtain the current BCT file at the current moment. The current backup operation is not the first backup operation.

[0007] If the current BCT file is verified to be valid, the current change data is obtained from the current BCT file.

[0008] Based on the current changed data and the previous snapshot obtained from the previous backup operation, determine the backup data corresponding to the current backup operation.

[0009] Secondly, this application also provides a data backup device, comprising:

[0010] The file acquisition module is used to start the current backup operation corresponding to the current time when the backup conditions are met at the current time, and to acquire the current BCT file at the current time. The current backup operation is not the first backup operation.

[0011] The data acquisition module is used to acquire the current change data from the current BCT file when the current BCT file is verified to be in a valid state.

[0012] The backup determination module is used to determine the backup data corresponding to the current backup operation based on the current changed data and the previous snapshot obtained from the previous backup operation.

[0013] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0014] When the backup conditions are met at the current moment, the current backup operation corresponding to the current moment is started to obtain the current BCT file at the current moment. The current backup operation is not the first backup operation.

[0015] If the current BCT file is verified to be valid, the current change data is obtained from the current BCT file.

[0016] Based on the current changed data and the previous snapshot obtained from the previous backup operation, determine the backup data corresponding to the current backup operation.

[0017] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0018] When the backup conditions are met at the current moment, the current backup operation corresponding to the current moment is started to obtain the current BCT file at the current moment. The current backup operation is not the first backup operation.

[0019] If the current BCT file is verified to be valid, the current change data is obtained from the current BCT file.

[0020] Based on the current changed data and the previous snapshot obtained from the previous backup operation, determine the backup data corresponding to the current backup operation.

[0021] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0022] When the backup conditions are met at the current moment, the current backup operation corresponding to the current moment is started to obtain the current BCT file at the current moment. The current backup operation is not the first backup operation.

[0023] If the current BCT file is verified to be valid, the current change data is obtained from the current BCT file.

[0024] Based on the current changed data and the previous snapshot obtained from the previous backup operation, determine the backup data corresponding to the current backup operation.

[0025] The aforementioned data backup method, apparatus, computer equipment, computer-readable storage medium, and computer program product, when the backup conditions are met at the current moment, initiate the current backup operation corresponding to the current moment. Then, they acquire the current BCT file at the current moment. This current backup operation is not the first backup operation. Only after verifying that the current BCT file is valid will they acquire the currently changed data based on it, ensuring the validity and accuracy of the currently changed data. Then, based on the currently changed data and the previous snapshot obtained from the previous backup operation, they can directly perform the current backup operation to obtain the backup data corresponding to the current backup operation. Throughout this process, it is not necessary to scan all data files; only the currently changed data that has been modified needs to be retrieved from the valid current BCT file, greatly improving the efficiency of data backup. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is an application environment diagram of a data backup method in one embodiment;

[0028] Figure 2 This is a flowchart illustrating a data backup method in one embodiment;

[0029] Figure 3 This is a structural block diagram of a data backup device in one embodiment;

[0030] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0032] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0033] The data backup method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another network server. The data backup method provided in this application can be executed independently by terminal 102 or server 104, or it can be executed collaboratively by terminal 102 and server 104.

[0034] In one embodiment, when the backup conditions are met at the current moment, server 104 initiates the current backup operation corresponding to the current moment. Server 104 obtains the current BCT file at the current moment, and the current backup operation is not the first backup operation. If server 104 verifies that the current BCT file is in a valid state, server 104 obtains the current change data based on the current BCT file. Based on the current change data and the previous snapshot obtained from the previous backup operation, server 104 determines the backup data corresponding to the current backup operation. In one embodiment, after receiving a backup request initiated by terminal 102 at the current moment, server 104 determines that the backup conditions are met at the current moment.

[0035] The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, etc. The server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0036] In one exemplary embodiment, such as Figure 2 As shown, a data backup method is provided, which can be applied to computer devices (which may be...) Figure 1 Terminal 102 in the middle can also be Figure 1 Taking server 104 as an example, the explanation includes the following steps 202 to 206. Wherein:

[0037] Step 202: When the backup conditions are met at the current moment, start the current backup operation corresponding to the current moment and obtain the current BCT file at the current moment. The current backup operation is not the first backup operation.

[0038] Here, backup conditions refer to the conditions for initiating data backup. In one embodiment, if a backup request is received from the backup requester at the current time, it is determined that the backup conditions are met at the current time. In one embodiment, if the time interval between the current time and the time of the previous backup operation reaches a preset duration, it is determined that the backup conditions are met at the current time. In one embodiment, if the time interval preceding the current time is a data update time point, it is determined that the backup conditions are met at the current time. The time difference between the current time and the previous time is a unit of time, which can be 1 hour, 1 day, etc. For example, if a data update operation is detected at the previous time, it is determined that the previous time is a data update time point, and the current time is automatically set to meet the backup conditions. For example, based on historical update records, the time with the highest probability of data update within a preset period (such as a day, a month, or a quarter) is statistically analyzed, and this time is used as the data update time. The historical update log records the number of data updates each hour for the past 30 days to determine the probability of an hourly data update. A higher number of updates indicates a higher probability of an update. The hour with the highest probability of an update is selected as the daily data update time. For example, if the probability of an update is highest at 10:00 AM, then the current time is 11:00 AM, and the backup conditions are met. Alternatively, the historical update log records the number of data updates each day for each month. If the probability of an update is highest on the 1st of each month, then the 1st of each month is the data update time. Therefore, if the current time is the 2nd of each month, the backup conditions are met.

[0039] The current backup operation refers to the data backup operation performed at the current moment. The current BCT file refers to the BCT file obtained at the current moment. The BCT (BLOCK CHANGE TRACKING) file is a data block change tracking file used to record the change information of each data block (such as the data file) in the data file.

[0040] In one embodiment, if the computer device verifies that the backup conditions are met at the current time, it initiates the current backup operation corresponding to the current time and determines the data file targeted by the current backup operation. If the backup operation is determined to be a non-first backup operation based on the backup record of the data file, the following step 204 is executed.

[0041] In one embodiment, after obtaining the current BCT file, the computer device verifies whether the current BCT file is empty; if so, it returns an exception message.

[0042] In one embodiment, the step of determining the first snapshot of the first backup operation includes: when the backup conditions are met for the first time at the initial time, acquiring the complete data in the target directory at the initial time; backing up the complete data and then performing snapshot processing to obtain the first snapshot of the first backup operation.

[0043] The initial moment is the point in time when the backup conditions are first met; it's the moment the first backup operation is performed on the data file. Complete data refers to all the data within the complete data file. The target directory is the directory where the complete data file is stored. Snapshot processing utilizes the storage system's snapshot technology to create a consistent point-in-time copy of the data during the backup process. Snapshot technology is a mechanism in storage technology used to capture and maintain the complete snapshot of data at a specific moment, similar to taking a "photo" of the data.

[0044] For example, the computer device mounts the storage pool to a mount directory in the local directory, obtains a data copy of the complete data in the target directory at the initial moment, performs snapshot processing on this data copy to obtain an initial snapshot, and stores the initial snapshot in the mount directory. Here, the data copy refers to the data obtained after backing up the complete data.

[0045] In this embodiment, in order to ensure the integrity of the backup data, a snapshot of the complete data backup is performed during the first backup operation. Therefore, subsequent backups only need to back up the changed data based on the backup data from the first backup operation, thereby improving backup efficiency.

[0046] Step 204: If the current BCT file is found to be valid, obtain the current change data based on the current BCT file.

[0047] For example, when the computer device verifies that the current BCT file is in a valid state, the computer device obtains at least one page information from the current BCT file, obtains the corresponding data change page based on each page information, and determines the current changed data based on at least one data change page.

[0048] In one embodiment, the computer device can determine whether the current BCT file is within its validity period. If it is, it is determined to be valid; otherwise, it is determined to be invalid.

[0049] In one embodiment, the computer device obtains change information of at least one data change page from the current BCT file, and determines that the current BCT file is in a valid state when all change information is verified to be valid.

[0050] In one embodiment, the method further includes: obtaining change information corresponding to at least one data change page from the current BCT file, wherein the change information includes at least the file identifier of the data file where the corresponding data change page is located, the instance identifier of the instance to which the data file belongs, and the page information of the data change page; for each data change page, obtaining the corresponding data file based on the corresponding file identifier and instance identifier; and verifying whether the current BCT file is in a valid state based on the data file corresponding to each of the at least one data change page, and obtaining a verification result.

[0051] In this context, a data change page refers to a page in a data file where data has been modified. This modification can be an update, deletion, or addition of data. A file identifier represents a data file, while an instance identifier refers to an instance within the database. For example, an instance contains at least one data file, and any two instances may have the same or different data files.

[0052] For example, after obtaining the current BCT file, the computer device retrieves change information corresponding to at least one data change page from the current BCT file. The change information corresponding to each data change page includes at least the file identifier of the data file where the data change page is located, the instance identifier of the instance to which the data file belongs, and the page information of the data change page. The page information may be the page number of the data change page in the data file. For example, a change information presented in the form of (4, 0, 8) indicates that page 8 in data file 4 (data file with file identifier 4) in instance 0 (the instance with instance identifier 0) is a data change page.

[0053] Next, for each data change page, the computer device, based on the corresponding file identifier and instance identifier, invokes an SQL (Structured Query Language) query to retrieve the storage path of the data file and obtains the corresponding data file from the storage path. The computer device then determines the validity of the page information in the corresponding change information based on the data file to which the data change page belongs, obtaining the judgment result for the data change page. Based on the judgment results of all data change pages, the computer device determines the verification result for whether the current BCT file is in a valid state. A valid judgment result for a data change page indicates that matching page information can be found based on the instance identifier and file identifier in the change information; that is, the change information of the data change page is valid. For example, if the judgment result of each data change page indicates that the verification passed, then the current BCT file is determined to be in a valid state. If the judgment result of at least one data change page indicates that the verification failed, then the current BCT file is determined to be in a invalid state.

[0054] For example, if it is determined that the current BCT file is valid, return to step 204 to continue execution. If it is determined that the current BCT file is not valid, end the current backup operation.

[0055] In this embodiment, the corresponding data file is retrieved by using the file identifier and instance identifier in the change information of the data change page. The validity of the current BCT file is then verified based on the data file to ensure that the subsequent backup operation is performed using a valid current BCT file, thus ensuring the accuracy and validity of the current backup operation.

[0056] In one embodiment, based on the data files corresponding to at least one data change page, verifying whether the current BCT file is in a valid state and obtaining a verification result includes: for each data change page, locating the corresponding page header information from the corresponding data file and parsing the page header information; determining whether the parsed page information is consistent with the page information in the change information to obtain a judgment result for the data change page; if the judgment results for each data change page are consistent, determining that the verification result indicates that the current BCT file is in a valid state; if the judgment results for at least one data change page are inconsistent, determining that the verification result indicates that the current BCT file is not in a valid state.

[0057] The header information is obtained through encoding or processing in a corresponding number system. Therefore, the header information is parsed—for example, decoded or analyzed in binary form—to obtain the parsing results. These results include the parsed page information, the file information of the data file containing the data change page, and the instance information of the instance to which that data file belongs. A data change page is the data page whose data has been modified.

[0058] For example, for each data change page, after obtaining the data file containing the data change page, the computer device locates the position of the data change page in the data file, i.e., its row, based on the page information of the change information of the data change page. It then retrieves the corresponding page header information from the located position, parses the page header information, and obtains the parsed page information. If the parsed page information is the same as the page information in the change information of the data change page, then the judgment result for the data change page is considered successful. If they are different, then the judgment result for the data change page is considered unsuccessful.

[0059] If the judgment results for each data change page are consistent, the current BCT file is determined to be valid; if the judgment results for at least one data change page are inconsistent, the current BCT file is determined to be invalid.

[0060] Each line in the data file corresponds to a specific data page. Therefore, based on the correspondence between lines and data pages, the location of the data change page in the data file can be determined based on the page information of the change information.

[0061] In this embodiment, after obtaining the data file to which the data change page belongs, the header information of the data change page is retrieved from the data file. The page information of the header information is used to verify whether the page information of the change information is accurate and valid. If they are consistent, it means that the page information of the data change page is accurate. If the page information of all data change pages is accurate, then the current BCT file can be accurately verified as valid.

[0062] Step 206: Based on the current changed data and the previous snapshot obtained from the previous backup operation, determine the backup data corresponding to the current backup operation.

[0063] The previous snapshot obtained from the previous backup operation can be understood as the backup data obtained from the previous backup operation.

[0064] For example, the computer device obtains the previous snapshot obtained from the previous backup operation, updates the previous snapshot with the current changed data, obtains the update result, and uses the updated snapshot as the backup data corresponding to the current backup operation.

[0065] For example, the computer device stores the backup data corresponding to the current moment and the current backup operation.

[0066] In one embodiment, determining the backup data corresponding to the current backup operation based on the current changed data and the previous snapshot obtained from the previous backup operation includes: writing the current changed data into the previous snapshot obtained from the previous backup operation to obtain the written data; and performing snapshot processing on the written data to obtain the backup data corresponding to the current backup operation.

[0067] For example, the computer device acquires a previous snapshot obtained from a previous backup operation, mounts the previous snapshot to a mount directory in the local directory, and writes the currently acquired changed data to the previous snapshot in the mount directory, thus obtaining the written data. The computer device performs snapshot processing on the written data to obtain the backup data corresponding to the current backup operation.

[0068] In this embodiment, by directly writing the current changed data to the previous snapshot, there is no need to scan the entire data file for backup; only the changed data needs to be written, which improves the efficiency of backup.

[0069] In one embodiment, the method further includes: parsing the obtained data query request; and if it is found that there is data missing in the original data at the time of the query requested by the data query request, retrieving the backup data corresponding to the time of the query from the stored backup dataset.

[0070] For example, after receiving a data query request, the computer device parses the request, determines the original data to be queried, and if it determines that the original data is missing, it determines the query time for that original data. Based on that query time, it retrieves the backup data corresponding to that query time. For instance, after retrieving the corresponding backup data, if the data storage duration of the backup data does not exceed the valid storage duration, the computer device determines that the backup data is usable and returns it, thus ensuring that the retrieved backup data is valid.

[0071] In this embodiment, after determining the backup data obtained at different times, if the original data required for the data query request is missing, the corresponding backup data can be retrieved based on the query time required by the data query request, so as to respond to the data query request in a timely manner.

[0072] In one specific embodiment, the specific steps are as follows:

[0073] When the backup conditions are met for the first time at the initial moment, the complete data in the target directory at the initial moment is retrieved; after backing up the complete data, a snapshot is taken to obtain the first snapshot of the first backup operation, and the initial moment and the first snapshot are stored accordingly. When the backup conditions are met at the current moment, the current backup operation corresponding to the current moment is started, and the current BCT file at the current moment is retrieved. The current backup operation is not the first backup operation.

[0074] Obtain change information for at least one data change page from the current BCT file. This change information includes at least the file identifier of the data file containing the data change page, the instance identifier of the instance to which the data file belongs, and the page information of the data change page. For each data change page, obtain the corresponding data file based on the file identifier and instance identifier. For each data change page, locate the corresponding page header information from the corresponding data file and parse the page header information. Determine whether the parsed page information matches the page information in the change information to obtain the data change page's determination result. If the determination results for each data change page are consistent, the verification result indicates that the current BCT file is in a valid state. If the determination results for at least one data change page are inconsistent, the verification result indicates that the current BCT file is not in a valid state.

[0075] If the verification passes, obtain the current changed data based on the current BCT file. Write the current changed data to the previous snapshot obtained from the previous backup operation to obtain the written data; perform snapshot processing on the written data to obtain the backup data corresponding to the current backup operation; and store the backup data corresponding to the current backup operation at the current time.

[0076] Upon receiving a data query request, the system parses the request. If it detects that the original data at the time of the query is missing, it retrieves the backup data corresponding to the time of the query from the stored backup dataset.

[0077] In this embodiment, when the backup conditions are met at the current moment, the current backup operation corresponding to that moment is initiated. Then, the current BCT file at that moment is obtained. This current backup operation is not the first backup operation. Only after verifying that the current BCT file is valid will the currently changed data be obtained based on it, ensuring the validity and accuracy of the currently changed data. Then, based on the currently changed data and the previous snapshot obtained from the previous backup operation, the current backup operation can be performed directly, thus obtaining the backup data corresponding to the current backup operation. Throughout this process, it is not necessary to scan all data files; only the currently changed data that has been modified needs to be obtained from the valid current BCT file, greatly improving the efficiency of data backup. This is especially beneficial for scenarios with a large number of data files. Furthermore, BCT files improve backup accuracy and recovery efficiency by efficiently tracking data page changes and reducing redundant backups, while reducing storage space requirements, ensuring high availability and high recovery speed. Compared to traditional backup methods, BCT files provide finer-grained backup granularity and more precise recovery paths, better meeting the backup needs of modern database environments.

[0078] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0079] Based on the same inventive concept, this application also provides a data backup apparatus for implementing the data backup method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more data backup apparatus embodiments provided below can be found in the limitations of the data backup method described above, and will not be repeated here.

[0080] In one exemplary embodiment, such as Figure 3 As shown, a data backup device 300 is provided, including: a file acquisition module 302, a data acquisition module 304, and a backup determination module 306, wherein:

[0081] The file acquisition module 302 is used to start the current backup operation corresponding to the current time when the backup conditions are met at the current time, and to acquire the current BCT file at the current time. The current backup operation is a non-first backup operation.

[0082] The data acquisition module 304 is used to acquire the current change data based on the current BCT file when it is verified that the current BCT file is in a valid state;

[0083] The backup determination module 306 is used to determine the backup data corresponding to the current backup operation based on the current changed data and the previous snapshot obtained from the previous backup operation.

[0084] In one embodiment, the backup determination module 306 is further configured to obtain the complete data in the target directory at the initial time when the backup conditions are met for the first time at the initial time; perform snapshot processing after backing up the complete data to obtain the first snapshot of the first backup operation.

[0085] In one embodiment, the apparatus further includes a file verification module, configured to obtain change information corresponding to at least one data change page from the current BCT file, wherein the change information includes at least the file identifier of the data file containing the corresponding data change page, the instance identifier of the instance to which the data file belongs, and the page information of the data change page; for each data change page, the corresponding data file is obtained based on the corresponding file identifier and the instance identifier; and based on the data file corresponding to each of the at least one data change page, the current BCT file is verified to be in a valid state to obtain a verification result.

[0086] In one embodiment, the file verification module is further configured to, for each data change page, locate the corresponding page header information from the corresponding data file and parse the page header information; determine whether the parsed page information is consistent with the page information in the change information, and obtain the judgment result of the data change page; if the judgment results of each data change page are consistent, determine that the verification result indicates that the current BCT file is in a valid state; if the judgment results of at least one data change page are inconsistent, determine that the verification result indicates that the current BCT file is not in a valid state.

[0087] In one embodiment, the backup determination module 306 is used to write the current changed data into the previous snapshot obtained from the previous backup operation to obtain the written data; and to perform snapshot processing on the written data to obtain the backup data corresponding to the current backup operation.

[0088] In one embodiment, the device further includes a data query module, used to parse the obtained data query request; and if it is found that there is a data gap in the original data at the query time requested by the data query request, to retrieve the backup data corresponding to the query time from the stored backup dataset.

[0089] Each module in the aforementioned data backup device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0090] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 4 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and databases. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media to run. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a data backup method.

[0091] Those skilled in the art will understand that Figure 4The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0092] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0093] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0094] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0095] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0096] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0097] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0098] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A data backup method, characterized in that, The method includes: When the backup conditions are met at the current moment, the current backup operation corresponding to the current moment is started to obtain the current BCT file at the current moment. The current backup operation is not the first backup operation. If the current BCT file is verified to be valid, the current change data is obtained based on the current BCT file. Based on the current changed data and the previous snapshot obtained from the previous backup operation, determine the backup data corresponding to the current backup operation.

2. The method according to claim 1, characterized in that, The steps for determining the first snapshot in the first backup operation include: When the backup conditions are met for the first time at the initial moment, the complete data in the target directory at the initial moment is obtained; After backing up the complete data, a snapshot is taken to obtain the first snapshot of the first backup operation.

3. The method according to claim 1, characterized in that, The method further includes: Obtain change information corresponding to at least one data change page from the current BCT file. The change information includes at least the file identifier of the data file where the corresponding data change page is located, the instance identifier of the instance to which the data file belongs, and the page information of the data change page. For each data change page, the corresponding data file is obtained based on the corresponding file identifier and the instance identifier; Based on the data file corresponding to at least one data change page, verify whether the current BCT file is in a valid state, and obtain the verification result.

4. The method according to claim 3, characterized in that, The step of verifying whether the current BCT file is in a valid state based on the data files corresponding to at least one data change page, and obtaining the verification result, includes: For each data change page, locate the corresponding header information from the relevant data file and parse the header information; Determine whether the parsed page information and the page information in the change information are consistent to obtain the determination result of the data change page; If the judgment results on each data change page are consistent, the verification result indicates that the current BCT file is in a valid state. If the judgment results of at least one data change page are inconsistent, the verification result indicates that the current BCT file is not in a valid state.

5. The method according to claim 1, characterized in that, The process of determining the backup data corresponding to the current backup operation based on the current changed data and the previous snapshot obtained from the previous backup operation includes: Write the current changed data to the previous snapshot obtained from the previous backup operation to obtain the written data; Perform snapshot processing on the written data to obtain the backup data corresponding to the current backup operation.

6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Parse the obtained data query request; If it is found that there is missing data in the original data at the time of the query requested by the data query request, the backup data corresponding to the time of the query is obtained from the stored backup dataset.

7. A data backup device, characterized in that, The device includes: The file acquisition module is used to start the current backup operation corresponding to the current time when the backup conditions are met at the current time, and to acquire the current BCT file at the current time. The current backup operation is not the first backup operation. The data acquisition module is used to acquire the current change data based on the current BCT file when the current BCT file is verified to be in a valid state. The backup determination module is used to determine the backup data corresponding to the current backup operation based on the current changed data and the previous snapshot obtained from the previous backup operation.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Virtual machine increment recovery method and device, computer equipment and storage medium

    CN117493074A

  • Backup method and device, recovery method and device, equipment and storage medium

    CN117931514A

  • System and method to achieve an uninterrupted file level backup using a pass-through snapshot engine

    US20210232318A1