System and method for cloning as SQL server AG databases in a hyperconverged system
A system and method include creating, by an Availability Group (“AG”) controller in a virtual computing system, a first AG clone from a source database. The source database is stored on a primary replica node of an AG of the virtual computing system. The system and method also include creating, by the Controller, a second AG clone from the first AG clone and storing, by the Controller, the second AG clone on a secondary replica node of the AG. The second AG clone has a size of substantially zero.
1 . A method comprising:
capturing, by a processor executing computer-readable instructions stored on a memory, a first snapshot of a source database on a first node;
capturing, by the processor, one or more transactional logs of one or more changes in the source database;
creating, by the processor, a point-in-time clone from the first snapshot and the one or more transactional logs; and
capturing, by the processor, a second snapshot of the point-in-time clone and, using the second snapshot, creating a second clone on a second node.
2 . The method of claim 1 , wherein creating the point-in-time clone includes applying, by the processor, the one or more transactional logs to the first snapshot.
3 . The method of claim 1 , further comprising:
storing, by the processor, the point-in-time clone on the first node.
4 . The method of claim 3 , wherein the first node is located in a first location and the second node is located in a second location different from the first location.
5 . The method of claim 3 , further comprising storing, by the processor, one or more copies of the second clone on additional nodes.
6 . The method of claim 1 , further comprising capturing, by the processor, the first snapshot at a first predetermined time and capturing the second snapshot at a second predetermined time according to a protection schedule associated with the source database.
7 . The method of claim 1 , wherein the point-in-time clone and the second clone reflect a state of the source database when the first snapshot was captured.
8 . The method of claim 1 , wherein a size of the first clone is greater than the size of the second clone.
9 . The method of claim 1 , wherein the point-in-time clone includes pointers to data of the source database, and wherein the second clone includes pointers to data of the point-in-time clone.
10 . The method of claim 1 , further comprising:
storing, by the processor, the first clone and one or more copies of the first clone on the first node based on a first replication factor; and
storing, by the processor, the second clone and one or more copies of the second clone on the second node based on a second replication factor.
11 . A system comprising one or more processors and a non-transitory, computer-readable medium including instructions which, when executed by the one or more processors, cause the one or more processors to:
capture a first snapshot of a source database on a first node;
capture one or more transactional logs of one or more changes in the source database;
create a point-in-time clone from the first snapshot and the one or more transactional logs; and
capture a second snapshot of the point-in-time clone and, using the second snapshot, creating a second clone on a second node.
12 . The system of claim 11 , wherein the instructions cause the one or more processors to create the point-in-time clone by applying the one or more transactional logs to the first snapshot.
13 . The system of claim 11 , wherein the instructions cause the one or more processors to store the point-in-time clone on the first node.
14 . The system of claim 13 , wherein the first node is located in a first location and the second node is located in a second location different from the first location.
15 . The system of claim 13 , wherein the instructions cause the one or more processors to store one or more copies of the second clone on additional nodes.
16 . The system of claim 11 , wherein the instructions cause the one or more processor to capture the first snapshot at a first predetermined time and capture the second snapshot at a second predetermined time according to a protection schedule associated with the source database.
17 . The system of claim 11 , wherein the point-in-time clone and the second clone reflect a state of the source database when the first snapshot was captured.
18 . The system of claim 11 , wherein a size of the first clone is greater than the size of the second clone.
19 . The system of claim 11 , wherein the point-in-time clone includes pointers to data of the source database, and wherein the second clone includes pointers to data of the point-in-time clone.
20 . The system of claim 11 , wherein the instructions cause the one or more processor to:
store the first clone and one or more copies of the first clone on the first node based on a first replication factor; and
store the second clone and one or more copies of the second clone on the second node based on a second replication factor.