Team NetObjects
Koken Agent

Aug 25, 2014 12:30PM EDT

Chris – The MySQL data is stored in /data/koken/mysql on the DigitalOcean host. I’m not sure what the best way to import it would be, or if it is even possible at this time. We’re looking at better ways of doing this, but for now it may take some trial and error.

Dave

Aug 26, 2014 01:00AM EDT

I had the exact same question, and I've been playing with this over the past few days and finally got a Docker-to-Docker migration working successfully. If you are migrating from a non-Docker MySQL instance into a Docker instance, you can skip the first part of this and just start with a mysqldump file directly.

First, I installed nsenter on the source Docker host, which allows me to enter the Docker container and connect to the mysql server directly. I followed the instructions here: https://github.com/jpetazzo/nsenter.

docker run --rm -v /usr/local/bin:/target jpetazzo/nsenter

Then I entered the container and ran mysqldump, using the koken user/pass from www/storage/configuration/database.php.

One thing to keep in mind: the Koken Dockerfile sets up a random password for the MySQL user when it runs. So if you take a backup and move it to another Koken Docker container, you will need to import it using the password for the target container, not the source container. And when copying the /www/ folder, don't overwrite the database.php file, since that's where the new password is stored.