From 80eea4cf740e9b4c245b7f4d3464323f0b508ae7 Mon Sep 17 00:00:00 2001 From: Bob Date: Tue, 6 Oct 2026 20:32:43 +0000 Subject: [PATCH 1/2] docs(migrating): document aw-server-rust --import-legacy / --legacy-dbpath Git-Session-Id: 0a01 --- src/migrating.rst | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/migrating.rst b/src/migrating.rst index 8666f02..cd60387 100644 --- a/src/migrating.rst +++ b/src/migrating.rst @@ -30,7 +30,30 @@ Importing from aw-server-python On aw-server-rust startup, if no database already exists, it will automatically look for an aw-server-python database (only the default peewee datastore supported) and import it into the new database. This can cause some slowness on first startup, especially if you have a large aw-server-python database. -If you've ran aw-server-rust before that version, but switched back, this import has already been triggered, and the import will therefore not run a second time. This can cause you to have old data in the aw-server-rust database. You can retrigger the import by stopping aw-server-rust, moving/removing your aw-server-rust database file, and then starting aw-server-rust again. +The automatic import only runs when the aw-server-rust database is first created. If you've ran aw-server-rust before (for example, tried it and switched back to aw-server-python), the import will not run again, and data recorded by aw-server-python since then will be missing from aw-server-rust. The server log says so on startup ("Datastore was already initialized, skipping legacy import"). + +Running the import manually +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Newer versions of aw-server-rust (released after v0.14.0) can re-run the import explicitly. Stop the running aw-server-rust (e.g. quit aw-qt), then start it once with ``--import-legacy``: + +.. code-block:: sh + + aw-server-rust --import-legacy + +(The binary is named ``aw-server`` if you built aw-server-rust from source.) + +The import is idempotent: buckets that already exist in aw-server-rust only get the events they're missing, so running it more than once does not create duplicates. Once it's done you can restart ActivityWatch normally. + +By default the legacy database is looked up at ``/activitywatch/aw-server/peewee-sqlite.v2.db`` (see :doc:`directories`). If yours is somewhere else, point to it with ``--legacy-dbpath``: + +.. code-block:: sh + + aw-server-rust --import-legacy --legacy-dbpath /path/to/peewee-sqlite.v2.db + +Setting a custom ``--dbpath`` disables the automatic import; add ``--import-legacy`` to run it anyway. + +On older versions without ``--import-legacy``, you can retrigger the import by stopping aw-server-rust, moving/removing your aw-server-rust database file, and then starting aw-server-rust again. Another option for migrating is to use the "Export all"/"Import all" buttons under the "Raw data" menu in the web UI. This should work with all datastores in aw-server-python. From 40d8f7d36bdf1076eb0bd80e2f7ba283b27a5a93 Mon Sep 17 00:00:00 2001 From: Bob Date: Tue, 13 Oct 2026 20:49:42 +0000 Subject: [PATCH 2/2] docs(migrating): name v0.14.1 as the first release with --import-legacy Git-Session-Id: 526e2d78-6632-4ec0-b94a-e5238cab6712 --- src/migrating.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/migrating.rst b/src/migrating.rst index cd60387..60e2894 100644 --- a/src/migrating.rst +++ b/src/migrating.rst @@ -35,7 +35,7 @@ The automatic import only runs when the aw-server-rust database is first created Running the import manually ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Newer versions of aw-server-rust (released after v0.14.0) can re-run the import explicitly. Stop the running aw-server-rust (e.g. quit aw-qt), then start it once with ``--import-legacy``: +ActivityWatch v0.14.1 and newer can re-run the import explicitly. Stop the running aw-server-rust (e.g. quit aw-qt), then start it once with ``--import-legacy``: .. code-block:: sh @@ -53,7 +53,7 @@ By default the legacy database is looked up at ``/activitywatch/aw-ser Setting a custom ``--dbpath`` disables the automatic import; add ``--import-legacy`` to run it anyway. -On older versions without ``--import-legacy``, you can retrigger the import by stopping aw-server-rust, moving/removing your aw-server-rust database file, and then starting aw-server-rust again. +On v0.14.0 and older, which lack ``--import-legacy``, you can retrigger the import by stopping aw-server-rust, moving/removing your aw-server-rust database file, and then starting aw-server-rust again. Another option for migrating is to use the "Export all"/"Import all" buttons under the "Raw data" menu in the web UI. This should work with all datastores in aw-server-python.