Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a couple of Debian servers with only little users and services. The applications are kept as far as possible in their own directories where they can be backed-up or synced easily.

But I have trouble to find an easy and reliable way to back up the surrounding data and to easily to reapply it to new servers in case of upgrade/failovers etc. By surrounding data, I am referring to files in /etc, some dot-files in ~HOME or the crontab entries.

How would you improve the following strategy, when switching a server:

  1. Copy /etc/passwd, /etc/group and /etc/shadow from other server too keep numerical ids consistent
  2. Copy the whole /home directory and /root directory across
  3. Manually copy the the application settings in /etc (eg. /etc/apache2, /etc/php, /etc/proftpd... and their entries in /etc/default/tomcat6
  4. Install the programs via apt.

There are no human users, so no deed to keep contents of home directories synced. Its all about things like .ssh keys etc.

share|improve this question
add comment

1 Answer

up vote 10 down vote accepted

Any proper answer is going to more or less boil down to this:

  1. Keep configs in a config management system. These can also handle package installation and upgrades. (Puppet, Chef, etc.)
  2. Use some sort of centralized database for user and group information. (LDAP, Kerberos, NIS, etc.)
  3. Use shared storage for /home. (NFS is the most frequently-used method here)
share|improve this answer
    
This should be a comment to EEAA's answer. Instead of a user database, for simple use, i'd try webmin. It can sync users/groups/packages between servers just fine. Unfortunately, it can do nothing about config files, unless you want to make scheduled file copying. –  Squall5668 Nov 20 '12 at 5:57
    
Sorry, I can't get behind any use of Webmin, nor any other GUI control panel. –  EEAA Nov 20 '12 at 6:25
    
Thank you for this answer. I am looking at the configuration systems currently, and I agree that your answer is probably that best solution for my question. Still it seems to me, that I am just pushing the problem to another layer. To use a config system, I have to install it and a user for it, make sure that it does not mess interfere with existing numerical ids I use across servers, store an shh key or other means of authentication... But basically this is not that much more than I needed before. –  Martin Nov 20 '12 at 7:58
1  
@Martin - The difference with config management systems is that they scale. Configuration values that are common to all or many of your systems become very simple to change - just update it in one place and it automatically gets applied to all systems. Additionally, with a config management system, you can keep your configuration in version control. –  EEAA Nov 20 '12 at 15:48
    
@EEAA Yes, the version control is probably the best thing about it. I have decdided to try cdist, it seems to be the most lightweight software i found. –  Martin Nov 21 '12 at 2:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.