Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Keep the authoritative instance in one database

1a9b383890c40885709804293cd3a75e775f06a0 · Keenan Nemetz · 3d ago · parent 12221a79

Keep the authoritative instance in one database

Move the CI queue and the sealed secret rows into instance.db, leaving index.db as the one derived database. Backups now copy the single authoritative file, and the index stays disposable.

Hooks and the SSH front door use the instance database for run credentials and required checks. The admin db commands and documentation now describe one authoritative database plus the derived index.

This was migrated once by hand on the rodent.software instance; there is no migration command and no legacy-layout check in the shipped code.

docs/cli.md +7−8

@@ -259,21 +259,20 @@ vole admin db check
259 259 vole admin db backup <dir>
260 260 ```
261 261
262 `list` — Prints every SQLite file in the data directory and what it is for. It reads
263 the configuration only: no database has to exist, and nothing is opened.
262 `list` — Prints the instance database and the derived index, and what each is for. It
263 reads the configuration only: no database has to exist, and nothing is opened.
264 264
265 265 `check` — Runs SQLite's quick integrity check on each existing database and reports the
266 first problem. The sealed store is checked without its key: the file is an
267 ordinary database whose values are ciphertext.
266 first problem. The instance database holds the sealed secret ciphertext; the
267 key is not needed to check the pages.
268 268
269 `backup` — Writes a consistent copy of every authoritative database into <dir> with
269 `backup` — Writes a consistent copy of the authoritative instance database into <dir> with
270 270 VACUUM INTO, which takes a read transaction and cannot lose the rows still
271 271 sitting in a -wal file. The derived index is skipped: it is rebuilt from the
272 272 repositories with `vole admin index rebuild`.
273 273
274 `backup` — The copies are created at 0600. `secrets.db` is included and is still
275 ciphertext: copy the key from `secrets_key` separately, because a backup that
276 holds both is a backup of plaintext.
274 `backup` — The copy is created at 0600. `secrets.key` is not copied: store it separately,
275 because a backup that holds both is a backup of plaintext.
277 276
278 277 `backup` — Local-only: it is not available over --remote.
279 278