License:
For the most part, Bacula is licensed under the GPL version 2 or greater
and any code that is Copyright Kern Sibbald and John Walker with the GPL
-indication is so licensed, but with the following two additions:
+indication is so licensed, but with the following four additions:
-Linking: Bacula may be linked with any libraries permitted under
+Linking:
+Bacula may be linked with any libraries permitted under
the GPL, or with any non-GPLed libraries, including OpenSSL, that
are required for its proper functioning, providing the source
code of those non-GPLed libraries is non-proprietary and freely available.
-Termination for Patent Action: In addition to the termination
-clause specified in the GPL, this license shall terminate
-automatically and you may no longer exercise any of the rights
-granted to you by this license as of the date you commence an
-action, including a cross-claim or counterclaim, against any
-licensor of GPL software alleging that the software infringes
-an intellectual property right or a patent. Special dispensation
-from or delay to the execution of this clause may be possible
-by applying directly to the license owner of this software.
-Such a dispensation or delay is valid only in writing and signed
-by the one or more of the license holders.
+Termination for Patent Action:
+In addition to the termination clause specified in the GPL, this
+license shall terminate automatically and you may no longer
+exercise any of the rights granted to you by this license as of
+the date you commence an action, including a cross-claim or
+counterclaim, against any licensor of GPL software alleging that
+the software infringes an intellectual property right or a
+patent. Special dispensation from or delay to the execution of
+this clause may be possible by applying directly to the license
+owner of this software. Such a dispensation or delay is valid
+only in writing and signed by the one or more of the license
+holders.
+
+IP rights:
+Recipient understands that although each Contributor grants the
+licenses to its Contributions set forth herein, no assurances are
+provided by any Contributor that the Program does not infringe
+the patent or other intellectual property rights of any other
+entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of
+intellectual property rights or otherwise. As a condition to
+exercising the rights and licenses granted hereunder, each
+Recipient hereby assumes sole responsibility to secure any other
+intellectual property rights needed, if any. For example, if a
+third party patent license is required to allow Recipient to
+distribute the Program, it is Recipient's responsibility to
+acquire that license before distributing the Program.
+
+Copyrights:
+Each Contributor represents that to its knowledge it has
+sufficient copyright rights in its Contribution, if any, to grant
+the copyright license set forth in this Agreement.
Code falling under the above conditions will be marked as follows:
Maybe for 1.35:
+- Implement Files/Bytes,... stats for restore job.
+- Implement Total Bytes Written, ... for restore job.
+- Check dates entered by user for correctness (month/day/... ranges)
+- Compress restore Volume listing by date and first file.
- Add Pool/Storage override regression test.
- Add delete JobId to regression.
- Add bscan to four-concurrent-jobs regression.
scripts to add them.
- Modify postgresql update script to remove bigint FilenameId
reference.
-
// Dmsg1(100, "Enter verify_cleanup() TermCod=%d\n", TermCode);
dequeue_messages(jcr); /* display any queued messages */
- Dmsg3(000, "JobLevel=%c Expected=%u JobFiles=%u\n", jcr->JobLevel,
+ Dmsg3(900, "JobLevel=%c Expected=%u JobFiles=%u\n", jcr->JobLevel,
jcr->ExpectedFiles, jcr->JobFiles);
if (jcr->JobLevel == L_VERIFY_VOLUME_TO_CATALOG &&
jcr->ExpectedFiles != jcr->JobFiles) {
sd->msg = wbuf; /* set correct write buffer */
if (!bnet_send(sd)) {
berrno be;
+ Jmsg2(jcr, M_FATAL, 0, _("Network send error %d to SD. ERR=%s\n"),
+ sd->msglen, bnet_strerror(sd));
sd->msg = msgsave; /* restore bnet buffer */
sd->msglen = 0;
bclose(&ff_pkt->bfd);
- Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
- bnet_strerror(sd));
return 0;
}
}
usage();
}
+ server_tid = pthread_self();
if (!no_signals) {
init_signals(terminate_filed);
} else {
const char *bnet_strerror(BSOCK * bsock)
{
berrno be;
- return be.strerror(bsock->b_errno);
+ if (bsock->errmsg == NULL) {
+ bsock->errmsg = get_pool_memory(PM_MESSAGE);
+ }
+ pm_strcpy(bsock->errmsg, be.strerror(bsock->b_errno));
+ return bsock->errmsg;
}
/*
void bnet_stop_thread_server(pthread_t tid)
{
quit = true;
- pthread_kill(tid, TIMEOUT_SIGNAL);
+ if (!pthread_equal(tid, pthread_self())) {
+ pthread_kill(tid, TIMEOUT_SIGNAL);
+ }
}
/*
POOLMEM *msg; /* message pool buffer */
char *who; /* Name of daemon to which we are talking */
char *host; /* Host name/IP */
- POOLMEM *errmsg; /* edited error message (to be implemented) */
+ POOLMEM *errmsg; /* edited error message */
RES *res; /* Resource to which we are connected */
BSOCK *next; /* next BSOCK if duped */
FILE *spool_fd; /* spooling file */
jcr->dir_bsock->spool = false;
}
}
+ Dmsg0(350, "Enter bnet_get\n");
}
+ Dmsg1(350, "End read loop with FD. Stat=%d\n", n);
if (is_bnet_error(ds)) {
+ Dmsg1(350, "Network read error from FD. ERR=%s\n", bnet_strerror(ds));
Jmsg1(jcr, M_FATAL, 0, _("Network error on data channel. ERR=%s\n"),
bnet_strerror(ds));
ok = false;
/* Clean up and then exit */
void terminate_stored(int sig)
{
- static int in_here = FALSE;
+ static bool in_here = false;
DEVRES *device;
JCR *jcr;
if (in_here) { /* prevent loops */
exit(1);
}
- in_here = TRUE;
+ in_here = true;
if (sig == SIGTERM) { /* normal shutdown request? */
/*
set_jcr_job_status(jcr, JS_Canceled);
fd = jcr->file_bsock;
if (fd) {
- fd->timed_out = TRUE;
- Dmsg1(100, "killing JobId=%d\n", jcr->JobId);
+ fd->timed_out = true;
+ Dmsg1(100, "term_stored killing JobId=%d\n", jcr->JobId);
pthread_kill(jcr->my_thread_id, TIMEOUT_SIGNAL);
if (jcr->device && jcr->device->dev && jcr->device->dev->dev_blocked) {
pthread_cond_signal(&jcr->device->dev->wait_next_vol);
/* */
#undef VERSION
#define VERSION "1.35.9"
-#define BDATE "16 October 2004"
-#define LSMDATE "16Oct04"
+#define BDATE "18 October 2004"
+#define LSMDATE "18Oct04"
/* Debug flags */
#undef DEBUG
ALTER TABLE Media ADD COLUMN EndFile INTEGER UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE Media ADD COLUMN EndBlock INTEGER UNSIGNED NOT NULL DEFAULT 0;
+ALTER TABLE File ADD INDEX (JobId, PathId, FilenameId);
+
UPDATE Filename SET Name='' WHERE Name=' ';
DELETE FROM Version;
INSERT INTO Version (VersionId) VALUES (8);
-CREATE TABLE CDImages (
- MediaId INTEGER UNSIGNED NOT NULL,
- LastBurn DATETIME NOT NULL,
- PRIMARY KEY (MediaId)
- );
-
END-OF-DATA
then
echo "Update of Bacula MySQL tables succeeded."
if $bindir/psql $* -f - <<END-OF-DATA
\c bacula
-ALTER TABLE Media ADD COLUMN EndFile integer not null default 0;
-ALTER TABLE Media ADD COLUMN EndBlock integer not null default 0;
+ALTER TABLE media ADD COLUMN EndFile integer;
+UPDATE media SET EndFile=0;
+ALTER TABLE media ALTER COLUMN EndFile SET NOT NULL;
+ALTER TABLE media ADD COLUMN EndBlock integer;
+UPDATE media SET EndBlock=0;
+ALTER TABLE media ALTER COLUMN EndBlock SET NOT NULL;
UPDATE Filename SET Name='' WHERE Name=' ';
+ALTER TABLE file ALTER COLUMN filenameid SET integer;
+
DELETE FROM Version;
INSERT INTO Version (VersionId) VALUES (8);
-create table CDImages
-(
- MediaId integer not null,
- LastBurn timestamp without time zone not null,
- primary key (MediaId)
-);
+create index file_jobid_idx on file (jobid);
+create index file_pathid_idx on file(pathid);
+create index file_filenameid_idx on file(filenameid);
+create index file_jpfid_idx on file (jobid, pathid, filenameid);
END-OF-DATA
then
DROP TABLE Media_backup;
-CREATE TABLE CDImages (
- MediaId INTEGER UNSIGNED NOT NULL,
- LastBurn DATETIME NOT NULL,
- PRIMARY KEY (MediaId)
- );
+CREATE INDEX inx9 ON File (JobId, PathId, FileNameId);
COMMIT;