Skip to content

Updating Tessra

Move to a new release safely, and roll back if something goes wrong.

Tessra never updates itself. When a new image starts, it applies any database migrations before serving requests. Migrations only move forward: an older image cannot open a database that a newer one has migrated.

Upgrade

  1. Read the release notes for every version between yours and the new one, for anything that needs action.
  2. Back up and check the backup:
    docker compose exec tessra dotnet Tessra.Api.dll admin backup /backups/
    docker compose exec tessra dotnet Tessra.Api.dll admin verify-backup /backups/<file>
    
  3. Note the image you are running now, so you can go back: docker compose images tessra.
  4. For a new minor version, change the image tag in compose.yaml (for example ghcr.io/brostro/tessra:0.1 to :0.2). For a patch release on the tag you already use, leave it as it is. Then:
    docker compose pull
    docker compose up -d
    docker compose ps          # wait for "healthy"
    docker compose logs tessra --since 5m
    
  5. Sign in, open a file, and upload a test screenshot from ShareX.

Only one Tessra server can use a data directory at a time. If the new container fails to start with "Another Tessra process is using the data directory", the old one is still running; docker compose up -d normally replaces it.

Roll back

If the new version does not work:

  1. Stop it: docker compose stop tessra.
  2. Set the image back to the previous tag.
  3. If the new version migrated the database, the old version will not open it. Restore the backup from step 2 with the old image:
    docker compose run --rm tessra admin restore /backups/<file> --force
    docker compose up -d
    

Anything uploaded between the backup and the rollback is lost from the database, so roll back soon or copy those files out first.

Supported upgrade paths

Each release's notes list the versions it upgrades from. Upgrading from a main build to the release that follows it works, but builds of main between releases are not tested as upgrade sources.