CHANGELOG.md gets the 0.3.0 notes: everything since 0.2.0 by area, and the steps for upgrading a 0.2.0 install (new compose files with a stock PocketBase on 8070, pb_data at /pb/pb_data, the media service, and the SMTP password to enter once more). The release workflow now uses the tag's CHANGELOG section as the Gitea release text. A v0.2.0 compose stack with data was upgraded in place to this commit and kept its data. Also fixes what CI would have failed on: - Server lint (golangci-lint v2.14): errors.Is/As for sentinel errors, the bbolt/errors package instead of the deprecated bolt error, one needless conversion, and commented nolints for gosec false positives. - SPDX headers on Database/export-schema.sh and Server/entrypoint.sh. - Prettier on two files; the generated pbschema/schema.json is ignored. - The editor-bridge dist page rebuilt to match the phone app's copy. PLAN.md and the upgrade guide point to the release notes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.8 KiB
Backups and upgrades
Everything that matters lives in docwell-db's data directory (the pb_data volume): the database, page history
and, unless files go to S3, the uploaded files. The search index in docwell-server's /data is rebuilt from it.
Backups
In Admin panel → Maintenance → Backups, Create backup writes a zip of the database and its files into
pb_data/backups. Download it and keep a copy somewhere else: a backup on the same disk does not survive the disk.
Backups made while people edit are consistent: PocketBase copies the database safely while it runs.
For scheduled backups, back up the pb_data volume with your usual tools (for example a nightly docker run of
restic or borg against the volume), or call the API from cron:
curl -fsS -X POST https://wiki.example.com/api/v1/admin/backups -H "Authorization: Bearer $TOKEN"
Restore
- Stop Docwell:
docker compose down. - Replace the contents of the
pb_datavolume with the contents of the backup zip. - Start Docwell again:
docker compose up -d. The search index rebuilds on its own.
Upgrades
-
Make a backup and download it.
-
Read the release notes (on the release, and in
CHANGELOG.mdin the repository) for anything to do by hand. From 0.2.0 to 0.3.0 there is: new compose files (PocketBase as a stock image on port 8070, and a newmediaservice), and the SMTP password to enter once more if it was saved in the admin panel. -
Pull and restart:
docker compose pull docker compose up -dPin a version with
DOCWELL_VERSION=0.3.0in.envinstead of followinglatest.
Database changes run on their own: docwell-server updates PocketBase's collections when it starts. Going back to an older version after a migration is not supported; restore the backup instead.