Skip to content

Upgrade Guide

Standard Upgrade

  1. Backup your data

    Terminal window
    ./scripts/backup.sh --all

    See Backup & Restore for details.

  2. Pull the latest code

    Terminal window
    cd breeze
    git pull origin main
  3. Update dependencies

    Terminal window
    pnpm install
  4. Re-deploy

    Terminal window
    ./scripts/prod/deploy.sh .env.prod

    The deploy script handles:

    • Running any pending database migrations
    • Rebuilding Docker images with the latest code
    • Rolling restart of services
    • Health check verification

Checking the Current Version

Terminal window
# API version
curl -s https://breeze.yourdomain.com/health | jq .version
# Agent version
breeze-agent version

Database Migrations

Migrations run automatically during deployment. To run them manually:

Terminal window
export DATABASE_URL="postgresql://breeze:password@localhost:5432/breeze"
pnpm db:migrate

Rolling Back

If an upgrade causes issues:

Terminal window
# Revert to the previous version
git checkout <previous-tag>
pnpm install
./scripts/prod/deploy.sh .env.prod

Agent Upgrades

Agents can be upgraded remotely from the dashboard or via command:

Terminal window
# From the API (sends upgrade command to agent via WebSocket)
curl -X POST https://breeze.yourdomain.com/api/v1/devices/:id/commands \
-H "Authorization: Bearer $TOKEN" \
-d '{"action": "upgrade_agent", "payload": {"version": "0.2.0"}}'

The agent downloads the new binary, verifies its signature, and performs a self-upgrade with automatic rollback on failure.