Clean up quickstart resources¶
This tutorial describes how to remove the Docker containers, images, and volumes created during the quickstart.
Resources to remove¶
The following table lists all resources created during the quickstart tutorials:
| Resource | Type | Created in |
|---|---|---|
psmysql |
Container | Percona Server quickstart |
ps-restore-target |
Container | Restore the backup |
pxb |
Container | Take a backup with Docker |
backupvol |
Volume | Take a backup with Docker |
restore_data |
Volume | Restore the backup |
Step 1: Exit the MySQL client¶
If the MySQL client session remains open, exit the session before removing containers.
-
Exit the MySQL command client:
exitExpected output
ByeAlternative commands:
\qorquit
Step 2: Remove Docker containers¶
Remove the containers created during the quickstart. The -f option forces removal of running containers.
-
Remove the restore target container:
docker container rm ps-restore-target -fExpected output
ps-restore-target -
Remove the Percona Server container:
docker container rm psmysql -fExpected output
psmysql -
Remove the Percona XtraBackup container:
docker container rm pxb -fExpected output
pxb
Step 3: Remove Docker images (optional)¶
Remove the Docker images to free disk space. Skip this step to retain images for future use.
-
Remove the Percona Server image:
docker image rmi percona/percona-server:8.4Expected output
Untagged: percona/percona-server:8.4 Untagged: percona/percona-server@sha256:... Deleted: sha256:... -
Remove the Percona XtraBackup image:
docker image rmi percona/percona-xtrabackup:8.4Expected output
Untagged: percona/percona-xtrabackup:8.4 Untagged: percona/percona-xtrabackup@sha256:... Deleted: sha256:...
Step 4: Remove Docker volumes¶
Remove the volumes that stored database and backup data.
Permanent data loss
Removing volumes permanently deletes all stored data. Verify the data is no longer needed before proceeding.
{.power-number}
-
Remove the backup volume:
docker volume rm backupvolExpected output
backupvol -
Remove the restore target volume:
docker volume rm restore_dataExpected output
restore_data
Verify resource removal¶
Confirm all quickstart resources have been removed with the following commands:
docker ps -a --filter "name=psmysql" --filter "name=ps-restore-target" --filter "name=pxb"
docker volume ls --filter "name=backupvol" --filter "name=restore_data"
Expected output
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
DRIVER VOLUME NAME
Empty results confirm resource removal completed.
Summary¶
This tutorial covered the removal of the following quickstart resources:
-
Three Docker containers:
psmysql,ps-restore-target,pxb -
Two Docker images:
percona/percona-server:8.4,percona/percona-xtrabackup:8.4 -
Two Docker volumes:
backupvol,restore_data
For information about running Percona XtraBackup in production environments, see Installation.