Your message dated Sun, 23 Dec 2012 09:48:07 +0100
with message-id <[email protected]>
and subject line Re: Bug#696573: backup-manager: Monthly backups on the 7th day 
(and higher) of the month don't work
has caused the Debian Bug report #696573,
regarding backup-manager: Monthly backups on the 7th day (and higher) of the 
month don't work
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
696573: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696573
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: backup-manager
Version: 0.7.9-4
Severity: normal
Tags: patch

Hi,
I had configured backup-manager to do incremental backups with a full backup
on the 23th of each month. I noticed that this did not work because
backup-manager:

- expects the value to be between 0 and 6 (this is only reasonable for weekly
  backups)
- tries to fix this by setting the value to 0 (which also only works for
  weekly backups)

Here is the relevant configuration which did not work

# Which frequency to use for the master tarball?
# possible values: weekly, monthly
export BM_TARBALLINC_MASTERDATETYPE="monthly"

# Number of the day, in the BM_TARBALLINC_MASTERDATETYPE frequency
# when master tarballs should be made
export BM_TARBALLINC_MASTERDATEVALUE="23"

And here is a small patch which adjusts the limits for monthly backups

--- /usr/share/backup-manager/sanitize.sh 2012-12-23 01:09:31.460859354 +0100 +++ /usr/share/backup-manager/sanitize.sh 2012-12-23 01:18:15.100111361 +0100
@@ -160,11 +160,22 @@
    [[ -z "$BM_TARBALLINC_MASTERDATETYPE" ]]; then
         confkey_require "BM_TARBALLINC_MASTERDATETYPE" "weekly"
 fi
+
+# check if the date on which the backup is supposed to run is a valid one
 if [[ -n "$BM_TARBALLINC_MASTERDATEVALUE" ]]; then
+    # if we have a monthly backup the limit is 31 and the fallback 1
+    if [[ "$BM_TARBALLINC_MASTERDATETYPE" = "monthly" ]]; then
+     if [[ "$BM_TARBALLINC_MASTERDATEVALUE" -gt "31" ]]; then
+ warning "BM_TARBALLINC_MASTERDATEVALUE should not be greater than 31 (or 29 to be safe), falling back to 1"
+        export BM_TARBALLINC_MASTERDATEVALUE="1"
+    fi
+   else
+    # if we have a weekly backup the limit is 6 and the fallback 0
     if [[ "$BM_TARBALLINC_MASTERDATEVALUE" -gt "6" ]]; then
warning "BM_TARBALLINC_MASTERDATEVALUE should not be greater than 6, falling back to 0"
         export BM_TARBALLINC_MASTERDATEVALUE="0"
     fi
+   fi
 fi

 if [[ "$BM_ARCHIVE_METHOD" = "tarball" ]] ||





Kind regards
 Thorsten

-- System Information:
Debian Release: 6.0.6
  APT prefers stable
  APT policy: (500, 'stable')
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

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
pn  backup-manager-doc <none>             (no description available)
pn  dar <none>             (no description available)
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
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 excluded

--- End Message ---
--- Begin Message ---
Package: backup-manager
Version: 0.7.10.1-1

Am 23.12.2012 um 01:37 schrieb Thorsten Gunkel:

> Package: backup-manager
> Version: 0.7.9-4
> Severity: normal
> Tags: patch
>
> Hi,
> I had configured backup-manager to do incremental backups with a full backup
> on the 23th of each month. I noticed that this did not work because
> backup-manager:
>
> - expects the value to be between 0 and 6 (this is only reasonable for
> weekly
>   backups)
> - tries to fix this by setting the value to 0 (which also only works for
>   weekly backups)

Thanks for the report, this bug has been fixed in version 0.7.10.

> And here is a small patch which adjusts the limits for monthly backups
>
> --- /usr/share/backup-manager/sanitize.sh       2012-12-23
> 01:09:31.460859354 +0100
> +++ /usr/share/backup-manager/sanitize.sh       2012-12-23
> 01:18:15.100111361 +0100
> @@ -160,11 +160,22 @@
>     [[ -z "$BM_TARBALLINC_MASTERDATETYPE" ]]; then
>          confkey_require "BM_TARBALLINC_MASTERDATETYPE" "weekly"
>  fi
> +
> +# check if the date on which the backup is supposed to run is a valid one
>  if [[ -n "$BM_TARBALLINC_MASTERDATEVALUE" ]]; then
> +    # if we have a monthly backup the limit is 31 and the fallback 1
> +    if [[ "$BM_TARBALLINC_MASTERDATETYPE" = "monthly" ]]; then
> +     if [[ "$BM_TARBALLINC_MASTERDATEVALUE" -gt "31" ]]; then
> +        warning "BM_TARBALLINC_MASTERDATEVALUE should not be greater
> than 31 (or 29 to be safe), falling back to 1"
> +        export BM_TARBALLINC_MASTERDATEVALUE="1"
> +    fi
> +   else
> +    # if we have a weekly backup the limit is 6 and the fallback 0
>      if [[ "$BM_TARBALLINC_MASTERDATEVALUE" -gt "6" ]]; then
>          warning "BM_TARBALLINC_MASTERDATEVALUE should not be greater
> than 6, falling back to 0"
>          export BM_TARBALLINC_MASTERDATEVALUE="0"
>      fi
> +   fi
>  fi
>
>  if [[ "$BM_ARCHIVE_METHOD" = "tarball" ]] ||

Upstream used this patch which should do the same as yours:

--8<---------------cut here---------------start------------->8---
diff --git a/lib/sanitize.sh b/lib/sanitize.sh
index d5cc9a7..9965193 100644
--- a/lib/sanitize.sh
+++ b/lib/sanitize.sh
@@ -166,8 +166,16 @@ if [[ "$BM_ARCHIVE_METHOD" = "tarball-incremental" ]] &&
 fi
 if [[ -n "$BM_TARBALLINC_MASTERDATEVALUE" ]]; then
     if [[ "$BM_TARBALLINC_MASTERDATEVALUE" -gt "6" ]]; then
-        warning "BM_TARBALLINC_MASTERDATEVALUE should not be greater than 6, 
falling back to 0"
-        export BM_TARBALLINC_MASTERDATEVALUE="0"
+        if [[ "$BM_TARBALLINC_MASTERDATETYPE" = "weekly" ]]; then
+            warning "BM_TARBALLINC_MASTERDATEVALUE should not be greater than 
6, falling back to 0"
+            export BM_TARBALLINC_MASTERDATEVALUE="0"
+        else
+        # monthly
+            if [[ "$BM_TARBALLINC_MASTERDATEVALUE" -gt "31" ]]; then
+                warning "BM_TARBALLINC_MASTERDATEVALUE should not be greater 
than 31, falling back to 1"
+                export BM_TARBALLINC_MASTERDATEVALUE="1"
+            fi
+        fi
     fi
 fi
--8<---------------cut here---------------end--------------->8---

Cheers,
       Sven

--- End Message ---

Reply via email to