Skip to content

Upgrade the Docker container

In the Stelo Replicator container, SQDR (both parts and the Data Replicator Manager) and Db2 are upgraded together: you run newer images, and the volumes keep the configuration, the licenses and the databases (see Volumes). Changes made elsewhere in the container, such as data sources in /etc/odbc.ini, must be made again.

Before you upgrade

  • Read the release notes of the versions between yours and the new one: SQDR and SQDR Plus release notes.
  • Plan a way back. The Replicator Service upgrades its control database when it first starts after the upgrade, and that can't be undone: to go back, restore the backup you take below (see Control database upgrades).
  • One thing at a time. Don't combine an upgrade with a move to another computer; see Change one thing at a time.
  • Your changes to the shipped files. The new image brings the connection templates (connector-templates.json) and the built-in macros (builtin-macros.json) in /var/sqdr up to date, but keeps a file you edited: docker logs stelo-full then shows "was edited and is kept", and the image's version is in /opt/StarQuest/sqdr/data-defaults/. The type configuration (type-config.json) always comes from the image: keep a copy of your changes, and apply them again after upgrading.

Upgrade

Run the commands on the host, in the directory with docker-compose.yml, as root (or with sudo).

  1. Let running group runs finish, and pause the incremental groups that replicate from Stelo Capture, so they don't report errors while the Capture Agents are stopped.
  2. Back up the control database with Db2's backup command, and keep a copy of the volumes' host directories (see The control database).
  3. Set the version: in .env, set STELO_VERSION to the new version (with latest, leave it). If .env also sets STELO_MANAGER_VERSION, change it too, or remove it so that both images run the same version. Set the version in .env, not on the command line (see Set up the container).
  4. Run the new images: docker compose pull, then bash compose-start.sh. Docker Compose recreates both containers on the new images, and the services start with them. Check that both containers are Up with docker ps.
  5. Db2: if the release notes say the release brings a new Db2 level, update each database (the control database and the staging databases) as db2inst1: db2updv115 -d <database>.
  6. The control database is upgraded by the Replicator Service when it first starts: nothing to run (see Control database upgrades).
  7. Reload the Data Replicator Manager and the SQDR Control Center in your browser. If signing in to the SQDR Control Center fails with "The response could not be deserialized", refresh the page (see Cannot sign in to SQDR Control Center after an upgrade).
  8. Db2 for i sources: stop each Db2 for i Capture Agent, run Update Host, and start it again.
  9. Resume the incremental groups: resume one small group first, check that it applies changes, then resume the rest.
  10. Do the checks after the upgrade.

What the Stelo Capture upgrade changes

  • When a Capture Agent starts after the upgrade, it upgrades the stored procedures in its staging database if they're from an older version.
  • When the Launch Agent starts, before any Capture Agent, it checks which version of the Java stored procedure jar (UDBProcs.jar) Db2 runs in SQDRC and in each Db2 for LUW staging database. If it's older than the installed Stelo Capture (or can't be read), the Launch Agent replaces the jar through Db2 and reloads its classes: Db2 11.5 keeps a copy of the jar per database, so copying the file during the install doesn't update it. Staging databases of disabled or standby Capture Agents, and databases without the jar, are skipped. Each replacement is logged in the Launch Agent log; a SEVERE message means Db2 still reports another version afterwards.

Earlier setup files

In the earlier setup files, the image tags are in docker-compose.yml, and the containers are started with compose-start.sh. To upgrade with them, edit the tags in docker-compose.yml, then run ./compose-stop.sh and ./compose-start.sh.

To change to the current files, in the directory with your earlier files:

  1. Download the current docker-compose.yml and compose-start.sh over the earlier ones (the curl -O lines in Set up the container). Keep your .env: its ports and MOUNTDIR still apply, and the current files ignore its other settings.
  2. Add STELO_VERSION to .env with the version to run (without it, latest).
  3. Run bash compose-start.sh. It recreates stelo-full on your existing volumes and data. Docker Compose warns that the six volumes of create-volumes.sh "already exist but were not created by Docker Compose": you can ignore it. It creates two volumes for Db2's /database and /hadr, which start empty this once; with the earlier files, every new container started them empty.

Checks after the upgrade

  • Versions: connect with the Data Replicator Manager and check the service version on the Service tab.
  • Control database: each time the service starts, its log says which level the control database is at ("Control database level ..."); see Control database upgrades.
  • Capture Agents: on the SQDR Control Center's Dashboard, check that the agents are running.
  • Groups: check that the incremental groups are running and apply changes; see The Groups page.
  • Your changes to the shipped files: apply your copy of type-config.json again, and check docker logs stelo-full for files that were kept because you edited them.

Upgrading to SQDR 7.0

  • A run-history limit of 0 changed meaning. Check Service Settings › Logging after upgrading; see How long history is kept.
  • Existing subscriptions aren't remapped. SQDR 7.0 maps some column types differently; existing subscriptions keep their columns. See Data type mapping.