Files
beads/website/docs/recovery/database-corruption.md
Steve Yegge 584608a14e feat: add llms.txt standard support for AI agent discoverability (#784)
Cherry-picked website/, scripts/generate-llms-full.sh, and deploy-docs.yml
from joyshmitz's PR. Fixed workflow to trigger on main branch instead of
docs/docusaurus-site.

Features:
- Docusaurus documentation site with llms.txt support
- Environment-variable driven config (defaults to steveyegge org)
- Automated llms-full.txt generation from docs
- GitHub Pages deployment workflow

Co-authored-by: joyshmitz <joyshmitz@users.noreply.github.com>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Executed-By: beads/crew/dave
Rig: beads
Role: crew
2025-12-30 18:27:50 -08:00

67 lines
1.1 KiB
Markdown

---
sidebar_position: 2
title: Database Corruption
description: Recover from SQLite database corruption
---
# Database Corruption Recovery
This runbook helps you recover from SQLite database corruption in Beads.
## Symptoms
- SQLite error messages during `bd` commands
- "database is locked" errors that persist
- Missing issues that should exist
- Inconsistent state between JSONL and database
## Diagnosis
```bash
# Check database integrity
bd status
# Look for corruption indicators
ls -la .beads/beads.db*
```
If you see `-wal` or `-shm` files alongside `beads.db`, a transaction may have been interrupted.
## Solution
:::warning
Back up your `.beads/` directory before proceeding.
:::
**Step 1:** Stop the daemon
```bash
bd daemon stop
```
**Step 2:** Back up current state
```bash
cp -r .beads .beads.backup
```
**Step 3:** Rebuild from JSONL (source of truth)
```bash
bd doctor --fix
```
**Step 4:** Verify recovery
```bash
bd status
bd list
```
**Step 5:** Restart daemon
```bash
bd daemon start
```
## Prevention
- Avoid interrupting `bd sync` operations
- Let the daemon handle synchronization
- Use `bd daemon stop` before system shutdown