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

By establishing a master-slave synchronization relationship between the local database and the cloud disk database, and using incremental snapshot backup data changes, the high storage cost and inefficiency problems caused by full backup in the existing technology are solved, and efficient and fast data is achieved Backup and restore.

CN119292834AInactive Publication Date: 2025-01-10JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411826041.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-01-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing data backup methods lead to full backups every day, resulting in huge amounts of stored data, increasing cloud storage costs and slow backup speed, affecting the normal operation of the database and ineffective backup efficiency.

Method used

By establishing a master-slave synchronization relationship between the local database and the cloud disk database, data backup is carried out using incremental snapshots, only the data change part is backed up, incremental snapshots are generated, and the full data is restored when needed.

Benefits of technology

It improves backup efficiency, reduces storage costs, ensures real-time and consistency of data, and realizes rapid data recovery without being affected by the size of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292834A_ABST
    Figure CN119292834A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data backup method, device and equipment, a computer readable medium and a program product. A specific embodiment of the method comprises the steps of determining whether data of a local database is backed up to a cloud disk database for the first time or not in response to the fact that first time is data backup regular time for the local database; in response to the determination that the data of the local database is not backed up to the cloud disk database for the first time, determining change data in the local database between the first time and the last data backup regular time; and sending the change data and the data backup regular time to the cloud disk database, so that the cloud disk database generates a corresponding first incremental snapshot. The implementation mode is related to data backup, the change data corresponding to the local database can be synchronized to the cloud disk database with the master-slave synchronization relation in time and efficiently, the change data are stored in a snapshot mode, and the backup efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of database data backup, and in particular to a data backup method, apparatus, device, computer-readable medium, and program product. Background Art

[0002] At present, data backup refers to the process of copying all or part of the data set from the hard disk or array of the application host to other storage media to prevent data loss due to system operation errors or system failures. Data backup is the basis of disaster recovery. Through backup, data can be protected from infringement and ensure data integrity and security. For data backup, the method adopted is: through the use of backup tools or commands to perform physical backup, perform a full backup once a day and perform an incremental backup every 5 minutes to achieve data backup.

[0003] However, the inventors have found that when using the above method to perform data backup, the following technical problems often occur: Performing a full backup every day will result in a huge amount of backup storage data, which will significantly increase cloud storage costs. In addition, the backup speed is slow, which may affect the normal operation of the database and lead to low backup efficiency.

[0004] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention

[0005] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.

[0006] Some embodiments of the present disclosure propose data backup methods, devices, equipment, computer-readable media, and program products to solve the technical problems mentioned in the above background technology section.

[0007] In a first aspect, some embodiments of the present disclosure provide a data backup method, including: in response to a first time being a regular data backup time for a local database, determining whether the data of the local database is backed up to a cloud disk database for the first time, wherein there is a master-slave synchronization relationship between the cloud disk database and the local database, and the cloud disk database is a database instance of the cloud disk mounted on the cloud platform; in response to determining that it is not the first time that the data of the local database is backed up to the cloud disk database, determining the change data in the local database between the first time and the previous data backup regular time; sending the change data and the data backup regular time to the cloud disk database, so that the cloud disk database generates a corresponding first incremental snapshot.

[0008] Optionally, the method further includes: in response to determining that it is the first time that the data of the local database is backed up to the cloud disk database, sending the initial full data corresponding to the local database and the regular data backup time to the cloud disk database, so that the cloud disk database can generate a corresponding initial full snapshot.

[0009] Optionally, the method further includes: in response to receiving data recovery information for a second time, determining a data backup periodic time that is in a time proximity relationship before the second time as a first target data backup periodic time; determining a second incremental snapshot set that is before the first target data backup periodic time; generating a first cloud disk instance at the second time based on the second incremental snapshot set and the initial full snapshot; in response to determining that the backup is restored to the local database or the corresponding cluster, copying the data corresponding to the first cloud disk instance to the local database or the cluster.

[0010] Optionally, the regular data backup time is set based on a backup frequency, and the backup frequency is determined based on a data change frequency and business requirements.

[0011] Optionally, the method further includes: in response to determining that the third time is an adjustment time for adjusting the full snapshot based on the incremental snapshot, determining a historical full snapshot and a third incremental snapshot that are close in time to the third time, wherein the third incremental snapshot set is each incremental snapshot between the historical time corresponding to the historical full snapshot and the third time; according to the third incremental snapshot set, adjusting the data sequence of the full data corresponding to the historical full snapshot to generate a full snapshot at the third time, wherein the third time is determined based on the amount of data corresponding to the third incremental snapshot set; and backing up the full snapshot at the third time and the third time to the cloud disk database.

[0012] Optionally, the method further includes: in response to receiving data recovery information for a fourth time, determining a data backup regular time and an adjustment time that are adjacent to the time before the fourth time as a second target data backup regular time and a target adjustment time; determining an incremental snapshot set between the target adjustment time and the second target data backup regular time as a fourth incremental snapshot set, and determining a historical full snapshot corresponding to the target adjustment time; generating a second cloud disk instance for the fourth time based on the fourth incremental snapshot set and the historical full snapshot; in response to determining that the backup is restored to the local database or the corresponding cluster, copying the data corresponding to the second cloud disk instance to the local database or the cluster.

