How To Take Snapshot of a Running Container In Docker

Today we will learn How To Take Snapshot of Running Container so we can restore it later if we required it. Having a backup of everything is better than nothing. You can have a backup of Docker containers as well as a snapshot of docker images and save the container.

Check Out: JfrogArtifactory Service Failed To Start On CentOS 7

How To Snapshot Backup of running a Container In Docker:

Having a Snapshot of a container is also known as Backup. There are two ways of taking a backup of a container in docker. you can easily perform these steps in the docker to save all the running container.

Two Ways of Container Backup

Check Out: Update Memory Size of Running Container

Way 1: I’m having two running containers on my docker-machine.

 docker save all images

I’m going to take a backup of mysqltest container.

docker commit -p 78e701a98334 mysqltest-backup

Container-id = 78e701a98334

Backup name = mysqltest-backup

snapshot of docker container

Check Out: Monitor Health of a Container

As you can see the backup of mysqltest created. This will create a backup as an image.

docker images

Way 2: You can also take the backup of a container image in tar form.

docker save -o mysqltest-backup.tar mysqltest-backup

Check Out: Check Logs Of a Container

YouTube link: Backup of Container

You’re done docker save container backup docker images snapshot of docker container

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment