You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: aw-sync/README.md
+41-13
Original file line number
Diff line number
Diff line change
@@ -3,20 +3,52 @@ aw-sync-rust
3
3
4
4
Synchronization for ActivityWatch.
5
5
6
-
Works by syncing local buckets with a special folder, which in turn should be synchronized by rsync/Syncthing/Dropbox/GDrive/whatever.
6
+
Works by syncing local buckets with a special folder, which in turn should be synchronized by rsync/Syncthing/Dropbox/GDrive/etc.
7
+
8
+
The latest beta versions of ActivityWatch ship with the `aw-sync` binary, but it's not enabled by default. You can start it from aw-qt or the command line, but due to the early state of development might not have the best UX. Please report issues and submit PRs!
7
9
8
10
Was originally prototyped as a PR to aw-server: https://github.com/ActivityWatch/aw-server/pull/50
9
11
10
12
11
13
## Usage
12
14
13
-
NOTE: Basic usage not quite ready yet, see the below testing sections for MVP usage.
15
+
This will start a daemon which both pulls and pushes events with the sync directory.
14
16
17
+
```sh
18
+
cargo run --bin aw-sync
15
19
```
16
-
cargo run --bin aw-sync -- sync
17
-
```
18
20
19
-
## Running with real data on a testing instance
21
+
For more options, see `cargo run --bin aw-sync -- --help`.
22
+
23
+
---
24
+
25
+
## FAQ
26
+
27
+
### When is it ready?
28
+
29
+
It works today, but there is still testing and polishing to be done before it's "click and play".
30
+
31
+
### Why do it this way?
32
+
33
+
By essentially only offering a "sync with folder" feature, we give the user a lot of freedom to choose how to store and sync their data.
34
+
35
+
We also avoid having to implement complex features such as conflict resolution, by enforcing that each device only writes to files in the sync folder they "own", and other devices may not modify them.
36
+
37
+
### What are the limitations?
38
+
39
+
- It only syncs afk and window buckets by default (since bucket IDs need to be unique)
40
+
- It will work a lot better once proper `hostname -> device ID` migration is complete.
41
+
- It doesn't sync settings
42
+
- It doesn't support Android, yet.
43
+
- It mirrors events to all devices,
44
+
- If you have a lot of devices you'll get a lot of duplicates, taking up a lot of space and potentially impacting performance.
45
+
- It doesn't support modifying/deleting events, yet.
46
+
47
+
---
48
+
49
+
## Advanced usage
50
+
51
+
### Syncing real data to a testing instance
20
52
21
53
If you want to try sync, you can do so by following these steps.
22
54
@@ -46,14 +78,9 @@ We will use some helper scripts to do the following:
46
78
47
79
In the end, You should get something like this: https://twitter.com/ErikBjare/status/1519399784234246147
48
80
81
+
### Testing with fake data
49
82
50
-
## Testing with fake data
51
-
52
-
**Note:** this documents usage for testing, it is not yet ready for production usage.
53
-
54
-
It assumes you're running a temporary aw-server instances.
55
-
56
-
### Pushing to the sync directory
83
+
#### Pushing to the sync directory
57
84
58
85
First start the sending aw-server instance. For example:
59
86
@@ -66,7 +93,7 @@ You can create some test data by opening `http://localhost:5667/#/stopwatch` and
66
93
67
94
Then run `cargo run --bin aw-sync-rust -- --port 5667` to sync your instance's buckets with the target directory.
68
95
69
-
### Pulling from the sync directory
96
+
####Pulling from the sync directory
70
97
71
98
Now to sync things back from the sync directory into another instance.
Now run `cargo run --bin aw-sync-rust -- --port 5668` to pull buckets from the sync dir (retrieving events from the 5667 instance) and push buckets from the 5668 instance to the sync dir.
0 commit comments