Question

Using Git to track server configuration

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.


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.