Just curious if there is an easy way to back up my docker-compose.yaml and .env files. I have the following directory structure for my containers:
-docker
-<name of container>
-.env
-docker-compose.yml
I’d like to copy those two files for each container folder but no other subfolders that may also be in the container folder (config, data, etc). I’ve been trying to get my restic backups to do it but I just can’t figure it out.
Is there a better way? I’d like to have backups in case my entire server dies.
UPDATE: Thank you all for the advice, I’m giving git a try and so far so good!

I don’t have many machines but about 40 containers. I used docker compose. Then I’ve found Trillium Notes for the documenting part. I have the client on my mac that syncs to the trillium container on my server that way I can always have access if something happens and the server is down or I need it offline. One thing I love about it is that I’ve set it so all pages are read only by default. This makes it work for me more like a wiki and I don’t accidentally overwrite something. The discipline to keep it updated?.. biggest challenge.