using rdiff-backup to *not* backup all of / ....

Adam Lazur adam@lazur.org
Sun, 8 Sep 2002 11:36:48 -0400


Alan (alan@ufies.org) said:
> Playing around with something like:  
> rdiff-backup --include-filelist /root/backups/includes.txt \
> --exclude \*\* / root@mybackup::/backups

Try:
rdiff-backup --include /root --exclude / / root@mybackup::/backups

I don't use the -filelist versions of include/exclude because they don't
allow globbing, among other things. See the "FILE SELECTION" portion of
the manpage for the differences.

Instead of --{ex,in}clude-filelist, I use some shell-fu[1] to turn a
file (which can be checked into cvs) into a commandline:

sed -e 's/^/--exclude /' \
    -e 's/^--exclude - /--exclude /' \
    -e 's/^--exclude + /--include /' \
    -e 's,\([^ ]*\) \(.*\),\1 \"\2\",'

This works similar to rsync's --exclude-from. Luckily, I haven't
reached the maximum commandline length yet :)

-- 
Adam Lazur, Cluster Monkey