Changes to 1.37.36:
15Aug05
+- Fix how FileSet is saved in job record to correct continual
+ Full save.
- Make datadir print on config.out listing.
- Move get FileSet record up in backup init to eliminate continual
Full save seen by Peter Sjoberg.
int db_delete_media_record(JCR *jcr, B_DB *mdb, MEDIA_DBR *mr);
/* find.c */
-int db_find_job_start_time(JCR *jcr, B_DB *mdb, JOB_DBR *jr, POOLMEM **stime);
+bool db_find_job_start_time(JCR *jcr, B_DB *mdb, JOB_DBR *jr, POOLMEM **stime);
int db_find_last_jobid(JCR *jcr, B_DB *mdb, const char *Name, JOB_DBR *jr);
int db_find_next_volume(JCR *jcr, B_DB *mdb, int index, bool InChanger, MEDIA_DBR *mr);
bool db_find_failed_job_since(JCR *jcr, B_DB *mdb, JOB_DBR *jr, POOLMEM *stime, int &JobLevel);
* Bacula Catalog Database Find record interface routines
*
* Note, generally, these routines are more complicated
- * that a simple search by name or id. Such simple
- * request are in get.c
+ * that a simple search by name or id. Such simple
+ * request are in get.c
*
* Kern Sibbald, December 2000
*
* Version $Id$
*/
-
/*
Copyright (C) 2000-2005 Kern Sibbald
This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
+ modify it under the terms of the GNU General Public License
+ version 2 as amended with additional clauses defined in the
+ file LICENSE in the main source directory.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ the file LICENSE for additional details.
*/
+
/* The following is necessary so that we do not include
* the dummy external definition of DB.
*/
-#define __SQL_C /* indicate that this is sql.c */
+#define __SQL_C /* indicate that this is sql.c */
#include "bacula.h"
#include "cats.h"
* StartTime is returned in stime
*
* Returns: 0 on failure
- * 1 on success, jr is unchanged, but stime is set
+ * 1 on success, jr is unchanged, but stime is set
*/
-int
+bool
db_find_job_start_time(JCR *jcr, B_DB *mdb, JOB_DBR *jr, POOLMEM **stime)
{
SQL_ROW row;
/* If no Id given, we must find corresponding job */
if (jr->JobId == 0) {
/* Differential is since last Full backup */
- Mmsg(mdb->cmd,
+ Mmsg(mdb->cmd,
"SELECT StartTime FROM Job WHERE JobStatus='T' AND Type='%c' AND "
"Level='%c' AND Name='%s' AND ClientId=%s AND FileSetId=%s "
"ORDER BY StartTime DESC LIMIT 1",
- jr->JobType, L_FULL, jr->Name,
- edit_int64(jr->ClientId, ed1), edit_int64(jr->FileSetId, ed2));
+ jr->JobType, L_FULL, jr->Name,
+ edit_int64(jr->ClientId, ed1), edit_int64(jr->FileSetId, ed2));
if (jr->JobLevel == L_DIFFERENTIAL) {
- /* SQL cmd for Differential backup already edited above */
+ /* SQL cmd for Differential backup already edited above */
/* Incremental is since last Full, Incremental, or Differential */
} else if (jr->JobLevel == L_INCREMENTAL) {
- /*
- * For an Incremental job, we must first ensure
- * that a Full backup was done (cmd edited above)
- * then we do a second look to find the most recent
- * backup
- */
- if (!QUERY_DB(jcr, mdb, mdb->cmd)) {
+ /*
+ * For an Incremental job, we must first ensure
+ * that a Full backup was done (cmd edited above)
+ * then we do a second look to find the most recent
+ * backup
+ */
+ if (!QUERY_DB(jcr, mdb, mdb->cmd)) {
Mmsg2(&mdb->errmsg, _("Query error for start time request: ERR=%s\nCMD=%s\n"),
- sql_strerror(mdb), mdb->cmd);
- db_unlock(mdb);
- return 0;
- }
- if ((row = sql_fetch_row(mdb)) == NULL) {
- sql_free_result(mdb);
+ sql_strerror(mdb), mdb->cmd);
+ goto bail_out;
+ }
+ if ((row = sql_fetch_row(mdb)) == NULL) {
+ sql_free_result(mdb);
Mmsg(mdb->errmsg, _("No prior Full backup Job record found.\n"));
- db_unlock(mdb);
- return 0;
- }
- sql_free_result(mdb);
- /* Now edit SQL command for Incremental Job */
- Mmsg(mdb->cmd,
+ goto bail_out;
+ }
+ sql_free_result(mdb);
+ /* Now edit SQL command for Incremental Job */
+ Mmsg(mdb->cmd,
"SELECT StartTime FROM Job WHERE JobStatus='T' AND Type='%c' AND "
"Level IN ('%c','%c','%c') AND Name='%s' AND ClientId=%s "
"AND FileSetId=%s ORDER BY StartTime DESC LIMIT 1",
- jr->JobType, L_INCREMENTAL, L_DIFFERENTIAL, L_FULL, jr->Name,
- edit_int64(jr->ClientId, ed1), edit_int64(jr->FileSetId, ed2));
+ jr->JobType, L_INCREMENTAL, L_DIFFERENTIAL, L_FULL, jr->Name,
+ edit_int64(jr->ClientId, ed1), edit_int64(jr->FileSetId, ed2));
} else {
Mmsg1(&mdb->errmsg, _("Unknown level=%d\n"), jr->JobLevel);
- db_unlock(mdb);
- return 0;
+ goto bail_out;
}
} else {
Dmsg1(100, "Submitting: %s\n", mdb->cmd);
Mmsg(mdb->cmd, "SELECT StartTime FROM Job WHERE Job.JobId=%s",
- edit_int64(jr->JobId, ed1));
+ edit_int64(jr->JobId, ed1));
}
if (!QUERY_DB(jcr, mdb, mdb->cmd)) {
pm_strcpy(stime, ""); /* set EOS */
Mmsg2(&mdb->errmsg, _("Query error for start time request: ERR=%s\nCMD=%s\n"),
- sql_strerror(mdb), mdb->cmd);
- db_unlock(mdb);
- return 0;
+ sql_strerror(mdb), mdb->cmd);
+ goto bail_out;
}
if ((row = sql_fetch_row(mdb)) == NULL) {
Mmsg2(&mdb->errmsg, _("No Job record found: ERR=%s\nCMD=%s\n"),
- sql_strerror(mdb), mdb->cmd);
+ sql_strerror(mdb), mdb->cmd);
sql_free_result(mdb);
- db_unlock(mdb);
- return 0;
+ goto bail_out;
}
Dmsg1(100, "Got start time: %s\n", row[0]);
pm_strcpy(stime, row[0]);
sql_free_result(mdb);
db_unlock(mdb);
- return 1;
+ return true;
+
+bail_out:
+ db_unlock(mdb);
+ return false;
}
/*
* it must be either Full or Diff.
*
* Returns: false on failure
- * true on success, jr is unchanged and stime unchanged
- * level returned in JobLevel
+ * true on success, jr is unchanged and stime unchanged
+ * level returned in JobLevel
*/
bool
db_find_failed_job_since(JCR *jcr, B_DB *mdb, JOB_DBR *jr, POOLMEM *stime, int &JobLevel)
"Level IN ('%c','%c') AND Name='%s' AND ClientId=%s "
"AND FileSetId=%s AND StartTime>'%s' "
"ORDER BY StartTime DESC LIMIT 1",
- jr->JobType, L_FULL, L_DIFFERENTIAL, jr->Name,
- edit_int64(jr->ClientId, ed1), edit_int64(jr->FileSetId, ed2),
- stime);
+ jr->JobType, L_FULL, L_DIFFERENTIAL, jr->Name,
+ edit_int64(jr->ClientId, ed1), edit_int64(jr->FileSetId, ed2),
+ stime);
if (!QUERY_DB(jcr, mdb, mdb->cmd)) {
db_unlock(mdb);
* For VERIFY_VOLUME_TO_CATALOG, we want the JobId of the last Job.
*
* Returns: 1 on success
- * 0 on failure
+ * 0 on failure
*/
int
db_find_last_jobid(JCR *jcr, B_DB *mdb, const char *Name, JOB_DBR *jr)
"SELECT JobId FROM Job WHERE Type='V' AND Level='%c' AND "
" JobStatus='T' AND Name='%s' AND "
"ClientId=%s ORDER BY StartTime DESC LIMIT 1",
- L_VERIFY_INIT, jr->Name,
- edit_int64(jr->ClientId, ed1));
+ L_VERIFY_INIT, jr->Name,
+ edit_int64(jr->ClientId, ed1));
} else if (jr->JobLevel == L_VERIFY_VOLUME_TO_CATALOG ||
- jr->JobLevel == L_VERIFY_DISK_TO_CATALOG) {
+ jr->JobLevel == L_VERIFY_DISK_TO_CATALOG) {
if (Name) {
- Mmsg(mdb->cmd,
+ Mmsg(mdb->cmd,
"SELECT JobId FROM Job WHERE Type='B' AND JobStatus='T' AND "
"Name='%s' ORDER BY StartTime DESC LIMIT 1", Name);
} else {
- Mmsg(mdb->cmd,
+ Mmsg(mdb->cmd,
"SELECT JobId FROM Job WHERE Type='B' AND JobStatus='T' AND "
"ClientId=%s ORDER BY StartTime DESC LIMIT 1",
- edit_int64(jr->ClientId, ed1));
+ edit_int64(jr->ClientId, ed1));
}
} else {
Mmsg1(&mdb->errmsg, _("Unknown Job level=%c\n"), jr->JobLevel);
* Find a Volume for a given PoolId, MediaType, and Status.
*
* Returns: 0 on failure
- * numrows on success
+ * numrows on success
*/
int
db_find_next_volume(JCR *jcr, B_DB *mdb, int item, bool InChanger, MEDIA_DBR *mr)
char ed1[50];
db_lock(mdb);
- if (item == -1) { /* find oldest volume */
+ if (item == -1) { /* find oldest volume */
/* Find oldest volume */
Mmsg(mdb->cmd, "SELECT MediaId,VolumeName,VolJobs,VolFiles,VolBlocks,"
"VolBytes,VolMounts,VolErrors,VolWrites,MaxVolBytes,VolCapacityBytes,"
"FROM Media WHERE PoolId=%s AND MediaType='%s' AND VolStatus IN ('Full',"
"'Recycle','Purged','Used','Append') "
"ORDER BY LastWritten LIMIT 1",
- edit_int64(mr->PoolId, ed1), mr->MediaType);
+ edit_int64(mr->PoolId, ed1), mr->MediaType);
item = 1;
} else {
/* Find next available volume */
"FROM Media WHERE PoolId=%s AND MediaType='%s' AND VolStatus='%s' "
"%s "
"%s LIMIT %d",
- edit_int64(mr->PoolId, ed1), mr->MediaType,
- mr->VolStatus, changer, order, item);
+ edit_int64(mr->PoolId, ed1), mr->MediaType,
+ mr->VolStatus, changer, order, item);
}
if (!QUERY_DB(jcr, mdb, mdb->cmd)) {
db_unlock(mdb);
numrows = sql_num_rows(mdb);
if (item > numrows) {
Mmsg2(&mdb->errmsg, _("Request for Volume item %d greater than max %d\n"),
- item, numrows);
+ item, numrows);
db_unlock(mdb);
return 0;
}
*/
bool do_backup_init(JCR *jcr)
{
- FILESET_DBR fsr;
POOL_DBR pr;
- memset(&fsr, 0, sizeof(fsr);
- if (!get_or_create_fileset_record(jcr, &fsr)) {
+ if (!get_or_create_fileset_record(jcr)) {
return false;
}
- bstrncpy(jcr->FSCreateTime, fsr.cCreateTime, sizeof(jcr->FSCreateTime));
/*
* Get definitive Job level and since time
since[0] = 0;
if (jcr->cloned) {
- if ( jcr->stime && jcr->stime[0]) {
+ if (jcr->stime && jcr->stime[0]) {
bstrncpy(since, _(", since="), since_len);
bstrncat(since, jcr->stime, since_len);
}
return true;
}
-bool get_or_create_fileset_record(JCR *jcr, FILESET_DBR *fsr)
+bool get_or_create_fileset_record(JCR *jcr)
{
+ FILESET_DBR fsr;
/*
* Get or Create FileSet record
*/
- memset(fsr, 0, sizeof(FILESET_DBR));
- bstrncpy(fsr->FileSet, jcr->fileset->hdr.name, sizeof(fsr->FileSet));
+ memset(&fsr, 0, sizeof(FILESET_DBR));
+ bstrncpy(fsr.FileSet, jcr->fileset->hdr.name, sizeof(fsr.FileSet));
if (jcr->fileset->have_MD5) {
struct MD5Context md5c;
unsigned char signature[16];
memcpy(&md5c, &jcr->fileset->md5c, sizeof(md5c));
MD5Final(signature, &md5c);
- bin_to_base64(fsr->MD5, (char *)signature, 16); /* encode 16 bytes */
- bstrncpy(jcr->fileset->MD5, fsr->MD5, sizeof(jcr->fileset->MD5));
+ bin_to_base64(fsr.MD5, (char *)signature, 16); /* encode 16 bytes */
+ bstrncpy(jcr->fileset->MD5, fsr.MD5, sizeof(jcr->fileset->MD5));
} else {
Jmsg(jcr, M_WARNING, 0, _("FileSet MD5 signature not found.\n"));
}
if (!jcr->fileset->ignore_fs_changes ||
- !db_get_fileset_record(jcr, jcr->db, fsr)) {
- if (!db_create_fileset_record(jcr, jcr->db, fsr)) {
+ !db_get_fileset_record(jcr, jcr->db, &fsr)) {
+ if (!db_create_fileset_record(jcr, jcr->db, &fsr)) {
Jmsg(jcr, M_ERROR, 0, _("Could not create FileSet \"%s\" record. ERR=%s\n"),
- fsr->FileSet, db_strerror(jcr->db));
+ fsr.FileSet, db_strerror(jcr->db));
return false;
}
}
- jcr->jr.FileSetId = fsr->FileSetId;
+ jcr->jr.FileSetId = fsr.FileSetId;
+ bstrncpy(jcr->FSCreateTime, fsr.cCreateTime, sizeof(jcr->FSCreateTime));
Dmsg2(119, "Created FileSet %s record %u\n", jcr->fileset->hdr.name,
jcr->jr.FileSetId);
return true;
* Open DB and create records for this job.
* Open Message Channel with Storage daemon to tell him a job will be starting.
* Open connection with File daemon and pass him commands
- * to do the backup.
+ * to do the backup.
* When the File daemon finishes the job, update the DB.
*
* Version $Id$
*/
-
/*
Copyright (C) 2004-2005 Kern Sibbald
This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
+ modify it under the terms of the GNU General Public License
+ version 2 as amended with additional clauses defined in the
+ file LICENSE in the main source directory.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ the file LICENSE for additional details.
*/
*/
bool do_mac_init(JCR *jcr)
{
- FILESET_DBR fsr;
POOL_DBR pr;
JOB_DBR jr;
JobId_t input_jobid;
char *Name;
- if (!get_or_create_fileset_record(jcr, &fsr)) {
+ if (!get_or_create_fileset_record(jcr)) {
return false;
}
- bstrncpy(jcr->FSCreateTime, fsr.cCreateTime, sizeof(jcr->FSCreateTime));
/*
* Find JobId of last job that ran.
switch (jcr->JobLevel) {
case L_FULL:
if (jcr->full_pool) {
- jcr->pool = jcr->full_pool;
+ jcr->pool = jcr->full_pool;
}
break;
case L_INCREMENTAL:
if (jcr->inc_pool) {
- jcr->pool = jcr->inc_pool;
+ jcr->pool = jcr->inc_pool;
}
break;
case L_DIFFERENTIAL:
if (jcr->dif_pool) {
- jcr->pool = jcr->dif_pool;
+ jcr->pool = jcr->dif_pool;
}
break;
}
/* Try to create the pool */
if (create_pool(jcr, jcr->db, jcr->pool, POOL_OP_CREATE) < 0) {
Jmsg(jcr, M_FATAL, 0, _("Pool %s not in database. %s"), pr.Name,
- db_strerror(jcr->db));
- return false;
+ db_strerror(jcr->db));
+ return false;
} else {
Jmsg(jcr, M_INFO, 0, _("Pool %s created in database.\n"), pr.Name);
}
}
- jcr->PoolId = pr.PoolId; /****FIXME**** this can go away */
+ jcr->PoolId = pr.PoolId; /****FIXME**** this can go away */
jcr->jr.PoolId = pr.PoolId;
jcr->needs_sd = true;
return true;
* Do a Migration, Archive, or Copy of a previous job
*
* Returns: false on failure
- * true on success
+ * true on success
*/
bool do_mac(JCR *jcr)
{
/* Print Job Start message */
Jmsg(jcr, M_INFO, 0, _("Start %s JobId %u, Job=%s\n"),
- Type, jcr->JobId, jcr->Job);
+ Type, jcr->JobId, jcr->Job);
set_jcr_job_status(jcr, JS_Running);
Dmsg2(100, "JobId=%d JobLevel=%c\n", jcr->jr.JobId, jcr->jr.JobLevel);
}
Dmsg2(100, "Enter mac_cleanup %d %c\n", TermCode, TermCode);
- dequeue_messages(jcr); /* display any queued messages */
+ dequeue_messages(jcr); /* display any queued messages */
memset(&mr, 0, sizeof(mr));
set_jcr_job_status(jcr, TermCode);
- update_job_end_record(jcr); /* update database */
+ update_job_end_record(jcr); /* update database */
if (!db_get_job_record(jcr, jcr->db, &jcr->jr)) {
Jmsg(jcr, M_WARNING, 0, _("Error getting job record for stats: %s"),
- db_strerror(jcr->db));
+ db_strerror(jcr->db));
set_jcr_job_status(jcr, JS_ErrorTerminated);
}
bstrncpy(mr.VolumeName, jcr->VolumeName, sizeof(mr.VolumeName));
if (!db_get_media_record(jcr, jcr->db, &mr)) {
Jmsg(jcr, M_WARNING, 0, _("Error getting Media record for Volume \"%s\": ERR=%s"),
- mr.VolumeName, db_strerror(jcr->db));
+ mr.VolumeName, db_strerror(jcr->db));
set_jcr_job_status(jcr, JS_ErrorTerminated);
}
int VolCount;
if (*fname == '|') {
- fname++;
- got_pipe = 1;
+ fname++;
+ got_pipe = 1;
bpipe = open_bpipe(fname, 0, "w");
- fd = bpipe ? bpipe->wfd : NULL;
+ fd = bpipe ? bpipe->wfd : NULL;
} else {
- /* ***FIXME*** handle BASE */
+ /* ***FIXME*** handle BASE */
fd = fopen(fname, jcr->JobLevel==L_FULL?"w+":"a+");
}
if (fd) {
- VolCount = db_get_job_volume_parameters(jcr, jcr->db, jcr->JobId,
- &VolParams);
- if (VolCount == 0) {
+ VolCount = db_get_job_volume_parameters(jcr, jcr->db, jcr->JobId,
+ &VolParams);
+ if (VolCount == 0) {
Jmsg(jcr, M_ERROR, 0, _("Could not get Job Volume Parameters to "
"update Bootstrap file. ERR=%s\n"), db_strerror(jcr->db));
- if (jcr->SDJobFiles != 0) {
- set_jcr_job_status(jcr, JS_ErrorTerminated);
- }
+ if (jcr->SDJobFiles != 0) {
+ set_jcr_job_status(jcr, JS_ErrorTerminated);
+ }
- }
- for (int i=0; i < VolCount; i++) {
- /* Write the record */
+ }
+ for (int i=0; i < VolCount; i++) {
+ /* Write the record */
fprintf(fd, "Volume=\"%s\"\n", VolParams[i].VolumeName);
fprintf(fd, "MediaType=\"%s\"\n", VolParams[i].MediaType);
fprintf(fd, "VolSessionId=%u\n", jcr->VolSessionId);
fprintf(fd, "VolSessionTime=%u\n", jcr->VolSessionTime);
fprintf(fd, "VolFile=%u-%u\n", VolParams[i].StartFile,
- VolParams[i].EndFile);
+ VolParams[i].EndFile);
fprintf(fd, "VolBlock=%u-%u\n", VolParams[i].StartBlock,
- VolParams[i].EndBlock);
+ VolParams[i].EndBlock);
fprintf(fd, "FileIndex=%d-%d\n", VolParams[i].FirstIndex,
- VolParams[i].LastIndex);
- }
- if (VolParams) {
- free(VolParams);
- }
- if (got_pipe) {
- close_bpipe(bpipe);
- } else {
- fclose(fd);
- }
+ VolParams[i].LastIndex);
+ }
+ if (VolParams) {
+ free(VolParams);
+ }
+ if (got_pipe) {
+ close_bpipe(bpipe);
+ } else {
+ fclose(fd);
+ }
} else {
- berrno be;
+ berrno be;
Jmsg(jcr, M_ERROR, 0, _("Could not open WriteBootstrap file:\n"
"%s: ERR=%s\n"), fname, be.strerror());
- set_jcr_job_status(jcr, JS_ErrorTerminated);
+ set_jcr_job_status(jcr, JS_ErrorTerminated);
}
}
- msg_type = M_INFO; /* by default INFO message */
+ msg_type = M_INFO; /* by default INFO message */
switch (jcr->JobStatus) {
case JS_Terminated:
- if (jcr->Errors || jcr->SDErrors) {
+ if (jcr->Errors || jcr->SDErrors) {
term_msg = _("Backup OK -- with warnings");
- } else {
+ } else {
term_msg = _("Backup OK");
- }
- break;
+ }
+ break;
case JS_FatalError:
case JS_ErrorTerminated:
term_msg = _("*** Backup Error ***");
- msg_type = M_ERROR; /* Generate error message */
- if (jcr->store_bsock) {
- bnet_sig(jcr->store_bsock, BNET_TERMINATE);
- if (jcr->SD_msg_chan) {
- pthread_cancel(jcr->SD_msg_chan);
- }
- }
- break;
+ msg_type = M_ERROR; /* Generate error message */
+ if (jcr->store_bsock) {
+ bnet_sig(jcr->store_bsock, BNET_TERMINATE);
+ if (jcr->SD_msg_chan) {
+ pthread_cancel(jcr->SD_msg_chan);
+ }
+ }
+ break;
case JS_Canceled:
term_msg = _("Backup Canceled");
- if (jcr->store_bsock) {
- bnet_sig(jcr->store_bsock, BNET_TERMINATE);
- if (jcr->SD_msg_chan) {
- pthread_cancel(jcr->SD_msg_chan);
- }
- }
- break;
+ if (jcr->store_bsock) {
+ bnet_sig(jcr->store_bsock, BNET_TERMINATE);
+ if (jcr->SD_msg_chan) {
+ pthread_cancel(jcr->SD_msg_chan);
+ }
+ }
+ break;
default:
- term_msg = term_code;
+ term_msg = term_code;
sprintf(term_code, _("Inappropriate term code: %c\n"), jcr->JobStatus);
- break;
+ break;
}
bstrftimes(sdt, sizeof(sdt), jcr->jr.StartTime);
bstrftimes(edt, sizeof(edt), jcr->jr.EndTime);
if (jcr->JobStatus == JS_Terminated && jcr->jr.JobBytes) {
Jmsg(jcr, M_ERROR, 0, "%s", db_strerror(jcr->db));
}
- jcr->VolumeName[0] = 0; /* none */
+ jcr->VolumeName[0] = 0; /* none */
}
if (jcr->ReadBytes == 0) {
jobstatus_to_ascii(jcr->FDJobStatus, fd_term_msg, sizeof(fd_term_msg));
jobstatus_to_ascii(jcr->SDJobStatus, sd_term_msg, sizeof(sd_term_msg));
-// bmicrosleep(15, 0); /* for debugging SIGHUP */
+// bmicrosleep(15, 0); /* for debugging SIGHUP */
Jmsg(jcr, msg_type, 0, _("Bacula %s (%s): %s\n"
" JobId: %d\n"
" Termination: %s\n\n"),
VERSION,
LSMDATE,
- edt,
- jcr->jr.JobId,
- jcr->jr.Job,
- level_to_str(jcr->JobLevel), jcr->since,
- jcr->client->hdr.name,
- jcr->fileset->hdr.name, jcr->FSCreateTime,
- jcr->pool->hdr.name,
- sdt,
- edt,
- edit_uint64_with_commas(jcr->jr.JobFiles, ec1),
- edit_uint64_with_commas(jcr->SDJobFiles, ec4),
- edit_uint64_with_commas(jcr->jr.JobBytes, ec2),
- edit_uint64_with_commas(jcr->SDJobBytes, ec5),
- (float)kbps,
- compress,
- jcr->VolumeName,
- jcr->VolSessionId,
- jcr->VolSessionTime,
- edit_uint64_with_commas(mr.VolBytes, ec3),
- jcr->Errors,
- jcr->SDErrors,
- fd_term_msg,
- sd_term_msg,
- term_msg);
+ edt,
+ jcr->jr.JobId,
+ jcr->jr.Job,
+ level_to_str(jcr->JobLevel), jcr->since,
+ jcr->client->hdr.name,
+ jcr->fileset->hdr.name, jcr->FSCreateTime,
+ jcr->pool->hdr.name,
+ sdt,
+ edt,
+ edit_uint64_with_commas(jcr->jr.JobFiles, ec1),
+ edit_uint64_with_commas(jcr->SDJobFiles, ec4),
+ edit_uint64_with_commas(jcr->jr.JobBytes, ec2),
+ edit_uint64_with_commas(jcr->SDJobBytes, ec5),
+ (float)kbps,
+ compress,
+ jcr->VolumeName,
+ jcr->VolSessionId,
+ jcr->VolSessionTime,
+ edit_uint64_with_commas(mr.VolBytes, ec3),
+ jcr->Errors,
+ jcr->SDErrors,
+ fd_term_msg,
+ sd_term_msg,
+ term_msg);
Dmsg0(100, "Leave mac_cleanup()\n");
}
extern void create_unique_job_name(JCR *jcr, const char *base_name);
extern void update_job_end_record(JCR *jcr);
extern bool get_or_create_client_record(JCR *jcr);
-extern bool get_or_create_fileset_record(JCR *jcr, FILESET_DBR *fsr);
+extern bool get_or_create_fileset_record(JCR *jcr);
extern JobId_t run_job(JCR *jcr);
extern bool cancel_job(UAContext *ua, JCR *jcr);
extern void init_jcr_job_record(JCR *jcr);
JOB *job = NULL;
CLIENT *client = NULL;
FILESET *fileset = NULL;
- FILESET_DBR fsr;
int listing = 0;
char since[MAXSTRING];
JCR *jcr = ua->jcr;
if (!get_or_create_client_record(jcr)) {
return 1;
}
- if (!get_or_create_fileset_record(jcr, &fsr)) {
+ if (!get_or_create_fileset_record(jcr)) {
return 1;
}