7

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.

Martin
  • 326
  • 3
  • 15

1 Answers1

10

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)
EEAA
  • 110,608