<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xml:base="https://bjorn.now/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Dolt on bjorn.now</title><link>https://bjorn.now/tags/dolt/</link><description>Recent content in Dolt on bjorn.now</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 03 Apr 2026 13:17:06 +0200</lastBuildDate><atom:link href="https://bjorn.now/tags/dolt/feed.xml" rel="self" type="application/rss+xml"/><item><title>How to recover from a corrupted dolt journal</title><link>https://bjorn.now/til/2026-04-03-how-to-recover-from-a-corrupted-dolt-journal/?utm_medium=feed</link><pubDate>Fri, 03 Apr 2026 13:17:06 +0200</pubDate><guid>https://bjorn.now/til/2026-04-03-how-to-recover-from-a-corrupted-dolt-journal/</guid><description>When dolt’s journal is corrupted, dolt fsck --revive-journal-with-data-loss will truncate it back to the last valid record.
I found this error message when starting dolt up after upgrading the server: invalid journal record at offset 5831169: invalid journal record: CRC checksum does not match.
To recover, go to your dolt DB:
cd ~/.beads/shared-server/dolt/&lt;db&gt; \ &amp;&amp; dolt fsck --revive-journal-with-data-loss It backs up the journal, truncates to the point it failed, and makes it possible to start the server again. In my case the db came back up with data loss. I did a bd dolt pull and it pulled in what I had pushed most recently, so nothing major was lost.</description><content:encoded><![CDATA[<p>When dolt&rsquo;s journal is corrupted, <code>dolt fsck --revive-journal-with-data-loss</code> will truncate it back to the last valid record.</p>
<p>I found this error message when starting dolt up after upgrading the server: <code>invalid journal record at offset 5831169: invalid journal record: CRC checksum does not match</code>.</p>
<p>To recover, go to your dolt DB:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">cd</span> ~/.beads/shared-server/dolt/&lt;db&gt; <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="se"></span>  <span class="o">&amp;&amp;</span> dolt fsck --revive-journal-with-data-loss</span></span></code></pre></div>
</div>
<p>It backs up the journal, truncates to the point it failed, and makes it possible to start the server again. In my case the db came back up with data loss. I did a <code>bd dolt pull</code> and it pulled in what I had pushed most recently, so nothing major was lost.</p>
<p>I&rsquo;m guessing this happened because installing beads 1.0 also upgraded dolt. If you&rsquo;re upgrading, it&rsquo;s worth making sure you&rsquo;ve done <code>bd vc commit &amp;&amp; bd dolt push</code> in all repos beforehand. That means <a href="https://bjorn.now/til/2026-03-20-configure-beads-dolt-to-share-via-git/">configuring a git remote</a> first.</p>
]]></content:encoded></item><item><title>How to find which dolt databases need to be committed</title><link>https://bjorn.now/til/2026-03-26-how-to-find-which-dolt-databases-need-to-be-committed/?utm_medium=feed</link><pubDate>Thu, 26 Mar 2026 15:32:42 +0100</pubDate><guid>https://bjorn.now/til/2026-03-26-how-to-find-which-dolt-databases-need-to-be-committed/</guid><description>dolt’s shared server won’t pull until all databases on the server have committed changes, not just the beads project you’re pulling.
You’ll get Error 1105 (HY000): cannot merge with uncommitted changes and it’s confusing when the beads project you’re working in has autocommit on. The uncommitted changes are in a different project that’s also using the shared server.
The fix is to go through your other projects and commit their changes (or enable autocommit by adding dolt.auto-commit: "on" to .beads/config.yml). To find which databases have uncommitted changes:</description><content:encoded><![CDATA[<p>dolt&rsquo;s shared server won&rsquo;t pull until all databases on the server have committed changes, not just the beads project you&rsquo;re pulling.</p>
<p>You&rsquo;ll get <code>Error 1105 (HY000): cannot merge with uncommitted changes</code> and it&rsquo;s confusing when the beads project you&rsquo;re working in has autocommit on. The uncommitted changes are in a different project that&rsquo;s also using the shared server.</p>
<p>The fix is to go through your other projects and commit their changes (or enable autocommit by adding <code>dolt.auto-commit: &quot;on&quot;</code> to <code>.beads/config.yml</code>). To find which databases have uncommitted changes:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nv">query</span><span class="o">=</span><span class="k">$(</span>bd sql <span class="s2">&#34;SHOW DATABASES&#34;</span> 2&gt;/dev/null <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="se"></span>  <span class="p">|</span> grep -v -E <span class="s2">&#34;^(Database|--|\(|dolt|information_schema|mysql)&#34;</span> <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="se"></span>  <span class="p">|</span> <span class="k">while</span> <span class="nb">read</span> db<span class="p">;</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">      <span class="nb">echo</span> <span class="s2">&#34;SELECT &#39;</span><span class="nv">$db</span><span class="s2">&#39; as db, table_name, status FROM \`</span><span class="nv">$db</span><span class="s2">\`.dolt_status WHERE table_name != &#39;config&#39;&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="k">done</span> <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="se"></span>  <span class="p">|</span> paste -sd<span class="s1">&#39;|&#39;</span> - <span class="p">|</span> sed <span class="s1">&#39;s/|/ UNION ALL /g&#39;</span><span class="k">)</span>
</span></span><span class="line"><span class="cl">bd sql <span class="s2">&#34;</span><span class="nv">$query</span><span class="s2">&#34;</span></span></span></code></pre></div>
</div>
<p>For each project that shows up, go in and run <code>bd vc commit -m 'Snapshot'</code>, and then you can pull again.</p>
<p>We&rsquo;re ignoring changes to the <code>config</code> table because they don&rsquo;t seem to matter for pulling.</p>
]]></content:encoded></item><item><title>How to manually restore a dolt db from its git remote</title><link>https://bjorn.now/til/2026-03-23-how-to-manually-restore-a-dolt-db-from-its-git-remote/?utm_medium=feed</link><pubDate>Mon, 23 Mar 2026 16:02:49 +0100</pubDate><guid>https://bjorn.now/til/2026-03-23-how-to-manually-restore-a-dolt-db-from-its-git-remote/</guid><description>You can manually clone a dolt database from its git remote when bd bootstrap or bd init won’t cooperate.
bd dolt stop: stop the server in the git repo you’re restoring so you can operate on its database cd ~/.beads/shared-server/dolt: go to the shared dolt server (it’s .beads/dolt/beads otherwise, I think) rm -rf &lt;prefix&gt;: remove the DB if it exists already dolt clone git+ssh://git@github.com/user/repo.git &lt;prefix&gt;: clone it to your prefix cd - &amp;&amp; bd ready: see if you can see the listing I don’t know why my local just refused with bd bootstrap but this allowed me to fix it manually.</description><content:encoded><![CDATA[<p>You can manually clone a dolt database from its git remote when <code>bd bootstrap</code> or <code>bd init</code> won&rsquo;t cooperate.</p>
<ol>
<li><code>bd dolt stop</code>: stop the server in the git repo you&rsquo;re restoring so you can operate on its database</li>
<li><code>cd ~/.beads/shared-server/dolt</code>: go to the shared dolt server (it&rsquo;s <code>.beads/dolt/beads</code> otherwise, I think)</li>
<li><code>rm -rf &lt;prefix&gt;</code>: remove the DB if it exists already</li>
<li><code>dolt clone git+ssh://git@github.com/user/repo.git &lt;prefix&gt;</code>: clone it to your prefix</li>
<li><code>cd - &amp;&amp; bd ready</code>: see if you can see the listing</li>
</ol>
<p>I don&rsquo;t know why my local just refused with <code>bd bootstrap</code> but this allowed me to fix it manually.</p>
]]></content:encoded></item><item><title>How to migrate beads from per-project to shared dolt server</title><link>https://bjorn.now/til/2026-03-20-migrate-beads-to-shared-dolt-server/?utm_medium=feed</link><pubDate>Fri, 20 Mar 2026 12:50:24 +0100</pubDate><guid>https://bjorn.now/til/2026-03-20-migrate-beads-to-shared-dolt-server/</guid><description>To switch beads from a per-project dolt server to the shared server, do a backup, configure shared-server, and restore.
I was running in “a server per repo” mode and it’s just unnecessary, they clash in annoying ways when switching repos, and once I understood how beads store data in git I embraced dolt and the shared server. I had hesitated because I had somehow connected it with DoltHub, and that’s optional for using beads.</description><content:encoded><![CDATA[<p>To switch beads from a per-project dolt server to the shared server, do a backup, configure shared-server, and restore.</p>
<p>I was running in &ldquo;a server per repo&rdquo; mode and it&rsquo;s just unnecessary, they clash in annoying ways when switching repos, and once I understood how <a href="/til/2026-03-20-configure-beads-dolt-to-share-via-git/">beads store data in git</a> I embraced dolt and the shared server. I had hesitated because I had somehow connected it with DoltHub, and that&rsquo;s optional for using beads.</p>
<ol>
<li><code>bd backup</code>: make sure you have your local database available for restore</li>
<li><code>bd dolt stop</code>: so we don&rsquo;t conflict on anything</li>
<li><code>bd dolt set shared-server true</code>: to configure this project to use the shared server</li>
<li><code>bd restore</code>: to restore the db</li>
</ol>
<p>For most of my projects this just worked, but in some cases I had to <a href="/til/2026-03-20-how-to-reset-beads-dolt-database/">reset the dolt configuration for the repo</a>.</p>
]]></content:encoded></item><item><title>Configure beads dolt to share via git</title><link>https://bjorn.now/til/2026-03-20-configure-beads-dolt-to-share-via-git/?utm_medium=feed</link><pubDate>Fri, 20 Mar 2026 12:31:05 +0100</pubDate><guid>https://bjorn.now/til/2026-03-20-configure-beads-dolt-to-share-via-git/</guid><description>Beads with dolt store data in git refs, not branches, and won’t share it anywhere until you manually configure a remote.
After bd init, your dolt data only exists locally. You can check with bd dolt remote list which will show “No remotes configured.”</description><content:encoded><![CDATA[<p>Beads with dolt <a href="https://github.com/steveyegge/beads/blob/main/docs/DOLT.md">store data</a> in git refs, not branches, and won&rsquo;t share it anywhere until you manually configure a remote.</p>
<p>After <code>bd init</code>, your dolt data only exists locally. You can check with <code>bd dolt remote list</code> which will show &ldquo;No remotes configured.&rdquo;</p>
<p>Point it at your existing git repo:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">bd dolt remote add origin git+ssh://git@github.com/you/repo.git</span></span></code></pre></div>
</div>
<p>Then push and verify:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">bd dolt push
</span></span><span class="line"><span class="cl">git ls-remote origin <span class="s1">&#39;refs/dolt/*&#39;</span>
</span></span><span class="line"><span class="cl"><span class="c1"># 52689c0ae7...  refs/dolt/data</span></span></span></code></pre></div>
</div>
<p>I&rsquo;ve seen <code>refs/</code> used for GitHub PRs before (<code>refs/pr/&lt;num&gt;/head</code>) but I haven&rsquo;t looked into how any of it actually works. For now, seeing <code>refs/dolt/data</code> show up in <code>git ls-remote</code> is enough to make me comfortable that my data exists somewhere.</p>
<p>To avoid doing this manually on every machine, add the remote to <code>.beads/config.yaml</code>:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">sync</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">git-remote</span><span class="p">:</span><span class="w"> </span><span class="l">git+ssh://git@github.com/you/repo.git</span></span></span></code></pre></div>
</div>
<p>Anyone cloning the repo can then run <code>bd bootstrap</code> and <code>bd dolt push / pull</code> will just work.</p>]]></content:encoded></item><item><title>How to reset beads' dolt database</title><link>https://bjorn.now/til/2026-03-20-how-to-reset-beads-dolt-database/?utm_medium=feed</link><pubDate>Fri, 20 Mar 2026 11:29:14 +0100</pubDate><guid>https://bjorn.now/til/2026-03-20-how-to-reset-beads-dolt-database/</guid><description>When beads can’t find or create a dolt database, delete the local dolt state and reinit.
The errors look like this:
Error: failed to open Dolt store: database "bs" not available after CREATE DATABASE: Error 1049 (HY000): database not found: bs or:
Error: failed to open database: database "bs" not found on Dolt server at 127.0.0.1:3308</description><content:encoded><![CDATA[<p>When <a href="https://github.com/steveyegge/beads">beads</a> can&rsquo;t find or create a <a href="https://github.com/dolthub/dolt">dolt</a> database, delete the local dolt state and reinit.</p>
<p>The errors look like this:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Error: failed to open Dolt store: database &#34;bs&#34; not available after CREATE DATABASE: Error 1049 (HY000): database not found: bs</span></span></code></pre></div>
</div>
<p>or:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Error: failed to open database: database &#34;bs&#34; not found on Dolt server at 127.0.0.1:3308</span></span></code></pre></div>
</div>
<p>Fix it by stopping dolt and removing its local state:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">bd dolt stop  <span class="c1"># or you won&#39;t be able to delete all the files</span>
</span></span><span class="line"><span class="cl">rm -rf .beads/dolt/
</span></span><span class="line"><span class="cl">rm .beads/dolt-server.*</span></span></code></pre></div>
</div>
<p>Also check <code>.beads/metadata.json</code> for stale server connection config. Mine had extra fields that were messing things up. I cleaned it down to just the essentials:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;database&#34;</span><span class="p">:</span> <span class="s2">&#34;dolt&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;backend&#34;</span><span class="p">:</span> <span class="s2">&#34;dolt&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;dolt_mode&#34;</span><span class="p">:</span> <span class="s2">&#34;server&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;dolt_database&#34;</span><span class="p">:</span> <span class="s2">&#34;bs&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;project_id&#34;</span><span class="p">:</span> <span class="s2">&#34;deadbeef-9164-426d-8c1c-ff8ae5d35e3e&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
<p>Then reinit: <code>bd init --force --prefix &lt;yourprefix&gt;</code>.</p>
<p><code>bd doctor --fix</code> couldn&rsquo;t sort this out, which is why I ended up doing all this manual cleanup.</p>
<p>I hit this upgrading to beads 0.61.0 when switching to shared-server mode.</p>]]></content:encoded></item></channel></rss>