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 procedure code blocks at the left margin

6d574becea8dcf72139479270da7c417ec5330de · Keenan Nemetz · 20d ago · parent a0172426

Keep procedure code blocks at the left margin

The site builds with Python-Markdown's fenced_code extension, which only
recognizes a fence that starts at column 0. Four pages nested a fenced block
under an ordered list item instead, so the fence was parsed as inline code and
the page showed the language token and the commands joined into one pill:
`sh vole workflow check vole workflow list`.

Number each affected procedure's steps with headings, the idiom quickstart.md
already uses, and keep the fence at the left margin. The prose that followed a
block stays with its step. DEVELOPMENT.md now records the constraint, because
the Markdown is valid CommonMark and renders correctly through the forge's
goldmark, which is why nothing caught it before.

Refs: 01M7BHJX0D3HBF01Y04YZM8GYB

docs/operations.md +74−70

@@ -53,56 +53,58 @@ Stopping the service interrupts web and Git access. If you cannot stop it, use
53 53 the online-safe database backup commands below and clone each repository instead
54 54 of copying a live repository directory.
55 55
56 1. Create private backup directories:
56 ### 1. Create private backup directories
57 57
58 ```sh
59 install -d -m 0700 backup key-backup
60 ```
58 ```sh
59 install -d -m 0700 backup key-backup
60 ```
61
62 ### 2. Copy the account and CI databases consistently
61 63
62 2. Copy the account and CI databases consistently:
64 ```sh
65 vole admin account backup backup/users.db
66 sqlite3 data/runs.db ".backup 'backup/runs.db'"
67 sqlite3 data/secrets.db ".backup 'backup/secrets.db'"
68 ```
63 69
64 ```sh
65 vole admin account backup backup/users.db
66 sqlite3 data/runs.db ".backup 'backup/runs.db'"
67 sqlite3 data/secrets.db ".backup 'backup/secrets.db'"
68 ```
70 These commands preserve SQLite WAL contents. A plain file copy of a live database
71 can miss recent transactions.
69 72
70 These commands preserve SQLite WAL contents. A plain file copy of a live
71 database can miss recent transactions.
73 ### 3. Copy repositories and stored files
72 74
73 3. Copy repositories and stored files:
75 ```sh
76 cp -a data/repos backup/
77 cp -a data/lfs backup/
78 cp -a data/logs backup/
79 cp -a data/acme backup/ 2>/dev/null || true
80 cp data/ssh_host_ed25519_key backup/
81 cp data/audit.log backup/
82 ```
74 83
75 ```sh
76 cp -a data/repos backup/
77 cp -a data/lfs backup/
78 cp -a data/logs backup/
79 cp -a data/acme backup/ 2>/dev/null || true
80 cp data/ssh_host_ed25519_key backup/
81 cp data/audit.log backup/
82 ```
84 `data/index.db` is derived and does not need a backup. `data/runs.db` is
85 authoritative CI history and queue state; do not omit it.
83 86
84 `data/index.db` is derived and does not need a backup. `data/runs.db` is
85 authoritative CI history and queue state; do not omit it.
87 ### 4. Copy the secrets key to separate protected storage
86 88
87 4. Copy the key that decrypts repository secrets to separate protected storage:
89 ```sh
90 install -m 0600 data/secrets.key key-backup/secrets.key
91 ```
88 92
89 ```sh
90 install -m 0600 data/secrets.key key-backup/secrets.key
91 ```
93 If `secrets_key` names another path, copy that file instead.
92 94
93 If `secrets_key` names another path, copy that file instead.
95 A copy containing both `secrets.db` and `secrets.key` is effectively a copy of
96 plaintext. Losing the key makes the restored secret database unreadable.
94 97
95 A copy containing both `secrets.db` and `secrets.key` is effectively a copy
96 of plaintext. Losing the key makes the restored secret database unreadable.
98 ### 5. Restart a packaged service
97 99
98 5. Restart a packaged service:
100 ```sh
101 sudo systemctl start vole
102 ```
99 103
100 ```sh
101 sudo systemctl start vole
102 ```
104 ### 6. Move both backups off the machine
103 105
104 6. Move both backups off the machine and restrict access to them. Record which
105 backup holds the encryption key and test the restore procedure below.
106 Record which backup holds the encryption key and test the restore procedure
107 below.
106 108
107 109 The account backup contains public keys and hashes of session and enrollment
108 110 tokens, not plaintext sessions or passwords. Treat it as private because it also
@@ -113,51 +115,53 @@ contains account metadata and access rules.
113 115 Stop the service before replacing its state. Restoring over a running instance
114 116 can mix files from different points in time.
115 117
116 1. Stop Vole and prepare an empty data directory:
118 ### 1. Stop Vole and prepare an empty data directory
119
120 ```sh
121 sudo systemctl stop vole
122 ```
117 123
118 ```sh
119 sudo systemctl stop vole
120 ```
124 ### 2. Restore these paths from the same backup
121 125
122 2. Restore these paths from the same backup:
126 ```text
127 data/users.db
128 data/runs.db
129 data/secrets.db
130 data/secrets.key
131 data/repos/
132 data/lfs/
133 data/logs/
134 data/ssh_host_ed25519_key
135 data/audit.log
136 data/acme/ # when automatic HTTPS is enabled
137 ```
123 138
124 ```text
125 data/users.db
126 data/runs.db
127 data/secrets.db
128 data/secrets.key
129 data/repos/
130 data/lfs/
131 data/logs/
132 data/ssh_host_ed25519_key
133 data/audit.log
134 data/acme/ # when automatic HTTPS is enabled
135 ```
139 Restore `secrets.key` from its separate protected copy. Ensure the restored files
140 belong to the service account and private keys have mode `0600`.
136 141
137 Restore `secrets.key` from its separate protected copy. Ensure the restored
138 files belong to the service account and private keys have mode `0600`.
142 ### 3. Rebuild derived repository and search indexes
139 143
140 3. Rebuild derived repository and search indexes:
144 ```sh
145 vole admin index rebuild
146 ```
141 147
142 ```sh
143 vole admin index rebuild
144 ```
148 ### 4. Revoke browser sessions from the restored account database
145 149
146 4. Revoke browser sessions carried by the restored account database:
150 ```sh
151 vole admin account revoke-sessions --all
152 ```
147 153
148 ```sh
149 vole admin account revoke-sessions --all
150 ```
154 Restored sessions must not outlive the cookies and revocation state of the system
155 they came from.
151 156
152 Restored sessions must not outlive the cookies and revocation state of the
153 system they came from.
157 ### 5. Start Vole and verify the instance
154 158
155 5. Start Vole and verify account sign-in, an SSH clone, a repository page, CI
156 history, a stored artifact, and any hosted sites:
159 ```sh
160 sudo systemctl start vole
161 ```
157 162
158 ```sh
159 sudo systemctl start vole
160 ```
163 Then check account sign-in, an SSH clone, a repository page, CI history, a stored
164 artifact, and any hosted sites.
161 165
162 166 If the account database is unrecoverable, repositories remain usable, but you
163 167 must recreate accounts, keys, passkeys, and access rules. If `runs.db` is lost,