Package: backup-manager
Severity: normal
Tags: patch

I had some trouble trying to backup the whole system (starting at /)
excluding some folders. I finally found out what the problem is:

backup-manager tries to use BM_TARBALL_BLACKLIST options only if they are
below the currently used BM_TARBALL_DIRECTORIES folder. So the exclude
/var/tmp is used for /var but not for /bin because /bin is no prefix of
/var/tmp

The test which is used for this fails for BM_TARBALL_DIRECTORIES, for which
all excludes have to be applied.

Attached you'll find a patch to fix this.

kind regards
 Thorsten

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-vserver-amd64 (SMP w/3 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- backup-methods.sh   2010-03-18 18:45:59.000000000 +0100
+++ backup-methods.sh   2010-12-29 02:39:23.000000000 +0100
@@ -246,6 +246,10 @@
         char=$(expr substr $pattern 1 1)
         if [[ "$char" = "/" ]]; then
 
+          # if you backup "/" any path is relative to you
+          if [[ "X${target}" = "X" ]]; then
+            blacklist="$blacklist ${switch}${pattern}"        
+          else
            # we blacklist only absolute paths related to $target
            if [[ "${pattern#$target}" != "$pattern" ]]; then
                 
@@ -257,6 +261,7 @@
                 # ...and blacklisting it
                 blacklist="$blacklist ${switch}${pattern}"
            fi
+          fi
 
         # relative path are blindly appended to the blacklist
         else

Attachment: signature.asc
Description: Digital signature

Reply via email to