Upgrading Synjar
Keep your Synjar installation up to date with the latest features and security patches.
Before upgrading
1. Check release notes
Review the changelog for:
- Breaking changes
- New environment variables
- Migration requirements
2. Backup your data
# Database backup
docker-compose exec -T postgres pg_dump -U synjar synjar > pre-upgrade-backup.sql
# Verify backup
ls -la pre-upgrade-backup.sql
3. Check current version
docker-compose exec synjar cat package.json | grep version
Upgrade procedures
Docker Compose
# Pull latest images
docker-compose pull
# Run database migrations
docker-compose run --rm synjar npx prisma migrate deploy
# Restart with new version
docker-compose up -d
Docker (single container)
# Pull new image
docker pull synjar/synjar:latest
# Stop current container
docker stop synjar
# Run migrations (new container)
docker run --rm \
-e DATABASE_URL="$DATABASE_URL" \
synjar/synjar:latest \
npx prisma migrate deploy
# Start new container
docker run -d --name synjar-new [same options as before]
# Remove old container
docker rm synjar
docker rename synjar-new synjar
Kubernetes (Helm)
# Update Helm repo
helm repo update
# Check for new values
helm show values synjar/synjar > new-values.yaml
diff values.yaml new-values.yaml
# Upgrade
helm upgrade synjar synjar/synjar -f values.yaml
Post-upgrade verification
Check health
curl http://localhost:6200/health
Check version
curl http://localhost:6200/api/info
Verify functionality
- Log in to the web interface
- Verify existing documents are accessible
- Upload a test document
- Run a search query
Rollback procedure
If issues occur after upgrade:
Docker Compose
# Stop current version
docker-compose down
# Restore database
cat pre-upgrade-backup.sql | docker-compose exec -T postgres psql -U synjar synjar
# Use previous image
docker-compose pull synjar/synjar:previous-version
docker-compose up -d
Kubernetes
helm rollback synjar
Version policy
- Patch versions (x.x.X): Bug fixes, safe to upgrade
- Minor versions (x.X.0): New features, review changelog
- Major versions (X.0.0): Breaking changes, read migration guide