Package: backup-manager
Version: 0.7.9-3
Severity: normal
Tags: upstream patch


Hello,

When using backup-manager to backup the root directory 
(BM_TARBALL_DIRECTORIES="/"), the
purge routine does not work well, it purges only .md5 files.

Backup-manager names the archives according to the following pattern:

$BM_ARCHIVE_PREFIX-<parent of $BM_TARBALL_DIRECTORIES>.$DATE.$BM_FILETYPE

When $BM_TARBALL_DIRECTORIES is root, the parent is void, so the resulting name 
is:

$BM_ARCHIVE_PREFIX.$DATE.$BM_FILETYPE.

The problem comes from the fact that the routine that computes the list of
outdated files (/usr/bin/backup-manager-purge) does not handle this special case
in its file name mathing, thus ignoring these archives.

I fixed /usr/bin/backup-manager-purge to handle correctly root backups:

------------------- PATCH BEGIN ----------------------
--- /usr/bin/backup-manager-purge.orig  2012-11-01 14:37:09.000000000 +0100
+++ /usr/bin/backup-manager-purge.fixed 2012-11-01 14:37:15.000000000 +0100
@@ -179,6 +179,13 @@
         $master = 0;
     }
 
+    # slash backup pattern
+    elsif ($archive =~ 
m/^\s*($ENV{BM_ARCHIVE_PREFIX})\.(\d{8})\.(master\.)?(\S+)\s*$/) {
+       ($prefix, $date, $master, $filetype) = ($1, $2, $3, $4, $5);
+       $master = $master ? 1 : 0;
+       $name = "slash";
+    }
+
     # Unknown pattern
     else {
         return undef;
------------------- PATCH END ------------------------

regards,
Stanislas.

-- System Information:
Debian Release: 6.0.6
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.13-grsec-xxxx-grs-ipv6-64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

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:
pn  anacron               <none>             (no description available)
pn  backup-manager-doc    <none>             (no description available)
pn  dar                   <none>             (no description available)
pn  dvd+rw-tools          <none>             (no description available)
pn  genisoimage           <none>             (no description available)
ii  gettext-base          0.18.1.1-3         GNU Internationalization utilities
pn  libfile-slurp-perl    <none>             (no description available)
pn  libnet-amazon-s3-perl <none>             (no description available)
ii  openssh-client        1:5.5p1-6+squeeze2 secure shell (SSH) client, for sec
ii  perl                  5.10.1-17squeeze3  Larry Wall's Practical Extraction 
pn  wodim                 <none>             (no description available)
pn  zip                   <none>             (no description available)

-- debconf information:
  backup-manager/upload-passwd: (password omitted)
  backup-manager/filetype: tar.gz
  backup-manager/upload-key:
  backup-manager/name-format: long
  backup-manager/time-to-live: 5
  backup-manager/burning-maxsize: 650
  backup-manager/burning-device: /dev/cdrom
  backup-manager/encryption_recipient:
* backup-manager/repo_user: root
  backup-manager/upload-hosts:
  backup-manager/upload-dir: /var/archives/uploads
* backup-manager/backup-repository: /var/archives
  backup-manager/burning-method: CDRW
  backup-manager/transfert_mode: scp
  backup-manager/burning-enabled: false
  backup-manager/upload-user-ftp:
  backup-manager/enable_encryption: false
  backup-manager/cron_frequency: never
  backup-manager/dump_symlinks: false
* backup-manager/directories: /etc /home
  backup-manager/upload-user-scp: bmngr
  backup-manager/cron_d_remove_deprecated: false
  backup-manager/blacklist: /var/archives
* backup-manager/repo_group: root
  backup-manager/want_to_upload: false


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to