Importing content to docker volume

I am getting started with docker and got my container running. Is it possible to import data to the volume created with docker run -it --name xp-home enonic/xp-home?. I managed to export some content from a server that I would like to use. I could not find the toolbox on there. Is the REST api possible to use?

Hi phe !

You can use Data Toolbox application :slight_smile:

I assume you are not actually talking about XP import/export here, but want to copy all your data into the docker instance?. If you have a single node deployment, you should be able to copy content of your previous XP_HOME into the docker volume and start the server.

Your data are essentially stored in the XP_HOME/repo directory, so if you are only looking to move the raw data moving this directory should be enough.

NB! Remember XP must not be running if you do this.

Normally, I would recommend that you use the toolbox or one of our apps designed for moving data.

enonic/xp-home does not have a toolbox as I can se?

I was actually looking for the toolbox answer but I dont know if its possible. I am relatively New to docker. I couldnt find the toolbox on in the volume.

You can find toolbox under “/enonic-xp/toolbox”. However you don’t have easy access to upload files to docker from your computer.

I don´t think its in the docker image?

If someone is struggling with the same problem

import.sh
    XPCONTAINER=d177b3275913
    XP_SU_PWD=password
    PATH_TO_EXPORT=/Users/phe/Downloads/ankisBarExport

docker exec $XPCONTAINER mkdir -p enonic-xp/home/data/export
docker cp $PATH_TO_EXPORT $XPCONTAINER:/enonic-xp/home/data/export/
docker exec $XPCONTAINER /enonic-xp/toolbox/toolbox.sh import -a su:password -t cms-repo:draft:/  -s myExport
2 Likes