[0013] Optionally, the method further includes: in response to determining that the fifth time is the incremental adjustment time for adjusting the incremental snapshot, determining a fifth incremental snapshot set corresponding to the fifth time and having a time proximity relationship, wherein the fifth incremental snapshot set is each incremental snapshot between the historical time corresponding to the historical full snapshot and the fifth time; performing incremental snapshot fusion on each fifth incremental snapshot in the fifth incremental snapshot set to generate a fused incremental snapshot; and backing up the fused incremental snapshot and the above to the cloud disk database.

[0014] Optionally, the method further includes: in response to receiving data recovery information for a sixth time, determining an incremental adjustment time that is adjacent to the time before the sixth time as a target incremental adjustment time; determining a historical full snapshot that corresponds to the sixth time and has a time proximity relationship; generating a third cloud disk instance at the sixth time based on the target incremental adjustment time and the historical full snapshot; in response to determining that the backup is restored to the local database or the corresponding cluster, copying the data corresponding to the third cloud disk instance to the local database or the cluster.

[0015] In a second aspect, some embodiments of the present disclosure provide a data backup device, including: a first determination unit, configured to determine whether the data of the local database is backed up to a cloud disk database for the first time in response to a first time being a regular data backup time for the local database, wherein a master-slave synchronization relationship exists between the cloud disk database and the local database, and the cloud disk database is a database instance of the cloud disk mounted on the cloud platform; a second determination unit, configured to determine the change data in the local database between the first time and the previous data backup regular time in response to determining that it is not the first time that the data of the local database is backed up to the cloud disk database; a backup unit, configured to send the change data and the data backup regular time to the cloud disk database, so that the cloud disk database generates a corresponding first incremental snapshot.

[0016] Optionally, the device also includes: in response to determining that it is the first time to back up the data of the above-mentioned local database to the above-mentioned cloud disk database, sending the initial full data corresponding to the above-mentioned local database and the above-mentioned data backup regular time to the above-mentioned cloud disk database, so that the above-mentioned cloud disk database can generate a corresponding initial full snapshot.

[0017] Optionally, the device also includes: in response to receiving data recovery information for a second time, determining a data backup periodic time that is in a time-adjacent relationship before the above-mentioned second time as a first target data backup periodic time; determining a second incremental snapshot set that is before the above-mentioned first target data backup periodic time; generating a first cloud disk instance at the above-mentioned second time based on the above-mentioned second incremental snapshot set and the above-mentioned initial full snapshot; in response to determining that the backup is restored to the above-mentioned local database or the corresponding cluster, copying the data corresponding to the above-mentioned first cloud disk instance to the above-mentioned local database or the above-mentioned cluster.

[0018] Optionally, the device also includes: in response to determining that the third time is an adjustment time for adjusting the full snapshot based on the incremental snapshot, determining the historical full snapshot and the third incremental snapshot that are in a time-close relationship corresponding to the above-mentioned third time, wherein the above-mentioned third incremental snapshot set is the incremental snapshots between the historical time corresponding to the above-mentioned historical full snapshot and the above-mentioned third time; according to the above-mentioned third incremental snapshot set, adjusting the data sequence of the full data corresponding to the above-mentioned historical full snapshot to generate a full snapshot at the above-mentioned third time, wherein the above-mentioned third time is determined based on the amount of data corresponding to the above-mentioned third incremental snapshot set; and backing up the full snapshot at the above-mentioned third time and the above-mentioned third time to the above-mentioned cloud disk database.

[0019] Optionally, the device also includes: in response to receiving data recovery information for a fourth time, determining a data backup regular time and an adjustment time that are adjacent to the time before the above-mentioned fourth time as a second target data backup regular time and a target adjustment time; determining an incremental snapshot set between the above-mentioned target adjustment time and the second target data backup regular time as a fourth incremental snapshot set, and determining a historical full snapshot corresponding to the above-mentioned target adjustment time; generating a second cloud disk instance for the above-mentioned fourth time based on the above-mentioned fourth incremental snapshot set and the above-mentioned historical full snapshot; in response to determining that the backup is restored to the above-mentioned local database or the corresponding cluster, copying the data corresponding to the above-mentioned second cloud disk instance to the above-mentioned local database or the above-mentioned cluster.

[0020] Optionally, the device also includes: in response to determining that the fifth time is the incremental adjustment time for adjusting the incremental snapshot, determining a fifth incremental snapshot set corresponding to the fifth time and having a time proximity relationship, wherein the fifth incremental snapshot set is each incremental snapshot between the historical time corresponding to the historical full snapshot and the fifth time; performing incremental snapshot fusion on each fifth incremental snapshot in the fifth incremental snapshot set to generate a fused incremental snapshot; and backing up the fused incremental snapshot and the above to the cloud disk database.

[0021] Optionally, the device also includes: in response to receiving data recovery information for a sixth time, determining an incremental adjustment time that is adjacent to the time before the above-mentioned sixth time as a target incremental adjustment time; determining a historical full snapshot that has a time proximity relationship corresponding to the above-mentioned sixth time; generating a third cloud disk instance at the above-mentioned sixth time according to the above-mentioned target incremental adjustment time and the historical full snapshot; in response to determining that the backup is restored to the above-mentioned local database or the corresponding cluster, copying the data corresponding to the above-mentioned third cloud disk instance to the above-mentioned local database or the above-mentioned cluster.

[0022] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.

[0023] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner in the first aspect is implemented.

[0024] In a fifth aspect, some embodiments of the present disclosure provide a computer program product, including a computer program, which implements the method described in any implementation manner in the above-mentioned first aspect when executed by a processor.

