# US 2021/0173746 A1 · Backup and restore in a distributed database utilizing consistent database snapshots

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0173746 A1
- Document ID: US20210173746A1
- Status: Published application
- Kind: A1
- Application number: 17/109,353
- Filed: 2020-12-02
- Published: 2021-06-10
- Earliest claimed: 2015-04-16
- Assignees: NuoDB, Inc.
- Applicants: NuoDB, Inc.
- Inventors: Ross R. Shaull
- Web page: https://patentgrep.com/patent/US20210173746A1

## CPC

- G06F 11/1458: {Management of the backup or restore process}
- G06F 16/219: {Managing data history or versioning (querying versioned data G06F16/2474; querying temporal data G06F16/2477)}
- G06F 16/2365: {Ensuring data consistency and integrity}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F 2201/82: Solving problems relating to consistency
- G06F 2201/84: Using snapshots, i.e. a logical point-in-time copy of the data
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques are disclosed for backup and restore in a distributed database utilizing consistent database snapshots. In particular, a distributed database system configured in accordance with an embodiment of the present disclosure includes a plurality of interconnected database nodes that collectively define a database having no single point of failure and that can be “viewed” by a SQL client as a single, logical database. In the course of executing such transactions, the distributed database system enables clients to declare snapshots that, when the transaction is committed, cause the distributed database system to logically freeze a consistent and complete copy of the state of the database at the point in time the transaction completed. Such snapshots enable clients to execute so-called “point-in-time” queries against those past states to return a result set that is essentially a reconstructed version of the database “as of” a particular point in time.

## Claims

### Claim 1

A system configured to store a database and a plurality of database snapshots in durable storage, the system comprising:
a network interface circuit configured to communicatively couple to a communication network, the communication network comprising a plurality of database nodes forming a distributed database;
a memory for storing a plurality of database objects, each having a current version and a past version; and
a snapshot manager module including a high-resolution archival mode configured to receive a database replication message via the communication network, and manipulate an identified database object in the memory based on the received database replication message, wherein the high-resolution archival mode is further configured to archive what had been the current version of the identified database object as a new past version and store a new current version in accordance with the database replication message;
wherein the new current version and each of the past versions are associated with a snapshot identifier.

### Claim 2 (depends on 1)

The system of claim 1, wherein the one or more replication messages are configured to synchronize database transactions such that a same database or portions thereof are stored in a memory within each of the plurality of database nodes, and wherein each replication message comprises data manipulation language (DML) and target database objects for that DML.

### Claim 3 (depends on 2)

The system of claim 2, wherein the DML comprises structured query language (SQL) compliant syntax.

### Claim 4 (depends on 1)

The system of claim 1, wherein each database object represents at least one of a database table, a database record, a database blob, and a database index.

### Claim 5 (depends on 1)

The system of claim 1, wherein the high-resolution archival mode is further configured to:
receive a destructive replication message identifying a past version for removal from a database object stored in the memory;
in response to receiving the destructive replication message, copy the identified past version of the database object into a frozen read-only copy of the database object; and
store the frozen read-only copy of the database object into the memory and remove the identified past version from the database object in the memory.

### Claim 6 (depends on 5)

The system of claim 5, wherein the destructive replication messages is configured to synchronize removal of past versions of database objects such that a same number of database object versions for each database object persists in each database, or portion thereof, stored in a memory of each of the plurality of database nodes.

### Claim 7 (depends on 5)

The system of claim 5, wherein the durable storage comprises a non-volatile storage location, wherein the high-resolution archival mode is configured to commit the frozen read-only copy of the database object into the non-volatile storage location.

### Claim 8 (depends on 7)

The system of claim 7, wherein the non-volatile storage location comprises a relative path or other identifier of at least one of a local hard drive, raid array, and a network-attached storage location associated with the system.

### Claim 9 (depends on 1)

The system of claim 1, wherein the high-resolution archival mode is further configured to:
receive, from a database node of the plurality of database nodes, a request for one or more database objects stored in the memory, wherein the requested database objects are associated with a previously executed transaction and collectively represent a consistent state of the database, or portion thereof, at the time the previously executed transaction was committed; and
send the one or more requested database objects to the database node via the communication network.

### Claim 10 (depends on 9)

The system of claim 9, wherein at least one database object of the one or more database objects comprises a frozen read-only copy of a database object, wherein the frozen read-only copy of the database object was created and stored in the memory after a destructive replication was received by the high-resolution archival mode.

### Claim 11 (depends on 1)

The system of claim 1, wherein the distributed database provides a single, logical view to a database client such that write operations affecting the database are synchronized to the plurality of database nodes.

### Claim 12 (depends on 11)

The system of claim 11, wherein the distributed database system implements Atomicty, Consistency, Isolation, and Durability (ACID) properties.

### Claim 13

A non-transitory computer-readable medium having a plurality of instructions encoded thereon that when executed by at least one processor cause a high-resolution archival process to be performed, the process being configured to:
receive a database replication message via a communication network, the communication network comprising a plurality of communicatively coupled database nodes forming a distributed database;
manipulate an identified database object in the memory based on the received database replication message;
archive what had been the current version of the identified database object as a new past version and store a new current version in accordance with the database replication message; and
store the new current version and past versions of the database object in a durable store location, wherein the new current version and each of the past versions are associated with a snapshot identifier.

### Claim 14 (depends on 13)

The computer-readable medium of claim 13, wherein the process is further configured to:
receive a destructive replication message identifying a past version to remove from a database object stored in a memory;
in response to receiving the destructive replication message, copy the identified past version of the database object into a frozen read-only copy of the database object; and
store the frozen read-only copy of the database object into the memory and remove the identified past version from the database object in the memory.

### Claim 15 (depends on 13)

The computer-readable medium of claim 13, wherein the process is further configured to:
receive, from a database node of the plurality of database nodes, a request for one or more database objects stored in the memory, wherein the requested database objects are associated with a previously executed transaction and collectively represent a consistent state of the database, or portion thereof, at the time the previously executed transaction was committed; and
send the one or more requested database objects to the database node via the communication network.

### Claim 16 (depends on 15)

The computer-readable medium of claim 15, wherein at least one database object of the one or more database objects comprises a frozen ready-only copy of a database object, wherein the frozen read-only copy of the database object was created and stored in a memory after a destructive replication was received from a node of the plurality of database nodes.

### Claim 17

A computer-implemented method for backup and restore of a database using database snapshots, the method comprising:
identifying, by a processor, a snapshot from a plurality of snapshots, each snapshot being associated with a previously committed database transaction and logically representing a consistent state of the database at the time the previously committed database transaction was committed;
requesting a plurality of database objects associated with the identified snapshot; and
reconstructing, in a memory, a past state of the database corresponding to the identified snapshot.

### Claim 18 (depends on 17)

The method of claim 17, the method further comprising storing the reconstructed past state in a desired storage location, wherein the desired storage location is at least one of a USB thumb drive, a hard drive, a raid array, an external hard drive, and a network-attached storage device.

### Claim 19 (depends on 17)

The method of claim 17, the method further comprising using the reconstructed past state to undue a previous database write operation on a live database, wherein the write operation was caused by least one of an UPDATE, INSERT, DELETE, and DROP SQL statement.

### Claim 20 (depends on 17)

The method of claim 17, the method further comprising copying the reconstructed past state to a durable storage of a database node, wherein the database node instantiates the past state as a live database such that reads and writes can be performed.
