You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to start this discussion by thanking cupcakearmy and contributors for their hard work on autorestic, as well as the many many people who have worked on restic itself.
I like to make things difficult for myself* and so I like to run everything in docker containers. I'm also a big fan of services that monitor docker labels for configuration (see: traefik, diun, and flame).
To that end, I use PremoWeb/chadburn. It can monitor the docker daemon (via a docker socket proxy, of course) and run commands within containers or execute new containers in a similar fashion to cron.
The downside to using chadburn/docker containers is that each time a new container is created (which it is whenever chadburn runs the job configured above), a new, random, hexadecimal hostname is assigned to that container. As far as I can tell, there is no way to specify the hostname of a container within chadburn.
This means that autorestic forget considers each backup to be from a different host and therefore no pruning takes place.
Thankfully, we can restore this functionality with strategic application of autorestic exec, specifically to invoke forget --group-by paths,tags. Here is my sample config for chadburn:
A big big big caveat on this is that if you have multiple hosts backing up to the same backend with the same path and same location name (and therefore the same automatic tag from autorestic), you're gonna have a bad time. I have two hosts running autorestic and I make sure that host's name is somewhere in the location name e.g. mace-homes and thyme-homes. I even go as far as configuring a new backend for each location, but that might be overkill.
HTH, HAND
Actually I like how easy docker containers make it to do a LOT of things. RIP dependency hell.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I would like to start this discussion by thanking cupcakearmy and contributors for their hard work on autorestic, as well as the many many people who have worked on restic itself.
I like to make things difficult for myself* and so I like to run everything in docker containers. I'm also a big fan of services that monitor docker labels for configuration (see: traefik, diun, and flame).
To that end, I use PremoWeb/chadburn. It can monitor the docker daemon (via a docker socket proxy, of course) and run commands within containers or execute new containers in a similar fashion to
cron
.The downside to using chadburn/docker containers is that each time a new container is created (which it is whenever chadburn runs the job configured above), a new, random, hexadecimal hostname is assigned to that container. As far as I can tell, there is no way to specify the hostname of a container within chadburn.
This means that
autorestic forget
considers each backup to be from a different host and therefore no pruning takes place.Thankfully, we can restore this functionality with strategic application of
autorestic exec
, specifically to invokeforget --group-by paths,tags
. Here is my sample config for chadburn:What you end up with is something like this:
A big big big caveat on this is that if you have multiple hosts backing up to the same backend with the same path and same location name (and therefore the same automatic tag from autorestic), you're gonna have a bad time. I have two hosts running autorestic and I make sure that host's name is somewhere in the location name e.g.
mace-homes
andthyme-homes
. I even go as far as configuring a new backend for each location, but that might be overkill.HTH, HAND
Beta Was this translation helpful? Give feedback.
All reactions