[0025] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: through the data backup method of some embodiments of the present disclosure, the change data corresponding to the local database can be synchronized to the cloud disk database with a master-slave synchronization relationship in a timely and efficient manner, so as to be stored in the form of snapshots, thereby improving the backup efficiency. Specifically, the reason for the low efficiency of the related backup is that the full backup every day will result in a huge amount of data stored for backup, which will significantly increase the cloud storage cost, and the backup speed is slow, which may affect the normal operation of the database, resulting in low backup efficiency. Based on this, the data backup method of some embodiments of the present disclosure, first, in response to the first time being the regular time for data backup for the local database, determines whether the data of the above-mentioned local database is backed up to the cloud disk database for the first time, wherein there is a master-slave synchronization relationship between the above-mentioned cloud disk database and the above-mentioned local database, and the above-mentioned cloud disk database is a database instance of the cloud disk mounted on the cloud platform. Here, by determining whether it is the first time to back up the data to the cloud disk database, the backup type of the data backup can be determined to ensure that the accurate recovery of the data is effectively achieved in the subsequent data recovery process. In addition, by establishing a cloud disk database with a master-slave synchronization relationship with the local database, the changed data can be synchronized in real time, ensuring the real-time and consistency of the backup data. Then, in response to determining that it is not the first time to back up the data of the local database to the cloud disk database, the changed data in the local database between the first time and the previous data backup regular time is determined. Here, replacing each full backup with an incremental backup can avoid the high storage cost and low backup efficiency caused by the large storage volume of the full backup, greatly improving the data backup efficiency. Moreover, the subsequent data synchronization backup by snapshot can be carried out in the subsequent recovery process without being affected by the size of the data, and the data can be quickly restored. Finally, the above-mentioned changed data and the above-mentioned data backup regular time are backed up to the cloud disk database, so that the above-mentioned cloud disk database can generate the corresponding first incremental snapshot. In summary, by establishing a cloud disk database with a master-slave synchronization relationship with the local database, the storage of data in the form of incremental snapshots can be realized in real time, ensuring data synchronization efficiency and backup efficiency. In addition, the storage of changed data in the form of incremental snapshots can reduce the storage pressure and low backup efficiency of each full backup. In this way, the changed data corresponding to the local database can be synchronized to the cloud disk database with a master-slave synchronization relationship in a timely and efficient manner, and stored in the form of snapshots, thereby improving backup efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0027] Figure 1 is a schematic diagram of an application scenario of a data backup method according to some embodiments of the present disclosure; Figure 2 is a flow chart of some embodiments of the data backup method according to the present disclosure; Figure 3 is a schematic diagram of regenerating a full snapshot based on incremental snapshots in some embodiments of the data backup method disclosed herein; Figure 4 are flow charts of other embodiments of the data backup method according to the present disclosure; Figure 5 is a schematic diagram of the structure of some embodiments of the data backup device according to the present disclosure; Figure 6 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0028] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0029] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0030] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0031] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0032] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0033] With regard to the collection, storage, and use of user personal information (such as the first incremental snapshot) involved in this disclosure, before performing the corresponding operations, the relevant organizations or individuals shall fulfill their obligations, including conducting personal information security impact assessments, fulfilling the obligation to inform the personal information subject, and obtaining the authorization and consent of the personal information subject in advance.

[0034] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0035] Figure 1 It is a schematic diagram of an application scenario of the data backup method according to some embodiments of the present disclosure.

[0036] exist Figure 1 In the application scenario, first, in response to the first time 102 being the regular data backup time for the local database 103, the electronic device 101 can determine whether the data of the local database 103 is backed up to the cloud disk database 106 for the first time. Among them, there is a master-slave synchronization relationship between the cloud disk database 106 and the local database 103. The cloud disk database 106 is a database instance of the cloud disk mounted on the cloud platform. In this application scenario, the first time 102 can be "November 1st at 11 o'clock". Then, in response to determining that it is not the first time to back up the data of the local database 103 to the cloud disk database 106, the electronic device 101 can determine the change data 105 in the local database 103 between the first time 102 and the previous data backup regular time 104. In this application scenario, the previous data backup regular time 104 can be "November 1st at 10:55". Finally, the electronic device 101 may back up the above-mentioned changed data 105 and the above-mentioned data backup to the above-mentioned cloud disk database 106 at a regular time, so that the above-mentioned cloud disk database 106 can generate a corresponding first incremental snapshot 107.

[0037] It should be noted that the electronic device 101 can be hardware or software. When the electronic device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or it can be implemented as a single server or a single terminal device. When the electronic device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, for example, or it can be implemented as a single software or software module. No specific limitation is made here.

[0038] It should be understood that Figure 1The number of electronic devices in the embodiment is only for illustration. Any number of electronic devices may be provided according to implementation requirements.

[0039] Continue to refer Figure 2 , shows a process 200 of some embodiments of the data backup method according to the present disclosure. The data backup method comprises the following steps: Step 201 , in response to the first time being a regular time for backing up data in a local database, determining whether to back up the data in the local database to a cloud disk database for the first time.

