- Figure out how to use ssh or stunnel to protect Bacula communications.
For 1.31 release:
+- The bsr for Dan's job has file indexes covering the whole range rather
+ than only the range contained on the volume.
+- Don't zero the Slot when the wrong volume is found -- simply ask
+ the operator.
- Add SDWriteSeqNo to SD, and probably Read on FD side.
- Make sure all restore counters are working correctly in the FD.
- When all cassettes in magazine are used, got:
/* Volume Parameter structure */
struct VOL_PARAMS {
char VolumeName[MAX_NAME_LENGTH]; /* Volume name */
+ uint32_t JobMediaId; /* record id */
uint32_t FirstIndex; /* First index this Volume */
uint32_t LastIndex; /* Last index this Volume */
uint32_t StartFile; /* File for start of data */
jr->VolSessionId = str_to_uint64(row[0]);
jr->VolSessionTime = str_to_uint64(row[1]);
- jr->PoolId = atoi(row[2]);
+ jr->PoolId = str_to_uint64(row[2]);
bstrncpy(jr->cStartTime, row[3]!=NULL?row[3]:"", sizeof(jr->cStartTime));
bstrncpy(jr->cEndTime, row[4]!=NULL?row[4]:"", sizeof(jr->cEndTime));
jr->JobFiles = atol(row[5]);
db_lock(mdb);
Mmsg(&mdb->cmd,
-"SELECT VolumeName,FirstIndex,LastIndex,StartFile,EndFile,StartBlock,EndBlock"
+"SELECT VolumeName,FirstIndex,LastIndex,StartFile,EndFile,StartBlock,"
+"EndBlock,JobMediaId"
" FROM JobMedia,Media WHERE JobMedia.JobId=%u"
" AND JobMedia.MediaId=Media.MediaId", JobId);
Vols[i].EndFile = atoi(row[4]);
Vols[i].StartBlock = atoi(row[5]);
Vols[i].EndBlock = atoi(row[6]);
+ Vols[i].JobMediaId = str_to_uint64(row[7]);
}
}
}
if (*num_ids > 0) {
id = (uint32_t *)malloc(*num_ids * sizeof(uint32_t));
while ((row = sql_fetch_row(mdb)) != NULL) {
- id[i++] = (uint32_t)atoi(row[0]);
+ id[i++] = str_to_uint64(row[0]);
}
*ids = id;
}
utime_t JobTDate;
uint32_t TotalFiles;
char ClientName[MAX_NAME_LENGTH];
- char JobIds[200];
+ char JobIds[200]; /* User entered string of JobIds */
STORE *store;
};
return stat;
}
+/*
+ * ***FIXME*** we need a better volume sequence number
+ */
int comp_vol_params(const void *v1, const void *v2)
{
VOL_PARAMS *vol1 = (VOL_PARAMS *)v1;
VOL_PARAMS *vol2 = (VOL_PARAMS *)v2;
- if (vol1->FirstIndex < vol2->FirstIndex) {
+ if (vol1->JobMediaId < vol2->JobMediaId) {
return -1;
- } else if (vol1->FirstIndex > vol2->FirstIndex) {
+ } else if (vol1->JobMediaId > vol2->JobMediaId) {
return 1;
} else {
return 0;
/* Sort the VolParams for each bsr */
for (RBSR *nbsr=bsr; nbsr; nbsr=nbsr->next) {
if (nbsr->VolCount > 1) {
- Dmsg1(100, "VolCount=%d\n", nbsr->VolCount);
qsort((void *)nbsr->VolParams, nbsr->VolCount, sizeof(VOL_PARAMS),
comp_vol_params);
}