-- backup of all images sudo docker ps -a | tail -n +2 | while read i; do echo "sudo docker save `echo $i | cut -f 2 -d ' '` | gzip > `echo $i | cut -f 1 -d ' '`.tar.gz"; done > commands sudo docker ps -a | tail -n +2 | while read i; do sudo docker save `echo $i | cut -f 2 -d ' '` | gzip > `echo $i | cut -f 1 -d ' '`.tar.gz; done and similar also with "docker export"