Upgrading
How to upgrade the knowledge graph system to new versions.
Update vs Upgrade
Following the familiar Linux package manager pattern:
| Command | What it does | Restarts? |
|---|---|---|
./operator.sh update |
Pull latest images | No |
./operator.sh upgrade |
Pull, migrate, restart | Yes |
Check for updates first:
./operator.sh update # Pull all images
./operator.sh update api # Pull specific service only
./operator.sh update operator # Update operator (scripts/migrations)
Then apply them:
Quick Upgrade
This command: 1. Pulls latest images (if using GHCR) 2. Backs up the database 3. Stops application containers 4. Runs database migrations 5. Starts containers with new images 6. Verifies health
Upgrade Options
# See what would change without doing it
./operator.sh upgrade --dry-run
# Skip backup (faster, but risky)
./operator.sh upgrade --no-backup
# Upgrade to specific version
./operator.sh upgrade --version 0.5.0
Before Upgrading
- Check the changelog for breaking changes
- Backup your data:
- Note your current version:
After Upgrading
-
Verify health:
-
Check logs for errors:
-
Test core functionality:
Rolling Back
If something goes wrong:
-
Stop containers:
-
Restore database:
-
Use previous image version: Edit compose file to pin previous version tag, then:
Version Pinning
By default, GHCR deployments use :latest. To pin a specific version:
Edit docker-compose.prod.yml:
Migration Notes
Database migrations run automatically during upgrade. If a migration fails:
-
Check logs:
-
Run manually:
-
If stuck, restore from backup and report the issue.