Hi all, I run a docker registry server with a host data volume -v :/var/lib/registry. I would like to backup the images in the registry, but I am not so sure how to proceed.
I can copy the mounted directory to another box, but what if someone else is currently pushing an image into the registry? I was thinking to either pause or stop the container before I copy the files. But I am afraid that both ways will leave a partially written image in the directory.
Later if I need to deploy a new registry server (recovery) using the backed-up volume, it may not start due to the partially written image. I read about the ‘lsof’ command to list all open files, so maybe I can use this one not to copy the files open for writing. What do you think?