Al Nikolov <[EMAIL PROTECTED]> writes:

>> So, I thought to take the information about the running system from
>> the file /var/lib/dpkg/status, and just backing up those files
>> deviating from the packages default-configs (the full files, no
>> diffs). Additionally, /home gets backed up, perhaps some
>> exclusions,
>
> IMHO, the debian policy permits a simplest option: just do a backup
> of /etc with following symlinks.

This *should* be OK. But to be shure I would go one step further.


# Backing up config files:

cat /var/lib/dpkg/info/*.conffiles | xargs tar czf /backup/config.tgz


# Backing up all files *not* included in debian packages:

cat /var/lib/dpkg/info/*.list | sort >/tmp/tmplist.debian
find / -xdev -type f | sort >/tmp/tmplist.reallife
comm -13 /tmp/tmplist.debian /tmp/tmplist.reallife | \
     xargs tar czf /backup/additions.tgz


# Backing up all packaged but changed files:

cd /
cat /var/lib/dpkg/info/*.md5sums | \
    LANG=en_US md5sum -c 2>&1 | cut -d\' -f2 | \
    xargs tar czf /backup/changed.tgz


The above commands are just written thoughts. I havn't actually tested
them, so maybe one have to fiddle a bit to get them working. For
example, the "find" call in the second part needs to be modified to
include the desired filesystems.

To be concrete, chances are high that you will destroy your computer
and kill your relatives by running the above commands. You have been
warned.

Hey Jens, won't you like to test this script and tell me about your
results? ;-)

[x] ulf

-- 
Der Mensch ist immer noch der beste Computer. (John F. Kennedy)

Reply via email to