A search of the four documents, the help text and config.example.yml for the review's faults found these. - prune help, and snapshot purge and snapshot list in README.md: a snapshot is dropped or reported when its manifest is gone, not its metadata or directory. - README.md, version: the date printed is the commit date. - README.md, Configuration: names the commands that start without a config that loads. - README.md, snapshot purge: "each such snapshot" named nothing. - README.md and docs/DATAMODEL.md: a backup can upload unchanged content again, so "uploads only what changed" was false. - docs/REPOSTRUCTURE.md: db.zst.age holds more than one snapshot's rows. - ARCHITECTURE.md: "database records" read as a noun. Model: fable-5-1
This commit is contained in:
+1
-1
@@ -299,7 +299,7 @@ database is honest. The restore therefore checks it:
|
|||||||
the remote key that was asked for.
|
the remote key that was asked for.
|
||||||
- `containedRestorePath` refuses a stored path that would leave the target
|
- `containedRestorePath` refuses a stored path that would leave the target
|
||||||
directory. It also refuses to write through a symlink below the target.
|
directory. It also refuses to write through a symlink below the target.
|
||||||
- A blob is not decompressed beyond the size the database records for it.
|
- A blob is not decompressed beyond the size that the database gives for it.
|
||||||
- Each downloaded blob is hashed. The hash must match the blob's name.
|
- Each downloaded blob is hashed. The hash must match the blob's name.
|
||||||
|
|
||||||
### Order of work
|
### Order of work
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ It was written to meet these requirements together:
|
|||||||
- **Blob**: one object at the destination. It holds many chunks, compressed and
|
- **Blob**: one object at the destination. It holds many chunks, compressed and
|
||||||
then encrypted.
|
then encrypted.
|
||||||
- **Local index**: a SQLite database on the backed-up machine. It records what
|
- **Local index**: a SQLite database on the backed-up machine. It records what
|
||||||
is already stored, so the next backup uploads only what changed.
|
is already stored, so the next backup does not upload it again.
|
||||||
- **Manifest**: the list of blobs one snapshot uses. It is stored at the
|
- **Manifest**: the list of blobs one snapshot uses. It is stored at the
|
||||||
destination without encryption.
|
destination without encryption.
|
||||||
- **Remote key**: a hash of the snapshot ID. It names the snapshot's directory
|
- **Remote key**: a hash of the snapshot ID. It names the snapshot's directory
|
||||||
@@ -405,8 +405,8 @@ the local index. Its timestamp is the time its backup finished.
|
|||||||
|
|
||||||
The command reports these below the table:
|
The command reports these below the table:
|
||||||
|
|
||||||
- Snapshots in the local index that are missing at the destination. Run
|
- Snapshots that are in the local index but have no manifest at the destination.
|
||||||
`vaultik prune` to drop those records.
|
Run `vaultik prune` to drop them from the local index.
|
||||||
- Remote-only snapshots whose manifest cannot be read. They are left out of the
|
- Remote-only snapshots whose manifest cannot be read. They are left out of the
|
||||||
table.
|
table.
|
||||||
- Remote-only snapshots beyond the first 1000. They are left out of the table.
|
- Remote-only snapshots beyond the first 1000. They are left out of the table.
|
||||||
@@ -493,13 +493,14 @@ Flags:
|
|||||||
The command acts only on snapshots in the local index. `--keep-latest` keeps the
|
The command acts only on snapshots in the local index. `--keep-latest` keeps the
|
||||||
newest snapshot of each name, not the newest overall.
|
newest snapshot of each name, not the newest overall.
|
||||||
|
|
||||||
The command removes each such snapshot from the local index. It also deletes the
|
The command removes from the local index each snapshot that the flags select. It
|
||||||
snapshot's directory under `metadata/` at the destination. Its blobs stay. Run
|
also deletes the snapshot's directory under `metadata/` at the destination. Its
|
||||||
`vaultik prune` afterwards to delete the blobs that no snapshot uses any more.
|
blobs stay. Run `vaultik prune` afterwards to delete the blobs that no snapshot
|
||||||
|
uses any more.
|
||||||
|
|
||||||
The command first drops local records of snapshots that are no longer at the
|
The command first drops from the local index each snapshot whose manifest is
|
||||||
destination. It fails and removes nothing when the destination cannot be listed
|
gone from the destination. It fails and removes nothing when the destination
|
||||||
or has no marker file.
|
cannot be listed or has no marker file.
|
||||||
|
|
||||||
### `snapshot remove <snapshot-id>`
|
### `snapshot remove <snapshot-id>`
|
||||||
|
|
||||||
@@ -732,16 +733,18 @@ vaultik completion fish > ~/.config/fish/completions/vaultik.fish
|
|||||||
|
|
||||||
### `version`
|
### `version`
|
||||||
|
|
||||||
Prints the version, the commit, the build date and the platform. It also says
|
Prints the version, the commit, the commit date and the platform. It labels the
|
||||||
when the binary is a development build, not a release.
|
commit date `build date`. It also says when the binary is a development build,
|
||||||
|
not a release.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
The config file is YAML. `vaultik config init` writes one to start from, and
|
The config file is YAML. `vaultik config init` writes one to start from, and
|
||||||
[`config.example.yml`](config.example.yml) is a longer example.
|
[`config.example.yml`](config.example.yml) is a longer example.
|
||||||
|
|
||||||
A command refuses to start when the config does not load. The config loads when
|
A command refuses to start when the config does not load. The `config` commands,
|
||||||
all of these hold:
|
`completion` and `version` are the exceptions. The config loads when all of
|
||||||
|
these hold:
|
||||||
|
|
||||||
- Every entry in `age_recipients` is an age X25519 public key.
|
- Every entry in `age_recipients` is an age X25519 public key.
|
||||||
- `snapshots` has at least one name, and every name has at least one path.
|
- `snapshots` has at least one name, and every name has at least one path.
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ index. This document describes its tables and how each command uses them.
|
|||||||
The local index has two jobs:
|
The local index has two jobs:
|
||||||
|
|
||||||
- It records which files, chunks and blobs are already stored. The next backup
|
- It records which files, chunks and blobs are already stored. The next backup
|
||||||
then uploads only what changed.
|
then does not store them again.
|
||||||
- It is the source of each snapshot's own database. A backup uploads a trimmed,
|
- It is the source of each snapshot's own database. A backup uploads a trimmed,
|
||||||
encrypted copy of the index with every snapshot.
|
encrypted copy of the index with every snapshot.
|
||||||
|
|
||||||
|
|||||||
@@ -142,8 +142,9 @@ remote key keeps names out of a listing. It does not hide them from a guess.
|
|||||||
|
|
||||||
The snapshot's database. A restore needs it.
|
The snapshot's database. A restore needs it.
|
||||||
|
|
||||||
- **Contents**: a SQLite database that holds this snapshot only. It lists every
|
- **Contents**: a SQLite database. It is a copy of the local index without the
|
||||||
file with its metadata, its chunks, and the blob that holds each chunk.
|
rows of other snapshots. It lists every file in the snapshot with its
|
||||||
|
metadata, its chunks, and the blob that holds each chunk.
|
||||||
- **Format**: the database file, compressed with zstd and then encrypted with
|
- **Format**: the database file, compressed with zstd and then encrypted with
|
||||||
age.
|
age.
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ from the backup destination store.
|
|||||||
Needs permission to list, read and delete objects on the destination
|
Needs permission to list, read and delete objects on the destination
|
||||||
store. It does not need the age private key.
|
store. It does not need the age private key.
|
||||||
|
|
||||||
Local cleanup drops snapshots whose metadata is gone from the
|
Local cleanup drops snapshots whose manifest is gone from the
|
||||||
destination store, incomplete snapshots, and any files, chunks, or
|
destination store, incomplete snapshots, and any files, chunks, or
|
||||||
blobs no longer referenced by a completed snapshot. Remote cleanup
|
blobs no longer referenced by a completed snapshot. Remote cleanup
|
||||||
scans every snapshot manifest in the destination store, builds the
|
scans every snapshot manifest in the destination store, builds the
|
||||||
|
|||||||
Reference in New Issue
Block a user