LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-25-2014, 03:52 PM   #1
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Rep: Reputation: Disabled
Git and server version control


I know there are fancy server management packages available, but I don't think I am ready for one.

Instead, I am thinking of just tracking configuration files with Git. My thoughts are to track everything in /etc/. Good idea? Any other folders which I should consider? I will probably do a fresh install, and do my first commit. Then maybe another commit directly after installing a major application (i.e. after installing Apache, then after installing MySQL, etc).

Please provide any comments and/or advice.

Thank you
 
Old 04-25-2014, 04:19 PM   #2
joe_2000
Senior Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 1,016

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
Quote:
Originally Posted by NotionCommotion View Post
I know there are fancy server management packages available, but I don't think I am ready for one.

Instead, I am thinking of just tracking configuration files with Git. My thoughts are to track everything in /etc/. Good idea? Any other folders which I should consider? I will probably do a fresh install, and do my first commit. Then maybe another commit directly after installing a major application (i.e. after installing Apache, then after installing MySQL, etc).

Please provide any comments and/or advice.

Thank you
Sounds a bit dangerous, but probably depends on how you plan to use it. Say you commit after installing package xy. Then you realize the installation broke something. What then?
What I am getting at: If you now just revert to the previous commit all you will achieve is getting /etc back to the preinstallation state. What if other directories were changed during the install? What if the regular repair procedure would require the /etc to actually be in the state it was left in by the installation?

I have broken stuff in my system several times by installing packages. More often than not just uninstalling these packages and reinstalling packages that were removed during install repaired everything. You may not have this option anymore if you confuse your system by manually reverting /etc.

Long story short: I think this is a bad idea except if you only want to use git in order to track changes that you made to config files yourself manually, and be able to view older versions of such config files... I might be missing something though...
 
Old 04-25-2014, 04:45 PM   #3
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Original Poster
Rep: Reputation: Disabled
Thanks Joe,

I agree willy nilly reverting back to a previous state is a bad idea. My desire is just being able to have history how the configuration was changed, and being able to manually go back to some previous state if necessary.

You think /etc is the only directory worth applying version control?
 
Old 04-25-2014, 04:52 PM   #4
joe_2000
Senior Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 1,016

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
Quote:
Originally Posted by NotionCommotion View Post
You think /etc is the only directory worth applying version control?
It depends on your system entirely. If you tweak it, make sure the directory you made changes in is tracked.
In my backup strategy I am backing up the following directories as "system configuration"

"/home/"
"/etc/"
"/opt/"
"/root/"
"/usr/local/bin/"
"/usr/local/include/"
"/usr/src/"
"/var/lib/dpkg"
"/var/lib/apt/extended_states"
"/var/spool/cron/crontabs/"

This does *not* include my personal data, which is only symlinked from /home/userdir. The advantage is that I am also backing up user configurations stored in home separately of user data.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Master version control with Git – tutorial LXer Syndicated Linux News 0 12-02-2013 08:50 AM
LXer: This week at LWN: Book Review: Pragmatic Version Control Using Git LXer Syndicated Linux News 0 05-01-2009 05:50 AM
LXer: Pragmatic Version Control Using Git (book review) LXer Syndicated Linux News 0 04-29-2009 08:30 AM
LXer: Microsoft uses git for version control LXer Syndicated Linux News 0 04-02-2009 04:30 AM
GIT Version Control System - need help getting started HelpMe2877 Linux - Server 2 07-01-2008 03:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration