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/operations.md +15−16
| @@ -66,12 +66,12 @@ install -d -m 0700 backup key-backup | |||
| 66 | 66 | vole admin db backup backup | |
| 67 | 67 | ``` | |
| 68 | 68 | ||
| 69 | This writes a copy of every authoritative database — `instance.db`, `runs.db`, | ||
| 70 | and `secrets.db` — with `VACUUM INTO`, which preserves SQLite WAL contents while | ||
| 69 | This writes a consistent copy of the authoritative instance database — | ||
| 70 | `instance.db` — with `VACUUM INTO`, which preserves SQLite WAL contents while | ||
| 71 | 71 | the instance runs. A plain file copy of a live database can miss recent | |
| 72 | 72 | transactions, and copying a database without its `-wal` file can roll it back. | |
| 73 | `data/index.db` is skipped because it is derived. `vole admin db list` shows the | ||
| 74 | files and which ones a backup needs. | ||
| 73 | The derived `data/index.db` is skipped because it is rebuilt from the | ||
| 74 | repositories. `vole admin db list` shows both files and which one a backup needs. | ||
| 75 | 75 | ||
| 76 | 76 | ### 3. Copy repositories and stored files | |
| 77 | 77 | ||
| @@ -95,8 +95,8 @@ sudo install -m 0600 /etc/ssh/ssh_host_ed25519_key backup/ssh_host_ed25519_key.s | |||
| 95 | 95 | A restore that omits it hands every CI job a key that cannot verify the host. | |
| 96 | 96 | ||
| 97 | 97 | `data/index.db` is derived and does not need a backup: `vole admin index rebuild` | |
| 98 | recreates it from the repositories. Every other database was copied by | ||
| 99 | `vole admin db backup`. | ||
| 98 | recreates it from the repositories. The authoritative state is the single | ||
| 99 | `instance.db` copied by `vole admin db backup`. | ||
| 100 | 100 | ||
| 101 | 101 | ### 4. Copy the secrets key to separate protected storage | |
| 102 | 102 | ||
| @@ -106,8 +106,8 @@ install -m 0600 data/secrets.key key-backup/secrets.key | |||
| 106 | 106 | ||
| 107 | 107 | If `secrets_key` names another path, copy that file instead. | |
| 108 | 108 | ||
| 109 | A copy containing both `secrets.db` and `secrets.key` is effectively a copy of | ||
| 110 | plaintext. Losing the key makes the restored secret database unreadable. | ||
| 109 | A copy containing both `instance.db` and `secrets.key` is effectively a copy of | ||
| 110 | the secret plaintext. Losing the key makes the restored secret rows unreadable. | ||
| 111 | 111 | ||
| 112 | 112 | ### 5. Restart a packaged service | |
| 113 | 113 | ||
| @@ -122,7 +122,8 @@ below. | |||
| 122 | 122 | ||
| 123 | 123 | The database backup contains public keys and hashes of session and enrollment | |
| 124 | 124 | tokens, not plaintext sessions or passwords. Treat it as private because it also | |
| 125 | contains account metadata and access rules. | ||
| 125 | contains account metadata, access rules, CI history, and sealed secret | ||
| 126 | ciphertext. | ||
| 126 | 127 | ||
| 127 | 128 | ## Restore an instance | |
| 128 | 129 | ||
| @@ -139,8 +140,6 @@ sudo systemctl stop vole | |||
| 139 | 140 | ||
| 140 | 141 | ```text | |
| 141 | 142 | data/instance.db | |
| 142 | data/runs.db | ||
| 143 | data/secrets.db | ||
| 144 | 143 | data/secrets.key | |
| 145 | 144 | data/repos/ | |
| 146 | 145 | data/lfs/ | |
| @@ -179,9 +178,9 @@ Then check account sign-in, an SSH clone, a repository page, CI history, a store | |||
| 179 | 178 | artifact, and any hosted sites. | |
| 180 | 179 | ||
| 181 | 180 | If the instance database is unrecoverable, repositories remain usable, but you | |
| 182 | must recreate accounts, keys, passkeys, and access rules. If `runs.db` is lost, | ||
| 183 | current refs can be queued again, but finished CI history and in-flight work are | ||
| 184 | lost. | ||
| 181 | must recreate accounts, keys, passkeys, access rules, release channels, and CI | ||
| 182 | history. Current refs can be queued again, but finished CI history and in-flight | ||
| 183 | work are lost. | ||
| 185 | 184 | ||
| 186 | 185 | ## Upgrade to the instance database | |
| 187 | 186 | ||
| @@ -297,8 +296,8 @@ vole admin index rebuild | |||
| 297 | 296 | ``` | |
| 298 | 297 | ||
| 299 | 298 | This restores repository, issue, change, activity, and search indexes from Git | |
| 300 | and stored records. It does not restore `data/runs.db`, `data/instance.db`, | ||
| 301 | accounts, secrets, logs, or artifacts. | ||
| 299 | and stored records. It does not restore `data/instance.db`, accounts, secrets, | ||
| 300 | logs, or artifacts. | ||
| 302 | 301 | ||
| 303 | 302 | ## Security notes | |
| 304 | 303 | ||