7

I heard once that in Linux it's possible to put whole /etc/ directory into repository. In fact i already done too much crap on server and I quite disoriented what exactly is setup in there at all.

Question is how to put FreeBSD all configuration files under Revision Control?

Is there's any solution for that like packages which helps to automatize this? (The only i know is etckeeper which is for Linux)

AntonioK
  • 519
  • 2
  • 9
  • 22
holms
  • 1,464
  • 7
  • 20
  • 37
  • Do you just want to put all your config-files under version control? I don't understand what you mean with packages. Version control is unvisersal, yet not automatic. If you change something, you commit the changes so that you can revert later. Or do you mean something entirely else? – Alexander Janssen Oct 08 '12 at 17:58
  • Yeap I mean tracing down configuration changes like `rcs` and `etckeeper` (this one uses git/mercurial) does. I don't speak about `puppet` style stuff – holms Oct 08 '12 at 18:02
  • See also https://unix.stackexchange.com/q/3750/9454 – Martin Schröder Jul 14 '17 at 11:21

2 Answers2

1

If you just want to track the changes of your own configurations on the same local host, you can happily use RCS.

A wonderful and easy howto is available on the internet.

Alexander Janssen
  • 2,557
  • 15
  • 21
  • it's basically tracks files that you know about. with time I even keep forgeting what I did on that server at all. Git style revisioning would be REALLY handy. etckeeper doesn't exists on freebsd =/ – holms Oct 08 '12 at 18:13
  • But even GIT doesn't track automatically all the files unless you run a cron job which checks for changes periodically. You still need to check them it. Although I don't know about etckeeper. – Alexander Janssen Oct 08 '12 at 18:17
  • Sure , git doesn't do this by him self, there's few hooks for this. That's why etckeeper appeared. and I basically asking about etckeeper alternative for freebsd. – holms Oct 08 '12 at 18:18
  • So you want changes automatically commited as soon as they have been made? – Alexander Janssen Oct 08 '12 at 18:20
  • in there git basically ignores changes made by system. it's only reacts to changes made by you. + lots's of file permission problems fixed in there.. i just googled out that etckeeper like 20min ago so I don't know much =)) – holms Oct 08 '12 at 18:30
  • Sure git ignores all your changes. If you make changes it's up to YOU to commit these changes. There's nothing like automatic commit, unless you brew up a watchdog with `inotify` for instance. – Alexander Janssen Oct 08 '12 at 18:32
  • 2
    Finally found it, etckeeper keeps track of owner/permission in additional metadata. git doesn't do this. and all those automaticall system changes like cron is just ignored in there. so I would like to have this package in bsd =) – holms Oct 11 '12 at 02:34
  • Does RCS tracks owner/permissions changes? – AntonioK Apr 30 '15 at 13:37
1

It isn't the same, and I wish someone would submit patches to etckeeper to support pkg, but an alternative might be to just snapshot the entire filesystem, if your /etc is on zfs.

Andrew
  • 142
  • 2
  • 9
  • Isn't [this support](https://github.com/joeyh/etckeeper/commit/1f21fbe26dfbc982492c8b7b90f3758a910f113d) enough? – pevik Mar 14 '16 at 23:30