[0040] In some embodiments, in response to the first time being a regular time for data backup of the local database, an execution subject (eg, Figure 1 The electronic device 101 shown in the figure can determine whether to back up the data of the above-mentioned local database to the cloud disk database for the first time. In practice, the electronic device 101 can be a data backup system. The data backup system can be a system for timely data backup and data recovery. The regular time of data backup can be a pre-regular time for data backup. In practice, the pre-regular time can be periodically determined. That is, the data backup time can be periodically performed (data backup processing is performed every predetermined time). The local database can be a database that performs various processing on data that undergoes data transformation locally. For example, the local database can be a relational database service (RDS) that needs to be backed up and restored. There is a master-slave synchronization relationship between the above-mentioned cloud disk database and the above-mentioned local database. That is, the local database is the master database, and the cloud disk database is the slave database. The transformation of each data in the local database will be synchronized to the cloud disk database to perform the corresponding data transformation. The above-mentioned cloud disk database is a database instance mounted on a cloud disk created on a cloud platform.

[0041] In practice, a database instance mounted with a cloud disk can be generated by following the steps below: First, select the corresponding cloud platform based on hardware requirements (for example, CPU requirements, etc.).

[0042] Then, select a suitable cloud host, create a database, and ensure that the instance configuration meets the data synchronization requirements.

[0043] Next, select the appropriate cloud disk type and size and mount it to the newly created database for data backup.

[0044] Finally, a master-slave synchronization relationship is set between the created database (i.e., the cloud disk database) and the local database to ensure that when data transformation occurs in the local database, the data in the corresponding created database is synchronously transformed accordingly.

[0045] In some optional implementations of some embodiments, the above-mentioned data backup periodic time is set based on the backup frequency, and the above-mentioned backup frequency is determined based on the data change frequency and business needs. Among them, the backup frequency can characterize the frequency of data backup. For example, the backup frequency can be a backup at the minute level. The data change frequency can be the frequency of data transformation in the local database. Business needs can be related business requirements, such as data backup processing on special holidays (for example, Double 11 holidays). The higher the backup frequency, the more frequent the corresponding data backup.

[0046] Step 202, in response to determining that it is not the first time to back up the data of the local database to the cloud disk database, determine the changed data in the local database between the first time and the previous data backup regular time.

[0047] In some embodiments, in response to determining that it is not the first time to back up the data of the above-mentioned local database to the above-mentioned cloud disk database, the above-mentioned execution entity may determine the change data in the above-mentioned local database between the above-mentioned first time and the previous data backup regular time as the first incremental snapshot. Among them, the previous data backup regular time may be the regular time of the most recent data backup before the first time. For example, data backup is performed for a periodic duration for the data backup policy. The corresponding first time is the time when the data backup is performed for the fourth time. Then the previous data backup regular time may be the time when the data backup is performed for the third time. Among them, the change data may represent the difference data between each data in the local database at the first time and each data at the previous data backup regular time. For example, the various data stored in the local database at the first time include: data A, data B, data C and data D. The various data stored in the local database at the previous data backup regular time include: data A, data B, data C, data D and data E. Then the corresponding change data may be the addition of data E.

[0048] Step 203: Back up the above-mentioned changed data and the above-mentioned data backup at a regular time to the above-mentioned cloud disk database, so that the above-mentioned cloud disk database can generate a corresponding first incremental snapshot.

[0049] In some embodiments, the execution subject may back up the change data and the data backup periodic time to the cloud disk database, so that the cloud disk database can generate a corresponding first incremental snapshot. The first incremental snapshot is an incremental snapshot generated by the cloud disk database based on the change data and the data backup periodic time lock. The first incremental snapshot will be set with a backup retention time in the cloud disk database, so that the backup will be deleted after the backup retention time.

[0050] As an example, the above execution entity may back up the changed data and the data backup periodic time in the form of key-value pairs to the cloud disk database.

[0051] In some optional implementations of some embodiments, after step 203, the steps further include: In response to determining that it is the first time to back up the data of the above-mentioned local database to the above-mentioned cloud disk database, the above-mentioned execution entity may back up the initial full data corresponding to the above-mentioned local database and the above-mentioned data backup periodic time to the above-mentioned cloud disk database, so that the above-mentioned cloud disk database can generate a corresponding initial full snapshot. Among them, backing up the data of the above-mentioned local database to the above-mentioned cloud disk database for the first time can represent the first time that the local database synchronizes the data backup to the cloud disk database. The initial full data can be all the full data stored in the local database at the first time. Among them, the initial full snapshot is a full snapshot generated by the cloud disk database based on the initial full data and the data backup periodic time lock.

[0052] As an example, the execution entity may back up the initial full data corresponding to the local database and the data backup periodic time to the cloud disk database in the form of key-value pairs.

[0053] In some optional implementations of some embodiments, after step 203, the steps further include: In the first step, in response to determining that the third time is the adjustment time for adjusting the full snapshot based on the incremental snapshot, the execution subject may determine the historical full snapshot and the third incremental snapshot set corresponding to the third time, which are close in time, wherein the third incremental snapshot set is each incremental snapshot between the historical time corresponding to the historical full snapshot and the third time. The adjustment time may be the time for regenerating the full snapshot according to the incremental snapshot to correspond to the latest full snapshot.

[0054] like Figure 3As shown, a schematic diagram of regenerating a full snapshot according to an incremental snapshot is shown. In chronological order, the corresponding generated full snapshot sequence may include: an initial full snapshot, a first full snapshot, a second full snapshot, and a third full snapshot. The backup time corresponding to the initial full snapshot is the first time. The backup time corresponding to the first full snapshot is time A, the backup time corresponding to the second full snapshot is time B, and the backup time corresponding to the third full snapshot is time C. The first full snapshot is generated based on the initial full snapshot and the first historical incremental snapshot sequence. The first historical incremental snapshot sequence is each incremental snapshot between the first time and time A. The time series between the first time and time A is a data backup regular time series A. The second full snapshot is generated based on the first full snapshot and the second historical incremental snapshot sequence. The second historical incremental snapshot sequence is each incremental snapshot between time A and time B. The time series between time A and time B is a data regular time series B. The third full snapshot is generated based on the second full snapshot and the third historical incremental snapshot sequence. The third historical incremental snapshot sequence is each incremental snapshot between time B and time C. The time series between time B and time C is a data regular time series C. The third time is the time after time C. The historical full snapshot corresponding to the third time and having a time close relationship is time C. The historical full snapshot is the third full snapshot. The third incremental snapshot can be an incremental snapshot of data changes between time C and the third time.

[0055] In the second step, the execution subject can adjust the data sequence of the full data corresponding to the historical full snapshot according to the third incremental snapshot set to generate a full snapshot at the third time. The third time is determined based on the amount of data corresponding to the third incremental snapshot set. In practice, when the amount of data corresponding to each incremental snapshot generated between the last adjustment time and the third time reaches the target value, the time when the value is reached is the third time, and each incremental snapshot between the last adjustment time and the third time is the third incremental snapshot set.

[0056] In a third step, the execution entity may back up the full snapshot at the third time and the third time to the cloud disk database.

[0057] In some optional implementations of some embodiments, after step 203, the steps further include: In the first step, in response to receiving data recovery information for the fourth time, the execution subject may determine a data backup regular time and adjustment time that is adjacent to the fourth time as the second target data backup regular time and target adjustment time. The data recovery information may be recovery information for recovering the data of each database at the fourth time.

[0058] For example, the fourth time is the time between time A and time B. Each data backup regular time between time A and time B includes: data backup regular time 1, data backup regular time 2, data backup regular time 3, and data backup regular time 4. The fourth time is the time between data backup regular time 3 and data backup regular time 4. The second target data backup regular time may be data backup regular time 3. The target adjustment time may be time A. The second historical incremental snapshot sequence includes: data backup regular time 1 corresponds to the second historical incremental snapshot, data backup regular time 2 corresponds to the second historical incremental snapshot, data backup regular time 3 corresponds to the second historical incremental snapshot, and data backup regular time 4 corresponds to the second historical incremental snapshot.

[0059] In the second step, the execution subject may determine the incremental snapshot set between the target adjustment time and the second target data backup periodic time as the fourth incremental snapshot set, and determine the historical full snapshot corresponding to the target adjustment time. For example, the fourth incremental snapshot set is the second historical incremental snapshot sequence. The historical full snapshot may be the first full snapshot.

[0060] In a third step, the execution entity may generate a second cloud disk instance for the fourth time according to the fourth incremental snapshot set and the historical full snapshot.

[0061] As an example, the execution subject may perform corresponding data operations on each data in the historical full snapshot according to the fourth incremental snapshot set to generate a processed snapshot, and generate a second cloud disk instance according to the processed snapshot.

[0062] In a fourth step, in response to determining that the backup is restored to the local database or the corresponding cluster, the execution entity may copy the data corresponding to the second cloud disk instance to the local database or the cluster.

[0063] In some optional implementations of some embodiments, after step 203, the steps further include: In the first step, in response to determining that the fifth time is the incremental adjustment time for adjusting the incremental snapshot, the execution subject may determine the fifth incremental snapshot set corresponding to the fifth time and having a time proximity relationship, wherein the fifth incremental snapshot set is each incremental snapshot between the historical time corresponding to the historical full snapshot and the fifth time. The incremental adjustment time may be the time for fusing and adjusting the incremental snapshots that are adjacent in time. Here, by fusing the incremental snapshots, it is possible to effectively avoid calling a large number of incremental snapshots during data recovery and then recovering data based on the full snapshot, thereby greatly improving data recovery efficiency and data recovery speed.

[0064] For example, the corresponding time of the historical full snapshot is 11 o'clock, and incremental snapshots are generated every 5 minutes. At 12 o'clock (that is, the incremental adjustment time), 12 incremental snapshots have been generated in the middle. The 12 incremental snapshots can be merged to generate a merged incremental snapshot. If data recovery is performed at 12 o'clock, the merged incremental snapshot and the historical full snapshot can be directly used for data recovery, avoiding the call of 12 incremental snapshots, which improves the recovery time and recovery efficiency.

[0065] In a second step, the execution subject may merge the incremental snapshots of the fifth incremental snapshots in the fifth incremental snapshot set to generate a merged incremental snapshot.

[0066] The third step is to merge the incremental snapshot and the backup into the cloud disk database.

[0067] In some optional implementations of some embodiments, after step 203, the steps further include: In the first step, in response to receiving the data recovery information for the sixth time, the execution subject may determine an incremental adjustment time that is adjacent to the time before the sixth time as the target incremental adjustment time.

[0068] In a second step, the execution subject may determine a full historical snapshot corresponding to the sixth time that has a time proximity relationship.

[0069] In the third step, the execution subject may adjust the time and the historical full snapshot according to the target increment to generate a third cloud disk instance at the sixth time.

[0070] In response to determining that the backup is restored to the local database or the corresponding cluster, the data corresponding to the third cloud disk instance is copied to the local database or the cluster.

[0071] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: through the data backup method of some embodiments of the present disclosure, the change data corresponding to the local database can be synchronized to the cloud disk database with a master-slave synchronization relationship in a timely and efficient manner, so as to be stored in the form of snapshots, thereby improving the backup efficiency. Specifically, the reason for the low efficiency of the related backup is that the full backup every day will result in a huge amount of data stored for backup, which will significantly increase the cloud storage cost, and the backup speed is slow, which may affect the normal operation of the database, resulting in low backup efficiency. Based on this, the data backup method of some embodiments of the present disclosure, first, in response to the first time being the regular time for data backup for the local database, determines whether the data of the above-mentioned local database is backed up to the cloud disk database for the first time, wherein there is a master-slave synchronization relationship between the above-mentioned cloud disk database and the above-mentioned local database, and the above-mentioned cloud disk database is a database instance of the cloud disk mounted on the cloud platform. Here, by determining whether it is the first time to back up the data to the cloud disk database, the backup type of the data backup can be determined to ensure that the accurate recovery of the data is effectively achieved in the subsequent data recovery process. In addition, by establishing a cloud disk database with a master-slave synchronization relationship with the local database, the changed data can be synchronized in real time, ensuring the real-time and consistency of the backup data. Then, in response to determining that it is not the first time to back up the data of the local database to the cloud disk database, the changed data in the local database between the first time and the previous data backup regular time is determined. Here, replacing each full backup with an incremental backup can avoid the high storage cost and low backup efficiency caused by the large storage volume of the full backup, greatly improving the data backup efficiency. Moreover, the subsequent data synchronization backup by snapshot can be carried out in the subsequent recovery process without being affected by the size of the data, and the data can be quickly restored. Finally, the above-mentioned changed data and the above-mentioned data backup regular time are backed up to the cloud disk database, so that the above-mentioned cloud disk database can generate the corresponding first incremental snapshot. In summary, by establishing a cloud disk database with a master-slave synchronization relationship with the local database, the storage of data in the form of incremental snapshots can be realized in real time, ensuring data synchronization efficiency and backup efficiency. In addition, the storage of changed data in the form of incremental snapshots can reduce the storage pressure and low backup efficiency of each full backup. In this way, the changed data corresponding to the local database can be synchronized to the cloud disk database with a master-slave synchronization relationship in a timely and efficient manner, and stored in the form of snapshots, thereby improving backup efficiency.

[0072] Further references Figure 4 , shows a process 400 of another embodiment of the data backup method according to the present disclosure. The data backup method comprises the following steps: Step 401 , in response to the first time being a regular time for backing up data in a local database, determining whether to back up the data in the local database to a cloud disk database for the first time.

[0073] Step 402, in response to determining that it is not the first time to back up the data of the local database to the cloud disk database, determine the changed data in the local database between the first time and the previous data backup regular time.

[0074] Step 403, back up the above-mentioned changed data and the above-mentioned data backup regularly to the above-mentioned cloud disk database.

[0075] In some embodiments, the specific implementation of steps 401-403 and the technical effects thereof can be referred to in Figure 2 The steps 201-203 in the corresponding embodiment are not described in detail here.

[0076] Step 404: In response to receiving the data recovery information for the second time, determine a data backup regular time that is in a time proximity relationship before the second time as a first target data backup regular time.

[0077] In some embodiments, in response to receiving the snapshot recovery information at the second time, the execution subject (eg Figure 1 The electronic device 101 shown in the figure can determine a data backup regular time that is in a time proximity relationship before the second time as the first target data backup regular time. The snapshot recovery information can be information for recovering database data at a corresponding time.

[0078] Step 405: determine a second incremental snapshot set before the first target data backup regular time.

[0079] In some embodiments, the execution entity may determine a second incremental snapshot set before the first target data backup period.

[0080] Step 406: Generate a first cloud disk instance at the second time according to the second incremental snapshot set and the initial full snapshot.

[0081] In some embodiments, the execution entity may generate a first cloud disk instance at the second time according to the second incremental snapshot set and the initial full snapshot.

[0082] Step 407 , in response to determining that the backup is restored to the local database or the corresponding cluster, copy the data corresponding to the first cloud disk instance to the local database or the cluster.

[0083] In some embodiments, in response to determining to restore the backup to the local database or the corresponding cluster, the execution entity may copy the data corresponding to the first cloud disk instance to the local database or the cluster.

[0084] from Figure 4 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, Figure 4 In the process 400 of the data backup method in some corresponding embodiments, by determining the corresponding incremental snapshot set, a cloud disk instance including the recovery data can be accurately and efficiently generated without being affected by the amount of data. Through the cloud disk instance, data recovery can be achieved efficiently.

[0085] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a data backup device. These device embodiments are similar to Figure 2 Corresponding to the method embodiments shown, the data backup device can be specifically applied to various electronic devices.

[0086] like Figure 5 As shown, a data backup device 500 includes: a first determination unit 501, a second determination unit 502 and a backup unit 503. The first determination unit 501 is configured to determine whether the data of the local database is backed up to the cloud disk database for the first time in response to the first time being the regular data backup time for the local database, wherein there is a master-slave synchronization relationship between the cloud disk database and the local database, and the cloud disk database is a database instance mounted on the cloud disk created on the cloud platform; the second determination unit 502 is configured to determine the change data in the local database between the first time and the last regular data backup time in response to determining that it is not the first time to back up the data of the local database to the cloud disk database; the backup unit 503 is configured to send the change data and the regular data backup time to the cloud disk database, so that the cloud disk database generates a corresponding first incremental snapshot.

[0087] In some optional implementations of some embodiments, the apparatus 500 further includes: a first backup unit (not shown in the figure). The first backup unit may be configured to: in response to determining that it is the first time to back up the data of the local database to the cloud disk database, send the initial full data corresponding to the local database and the regular data backup time to the cloud disk database, so that the cloud disk database generates a corresponding initial full snapshot.

[0088] In some optional implementations of some embodiments, the above-mentioned device 500 also includes: a third determination unit, a fourth determination unit, a generation unit and a copy unit (not shown in the figure). Among them, the above-mentioned third determination unit can be configured to: in response to receiving data recovery information for the second time, determine the data backup regular time that is in a time proximity relationship before the above-mentioned second time as the first target data backup regular time. The fourth determination unit can be configured to: determine the second incremental snapshot set before the above-mentioned first target data backup regular time. The generation unit can be configured to: generate the first cloud disk instance at the above-mentioned second time according to the above-mentioned second incremental snapshot set and the above-mentioned initial full snapshot. The copy unit can be configured to: in response to determining that the backup is restored to the above-mentioned local database or the corresponding cluster, copy the data corresponding to the above-mentioned first cloud disk instance to the above-mentioned local database or the above-mentioned cluster.

[0089] In some optional implementations of some embodiments, the device 500 further includes: a fifth determination unit, an adjustment unit, and a second backup unit (not shown in the figure). The fifth determination unit may be configured to: in response to determining that the third time is the adjustment time for adjusting the full snapshot based on the incremental snapshot, determine the historical full snapshot and the third incremental snapshot corresponding to the third time that have a time proximity relationship, wherein the third incremental snapshot set is each incremental snapshot between the historical time corresponding to the historical full snapshot and the third time. The adjustment unit may be configured to: according to the third incremental snapshot set, adjust the data sequence of the full data corresponding to the historical full snapshot to generate the full snapshot at the third time, wherein the third time is determined based on the amount of data corresponding to the third incremental snapshot set. The second backup unit may be configured to: back up the full snapshot at the third time and the third time to the cloud disk database.

[0090] In some optional implementations of some embodiments, the device 500 further includes: a sixth determination unit, a seventh determination unit, a first instance generation unit, and a second backup unit (not shown in the figure). The sixth determination unit may be configured to: in response to receiving data recovery information for the fourth time, determine the data backup regular time and adjustment time that are adjacent to the time before the fourth time as the second target data backup regular time and target adjustment time. The seventh determination unit may be configured to: determine the incremental snapshot set between the target adjustment time and the second target data backup regular time as the fourth incremental snapshot set, and determine the historical full snapshot corresponding to the target adjustment time. The first instance generation unit may be configured to: generate a second cloud disk instance for the fourth time according to the fourth incremental snapshot set and the historical full snapshot. The second backup unit may be configured to: in response to determining that the backup is restored to the local database or the corresponding cluster, copy the data corresponding to the second cloud disk instance to the local database or the cluster.

[0091] In some optional implementations of some embodiments, the above-mentioned device 500 also includes: an eighth determination unit, a fusion unit and a third backup unit (not shown in the figure). Among them, the above-mentioned eighth determination unit can be configured to: in response to determining that the fifth time is the incremental adjustment time for adjusting the incremental snapshot, determine the fifth incremental snapshot set corresponding to the above-mentioned fifth time and having a time proximity relationship, wherein the above-mentioned fifth incremental snapshot set is each incremental snapshot between the historical time corresponding to the above-mentioned historical full snapshot and the above-mentioned fifth time. The fusion unit can be configured to: perform incremental snapshot fusion on each fifth incremental snapshot in the above-mentioned fifth incremental snapshot set to generate a fused incremental snapshot. The third backup unit can be configured to: backup the above-mentioned fused incremental snapshot and the above-mentioned to the above-mentioned cloud disk database.

[0092] In some optional implementations of some embodiments, the above-mentioned device 500 also includes: a ninth determination unit, a tenth determination unit, a first instance generation unit and a data copy unit (not shown in the figure). Among them, the above-mentioned ninth determination unit can be configured to: in response to receiving snapshot recovery information for the sixth time, determine the incremental adjustment time that is adjacent to the time before the above-mentioned sixth time as the target incremental adjustment time. The tenth determination unit can be configured to: determine the historical full snapshot corresponding to the above-mentioned sixth time that has a time proximity relationship. The first instance generation unit can be configured to: generate a third cloud disk instance at the above-mentioned sixth time according to the above-mentioned target incremental adjustment time and the historical full snapshot. The data copy unit can be configured to: in response to determining that the backup is restored to the above-mentioned local database or the corresponding cluster, copy the data corresponding to the above-mentioned third cloud disk instance to the above-mentioned local database or the above-mentioned cluster.

[0093] It is understandable that the units recorded in the data backup device 500 are similar to those in the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the data backup device 500 and the units included therein, and will not be described in detail here.

[0094] Reference below Figure 6 , which shows an electronic device (e.g. Figure 1 Schematic diagram of the structure of the electronic device 101) 600. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0095] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory 602 or a program loaded from a storage device 608 to a random access memory 603. Various programs and data required for the operation of the electronic device 600 are also stored in the random access memory 603. The processing device 601, the read-only memory 602, and the random access memory 603 are connected to each other via a bus 604. An input / output interface 605 is also connected to the bus 604.

[0096] Typically, the following devices may be connected to the input / output interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0097] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a read-only memory 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.

