cat /var/lib/dpkg/info/*.list | sort -u > /tmp/all-dpkg-files
cat /var/lib/dpkg/info/*.conffiles | sort -u > /tmp/all-conf-files
comm -23 /tmp/all-dpkg-files /tmp/all-conf-files | perl -n -e "chomp;" -e 'print "$_\n" if -f;" > /tmp/exclude-files
echo /var/cache >> /tmp/exclude-files
echo /tmp >> /tmp/exclude-files
echo $HOME >> /tmp/exclude-files
tar -c -v -f - --exclude-from /tmp/exclude-files / | bzip -9 > ~/my-machine-backup.tar.bz2
dpkg -l > ~/my-debian-packages.list
No comments:
Post a Comment