Docker Community Forums

Share and learn in the Docker community.

Container migration

docker

(Getaceres) #1

Hello, I’m trying to use the experimental checkpoint feature to implement container migration between machines. I’ve found many examples of checkpointing and restoring on the same machine but I’ve only found this documentation about migrating checkpoints between different machines:

However, the commands it uses is outdated and docker checkpoint restore is not available anymore. Instead docker start --checkpoint syntax should be used. I’ve done my use case as follow:

Host 1: Has a docker container running which I do a checkpoint at a location in $CHECKPOINT_FOLDER which is a shared folder among different machines with docker checkpoint create --checkpoint-dir=$CHECKPOINT_FOLDER $NAME checkpoint-$NAME where $NAME is the name of the running container (one-13 in this case).

Host 2: Has access to $CHECKPOINT_FOLDER folder and I can see the created one. I run docker start --checkpoint-dir $CHECKPOINT_FOLDER --checkpoint checkpoint-$NAME $NAME where $NAME again is the same name of the container that was running at host 1 (one-13). However I get this error:

No such container: one-13

Which makes me think that I have to create a container before starting a checkpoint but then, how do I do so? isn’t supposed to be created automatically from the checkpoint? If not, is there a way to pass the checkpoint to the docker create command? What’s the workflow for this use case?

Thank you.


(Ben) #2

I got this to work and documented it here Docker Checkpoint & Restore on another host?. I used the link to the CircleCI blog post you mentioned which gave me the idea to create the container first on the target system. Coincidentally (or maybe ironically) I’ll be using this technique for Jenkins services I run for my company.