Skip to content

Updating Avenvail

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

Avenvail 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 avenvail dotnet Avenvail.Api.dll admin backup /backups/
    docker compose exec avenvail dotnet Avenvail.Api.dll admin verify-backup /backups/<file>
    
  3. Note the image you are running now, so you can go back: docker compose images avenvail.
  4. For a new minor version, change the image tag in compose.yaml (for example ghcr.io/avenvail/avenvail:0.7 to :0.8). 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 avenvail --since 5m
    
  5. Sign in, open a file, and upload a test screenshot from ShareX.

Only one Avenvail server can use a data directory at a time. If the new container fails to start with "Another Avenvail 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 avenvail.
  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 avenvail 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.