Skip to content

Remove the Docker container

Removing the containers keeps your data on the volumes, so you can start them again later with bash compose-start.sh. Deleting the volumes' host directories deletes the configuration, the licenses and the databases for good.

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

  1. Sources: for each source database you no longer replicate, remove what Stelo Capture added to it, while the container still runs; see Remove Stelo Capture from the source databases.
  2. Remove the containers: docker compose down. It stops and removes both containers and their network; the volumes, and your data on them, stay.
  3. Delete the data, if you no longer need it. First copy any backups you want to keep from the backups volume (/mnt/stelo/backups). Then remove the volumes and their host directories, with your MOUNTDIR in place of /mnt:

    docker volume rm sq-config sqplus-config backups db2-home db2-data db2-logs db2-database db2-hadr
    rm -rf /mnt/stelo/sqdr /mnt/stelo/sqdrplus /mnt/stelo/backups /mnt/data/home /mnt/data/db2 /mnt/logs/db2 \
           /mnt/data/database /mnt/data/hadr
    

    Removing a volume doesn't delete its host directory; the rm does.

  4. Remove the images: docker images lists them; remove them with docker image rm <image ID>. Containers created with the earlier setup files also left small unnamed volumes for Db2's /database and /hadr, a new pair each time; docker volume prune removes them, with any other unused unnamed volume on the host.