For 1.33
+- Implement Console mtx commands.
+- Look at 2Gb limit for SQLite.
+- Implement 3 Pools for a Job:
+ Job {
+ Name = ...
+ Full Backup Pool = xxx
+ Incremental Backup Pool = yyy
+ Differential Backup Pool = zzz
+ }
- Add a default DB password to MySQL.
GRANT all privileges ON bacula.* TO bacula@localhost IDENTIFIED BY
'bacula_password';
# $2 = main pid of running program to be traced back.
#
gdb -quiet -batch -x @sbindir@/btraceback.gdb $1 $2 2>&1 \
- | @sbindir@/smtp -h @smtp_host@ -s "Bacula traceback" @dump_email@
+ | @sbindir@/bsmtp -h @smtp_host@ -s "Bacula traceback" @dump_email@
# Below is some old code that did the traceback from a core
# dump. However, for some odd reason, core dumps are not
.c.o:
$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
#-------------------------------------------------------------------------
-all: Makefile console @STATIC_CONS@
+all: Makefile bconsole @STATIC_CONS@
@echo "==== Make of console is good ===="
@echo " "
&& CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
clean:
- @$(RMF) console core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
- @$(RMF) static-console gmon.out
+ @$(RMF) console bconsole core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
+ @$(RMF) static-console static-bconsole gmon.out
realclean: clean
- @$(RMF) tags console.conf
+ @$(RMF) tags console.conf bconsole.conf
distclean: realclean
if test $(srcdir) = .; then $(MAKE) realclean; fi
(cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
install: all
- $(INSTALL_SCRIPT) console $(DESTDIR)$(sbindir)/console
- @srcconf=console.conf; \
+ $(INSTALL_SCRIPT) bconsole $(DESTDIR)$(sbindir)/bconsole
+ @srcconf=bconsole.conf; \
if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
destconf=$$srcconf.new; \
echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
uninstall:
- (cd $(DESTDIR)$(sbindir); $(RMF) console)
- (cd $(DESTDIR)$(sysconfdir); $(RMF) console.conf console.conf.new)
+ (cd $(DESTDIR)$(sbindir); $(RMF) bconsole)
+ (cd $(DESTDIR)$(sysconfdir); $(RMF) bconsole.conf bconsole.conf.new)
{"VolumeToCatalog", L_VERIFY_VOLUME_TO_CATALOG, JT_VERIFY},
{"DiskToCatalog", L_VERIFY_DISK_TO_CATALOG, JT_VERIFY},
{"Data", L_VERIFY_DATA, JT_VERIFY},
+ {" ", L_NONE, JT_ADMIN},
+ {" ", L_NONE, JT_RESTORE},
{NULL, 0}
};
{
jcr->job = job;
jcr->JobType = job->JobType;
- jcr->JobLevel = job->level;
+ switch (jcr->JobType) {
+ case JT_ADMIN:
+ case JT_RESTORE:
+ jcr->JobLevel = L_NONE;
+ break;
+ default:
+ jcr->JobLevel = job->level;
+ break;
+ }
jcr->JobPriority = job->Priority;
jcr->store = job->storage;
jcr->client = job->client;
jcr->messages = job->messages;
if (jcr->RestoreBootstrap) {
free(jcr->RestoreBootstrap);
+ jcr->RestoreBootstrap = NULL;
}
/* This can be overridden by Console program */
if (job->RestoreBootstrap) {
break;
case JT_RESTORE:
case JT_ADMIN:
- jcr->JobLevel = L_FULL;
+ jcr->JobLevel = L_NONE;
break;
default:
break;
}
memset(&rjr, 0, sizeof(rjr));
- jcr->jr.Level = 'F'; /* Full restore */
+ jcr->jr.Level = L_FULL; /* Full restore */
jcr->jr.StartTime = jcr->start_time;
if (!db_update_job_start_record(jcr, jcr->db, &jcr->jr)) {
Jmsg(jcr, M_ERROR, 0, "%s", db_strerror(jcr->db));
static void prt_runtime(UAContext *ua, JOB *job, int level, time_t runtime, POOL *pool)
{
char dt[MAX_TIME_LENGTH];
+ char *level_ptr;
bool ok = false;
bool close_db = false;
JCR *jcr = ua->jcr;
}
}
bstrftime(dt, sizeof(dt), runtime);
+ switch (job->JobType) {
+ case JT_ADMIN:
+ case JT_RESTORE:
+ level_ptr = " ";
+ break;
+ default:
+ level_ptr = level_to_str(level);
+ break;
+ }
bsendmsg(ua, _("%-14s %-8s %-18s %-18s %s\n"),
- level_to_str(level), job_type_to_str(job->JobType), dt, job->hdr.name,
- mr.VolumeName);
+ level_ptr, job_type_to_str(job->JobType), dt, job->hdr.name, mr.VolumeName);
if (close_db) {
db_close_database(jcr, jcr->db);
}
#define L_VERIFY_DISK_TO_CATALOG 'd' /* verify Disk attributes to catalog */
#define L_VERIFY_DATA 'A' /* verify data on volume */
#define L_BASE 'B' /* Base level job */
+#define L_NONE ' ' /* None, for Restore and Admin */
/* Job Types. These are stored in the DB */
{
/* Keep some statistics */
switch (jcr->JobType) {
- case JT_BACKUP:
- case JT_VERIFY:
- case JT_RESTORE:
- last_job.NumJobs++;
- last_job.JobType = jcr->JobType;
- last_job.JobId = jcr->JobId;
- last_job.VolSessionId = jcr->VolSessionId;
- last_job.VolSessionTime = jcr->VolSessionTime;
- strcpy(last_job.Job, jcr->Job);
- last_job.JobFiles = jcr->JobFiles;
- last_job.JobBytes = jcr->JobBytes;
- last_job.JobStatus = jcr->JobStatus;
- last_job.start_time = jcr->start_time;
- last_job.end_time = time(NULL);
- break;
- default:
- break;
+ case JT_BACKUP:
+ case JT_VERIFY:
+ case JT_RESTORE:
+ case JT_ADMIN:
+ last_job.NumJobs++;
+ last_job.JobType = jcr->JobType;
+ last_job.JobId = jcr->JobId;
+ last_job.VolSessionId = jcr->VolSessionId;
+ last_job.VolSessionTime = jcr->VolSessionTime;
+ bstrncpy(last_job.Job, jcr->Job, sizeof(last_job.Job));
+ last_job.JobFiles = jcr->JobFiles;
+ last_job.JobBytes = jcr->JobBytes;
+ last_job.JobStatus = jcr->JobStatus;
+ last_job.start_time = jcr->start_time;
+ last_job.end_time = time(NULL);
+ break;
+ default:
+ break;
}
pthread_mutex_destroy(&jcr->mutex);
case L_VERIFY_DATA:
str = _("Verify Data");
break;
+ case L_NONE:
+ str = " ";
+ break;
default:
str = _("Unknown Job Level");
break;