Recover Percona Xtradb in container Recover Percona Xtradb in container docker docker

Recover Percona Xtradb in container


That container uses volumes (see here), so your data is not inside the container.

To find where it is stored, use docker container inspect YOUR_CONTAINER_NAME, and search for Mounts in the output. If you have jqinstalled you can use something like

$ docker container inspect YOUR_CONTAINER_NAME | jq ".[0].Mounts"

Once you found the directory where the data is stored, you should create a backup.

You can then create a new container, with a bind to that directory. Something like

$ docker run -it -v VOLUME_PATH:/var/lib/mysql OTHER_OPTIONS_HERE image_name /bin/sh

This should give you a shell where you can execute any commands you may need.

Once you finished, you can delete this container, and hopefully the percona one should now work.