- Release Notes for Bacula 2.5.40
+ Release Notes for Bacula 2.5.42
- Bacula code: Total files = 522 Total lines = 204,340 (*.h *.c *.in)
+ Bacula code: Total files = 521 Total lines = 204,881 (*.h *.c *.in)
The diff between 2.4.4 and 2.5.x is 208,340 lines, so this release
represents an enormous effort.
This Director and Storage daemon must be upgraded at the same time,
but they should be compatible with all 2.4.x File daemons, unless you
use some of the new features that affect the FD. In other words, you should
-not have to upgrade all your File daemons when you upgrade. However, the next
-BETA release (after version 2.5.40) will require a database upgrade.
+not have to upgrade all your File daemons when you upgrade. However, any
+release of version 2.5.40 or greater requires a database upgrade.
================== Warning !!!!!! ==========================
11). If you are using already a 2.5 version, you can drop the JobHistory
table before upgrading your catalog (if you are using the new "long term
statistics" module, you can upgrade this table the same way we do with
-the Job table, see the src/cats/update_bacula_table script).
+the Job table, see the src/cats/update_bacula_tables script).
+
+The simplest way to:
+1. Stop any current version of Bacula from running.
+2. Save a copy of your existing database.
+3. Configure, build, and install the 2.5.42 version of Bacula
+4. cd <your-scripts-installation-directory>
+5. ./update_bacula_tables
+6. If you have multiple catalogs, edit the update_bacula_tables
+ script and put the name of another database, and then
+ execute the script again. Repeat this until all Bacula
+ catalogs have been updated.
+7. Start the new Bacula. If everything worked, it should
+ not print any error messages.
The upgrade operation will convert the FileId index field of the File table
from 32 bits to 64 bits. This operation will take TIME and will *temporarily*
line (--libdir=/full-path/dir), but this should not be necessary.
If you have problems with libtool or you wish to use the old
-way of building static libraries, you can do so by disabling
-libtool on the configure command line with:
+way of building libraries and linking them into Bacula, you
+can do so by disabling libtool on the configure command line with:
./configure --disable-libtool
==============================================================
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2007-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2007-2009 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
static bRC baculaSetValue(bpContext *ctx, bwVariable var, void *value);
static bRC baculaRegisterEvents(bpContext *ctx, ...);
static bRC baculaJobMsg(bpContext *ctx, const char *file, int line,
- int type, time_t mtime, const char *msg);
+ int type, utime_t mtime, const char *msg);
static bRC baculaDebugMsg(bpContext *ctx, const char *file, int line,
int level, const char *msg);
}
static bRC baculaJobMsg(bpContext *ctx, const char *file, int line,
- int type, time_t mtime, const char *msg)
+ int type, utime_t mtime, const char *msg)
{
- Dmsg5(dbglvl, "Job message: %s:%d type=%d time=%ld msg=%s\n",
+ Dmsg5(dbglvl, "Job message: %s:%d type=%d time=%lld msg=%s\n",
file, line, type, mtime, msg);
return bRC_OK;
}
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2007-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2007-2009 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
bRC (*getBaculaValue)(bpContext *ctx, brVariable var, void *value);
bRC (*setBaculaValue)(bpContext *ctx, bwVariable var, void *value);
bRC (*JobMessage)(bpContext *ctx, const char *file, int line,
- int type, time_t mtime, const char *msg);
+ int type, utime_t mtime, const char *msg);
bRC (*DebugMessage)(bpContext *ctx, const char *file, int line,
int level, const char *msg);
} bFuncs;
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
*/
if (((runtime - run->last_run) < 61) || ((runtime+59) < now)) {
#ifdef SCHED_DEBUG
- char dt[50], dt1[50], dt2[50];
- bstrftime_nc(dt, sizeof(dt), runtime);
- bstrftime_nc(dt1, sizeof(dt1), run->last_run);
- bstrftime_nc(dt2, sizeof(dt2), now);
- Dmsg7(000, "Drop: Job=\"%s\" run=%s(%x). last_run=%s(%x). now=%s(%x)\n", job->hdr.name,
- dt, runtime, dt1, run->last_run, dt2, now);
+ Dmsg4(000, "Drop: Job=\"%s\" run=%lld. last_run=%lld. now=%lld\n", job->hdr.name,
+ (utime_t)runtime, (utime_t)run->last_run, (utime_t)now);
fflush(stdout);
#endif
return;
}
#ifdef SCHED_DEBUG
- Dmsg4(000, "Add: Job=\"%s\" run=%x last_run=%x now=%x\n", job->hdr.name,
- runtime, run->last_run, now);
+ Dmsg4(000, "Add: Job=\"%s\" run=%lld last_run=%lld now=%lld\n", job->hdr.name,
+ (utime_t)runtime, (utime_t)run->last_run, (utime_t)now);
#endif
/* accept to run this job */
job_item *je = (job_item *)malloc(sizeof(job_item));
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
return false;
}
delta_start = StartTime - jr.StartTime;
- Dmsg3(200, "ST=%d jr.ST=%d delta=%d\n", (time_t)StartTime,
- (time_t)jr.StartTime, (time_t)delta_start);
+ Dmsg3(200, "ST=%lld jr.ST=%lld delta=%lld\n", StartTime,
+ (utime_t)jr.StartTime, delta_start);
jr.StartTime = (time_t)StartTime;
jr.SchedTime += (time_t)delta_start;
jr.EndTime += (time_t)delta_start;
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
ds->fsend(OK_append);
do_fd_commands(jcr); /* finish dialog with FD */
-
- time_t job_elapsed = time(NULL) - jcr->run_time;
+ /*
+ * Don't use time_t for job_elapsed as time_t can be 32 or 64 bits,
+ * and the subsequent Jmsg() editing will break
+ */
+ int32_t job_elapsed = time(NULL) - jcr->run_time;
if (job_elapsed <= 0) {
job_elapsed = 1;
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2007-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2007-2009 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
static bRC baculaSetValue(bpContext *ctx, bwVariable var, void *value);
static bRC baculaRegisterEvents(bpContext *ctx, ...);
static bRC baculaJobMsg(bpContext *ctx, const char *file, int line,
- int type, time_t mtime, const char *msg);
+ int type, utime_t mtime, const char *msg);
static bRC baculaDebugMsg(bpContext *ctx, const char *file, int line,
int level, const char *msg);
}
static bRC baculaJobMsg(bpContext *ctx, const char *file, int line,
- int type, time_t mtime, const char *msg)
+ int type, utime_t mtime, const char *msg)
{
- Dmsg5(dbglvl, "Job message: %s:%d type=%d time=%ld msg=%s\n",
+ Dmsg5(dbglvl, "Job message: %s:%d type=%d time=%lld msg=%s\n",
file, line, type, mtime, msg);
return bRC_OK;
}
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2007-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2007-2009 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
bRC (*getBaculaValue)(bpContext *ctx, brVariable var, void *value);
bRC (*setBaculaValue)(bpContext *ctx, bwVariable var, void *value);
bRC (*JobMessage)(bpContext *ctx, const char *file, int line,
- int type, time_t mtime, const char *msg);
+ int type, utime_t mtime, const char *msg);
bRC (*DebugMessage)(bpContext *ctx, const char *file, int line,
int level, const char *msg);
} bFuncs;
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2004-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2004-2009 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
#endif
/* Add run time, to get current wait time */
- time_t despool_start = time(NULL) - jcr->run_time;
+ int32_t despool_start = time(NULL) - jcr->run_time;
set_new_file_parameters(dcr);
/* Set new file/block parameters for current dcr */
set_new_file_parameters(dcr);
- /* Subtracting run_time give us elapsed time - wait_time since we started despooling */
- time_t despool_elapsed = time(NULL) - despool_start - jcr->run_time;
+ /*
+ * Subtracting run_time give us elapsed time - wait_time since
+ * we started despooling. Note, don't use time_t as it is 32 or 64
+ * bits depending on the OS and doesn't edit with %d
+ */
+ int32_t despool_elapsed = time(NULL) - despool_start - jcr->run_time;
if (despool_elapsed <= 0) {
despool_elapsed = 1;
char tbuf[100];
Dmsg1(100, "Commit attributes at %s\n", bstrftimes(tbuf, sizeof(tbuf),
- ( utime_t)time(NULL)));
+ (utime_t)time(NULL)));
if (are_attributes_spooled(jcr)) {
if (fseeko(jcr->dir_bsock->m_spool_fd, 0, SEEK_END) != 0) {
berrno be;
char tbuf[100];
Dmsg1(100, "Close attr spool file at %s\n", bstrftimes(tbuf, sizeof(tbuf),
- ( utime_t)time(NULL)));
+ (utime_t)time(NULL)));
if (!bs->m_spool_fd) {
return true;
}
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
#undef VERSION
#define VERSION "2.5.42"
-#define BDATE "12 March 2009"
-#define LSMDATE "12Mar09"
+#define BDATE "14 March 2009"
+#define LSMDATE "14Mar09"
#define PROG_COPYRIGHT "Copyright (C) %d-2009 Free Software Foundation Europe e.V.\n"
#define BYEAR "2009" /* year for copyright messages in progs */
General:
+14Mar09
+kes Fix problems with bug #1247 and 64 bit time_t OSes by not
+ editing (printf) time_t values.
12Mar09
kes Install bacula (start/stop script) in sbindir in addition to
scripts dir.