LIST BACKUPS DATABASE

Syntax

LIST BACKUPS DATABASE database_name

Privileges

BACKUP

Description

The LIST BACKUPS DATABASE command retrieves detailed information about which backups are available for a specific database. SQLite Cloud backup is a continuous backup system based on LiteStream that uses S3 as a storage option and can also backup AES-256 encrypted databases.

Return

A Rowset with the following columns:

  • type: can be snapshot or wal
  • replica: always S3 in this version
  • generation: backup generation ID
  • index: backup index ID
  • offset: backup offset
  • size: backup size in bytes
  • created: backup creation date and time

Example

> LIST BACKUPS DATABASE db1.sqlite
----------|---------|------------------|-------|--------|------|----------------------|
 type     | replica | generation       | index | offset | size | created              |
----------|---------|------------------|-------|--------|------|----------------------|
 snapshot | s3      | 6283e07babc9aff1 | 0     | NULL   | 797  | 2023-02-01T14:51:24Z |
 wal      | s3      | 6283e07babc9aff1 | 0     | 0      | 119  | 2023-02-01T14:51:24Z |
 wal      | s3      | 6283e07babc9aff1 | 0     | 4152   | 493  | 2023-02-06T15:46:32Z |
 wal      | s3      | 6283e07babc9aff1 | 1     | 0      | 119  | 2023-02-06T15:46:33Z |
 wal      | s3      | 6283e07babc9aff1 | 1     | 4152   | 386  | 2023-02-06T15:47:44Z |
 wal      | s3      | 6283e07babc9aff1 | 2     | 0      | 119  | 2023-02-06T15:47:44Z |
 wal      | s3      | 6283e07babc9aff1 | 2     | 4152   | 386  | 2023-02-06T15:48:20Z |
 wal      | s3      | 6283e07babc9aff1 | 3     | 0      | 119  | 2023-02-06T15:48:45Z |
 wal      | s3      | 6283e07babc9aff1 | 3     | 4152   | 386  | 2023-02-06T15:48:55Z |
 wal      | s3      | 6283e07babc9aff1 | 3     | 8272   | 386  | 2023-02-06T15:49:28Z |
 wal      | s3      | 6283e07babc9aff1 | 4     | 0      | 119  | 2023-02-06T15:49:45Z |
 wal      | s3      | 6283e07babc9aff1 | 4     | 4152   | 386  | 2023-02-06T15:53:30Z |
 wal      | s3      | 6283e07babc9aff1 | 5     | 0      | 119  | 2023-02-06T15:53:30Z |
 wal      | s3      | 6283e07babc9aff1 | 5     | 4152   | 386  | 2023-02-06T15:53:52Z |
 wal      | s3      | 6283e07babc9aff1 | 6     | 0      | 115  | 2023-02-06T15:54:31Z |
 snapshot | s3      | b866f7b3be9557d1 | 0     | NULL   | 799  | 2023-02-07T17:39:46Z |
 wal      | s3      | b866f7b3be9557d1 | 0     | 0      | 119  | 2023-02-07T17:39:46Z |
 snapshot | s3      | 1131237b6da7ae81 | 0     | NULL   | 799  | 2023-02-07T19:25:15Z |
 wal      | s3      | 1131237b6da7ae81 | 0     | 0      | 119  | 2023-02-07T19:25:15Z |
----------|---------|------------------|-------|--------|------|----------------------|