Skip to content

Instantly share code, notes, and snippets.

@coaxial
Last active August 17, 2017 00:28
Show Gist options
  • Save coaxial/102ac0a723d97a3ce8fca3b005c45e76 to your computer and use it in GitHub Desktop.
Save coaxial/102ac0a723d97a3ce8fca3b005c45e76 to your computer and use it in GitHub Desktop.
move docker containers to another host
# from https://www.reddit.com/r/docker/comments/6gnmsz/way_of_migrating_docker_containers_to_new_host/
service docker stop
tar -C /var/lib -czf /tmp/docekrlib.tgz docker
## move dockerlib.tgz to new sever
tar -C /var/lib -xzf /tmp/docekrlib.tgz
service docker restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment