Priority:
+- Check if gnome-console works with TLS.
- Ensure that the SD re-reads the Media record if the JobFiles
does not match -- it may have been updated by another job.
- Look at moving the Storage directive from the Job to the
Pool in the default conf files.
-- Make sure the new level=Full syntax is used in all
- example conf files (especially in the manual).
-- Fix prog copyright (SD) all other files.
- Migration Volume span bug
- Rescue release
- Bug reports
- Wrong jobbytes with query 12 (todo)
- bacula-1.38.2-ssl.patch
- Bare-metal recovery Windows (todo)
-- Document need for UTF-8 format
- Make release unload any autochanger.
- Arno's reservation deadlock.
- Eric's SD patch
+- Make sure the new level=Full syntax is used in all
+ example conf files (especially in the manual).
+- Fix prog copyright (SD) all other files.
+- Document need for UTF-8 format
+
# (default "")
#
#
+BINDIR=@SQL_BINDIR@
+
cd @working_dir@
rm -f bacula.sql
if test xsqlite = x@DB_NAME@ ; then
- echo ".dump" | @SQL_BINDIR@/sqlite $1.db >$1.sql
+ echo ".dump" | ${BINDIR}/sqlite $1.db >$1.sql
else
if test xmysql = x@DB_NAME@ ; then
if test $# -gt 2; then
else
MYSQLPASSWORD=""
fi
- @SQL_BINDIR@/mysqldump -u $2$MYSQLPASSWORD -f --opt $1 >$1.sql
+ ${BINDIR}/mysqldump -u $2$MYSQLPASSWORD -f --opt $1 >$1.sql
else
if test xpostgresql = x@DB_NAME@ ; then
if test $# -gt 2; then
PGPASSWORD=$3
export PGPASSWORD
fi
- exec @SQL_BINDIR@/pg_dump -c -U $2 $1 >$1.sql
+ exec ${BINDIR}/pg_dump -c -U $2 $1 >$1.sql
else
- echo ".dump" | @SQL_BINDIR@/sqlite3 $1.db >$1.sql
+ echo ".dump" | ${BINDIR}/sqlite3 $1.db >$1.sql
fi
fi
fi
#
# To read back a MySQL database use:
# cd @working_dir@
-# rm -f @SQL_BINDIR@/../var/bacula/*
+# rm -f ${BINDIR}/../var/bacula/*
# mysql <bacula.sql
#
# To read back a SQLite database use:
static char OKbackup[] = "2000 OK backup\n";
static char OKstore[] = "2000 OK storage\n";
static char EndJob[] = "2800 End Job TermCode=%d JobFiles=%u "
- "ReadBytes=%lld JobBytes=%lld Errors=%u "
+ "ReadBytes=%llu JobBytes=%llu Errors=%u "
"VSS=%d Encrypt=%d\n";
/* Pre 1.39.29 (04Dec06) EndJob */
static char OldEndJob[] = "2800 End Job TermCode=%d JobFiles=%u "
- "ReadBytes=%lld JobBytes=%lld Errors=%u\n";
+ "ReadBytes=%llu JobBytes=%llu Errors=%u\n";
/*
* Called here before the job is run to do the job
* specific setup.
BSOCK *fd = jcr->file_bsock;
bool fd_ok = false;
uint32_t JobFiles, Errors;
- uint64_t ReadBytes, JobBytes;
+ uint64_t ReadBytes = 0;
+ uint64_t JobBytes = 0;
int VSS = 0;
int Encrypt = 0;
break;
}
}
+
if (is_bnet_error(fd)) {
Jmsg(jcr, M_FATAL, 0, _("Network error with FD during %s: ERR=%s\n"),
job_type_to_str(jcr->JobType), bnet_strerror(fd));
#endif
if (ff_pkt->flags & FO_ENCRYPT) {
+ if (ff_pkt->flags & FO_SPARSE) {
+ Jmsg0(jcr, M_FATAL, 0, _("Encrypting sparse data not supported.\n"));
+ goto err;
+ }
/* Allocate the cipher context */
if ((cipher_ctx = crypto_cipher_new(jcr->pki_session, true,
&cipher_block_size)) == NULL) {
/* Shouldn't happen! */
- Jmsg0(jcr, M_FATAL, 0, _("Failed to initialize encryption context\n"));
+ Jmsg0(jcr, M_FATAL, 0, _("Failed to initialize encryption context.\n"));
goto err;
}
/* Send termination status back to Dir */
bnet_fsend(dir, EndJob, jcr->JobStatus, jcr->JobFiles,
edit_uint64(jcr->ReadBytes, ed1),
- edit_uint64(jcr->JobBytes, ed2), jcr->Errors);
+ edit_uint64(jcr->JobBytes, ed2), jcr->Errors, 0,
+ jcr->pki_encrypt);
+ Dmsg1(110, "End FD msg: %s\n", dir->msg);
/* Inform Director that we are done */
bnet_sig(dir, BNET_TERMINATE);
/* Send termination status back to Dir */
bnet_fsend(dir, EndJob, jcr->JobStatus, jcr->JobFiles,
edit_uint64(jcr->ReadBytes, ed1),
- edit_uint64(jcr->JobBytes, ed2), jcr->Errors);
+ edit_uint64(jcr->JobBytes, ed2), jcr->Errors, 0,
+ jcr->pki_encrypt);
+ Dmsg1(110, "End FD msg: %s\n", dir->msg);
/* Inform Director that we are done */
bnet_sig(dir, BNET_TERMINATE);
bool extract = false;
int32_t file_index;
char ec1[50]; /* Buffer printing huge values */
-
BFILE bfd; /* File content */
uint64_t fileAddr = 0; /* file write address */
uint32_t size; /* Size of file */
Jmsg3(jcr, M_ERROR, 0, _("Seek to %s error on %s: ERR=%s\n"),
edit_uint64(*addr, ec1), jcr->last_fname,
be.strerror(bfd->berrno));
- return false;
+ return false;
}
}
*data += SPARSE_FADDR_SIZE;
Dmsg1(500, "Crypto unser block size=%d\n", jcr->crypto_packet_len - CRYPTO_LEN_SIZE);
if (jcr->crypto_packet_len == 0 || jcr->crypto_buf_len < jcr->crypto_packet_len) {
- /* No full preserved block is available. */
- return 0;
+ /* No full preserved block is available. */
+ return 0;
}
/* We have one full block, set up the filter input buffers */
}
if (flags & FO_SPARSE) {
- if (!sparse_data(jcr, bfd, addr, &wbuf, &wsize)) {
- return -1;
- }
+ if (!sparse_data(jcr, bfd, addr, &wbuf, &wsize)) {
+ return -1;
+ }
}
if (flags & FO_GZIP) {
if (flags & FO_ENCRYPT) {
/* Move any remaining data to start of buffer */
if (jcr->crypto_buf_len > 0) {
- Dmsg1(30, "Moving %u buffered bytes to start of buffer\n", jcr->crypto_buf_len);
- memmove(jcr->crypto_buf, &jcr->crypto_buf[jcr->crypto_packet_len],
- jcr->crypto_buf_len);
+ Dmsg1(30, "Moving %u buffered bytes to start of buffer\n", jcr->crypto_buf_len);
+ memmove(jcr->crypto_buf, &jcr->crypto_buf[jcr->crypto_packet_len],
+ jcr->crypto_buf_len);
}
/* The packet was successfully written, reset the length so that the next
* packet length may be re-read by unser_crypto_packet_len() */
if (jcr->crypto_buf_len != jcr->crypto_packet_len) {
Jmsg2(jcr, M_FATAL, 0,
- _("Unexpected number of bytes remaining at end of file, received %u, expected %u\n"),
- jcr->crypto_packet_len, jcr->crypto_buf_len);
+ _("Unexpected number of bytes remaining at end of file, received %u, expected %u\n"),
+ jcr->crypto_packet_len, jcr->crypto_buf_len);
return false;
}
jcr->crypto_packet_len = 0;
if (flags & FO_SPARSE) {
- if (!sparse_data(jcr, bfd, addr, &wbuf, &wsize)) {
- return false;
- }
+ if (!sparse_data(jcr, bfd, addr, &wbuf, &wsize)) {
+ return false;
+ }
}
if (flags & FO_GZIP) {
General:
06Dec06
+kes Put make_catalog_backup SQL_BINDIR in an environment variable to
+ make it easier for the user to change.
+kes Fail any backup job that tries to use encryption and sparse options.
+ Hopefully this is a temporary change.
+kes Correct the EndJob return string for non-backup jobs.
+kes Review the encryption restore code.
+kes Implement a new encryption regression test with compression.
kes Modify migrate not to fail if nothing found to migrate.
kes Add #undef HAVE_OPENSSL, HAVE_TLS, HAVE_CYRPTO to autoconf/config.h.in
because they were not always set correctly.