[0098] It should be noted that the computer-readable medium mentioned above in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0099] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0100] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in response to the first time being the regular data backup time for the local database, determines whether the data of the local database is backed up to the cloud disk database for the first time, wherein there is a master-slave synchronization relationship between the cloud disk database and the local database, and the cloud disk database is a database instance of the cloud disk mounted on the cloud platform; in response to determining that it is not the first time to back up the data of the local database to the cloud disk database, determines the change data in the local database between the first time and the previous data backup regular time; sends the change data and the data backup regular time to the cloud disk database, so that the cloud disk database generates the corresponding first incremental snapshot.

[0101] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0102] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0103] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor comprising a first determination unit, a second determination unit and a backup unit. Among them, the names of these units do not constitute a limitation on the unit itself in certain circumstances, for example, the backup unit may also be described as "a unit that sends the above-mentioned change data and the above-mentioned data backup to the above-mentioned cloud disk database at regular intervals, so that the above-mentioned cloud disk database can generate a corresponding first incremental snapshot".

[0104] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0105] Some embodiments of the present disclosure further provide a computer program product, including a computer program, which implements any of the above-mentioned data backup methods when executed by a processor.

[0106] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.

Claims

1. A data backup method, comprising: In response to the first time being a regular time for backing up data of a local database, determining whether to back up the data of the local database to a cloud disk database for the first time, wherein a master-slave synchronization relationship exists between the cloud disk database and the local database, and the cloud disk database is a database instance mounted on a cloud disk created on a cloud platform; In response to determining that it is not the first time to back up the data of the local database to the cloud disk database, determining the changed data in the local database between the first time and the last data backup regular time; The changed data and the data backup are sent to the cloud disk database at a regular time so that the cloud disk database can generate a corresponding first incremental snapshot.

