|
19 | 19 | 1. Commit that change with comment "Bump to -pre version". |
20 | 20 | 1. Run `git push upstream` |
21 | 21 | 1. Navigate to the tag in the GitHub releases UI and create a release with general comments about the changes in the release |
| 22 | + |
| 23 | +--- |
| 24 | + |
| 25 | +For the next release, include the folowing in the release notes: |
| 26 | + |
| 27 | +Running the Docker image for this server without specifying DATA_DIR |
| 28 | +defaulted to storing the server data in |
| 29 | +`/var/lib/taskchampion-sync-server`. However, the Dockerfile only |
| 30 | +specifies that the subdirectory `/var/lib/taskchampion-sync-server/data` |
| 31 | +is a VOLUME. This change fixes the default to match the VOLUME, putting |
| 32 | +the server data on an ephemeral volume or, if a `--volume |
| 33 | +$NAME:/var/lib/taskchampion-sync-server/data` argument is provided to |
| 34 | +`docker run`, in a named volume. |
| 35 | + |
| 36 | +Before this commit, with default settings the server data is stored in |
| 37 | +the container's ephemeral writeable layer. When the container is killed, |
| 38 | +the data is lost. This issue does not affect deployments with `docker |
| 39 | +compose`, as the compose configuration specifies a correct `DATA_DIR`. |
| 40 | + |
| 41 | +You can determine if your deployment is affected as follows. First, |
| 42 | +determine the ID of the running server container, `$CONTAINER`. Examine |
| 43 | +the volumes for that container: |
| 44 | + |
| 45 | +```shell |
| 46 | +$ docker container inspect $CONTAINER | jq '.[0].Config.Volumes' |
| 47 | +{ |
| 48 | + "/var/lib/task-champion-sync-server/data": {} |
| 49 | +} |
| 50 | +``` |
| 51 | + |
| 52 | +Next, find the server data, in a `.sqlite3` file: |
| 53 | + |
| 54 | +```shell |
| 55 | +$ docker exec $CONTAINER find /var/lib/taskchampion-sync-server |
| 56 | +/var/lib/taskchampion-sync-server |
| 57 | +/var/lib/taskchampion-sync-server/data |
| 58 | +/var/lib/taskchampion-sync-server/taskchampion-sync-server.sqlite3 |
| 59 | +``` |
| 60 | + |
| 61 | +If the data is not in a directory mounted as a volume, then it is |
| 62 | +ephemeral. To copy the data out of the container: |
| 63 | + |
| 64 | +```shell |
| 65 | +docker cp $CONTAINER:/var/lib/taskchampion-sync-server/taskchampion-sync-server.sqlite3 /tmp |
| 66 | +``` |
| 67 | + |
| 68 | +You may then upgrade the image and use `docker cp` to copy the data back |
| 69 | +to the correct location, `/var/lib/taskchampion-sync-server/data`. |
| 70 | + |
| 71 | +Note that, as long as all replicas are fully synced, the TaskChampion |
| 72 | +sync protocol is resilient to loss of server data, so even if the server |
| 73 | +data has been lost, `task sync` may continue to work. |
0 commit comments