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).
- 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.
- Remove the containers:
docker compose down. It stops and removes both containers and their network; the volumes, and your data on them, stay. -
Delete the data, if you no longer need it. First copy any backups you want to keep from the
backupsvolume (/mnt/stelo/backups). Then remove the volumes and their host directories, with yourMOUNTDIRin 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/hadrRemoving a volume doesn't delete its host directory; the
rmdoes. -
Remove the images:
docker imageslists them; remove them withdocker image rm <image ID>. Containers created with the earlier setup files also left small unnamed volumes for Db2's/databaseand/hadr, a new pair each time;docker volume pruneremoves them, with any other unused unnamed volume on the host.