2. The method according to claim 1, wherein: The method further comprises: In response to determining that it is the first time to back up the data of the local database to the cloud disk database, the initial full data corresponding to the local database and the data backup periodic time are sent to the cloud disk database so that the cloud disk database generates a corresponding initial full snapshot.

3. The method according to claim 2, wherein: The method further comprises: In response to receiving the data recovery information for the second time, determining a data backup periodic time that is in a time proximity relationship before the second time as a first target data backup periodic time; Determine a second incremental snapshot set before the first target data backup period; Generating a first cloud disk instance at the second time according to the second incremental snapshot set and the initial full snapshot; In response to determining that the backup is restored to the local database or the corresponding cluster, the data corresponding to the first cloud disk instance is copied to the local database or the cluster.

4. The method according to claim 1, wherein: The data backup period is set based on the backup frequency, and the backup frequency is determined based on the data change frequency and business requirements.

5. The method according to claim 1, wherein: The method further comprises: In response to determining that the third time is an adjustment time for adjusting the full snapshot based on the incremental snapshot, determining a historical full snapshot and a third incremental snapshot set that are in a close temporal relationship corresponding to the third time, wherein the third incremental snapshot set is each incremental snapshot between the historical time corresponding to the historical full snapshot and the third time; According to the third incremental snapshot set, adjusting the data sequence of the full data corresponding to the historical full snapshot to generate a full snapshot at the third time, wherein the third time is determined based on the amount of data corresponding to the third incremental snapshot set; The full snapshot at the third time and the third time are backed up to the cloud disk database.

