Files
Docwell/Docs-Site/guide/backups-upgrades.md
T
tajniak81andClaude Opus 5.5 cad42fbe89
CI / desktop (ubuntu-latest) (push) Successful in 2h34m54s
CI / mobile (push) Failing after 4m52s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / docker (push) Successful in 53m34s
Docs / build (push) Canceled after 0s
Docs / deploy (push) Canceled after 0s
CI / go (Media) (push) Successful in 13m0s
CI / go (Server) (push) Successful in 24m4s
CI / go (Web-App) (push) Successful in 12m35s
CI / frontend (push) Failing after 11m51s
Prepare the 0.3.0 release
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>
2026-11-17 10:21:57 +01:00

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

  1. Stop Docwell: docker compose down.
  2. Replace the contents of the pb_data volume with the contents of the backup zip.
  3. Start Docwell again: docker compose up -d. The search index rebuilds on its own.

Upgrades

  1. Make a backup and download it.

  2. Read the release notes (on the release, and in CHANGELOG.md in 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 new media service), and the SMTP password to enter once more if it was saved in the admin panel.

  3. Pull and restart:

    docker compose pull
    docker compose up -d
    

    Pin a version with DOCWELL_VERSION=0.3.0 in .env instead of following latest.

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.