IP Library Granted Patent US 11,256,715
Granted Patent B2
US 11,256,715 · App. 16/412,105 · Granted Feb 22, 2022

Data backup method and apparatus

Inventors: Yunliang Shi (Hangzhou, CN); Huabing Du (Hangzhou, CN)
Assignee: Advanced New Technologies Co., Ltd.
G06F16/273G06F16/2358
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,256,715
App. No.
16/412,105
Granted
Feb 22, 2022
Kind
B2
Abstract

A method and an apparatus for data backup are disclosed. The method includes querying a slave for check information, where the check information is data inserted into a master when data written to the master is copied into the slave in a form of a log; obtaining a time at which the check information is inserted into the master and setting the time as a backup completion time point; and deleting data record(s) that is/are earlier than the backup completion time point from mirrored data, the mirrored data being data that is synchronously written to a defined storage space when the data is written to the master. The method for data backup is easy to implement at a low cost, and provides highly secure data backup.

Claims (49)

1. A method implemented by one or more computing devices, the method comprising:

detecting that a piece of data is written into a master in a preset period of time, the piece of data being synchronously written into a defined storage space to generate mirrored data when the piece of data is written into the master;

inserting check information into the master, the check information including particular information to distinguish from the piece of data;

backing up the piece of data and the check information to a slave; and

deleting one or more data records including at least the piece of data from the defined storage space after the check information is backed up in the slave.

2. The method of claim 1 , further comprising recording the piece of data written into the master and the check information into a binary log.

3. The method of claim 2 , further comprising:

replicating at least one data event recorded in the binary log to a relay log; and

executing one or more data events recorded in the relay log, and updating the slave using respective data and check information recorded in the relay log.

4. The method of claim 3 , wherein the backup completion time point corresponds to a time at which the check information is inserted into the master.

5. The method of claim 1 , wherein deleting the one or more data records comprises:

obtaining a time at which the mirrored data is written to the defined storage space;

comparing the time at which the mirrored data is written to the defined storage space with a backup completion time point to obtain at least one data record in the mirrored data that is earlier than the backup completion time point; and

deleting at least one data record that is earlier than the backup completion time point from the mirrored data.

6. The method of claim 1 , wherein the defined storage space comprises an internal memory and/or a magnetic disk.

7. The method of claim 1 , wherein inserting the check information into the master comprises directly inserting the check information including the particular information into the master if no previous check information is stored in the master, or replacing the previous check information stored in the master by the check information including the particular information.

8. One or more computer readable media storing executable instructions that, when executed by one or more processors, cause the one or more processors to perform acts comprising:

detecting that a piece of data is written into a master in a preset period of time, the piece of data being synchronously written into a defined storage space to generate mirrored data when the piece of data is written into the master;

inserting check information into the master, the check information including particular information to distinguish from the piece of data;

backing up the piece of data and the check information to a slave; and

deleting one or more data records including at least the piece of data from the defined storage space after the check information is backed up in the slave.

9. The one or more computer readable media of claim 8 , the acts further comprising recording the piece of data written into the master and the check information into a binary log.

10. The one or more computer readable media of claim 8 , the acts further comprising:

replicating at least one data event recorded in the binary log to a relay log; and

executing one or more data events recorded in the relay log, and updating the slave using respective data and check information recorded in the relay log.

11. The one or more computer readable media of claim 8 , wherein deleting the one or more data records comprises:

obtaining a time at which the mirrored data is written to the defined storage space;

comparing the time at which the mirrored data is written to the defined storage space with a backup completion time point to obtain at least one data record in the mirrored data that is earlier than the backup completion time point; and

deleting at least one data record that is earlier than the backup completion time point from the mirrored data.

12. The one or more computer readable media of claim 11 , wherein the backup completion time point corresponds to a time at which the check information is inserted into the master.

13. The one or more computer readable media of claim 8 , wherein the defined storage space comprises an internal memory and/or a magnetic disk.

14. The one or more computer readable media of claim 8 , wherein inserting the check information into the master comprises directly inserting the check information including the particular information into the master if no previous check information is stored in the master, or replacing the previous check information stored in the master by the check information including the particular information.

15. An apparatus comprising:

one or more processors;

memory storing executable instructions that, when executed by the one or more processors, cause the one or more processors to perform acts comprising:

detecting that a piece of data is written into a master in a preset period of time, the piece of data being synchronously written into a defined storage space to generate mirrored data when the piece of data is written into the master;

inserting check information into the master, the check information including particular information to distinguish from the piece of data;

backing up the piece of data and the check information to a slave; and

deleting one or more data records including at least the piece of data from the defined storage space after the check information is backed up in the slave.

16. The apparatus of claim 15 , the acts further comprising recording the piece of data written into the master and the check information into a binary log.

17. The apparatus of claim 15 , the acts further comprising:

replicating at least one data event recorded in the binary log to a relay log; and

executing one or more data events recorded in the relay log, and updating the slave using respective data and check information recorded in the relay log.

18. The apparatus of claim 15 , wherein deleting the one or more data records comprises:

obtaining a time at which the mirrored data is written to the defined storage space;

comparing the time at which the mirrored data is written to the defined storage space with a backup completion time point to obtain at least one data record in the mirrored data that is earlier than the backup completion time point; and

deleting at least one data record that is earlier than the backup completion time point from the mirrored data.

19. The apparatus of claim 18 , wherein the backup completion time point corresponds to a time at which the check information is inserted into the master.

20. The apparatus of claim 15 , wherein inserting the check information into the master comprises directly inserting the check information including the particular information into the master if no previous check information is stored in the master, or replacing the previous check information stored in the master by the check information including the particular information.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 10, 2020
From: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
To: ADVANCED NEW TECHNOLOGIES CO., LTD.
Reel/Frame 054064/0610 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 31, 2020
From: ALIBABA GROUP HOLDING LIMITED
To: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053650/0816 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 14, 2019
From: SHI, YUNLIANG; DU, HUABING
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 049176/0948 →
Priority Claims (1)
CN 201510019142.7 · Jan 14, 2015 · national
Continuity (2)
Continuation 14994596 · Jan 13, 2016
Related Publication 20190266177A1 · Aug 29, 2019