Backups, upgrades, and rollback
Prepare a recoverable upgrade workflow around configuration, database, Redis, and gateway data.
Create a consistent backup before upgrading
Preserve the original deploy/stack.env, MySQL data and migration history, Redis data, encrypted gateway data, and HTTPS configuration. Keep an off-host copy and verify it through a separate restoration exercise.
- Do not copy a live MySQL data directory directly.
- Existing encrypted data may be unrecoverable without the original encryption key.
- Record the current source revision, image ID, and schema version.
Upgrade in a maintenance window
Verify backups, the target release, migrations, and critical clients before updating production in a maintenance window. --local uses the same installer command for initial deployment and updates: fetch or upload the new source, then rerun in the original application directory, preserving configuration and data. It does not fetch the target revision. Downloaded archives lack .git metadata and should not be updated with git pull.
git pull --ff-only && ./install.sh --local --public --port 18080Run in the original application directory after resolving local changes and confirming the tracking branch. For a pinned revision or uploaded source, prepare the target source and rerun only the original installer command. Keep the original flags for host-only or HTTPS deployments.
./deploy/stack.sh status
./deploy/stack.sh logsRun from the actual deployment directory: the application checkout for --local, or /opt/bosapi for the default root archive workflow. Add sudo on Linux if Docker access requires it, never on macOS.
Verify by layer, not only container state
- Container health: application, MySQL, and Redis are in the expected state.
- Management flow: an administrator can sign in and complete MFA.
- Business request: model listing and a real model call succeed.
- Data checks: request records, usage, and security events match expectations.
Separate application rollback from data rollback
Restoring an older image does not reverse database migrations. Reuse an older image only when it is compatible with the current schema; otherwise restore a coordinated backup. Recheck sign-in, model requests, and data access after rollback.
Match capabilities and procedures to your deployment version. Read the documentation scope