How to know the location of exported database in docker

368 views
Skip to first unread message

Khairunnisah Khairunnisah

unread,
Aug 30, 2021, 6:00:39 AM8/30/21
to AtoM Users
I want to export mysql database in docker. It works, but I don't know the locaation of exported database. How can I know the location of exported database? Because I want to download the database.
Thank you

Dan Gillean

unread,
Aug 30, 2021, 1:08:57 PM8/30/21
to ICA-AtoM Users
Hi there, 

If you have not specified a path, then the mysqldump is likely still in the percona container. You can copy it out of there to a location on your local filesystem, however. 

Below is a screenshot showing how one of our developers accomplished this:

docker-mysqldump.png

Essentially, this was done by:
  • Specifying where the Docker compose file is located so we don't get errors (the AtoM compose environment does not install it in root as expected)
  • First accessing the bash command-line in the percona container, where the MySQL database is managed
  • running the sqldump command, passing the database user, password, database name, and a location for the dump. If you didn't specify a location, it should be in whatever directory you were in when you run the command
  • Exiting the bash command-prompt in the percona container
  • Copying the dump from the tmp directory in the percona container to the root directory of the local host computer
You can see all containers and their statuses with the following: 
To see the name of services listed, run: 
  • docker-compose ps --services
I hope this helps!

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


On Mon, Aug 30, 2021 at 6:00 AM Khairunnisah Khairunnisah <khairunn...@gmail.com> wrote:
I want to export mysql database in docker. It works, but I don't know the locaation of exported database. How can I know the location of exported database? Because I want to download the database.
Thank you

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/d2933356-138d-4de6-b64a-5b9cf9e7a214n%40googlegroups.com.

Khairunnisah Khairunnisah

unread,
Aug 31, 2021, 8:42:08 AM8/31/21
to AtoM Users
Thank you, the problem is solved.
Reply all
Reply to author
Forward
0 new messages