6. The method according to claim 5, wherein: The method further comprises: In response to receiving data recovery information for a fourth time, determining a data backup regular time and an adjustment time that are adjacent to each other before the fourth time as a second target data backup regular time and a target adjustment time; Determine an incremental snapshot set between the target adjustment time and the second target data backup regular time as a fourth incremental snapshot set, and determine a historical full snapshot corresponding to the target adjustment time; Generating a second cloud disk instance for the fourth time according to the fourth incremental snapshot set and the historical full snapshot; In response to determining that the backup is restored to the local database or the corresponding cluster, the data corresponding to the second cloud disk instance is copied to the local database or the cluster.

7. The method according to claim 1, wherein: The method further comprises: In response to determining that the fifth time is the incremental adjustment time for adjusting the incremental snapshot, determining a fifth incremental snapshot set corresponding to the fifth time and having a time proximity relationship, wherein the fifth incremental snapshot set is each incremental snapshot between the historical time corresponding to the historical full snapshot and the fifth time; Performing incremental snapshot fusion on each fifth incremental snapshot in the fifth incremental snapshot set to generate a fused incremental snapshot; The merged incremental snapshot and the backup are saved to the cloud disk database.

8. The method according to claim 7, wherein: The method further comprises: In response to receiving data recovery information for a sixth time, determining an incremental adjustment time that is adjacent to the time before the sixth time as a target incremental adjustment time; Determine a historical full snapshot corresponding to the sixth time and having a time proximity relationship; Adjusting the time and the historical full snapshot according to the target increment, generating a third cloud disk instance at the sixth time; In response to determining that the backup is restored to the local database or the corresponding cluster, the data corresponding to the third cloud disk instance is copied to the local database or the cluster.

9. A data backup device, comprising: A first determining unit is configured to determine whether to back up the data of the local database to a cloud disk database for the first time in response to the first time being a regular time for backing up data of the local database, wherein a master-slave synchronization relationship exists between the cloud disk database and the local database, and the cloud disk database is a database instance mounted on a cloud disk created on a cloud platform; A second determining unit is configured to, in response to determining that it is not the first time to back up the data of the local database to the cloud disk database, determine the changed data in the local database between the first time and the last data backup regular time; The backup unit is configured to send the change data and the data backup periodically to the cloud disk database so that the cloud disk database generates a corresponding first incremental snapshot.

10. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.

11. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

12. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • A method and apparatus for data management

    CN109032840A

  • Method and device for data disaster recovery

    CN113535477A

  • Snapshot rollback method, system and device based on OPENSTACK cloud host and storage medium

    CN114780302A

  • Snapshot management method and system and computer readable medium

    CN115658239A

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

    CN117931514A