Skip to content

docs(directories): document aw-server-rust --dbpath and its aw-qt caveat - #227

Merged
ErikBjare merged 2 commits into
ActivityWatch:masterfrom
TimeToBuildBob:docs/dbpath-location
Nov 25, 2026
Merged

ErikBjare merged 2 commits into
ActivityWatch:masterfrom
TimeToBuildBob:docs/dbpath-location

Conversation

@TimeToBuildBob

@TimeToBuildBob TimeToBuildBob commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

The page names the data directories but never says the database can live somewhere else. A user asked exactly that on the forum (keeping ActivityWatch data on an external drive shared between computers), and the only public mention of the flag is the v0.11.0 changelog entry.

This adds a "Changing the database location" section to src/directories.rst covering:

  • aw-server-rust --dbpath <file> with an example. The value is the database file, and its folder must already exist.
  • That it is CLI-only: not in the config file (AWConfig has no such field) and not passed by aw-qt (aw_qt/manager.py starts modules with no extra args). The Tauri app embeds the server and has no equivalent.
  • Classic app setup: remove whichever server is in autostart_modules (the default is the Python aw-server), then start aw-server-rust by hand. The tray Modules menu only stops a server for the session.
  • Moving existing history: copy sqlite.db (plus -wal/-shm) from aw-server-rust, or use --import-legacy (v0.14.1+) for Python aw-server history. Categories and other web UI settings are not imported.
  • Single-writer caveat: a shared database is not syncing; one machine at a time, no network shares, and syncing is the supported way to combine per-machine data.
  • aw-server (Python) has no --dbpath, only --profile.

The first revision said --dbpath <directory>, which was wrong.

Verified against the sources pinned by v0.14.3 (aw-server-rust 113752dd, aw-qt c31456c1) and by running the released v0.14.3 Linux binaries in a throwaway HOME:

Case Result
--dbpath pointing at an existing directory datastore worker panics
--dbpath in a missing folder datastore worker panics
--dbpath to a new file starts empty
new file + --import-legacy Python server bucket and event imported
copied sqlite.db* + --dbpath history present

The page builds with sphinx-build -W -n (with stubs for the linked pages).

The page names the data directories but never says the database can live
elsewhere, which is the first question from users keeping their data on an
external drive. Document the CLI flag, that it is not a config/UI setting,
that aw-qt cannot pass it (so autostart_modules needs editing), the
single-writer caveat, and that aw-server (Python) has no equivalent.

Git-Session-Id: 5458086f-339f-47ce-8bdd-5ff30f715ac0
@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

Review guide (auto-posted)

Structured warm-up for reviewers — what changed, what to run, where to look.

Key files

  • src/directories.rst (+30/-0, Δ30)

Suggested verification

  • Run the repo's usual CI-equivalent checks locally

Known risks / watch points

  • No automatic high-risk tags; use file list + diff for judgment.

Suggested review focus

  • Confirm behavior matches the PR description acceptance criteria.
  • Skim the largest diffs first (listed above).
  • If CI is green, spot-check the highest-risk paths called out here.

Generated by scripts/github/pr-warmup-review-guide.py for #227.

@greptile-apps

greptile-apps Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The documentation appears safe to merge.

Summary

Adds instructions for keeping the aw-server-rust database outside its default directory.

  • The directories guide shows how to run the Rust server with another database file.

Both previous threads are addressed: the steps now remove whichever server is enabled, and the new subsection explains how to preserve existing history. No new actionable issues were found.

Reviews (2) · Last reviewed commit: "docs(directories): fix --dbpath usage an..." · Reviewed by Greptile

Comment thread src/directories.rst Resolved
Comment thread src/directories.rst Resolved
--dbpath takes the database file, not a directory: with the released
v0.14.3 binary a directory path (or a missing parent folder) makes the
datastore worker panic. The classic app starts the Python aw-server by
default, so remove whichever server is listed in autostart_modules, and
explain how to bring existing history to the new location.

Git-Session-Id: 3b28c971-364c-567b-afa9-b80e3d39b9bd
@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

@greptileai review

@ErikBjare
ErikBjare merged commit 9d5d5ba into ActivityWatch:master Nov 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants