[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

getting modified config files



Hi,

I'm currently working on a program, that will create a kind of backup of a 
system running debian. I don't care at the moment about /home or /var, because
I only want a system with the same functionality. So only the changed config-
files and the list of packages is needed (on my system only debian-packages are
installed, original or self-created).
My problem is getting the list of config-files that have been modified. If I
look at /var/lib/dpkg/info/*.md5sums I get a list of files with md5sums that I
can check, wether they are modified, alright. I have 
/var/lib/dpkg/info/*.conffiles, but no md5sums provided, so I cannot check, 
wether these files have been modified. I read the packaging manual and there's
a description, how it is decided wether a new config-file will be installed
(creating md5-sum of current, checking with md5-sum of to-be-installed-conffile,
if eq do nothing, else ask user). But I don't want to download the package
currently installed, check the md5-sum of the conffile, compare and then 
decide, wether I should back it up or not.
Another problem is, that not every configfile is in /var/lib/dpkg/lib/*.conffiles,
eg /etc/apache/*, because some are create by postinst or preinst-Skripts. So
it's a mess. I have to backup the whole /etc directory and miss every file
that's not under /etc.
Is there a way to get a listing of _all_ files a debian package installs 
(including files created by post-/preinst scripts) with md5-sums of every
file or do I have to simply backup /etc or rely on a file with changed files
provided by the user ?
For the curious minded, who want to know, what I exactly want to do with my
program, for the rest:

Thanks in advance for any hints,
	Matthias Mueller

At the moment I maintain several different linux machines, running as routers,
IDS-System, db-server, vpn-servers, network managment system etc. The problem
is that I only have about 1 backup machine per 5 production machines (at the
moment no backup, but that's another problem).
I want to create backup-machines, where you get root, choose the machine to 
backup, hit enter, change the ethernet plugs and everything works again.
I want to achieve this goal, building a debian package, that contains the
package list, modified config-files and other data (at the moment only 
package list and modified config-files, because excluding the db-server and
the network-managment server I only have these things changed).
At the current stage I have a program running, that creates a .deb package
with the package list and the config files (/etc) and creates a working copy
of this system on the backup system if you install the deb and run 
hostconfig-'hostname_of_the_desired_system'. The .deb package is about 280KB
(created on a router), but I want to minimize the overhead.
My ultimate goal is to have a working system, where you can create mirror on
a default backup machine or install a .deb-package on a debian-system and have
a working mirror or go to a new machine, insert a boot-floppie, choose your
profile (router for the students, vpn-server eg) and half an hour later you
have your working clone....

-- 
Matthias.Mueller@rz.uni-karlsruhe.de
Rechenzentrum Universitaet Karlsruhe
Abteilung Netze



Reply to: