** Mark Rogers mark@quarella.co.uk [2011-08-09 16:07]:
Something like this ought to be quite possible but I'm not sure if it exists. I'm using an Ubuntu Server install (11.04)
- Make a note of the base install (eg ubuntu-server) and version,
from which a fresh install could be done on new hardware 2. Create a list of all packages installed/uninstalled relative to that base (by name, not version, assume that a re-install would be applied to current versions of the same packages). 3. Backup all configuration files which were created by the above but have been changed from the distro installed versions, ideally as diffs against the original files. 4. Backup all files which are not part of the distro install (ie as defined by the above), with a list of exclusions (to avoid backing up log files, for example).
Does anything like this exist? It seems to me that it should be fairly straightforward (but my knowledge of the relevant packing tools isn't very good so I might be wrong). In principle it would be quite easy from this to backup (say) an 11.04 server and restore to an 11.10 install, and have something which would probably be pretty close to working. As an additional step, say 3a, it would be nice to do intelligent backups of certain files (eg proper database dumps to SQL) which could then be excluded from step 4.
Aside from the above, does anyone have a good recommendation for efficiently backing up an existing server via SSH without pulling all the base install stuff but without missing anything?
** end quote [Mark Rogers]
It doesn't completely fit your description, but take a look at etckeeper [1]. I use it on my Ubuntu servers and I think it is in the standard repositories for Debian too - no idea about other distros, but there must be a good chance. It basically stores changes to files in /etc in a git, bzr, or other repository, and by being tied into apt or other package manager, automatically notes new config files as packages are installed (so will keep some sort of record of what packages have been installed and when.
[1] http://kitenet.net/~joey/code/etckeeper/ [2] https://help.ubuntu.com/10.04/serverguide/C/etckeeper.html