Yep. I've got a bunch of apps that work offline, so I back up the currently deployed version of the image in case of hardware or other failure that requires me to re-deploy it. I also have quite a few custom-built images that take a while to build, so having a backup of the built image is convenient.
I structure my Docker-based apps into dedicated folders with all of their config and data directories inside a main container directory so everything is kept together. I also make an images directory which holds backup dumps of the images for the stack.
- Backup:
docker save {image}:{tag} | gzip -9 > ./images/{image}-{tag}-{arch}.tar.gz - Restore
docker load < ./images/{image}-{tag}-{arch}.tar.gz
It will backup/restore with the image and tag used during the save step. The load step will accept a gzipped tar so you don't even need to decompress it first. My older stuff doesn't have the architecture in the filename but I've started adding that lately now that I have a mix of amd64 and arm64.