[bind10-dev] Config snapshots in git
Michal 'vorner' Vaner
michal.vaner at nic.cz
Thu Sep 5 11:05:07 UTC 2013
Hello
When talking about #3136 on the planning call, I mentioned two things:
• I don't like metadata like content version number inside the data (it was only
a feeling then, but now thinking about it, what if I copy a config from other
machine? The version abruptly „jumps“ to the version of the other config).
• Storing number only is not really useful (at least it seems to me) and storing
the snapshots is implementing VCS, therefore if done by us, it is reinventing
of wheels.
So I proposed (and contrary to first reaction on the call, not as a joke) using
git for storing the changes of config. This is actually very easy to do, if you
are OK with just storing the changes, not having support for restoring them (eg.
for archiving purposes, not for restoring).
The only thing that needs to be done, when we do „config commit“:
• Check if the .git directory exists (at the place where our config lives). If
not, do:
git init
git add config.db
• Commit it:
git commit config.db -m 'Automatic commit'
This gives a complete history to the user, not just some numbers. I think it is
simple to implement (I did some equivalents in several CGI scripts where I
wanted to keep track of history). The only disadvantage is we need git on the
machine, but we could make it configurable (even runtime-configurable). If user
wanted to turn this on, git would be required, but otherwise it would not be
needed.
What do you think?
With regards
--
The cost of living is going up, and the chance of living is going down.
Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20130905/ad623abc/attachment.bin>
More information about the bind10-dev
mailing list