Package: backup-manager
Version: 0.7.9-3
Severity: normal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


The patch supplied in previous message leaves the paths in absolute form when
backup path is /. This works with tar, but not with dar which requires that
paths passed with the -P option be relative.

For example:

1>tar -cf /mnt/backups/test.tar --exclude=/home --exclude=/var --exclude=/mnt \
  --exclude=/srv --exclude=/usr --exclude=/etc --exclude=/proc --exclude=/sys \
  --exclude=/dev --exclude=/tmp --exclude=/lib --exclude=/boot --verbose /

  works ok.

2>dar --create /mnt/backups/test --fs-root=/ -P/home -P/var -P/mnt -P/srv \
  -P/usr -P/etc -P/proc -P/sys -P/dev -P/tmp -P/lib -P/boot --verbose

  produces error:

Reading config file: /etc/darrc
Parse error on command line (or included files): Cannot add an absolute path

I supply a new patch that makes path relative in all cases and so works with 
both tar and dar. See attached file.

regards
George Zarkadas


- -- System Information:
Debian Release: 6.0.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 
'stable'), (450, 'testing-proposed-updates'), (450, 'testing'), (400, 
'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=el_GR.utf8, LC_CTYPE=el_GR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages backup-manager depends on:
ii  debconf [debconf-2.0]        1.5.36.1    Debian configuration management sy
ii  findutils                    4.4.2-1+b1  utilities for finding files--find,
ii  ucf                          3.0025+nmu1 Update Configuration File: preserv

backup-manager recommends no packages.

Versions of packages backup-manager suggests:
ii  anacron               2.3-14             cron-like program that doesn't go 
ii  backup-manager-doc    0.7.9-3            documentation package for Backup M
ii  dar                   2.3.10-1+b1        Disk ARchive: Backup directory tre
ii  dvd+rw-tools          7.1-6              DVD+-RW/R tools
ii  genisoimage           9:1.1.11-1         Creates ISO-9660 CD-ROM filesystem
ii  gettext-base          0.18.1.1-3         GNU Internationalization utilities
ii  libfile-slurp-perl    9999.13-1          single call read & write file rout
pn  libnet-amazon-s3-perl <none>             (no description available)
ii  openssh-client        1:5.5p1-6+squeeze1 secure shell (SSH) client, for sec
ii  perl                  5.10.1-17squeeze2  Larry Wall's Practical Extraction 
ii  wodim                 9:1.1.11-1         command line CD/DVD writing tool
ii  zip                   3.0-3              Archiver for .zip files

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJOQEROAAoJEJWXIVmJ5BwWJJoIAN2W1EQUVxxynrRSfLrWejCu
Yyq9Bpdw4+qFVORki32UEFg8lIquPaiacikQEz5SN74CzNKLF83P2y1GkQ6xPj9s
7f0/5X4ZneDox1RnnI9L0FvMlX9q3LEZCzA8SXlTuAqpAhYKA2Nh4ic9rHahwouP
J+Zk63czcfqx2Lqm5ZmyX3+Pw9+LMFdZSWNcxiLjC/VFVmubxK9+4VyZijx6N6xW
rOnPBrT8c5KqmPSBXnD/Vdpb0kEnQF+UicnoPbDIC+CZrYdfR92cd6juNM9NWWc8
Uv+Hd5N+emDgTOmi/p7gO6loUeKZVKzUMgELSJRh/MeR/mysZDljMMtRqfAVyqE=
=4obj
-----END PGP SIGNATURE-----
--- backup-methods.sh.orig
+++ backup-methods.sh
@@ -238,7 +238,9 @@
     target="$2"
     debug "__get_flags_relative_blacklist ($switch, $target)"
 
-    target=${target%/}
+    if [ "$target" != "/" ]; then
+        target=${target%/}
+    fi
     blacklist=""
     for pattern in $BM_TARBALL_BLACKLIST
     do
@@ -252,7 +254,13 @@
                 # making a relative path...
                 pattern="${pattern#$target}"
                 length=$(expr length $pattern)
-                pattern=$(expr substr $pattern 2 $length)
+                # for $target="/", no spare / is left at the beggining
+                # after the # substitution; thus take substr from pos 1
+                if [ "$target" != "/" ]; then
+                    pattern=$(expr substr $pattern 2 $length)
+                else
+                    pattern=$(expr substr $pattern 1 $length)
+                fi
 
                 # ...and blacklisting it
                 blacklist="$blacklist ${switch}${pattern}"

Reply via email to