From: Kern Sibbald Date: Sat, 2 Aug 2003 19:49:18 +0000 (+0000) Subject: Fix restore spanning volumes X-Git-Tag: Release-1.31a~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ae1d31a0fbf77b70888981e8c2d43cfb774dd9f2;p=bacula%2Fbacula Fix restore spanning volumes git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@658 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/ChangeLog b/bacula/ChangeLog index 0c7bf25f70..fe57758ad6 100644 --- a/bacula/ChangeLog +++ b/bacula/ChangeLog @@ -1,5 +1,10 @@ -2003-08-02 Version 1.31 30Jul03 Released +2003-08-02 Version 1.31a 02Aug03 Released +- Yifang Dai reported a case where he stress tested Bacula and + backed up to four volumes, but only two were selected for the + restore. This is because I forgot that the selection could + span a volume entirely. + - Added a missing CLIENT_FOUND_ROWS to the second attempt to open the MySQL database -- this prevents UPDATE errors if nothing actually changed. diff --git a/bacula/CheckList b/bacula/CheckList index 64aa5787d4..ff26ed374b 100644 --- a/bacula/CheckList +++ b/bacula/CheckList @@ -15,4 +15,4 @@ - cvs -q tag Release-1_nn - cd bacula - rm -rf bacula-1.nn -- cvs -q export -r Release-1_nn -d bacula-1.nn bacula +- cvs -z3 export -r Release-1_nn -d bacula-1.nn bacula diff --git a/bacula/src/dird/bsr.c b/bacula/src/dird/bsr.c index f843a6f20d..1280b87ad2 100644 --- a/bacula/src/dird/bsr.c +++ b/bacula/src/dird/bsr.c @@ -79,12 +79,17 @@ static void write_findex(UAContext *ua, RBSR_FINDEX *fi, } } +/* + * Find out if Volume defined with FirstIndex and LastIndex + * falls within the range of selected files in the bsr. + */ static bool is_volume_selected(RBSR_FINDEX *fi, int32_t FirstIndex, int32_t LastIndex) { if (fi) { if ((fi->findex >= FirstIndex && fi->findex <= LastIndex) || - (fi->findex2 >= FirstIndex && fi->findex2 <= LastIndex)) { + (fi->findex2 >= FirstIndex && fi->findex2 <= LastIndex) || + (fi->findex < FirstIndex && fi->findex2 > LastIndex)) { return true; } return is_volume_selected(fi->next, FirstIndex, LastIndex); diff --git a/bacula/src/version.h b/bacula/src/version.h index 7c2a606e2f..3e26c96c2d 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -1,8 +1,8 @@ /* */ -#define VERSION "1.31" +#define VERSION "1.31a" #define VSTRING "1" -#define BDATE "30 Jul 2003" -#define LSMDATE "30Jul03" +#define BDATE "02 Aug 2003" +#define LSMDATE "02Aug03" /* Debug flags */ #define DEBUG 1