how to restore mariadb with mariabackup in docker?

If we can't stop mariadb in docker, how could we restore mariadb with mariadbbackup ?

Due to if we want to restore by using mariadbbakcup, we need to stop mariadb server and empty /var/lib/mysql directory.

But I found there seems no way to stop mariadb service in docker.

When I stop mariadb service by using shutdown in mariadb, the container also stop and exit.

Thanks for any suggestion & help.

Answer Answered by Daniel Black in this comment.

There's a restore from backup example on the Docker Hub MariaDB page - https://hub.docker.com/_/mariadb/ under "Restore backups with Mariabackup".

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.