Docker container migration Docker container migration docker docker

Docker container migration


Before restoring the container in the destination host, you have to create a container:

 sudo docker create --name $NAME <container-image>

Creating the container $NAME is to make sure that the base image is downloaded and the disk space is allocated, you can check in /var/lib/docker/containers/

Then you can restore it with the share dump files in $CHECKPOINT_FOLDER

 sudo docker start --checkpoint=checkpoint-$NAME --checkpoint-dir=$CHECKPOINT_FOLDER $NAME

or specifically with checkpoint-name

 sudo docker start --checkpoint=checkpoint-one-13 --checkpoint-dir=$CHECKPOINT_FOLDER $NAME