Docker – how to restore a image from a backup

┌──(root💀vm-iot-jsho-docker-01)-[~]
└─# docker save -o ubuntu.20210214.tar ubuntu
┌──(root💀vm-iot-jsho-docker-01)-[~]
└─# ls -la
insgesamt 147124
drwx—— 5 root root 4096 14. Feb 14:16 .
drwxr-xr-x 19 root root 4096 14. Feb 12:08 ..
-rw-r–r– 1 root root 4503 5. Feb 20:07 .bashrc
drwx—— 3 root root 4096 6. Feb 16:16 .cache
drwx—— 2 root root 4096 10. Feb 14:35 .docker
drwxr-xr-x 29 root root 4096 10. Feb 15:03 docker-images
-rw-r–r– 1 root root 11656 5. Feb 20:12 .face
lrwxrwxrwx 1 root root 11 5. Feb 21:09 .face.icon -> /root/.face
-rw-r–r– 1 root root 0 5. Feb 20:33 .hushlogin
-rw-r–r– 1 root root 148 4. Nov 21:24 .profile
-rw——- 1 root root 75307008 14. Feb 14:16 ubuntu.20210214.tar
-rw-r–r– 1 root root 75282944 14. Feb 12:08 ubuntu-iot-jsho-01.20210214.tar
-rw——- 1 root root 5918 14. Feb 13:05 .zsh_history
-rw-r–r– 1 root root 8063 5. Feb 20:07 .zshrc
┌──(root💀vm-iot-jsho-docker-01)-[~]
└─# docker load -i ubuntu.20210214.tar
Loaded image: ubuntu:latest
┌──(root💀vm-iot-jsho-docker-01)-[~]
└─# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu latest f63181f19b2f 3 weeks ago 72.9M
┌──(root💀vm-iot-jsho-docker-01)-[~]
└─#

Leave a Reply

You must be logged in to post a comment.