From 3bb198425cb3b456538154f78350616ee6ff2a60 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Wed, 5 May 2021 16:25:05 -0400 Subject: [PATCH] Use `ta config set` in documentation --- docs/src/config-file.md | 10 +++++++++- docs/src/task-sync.md | 28 +++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/docs/src/config-file.md b/docs/src/config-file.md index 90a892805..6968e6e51 100644 --- a/docs/src/config-file.md +++ b/docs/src/config-file.md @@ -40,7 +40,15 @@ If using a remote server: * `server_client_key` - Client key to identify this replica to the sync server (a UUID) If not set, then sync is done to a local server. -# Reports +## Reports * `reports` - a mapping of each report's name to its definition. See [Reports](./reports.md) for details. + +## Editing + +As a shortcut, the simple, top-level configuration values can be edited from the command line: + +```shell +ta config set data_dir /home/myuser/.taskchampion +``` diff --git a/docs/src/task-sync.md b/docs/src/task-sync.md index a4252c6ac..82200ae48 100644 --- a/docs/src/task-sync.md +++ b/docs/src/task-sync.md @@ -11,13 +11,39 @@ Synchronization is quick, especially if no changes have occurred. Each replica expects to be synchronized frequently, even if no server is involved. Without periodic syncs, the storage space used for the task database will grow quickly, and performance will suffer. +## Local Sync + By default, TaskChampion syncs to a "local server", as specified by the `server_dir` configuration parameter. +This defaults to `taskchampion-sync-server` in your [data directory](https://docs.rs/dirs-next/2.0.0/dirs_next/fn.data_dir.html), but can be customized in the configuration file. + +## Remote Sync + +For remote synchronization, you will need a few pieces of information. +From the server operator, you will need an origin and a client key. +Configure these with + +```shell +ta config set server_origin "" +ta config set server_client_key "" +``` + +You will need to generate your own encryption secret. +This is used to encrypt your task history, so treat it as a password. +The following will use the `openssl` utility to generate a suitable value: + +```shell +ta config set encryption_secret $(openssl rand -hex 35) +``` + Every replica sharing a task history should have precisely the same configuration for `server_origin`, `server_client_key`, and `encryption_secret`. +### Adding a New Replica + Synchronizing a new replica to an existing task history is easy: begin with an empty replica, configured for the remote server, and run `ta sync`. The replica will download the entire task history. +### Upgrading a Locally-Sync'd Replica + It is possible to switch a single replica to a remote server by simply configuring for the remote server and running `ta sync`. The replica will upload the entire task history to the server. Once this is complete, additional replicas can be configured with the same settings in order to share the task history. -