Upgrading & Migration
Version upgrades, database migration, and rollback procedures.
Version Upgrades
Bare Metal
curl -fsSL https://www.nobacmd.com/install.sh | bash
The installer handles dependency updates, frontend builds, and service restarts. SQLite schema migrations run automatically on startup.
Docker
curl -fL https://www.nobacmd.com/download/latest/docker-install.sh | bash
docker compose up -d
The install script downloads a SHA-verified image tarball from R2, loads it into the local Docker daemon, and tags it as noba-enterprise:latest. Pin a specific version with NOBA_VERSION=…. SQLite migrations run automatically when the container starts.
Self-Update (from the UI)
Navigate to Settings → General → Self-Update and click Check for Updates. The built-in updater pulls changes, verifies integrity, installs new dependencies, and restarts — with automatic rollback on failure.
Database Backend Migration
NOBA supports three database backends: SQLite (default), PostgreSQL, and MySQL/MariaDB. You can migrate from SQLite to either relational backend at any time.
SQLite → PostgreSQL
- Create the PostgreSQL database:
createdb noba - Install the driver:
pip install psycopg2-binary - Initialize schema:
python3 scripts/init-postgres-schema.py - Migrate data:
DATABASE_URL=postgresql://... python3 scripts/migrate-to-postgres.py - Stamp Alembic baseline:
noba-migrate stamp 001 - Apply pending migrations:
noba-migrate upgrade - Set
DATABASE_URLand restart NOBA
SQLite → MySQL / MariaDB
- Create the MySQL database with
utf8mb4charset - Install the driver:
pip install PyMySQL DBUtils - Initialize schema:
python3 scripts/init-mysql-schema.py - Migrate data:
DATABASE_URL=mysql://... python3 scripts/migrate-to-mysql.py - Set
DATABASE_URLand restart NOBA
Schema Versions
| Version | Changes |
|---|---|
| v1 | Core infrastructure (tokens, metrics, settings) |
| v2 | Agents and alerts |
| v3 | Automations and healing |
| v4 | Audit logging and trust |
| v5 | Endpoints and baselines |
| v6 | Multi-tenancy |
| v7 | Enterprise tenant columns |
| v8 | Password resets, invites, backups, reports |
| v9 | AD sync tables (directories, sync state, run log, user links, migration plans) |
Rollback
Bare Metal
cd ~/noba-enterprise
git log --oneline -10 # find the last known-good commit
git checkout <commit-hash>
bash install.sh --upgrade
Database
Before migrating backends, NOBA creates a backup automatically. You can also create one manually from Settings → Database → Backup.
For PostgreSQL downgrades: noba-migrate downgrade <revision>