1 -- We maintain a local index of data blocks that have been previously stored
2 -- for constructing incremental snapshots.
4 -- The index is stored in an SQLite3 database. This is its schema.
6 -- List of snapshots which have been created.
7 create table snapshots (
8 snapshotid integer primary key,
14 -- List of segments which have been created.
15 create table segments (
16 segmentid integer primary key,
17 segment text unique not null,
23 -- Index of all blocks which have been stored, by checksum.
24 create table block_index (
25 blockid integer primary key,
26 segmentid integer not null,
33 create index block_content_index on block_index(checksum);
34 create unique index block_name_index on block_index(segmentid, object);
36 -- Summary of segment utilization for each snapshots.
37 create table segments_used (
38 snapshotid integer not null,
39 segmentid integer not null,