borgmatic-collective / docker-borgmatic

Borgmatic in Docker
GNU General Public License v3.0
354 stars 93 forks source link

borgmatic check state persistence #211

Open witten opened 1 year ago

witten commented 1 year ago

As of borgmatic 1.7.0, borgmatic stores check state in ~/.borgmatic/checks, which allows the user to configure checks to run on a rough schedule instead of every time borgmatic runs. There is also a default schedule that relies on ~/.borgmatic/checks even if the user doesn't configure anything.

So do you think it makes sense for the Docker image documentation to instruct the user to mount this path as a volume? That way the check state would be persisted across restarts of the container. I realize I was probably the one who told you that ~/.borgmatic doesn't need persisting anymore, so I take responsibility for this even being an issue with the Docker image to begin with!

Tangentially related issue: https://projects.torsion.org/borgmatic-collective/borgmatic/issues/562

grantbevis commented 1 year ago

No worries @witten I'll get a PR ready to persist ~/.borgmatic

I've checked and we do persist ~/.borgmatic' both by the docker-compose.yml: https://github.com/borgmatic-collective/docker-borgmatic/blob/master/base/docker-compose.yml#L10

and via the Dockerfile as a VOLUME: https://github.com/borgmatic-collective/docker-borgmatic/blob/master/base/Dockerfile#L11

This should be sufficient to cover retaining ~/.borgmatic/checks

witten commented 1 month ago

It looks like ~/.borgmatic is no longer in the Docker Compose file...?