Backup Linux-system using DAR

You gotta love dar!

Do yourself a favour and hit a “apt-get install dar kdar; man dar”, and engulf yourself in it’s possibilities. Or just take a glipmse at the features here.
And if you are like me, and just want the job done, take a look at kdar (a gui).
I just finished a kdar-backup of my laptop, ran from a script created with kdar with some additions (removal of -p option and addition of –exclude-file option).
dar -v -c “/media/externaldrive/dar/d420.u910.root.100606” -R “/” -s 734003200 -D -y -m 150 -Z “*.avi” -Z “*.bz2” -Z “*.deb” -Z “*.gif” -Z “*.gz” -Z “*.iso” -Z “*.jpg” -Z “*.mov” -Z “*.mpg” -Z “*.pbm” -Z “*.pdf” -Z “*.png” -Z “*.pnm” -Z “*.Z” -Z “*.zip” -P “media/externaldrive/dar” -P “dev” -P “dev/pts” -P “dev/shm” -P “lib/init/rw” -P “media” -P “mnt” -P “proc” -P “sys” -P “tmp” -P “var/lock” -P “var/run” -P “var/tmp” –exclude-file=excludefiles
Pretty basic right? =)
And look at this beauty of summary generated when finished:

361049 inode(s) saved
with 421 hard link(s) recorded
0 inode(s) changed at the moment of the backup
0 inode(s) not saved (no inode/file change)
1 inode(s) failed to save (filesystem error)
10 inode(s) ignored (excluded by filters)
0 inode(s) recorded as deleted from reference backup
——————————————–
Total number of inodes considered: 361060
——————————————–
EA saved for 0 inode(s)
——————————————–

I’m planning to use a script like this one generating an excludefile to exclude all package-installed files:

#!/bin/bash
COLUMNS=185 dpkg -l|awk ‘/^ii/{ print $2 }’|xargs -l dpkg -L|sort -u > dpkg-files