resta

Upgrading

To upgrade Resta, pull the new images and recreate the containers; the API migrates its Postgres tables on start, and database files need no migration because they stay in the SQLite format. Queries fail for the few seconds the node takes to restart, so clients should retry.

Docker Compose

docker compose pull
docker compose up -d

To upgrade deliberately, pin a version in .env and change it when you choose:

RESTA_VERSION=0.1.0

Coolify

Change RESTA_VERSION in the resource’s environment, or redeploy to pull latest.

Before you upgrade

  1. Read the release notes for the version.
  2. Back up Postgres (see Backups).
  3. Take snapshots of databases you cannot afford to lose since the last scheduled pass:
curl -X POST https://db.example.com/v1/databases/<name>/snapshots \
  -H "Authorization: Bearer $RESTA_API_KEY"

During the upgrade

The node runs as one container on one volume, so it stops before the new one starts. Requests in that window fail with a connection error or 502 from the gateway. Open interactive transactions are rolled back.

Rolling back

Set RESTA_VERSION to the previous version and redeploy. A Postgres migration from a newer version may not be readable by an older one; restore the Postgres backup from before the upgrade if the old API fails to start.

Updated · View as Markdown