Report this

What is the reason for this report?

Using Git to track server configuration

Posted on October 28, 2015

I am wondering if I can use Git to maintain server configuration for Ubuntu? If so, which directories would make sense to track? My fear as a newbie is that I will make a change in server configuration that breaks everything and not have an easy way to undo. I realize that we can create images/backups of our droplets but I may want a slightly more granular approach.

Also, if this even makes sense, what security implications might it have? Last, I am not talking about setting up Git to track my sites, this is a given, I am particularly interested in the actual server and its configuration and tracking its changes.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

It makes sense to track changes using Git as long as you are tracking configuration files. I will suggest tracking the /etc directory. There is also a program called etckeeper that you can use the automate the process but etckeeper can only be used on the /etc directory.

Something to keep in mind is that OS will also change configuration files, for example on upgrades.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.