Package: backup-manager Version: 0.7.9-3 Severity: normal Tags: upstream patch
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Backup-manager calculates the date string of the archive name (the TODAY env var) upon startup, then performs the backup, then runs backup-manager-upload with a date argument of 'today' to upload the archive(s). The 'today' argument results in recalculation of the date string on the fly by bmu, at the time of invocation, ie just before the upload begins. Thus, we have two calculations of the date part of the archive name separated by a potentially significant time delay. Therefore, if a backup starts at date X and finishes at date X + 1, it will not get uploaded. I was actually hit by that before inspecting the code. A patch is attached to address this issue. The patch replaces the 'today' argument with the $TODAY variable, the one that its value is set during the startup of backup-manager. I have tested the patch both by building the package and patching my system's live configuration and it works (backups are uploaded). The patch has also the nice side effect of allowing the upload of archives of any date, by writing 'export TODAY=...' in a configuration file, FOO, and then issuing 'backup-manager --upload -c FOO', since backup-manager sets the TODAY variable early, before reading the configuration 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 - -- debconf information excluded - -- debsums errors found: debsums: changed file /usr/share/backup-manager/actions.sh (from backup-manager package) debsums: changed file /usr/share/backup-manager/files.sh (from backup-manager package) debsums: changed file /usr/share/backup-manager/backup-methods.sh (from backup-manager package) debsums: changed file /usr/share/backup-manager/upload-methods.sh (from backup-manager package) debsums: changed file /usr/share/backup-manager/sanitize.sh (from backup-manager package) debsums: changed file /usr/share/backup-manager/externals.sh (from backup-manager package) debsums: changed file /usr/sbin/backup-manager (from backup-manager package) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQEcBAEBAgAGBQJOUaHiAAoJEJWXIVmJ5BwWQMgIAI3ywdXCVZT1/PB5EpioLbWu Lu1z1kW4dxeTyX/XciML7aVchhwSCOWp+ksS4JISHHz3Lh1UQoHhfBFfcHqY6bXj wtl7Er6smBhxuNwCYO3lBrfhjJScPi6xZ7IYO1ilg67zGp1y3msWjx4y63ktsrgh vl/l3hzoyEWDVjzgbdFdmrias+uxKmrZN7bwKksoQkBf3kmhYeFtGDe0Ak6H8ubj V5/1UYYC3UQ4LWK6uG4D9HwTkBUYrKGekOJOXYsDzGGBSwnfTm1Dq/p+WaJsYtw6 1gUEZZ6kiIPa+KTIoJ/PW8F/0m23LDbqF5XI39WUrbC16SYDlju7Xp4XEoW3SaU= =Zie9 -----END PGP SIGNATURE-----
--- a/lib/upload-methods.sh +++ b/lib/upload-methods.sh @@ -64,7 +64,7 @@ -h="$bm_upload_hosts" \ -u="$BM_UPLOAD_SSH_USER" \ -d="$BM_UPLOAD_SSH_DESTINATION" \ - -r="$BM_REPOSITORY_ROOT" today 2>$logfile || + -r="$BM_REPOSITORY_ROOT" ${TODAY} 2>$logfile || error "Error reported by backup-manager-upload for method \"scp\", check \"\$logfile\"." rm -f $logfile } @@ -101,7 +101,7 @@ -u="$BM_UPLOAD_SSH_USER" \ -d="$BM_UPLOAD_SSH_DESTINATION" \ -r="$BM_REPOSITORY_ROOT" \ - --gpg-recipient="$BM_UPLOAD_SSHGPG_RECIPIENT" today 2>$logfile|| + --gpg-recipient="$BM_UPLOAD_SSHGPG_RECIPIENT" ${TODAY} 2>$logfile|| error "Error reported by backup-manager-upload for method \"ssh-gpg\", check \"\$logfile\"." rm -f $logfile } @@ -134,7 +134,7 @@ -h="$bm_upload_hosts" \ -u="$BM_UPLOAD_FTP_USER" \ -d="$BM_UPLOAD_FTP_DESTINATION" \ - -r="$BM_REPOSITORY_ROOT" today 2>$logfile|| + -r="$BM_REPOSITORY_ROOT" ${TODAY} 2>$logfile|| error "Error reported by backup-manager-upload for method \"ftp\", check \"\$logfile\"." rm -f $logfile @@ -164,7 +164,7 @@ -h="$bm_upload_hosts" \ -u="$BM_UPLOAD_S3_ACCESS_KEY" \ -b="$BM_UPLOAD_S3_DESTINATION" \ - -r="$BM_REPOSITORY_ROOT" today 2>$logfile || + -r="$BM_REPOSITORY_ROOT" ${TODAY} 2>$logfile || error "Error reported by backup-manager-upload for method \"s3\", check \"\$logfile\"." rm -f $logfile }