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 installed Debian on a computer three years ago. I've made changes to a variety of configurations (print, ssh, and so on). I'm now backing up in preparation for an upgrade. I would like to save copies of those configurations that I have modified, but haven't kept a list.

Is there some relatively simple command sequence I can use to identify those configuration files modified from the defaults, so I can send those to a .tar archive?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

In a relative way, find the installation date with:

sudo grep ubiquity /var/log/installer/syslog | less

or:

tune2fs -l /dev/sda1 | grep created

or some other ways.

And find all the configurations file which is modified since this time:

# tar cvf config_files.tar $(find /etc/ -type f -name \*.conf -mtime -1095)

You may also want to take a look at /usr/local/etc, ...

share|improve this answer
    
thx, i'll try this -- back soon . . . –  chernevik Oct 29 '11 at 18:31
    
<< tune2fs -l /dev/sda1 >> gave a very reasonable answer. (The << grep ubiquity >> bit, nothing.) When generating the list passed to << tar >> I modified the -name argument, replacing << *.conf >> with << *conf* >>. The former was missing items like "ssh_config". Thanks! –  chernevik Oct 30 '11 at 0:34

dpkg --status package will show the conf. files and their md5sum so you could compare that to the md5sum of your files and see the ones that have changed. Now...how to do this for all the installed packages....

share|improve this answer
    
dpkg --get-selections would show the list –  Jure1873 Oct 29 '11 at 19:42

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.