Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in DevOps and Agile by (47.6k points)

How do I backup Docker?

1 Answer

0 votes
by (106k points)

To backup Docker, you can use Docker’s built in functionality. Docker gives you the ability to “backup” your images and then import them anywhere you like.

Let’s understand this by an example, let’s suppose you had an image on your docker-toolbox called “myimage” at the command line, you can back it up by doing:

 docker save myimage > /tmp/myimage.tar

And obviously this will create a tar file in the /tmp directory. You can then copy that to a USB drive, disk share or what have you. Once you get it to the system running elsewhere, you can then import the image like so:

docker load < /tmp/myimage.tar

Which will read the image into your Docker instance and make it available at that location to instantiate containers on? Done. If you want to learn more about these things I would suggest you must take up the following Docker training course. If you like reading then you must read the following Docker tutorial. I am also mentioning a video tutorial for you which you can watch to clear all your basic concepts regarding Docker.

Browse Categories

...