There was a previous (now closed) issue (How to remove a host ? · Issue #580 · ytti/oxidized · GitHub) which this closely related to but I’m not sure if this is a bug or I’m doing something wrong, or it’s expected behaviour.
My view on deleting the configurations of removed devices is it should be OK as everything’s in a git repository so, if we want to find out about something that was removed a year or so ago, we can just check out an old branch. In my case, I want to remove old files as I have a script which checks through the backups to look for things like IP addresses actively referenced in the current configuration of devices so having old configurations for defunct devices lying about means these continue to be counted as “in use”. Ignoring that side of things, however…
To remove the configurations, currently I’m trying:
- Stop Oxidized (by
pkill .config/oxidized/pid
). - Clone the bare repository directly from
.config/oxidized/configs.git
. git rm
the devices I no longer require.git commit
this and thengit push
it back to the bare repository.- Restart Oxidized.
This looks fine up until Oxidized finds the next changed device configuration and creates a new commit for it, then all the deleted device files come back.
This process looks the same as what @davromaniak was suggesting in the above issue but it’s not working for me. What am I doing wrong? This is more of a support message but I’m unclear how I can remove these files, even manually?