14

I would like to put my /etc directory iunder source control using bazaar.

Are there any gotchas in doing this. It seems safer to do it user an ordinary user rather than root - might there a be a problem with .bzr belonging to such a user.

justintime
  • 337
  • 3
  • 9

3 Answers3

15

You should look at using etckeeper, instead of trying to reinvent the wheel.

ThatGraemeGuy
  • 15,314
  • 12
  • 51
  • 78
  • Looks promising, I had to google to findo ut how to use it . Is there a pointer to a guide to setting it up. – justintime Aug 30 '10 at 19:49
  • I haven't used it personally, sorry. See if anything here helps: http://serverfault.com/search?q=etckeeper – ThatGraemeGuy Aug 30 '10 at 22:13
  • 2
    `etckeeper` is awesome. Two gotchas tho: for backup, you end up pushing the repo somewhere remote. Please use key-based SSH for that, so it gets done securely. Also, what you store in `/etc` can be sensitive (think `/etc/shadow` or any private keys) so make sure that whereever you push the repo to does not have a 'public' webpage, or is being served out through any other unauthenticated means. – Marcin Oct 10 '12 at 13:04
4

Could be overkill for a single system (unless you need to 'rebuild' it from time to time) but the usual solution for configuration management is to use some scm like cfEngine, Puppet, bcfg2 , or the like, and then put their data under source control.

Luke404
  • 5,708
  • 3
  • 44
  • 58
1

Here's a way using SVN and cron to manage /etc. I suppose it could be adapted.

Chris Nava
  • 1,147
  • 1
  • 7
  • 9