Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 1.14 KB

docker-backup.md

File metadata and controls

58 lines (40 loc) · 1.14 KB

docker backup


through export, import

backup

docker export containername > backup01.tar

restore image

docker import backup01.tar backup01

recreate container

note volume, container name, and other run options need to be specified

docker run -ti [options] backup01 /bin/bash

through image commit, save, load

create an image of current container ( pausing during commit )

note volumes need to be saved separately

docker commit -p containername backup01

save image to a file

docker save -o backup01.tar backup01

restore container image

docker load -i backup01.tar