Reputation: 359
I was using a dockerized mariadb container (connected to mediawiki) with default setting(docker run --name some-mariadb -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mariadb:tag
). And now i need to migrate it to another machine. But don't know how to keep it's data together.
docker inspect
told me that the current data is located in /var/lib/docker/volumes/c27...d02/_data
. Do i just need to copy this folder and move to another machine together? Need your help guys :(
Upvotes: 0
Views: 756
Reputation: 17576
Simply keep that directory as a volume. Have you read the documentation? Especially the Where to Store Data
part
-v /var/lib/mysql
When you migrate to another machine, simply copy&paste that directory to its counterpart on the another server.
Upvotes: 1