From: Kern Sibbald Date: Sun, 11 Dec 2005 10:07:11 +0000 (+0000) Subject: - Merge changes made to 1.38.3 into HEAD X-Git-Tag: Release-7.0.0~8227 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9cdeafde391bd0c57693398f3b9eac9404892f1b;p=bacula%2Fbacula - Merge changes made to 1.38.3 into HEAD - Add stubs for pygtk-console code - Create Makefile.in for pygtk-console code git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2658 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/autoconf/config.h.in b/bacula/autoconf/config.h.in index c9eee56660..87af24d6af 100644 --- a/bacula/autoconf/config.h.in +++ b/bacula/autoconf/config.h.in @@ -274,9 +274,6 @@ /* Define if encryption support should be enabled */ #undef HAVE_CRYPTO -/* Define if the SHA-2 family of digest algorithms is available */ -#undef HAVE_SHA2 - /* Define to 1 if you have the header file. */ #undef HAVE_CURSES_H @@ -516,6 +513,9 @@ /* Define to 1 if you have the `setsid' function. */ #undef HAVE_SETSID +/* Define if the SHA-2 family of digest algorithms is available */ +#undef HAVE_SHA2 + /* Define to 1 if you have the `signal' function. */ #undef HAVE_SIGNAL diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index c0cac2b548..e7d2c7ef12 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -1994,6 +1994,7 @@ AC_OUTPUT([autoconf/Make.common \ src/cats/drop_bacula_tables \ src/cats/drop_bacula_database \ src/findlib/Makefile \ + src/pygtk-console/Makefile \ src/tools/Makefile \ src/win32/winbacula.nsi \ src/win32/baculafd/bacula-fd.conf \ diff --git a/bacula/configure b/bacula/configure index ff48c3ab66..2898b0b205 100755 --- a/bacula/configure +++ b/bacula/configure @@ -29832,7 +29832,7 @@ if test "x${subsysdir}" = "x${sbindir}" ; then exit 1 fi - ac_config_files="$ac_config_files autoconf/Make.common Makefile scripts/startmysql scripts/stopmysql scripts/btraceback scripts/startit scripts/stopit scripts/bconsole scripts/gconsole scripts/bacula scripts/devel_bacula scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/bacula.desktop.gnome1.consolehelper scripts/bacula.desktop.gnome2.consolehelper scripts/bacula.desktop.gnome1.xsu scripts/bacula.desktop.gnome2.xsu scripts/gnome-console.console_apps scripts/mtx-changer scripts/dvd-handler scripts/bacula-tray-monitor.desktop scripts/logwatch/Makefile scripts/logwatch/logfile.bacula.conf src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/gnome2-console/Makefile src/gnome2-console/gnome-console.conf src/wx-console/Makefile src/wx-console/wx-console.conf src/tray-monitor/Makefile src/tray-monitor/tray-monitor.conf src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/filed/win32/Makefile src/cats/Makefile src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite_database src/cats/update_sqlite_tables src/cats/make_sqlite_tables src/cats/grant_sqlite_privileges src/cats/drop_sqlite_tables src/cats/drop_sqlite_database src/cats/create_sqlite3_database src/cats/update_sqlite3_tables src/cats/make_sqlite3_tables src/cats/grant_sqlite3_privileges src/cats/drop_sqlite3_tables src/cats/drop_sqlite3_database src/cats/sqlite src/cats/mysql src/cats/create_bdb_database src/cats/update_bdb_tables src/cats/make_bdb_tables src/cats/grant_bdb_privileges src/cats/drop_bdb_tables src/cats/drop_bdb_database src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/findlib/Makefile src/tools/Makefile src/win32/winbacula.nsi src/win32/baculafd/bacula-fd.conf src/win32/Makefile src/win32/console/bconsole.conf src/win32/wx-console/wx-console.conf src/win32/pebuilder/Makefile po/Makefile.in $PFILES" + ac_config_files="$ac_config_files autoconf/Make.common Makefile scripts/startmysql scripts/stopmysql scripts/btraceback scripts/startit scripts/stopit scripts/bconsole scripts/gconsole scripts/bacula scripts/devel_bacula scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/bacula.desktop.gnome1.consolehelper scripts/bacula.desktop.gnome2.consolehelper scripts/bacula.desktop.gnome1.xsu scripts/bacula.desktop.gnome2.xsu scripts/gnome-console.console_apps scripts/mtx-changer scripts/dvd-handler scripts/bacula-tray-monitor.desktop scripts/logwatch/Makefile scripts/logwatch/logfile.bacula.conf src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/gnome2-console/Makefile src/gnome2-console/gnome-console.conf src/wx-console/Makefile src/wx-console/wx-console.conf src/tray-monitor/Makefile src/tray-monitor/tray-monitor.conf src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/filed/win32/Makefile src/cats/Makefile src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite_database src/cats/update_sqlite_tables src/cats/make_sqlite_tables src/cats/grant_sqlite_privileges src/cats/drop_sqlite_tables src/cats/drop_sqlite_database src/cats/create_sqlite3_database src/cats/update_sqlite3_tables src/cats/make_sqlite3_tables src/cats/grant_sqlite3_privileges src/cats/drop_sqlite3_tables src/cats/drop_sqlite3_database src/cats/sqlite src/cats/mysql src/cats/create_bdb_database src/cats/update_bdb_tables src/cats/make_bdb_tables src/cats/grant_bdb_privileges src/cats/drop_bdb_tables src/cats/drop_bdb_database src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/findlib/Makefile src/pygtk-console/Makefile src/tools/Makefile src/win32/winbacula.nsi src/win32/baculafd/bacula-fd.conf src/win32/Makefile src/win32/console/bconsole.conf src/win32/wx-console/wx-console.conf src/win32/pebuilder/Makefile po/Makefile.in $PFILES" ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -30460,6 +30460,7 @@ do "src/cats/drop_bacula_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/drop_bacula_tables" ;; "src/cats/drop_bacula_database" ) CONFIG_FILES="$CONFIG_FILES src/cats/drop_bacula_database" ;; "src/findlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/findlib/Makefile" ;; + "src/pygtk-console/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/pygtk-console/Makefile" ;; "src/tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/tools/Makefile" ;; "src/win32/winbacula.nsi" ) CONFIG_FILES="$CONFIG_FILES src/win32/winbacula.nsi" ;; "src/win32/baculafd/bacula-fd.conf" ) CONFIG_FILES="$CONFIG_FILES src/win32/baculafd/bacula-fd.conf" ;; diff --git a/bacula/kes-1.38 b/bacula/kes-1.38 index e02f99b215..f261ea1911 100644 --- a/bacula/kes-1.38 +++ b/bacula/kes-1.38 @@ -3,6 +3,78 @@ General: +Changes to 1.38.3: +09Dec05 +- Merge updates into 1.38 branch +- Update specs to include mysql4 define. +- Stop read_record() if status not ok in second loop. +- Return rec->FileIndex in dcr->VolLastIndex for normal + and partial records in read_record(). This allows bscan + to get FileIndex at EOT correct. +- Fix butil.c to correctly set dcr -- fixes seg fault in bls. +08Dec05 +- Apply patch supplied by user (slightly modified) to fix + correct detection of holes in block devices and FIFOs. + Bug # 506. +- Apply patch supplied by user (slightly modified) + to fix SD hang with multiple pools and bad client + IP. Fixes bug # 508. +07Dec05 +- Add nagios plugin to the examples directory. Submitted by + Christian Masopust. +- Remove warning message about multiple saves of hardlinked files + from find_one.c as it can generate too many warning messages. +06Dec05 +- Reset timeout values before select() per patch from + Frank Sweetser for problems with non-blocking sockets. +- Unlink the state file if either reading or writing it gets + errors. Hopefully this will fix Win32 exit problems. +- Add sanity check in append.c to ensure that dcr is not NULL. + This can happen if multiple drive autochanger SCSI control + channel and drive indicies do not correspond. +05Dec05 +- Get next volume from Scratch pool before creating a volume. +- Set new Pool defaults in Vol when moved from Scratch Pool. +- Remove argument from create_bacula_database for SQLite as it + caused an error. +- Add back next_vol index code so that two drive autochangers can get + a second tape. +- Change a bunch of debug levels to aid debugging autochangers. +- Fix reservation so that mutexes are properly applied. +- Rework reservation algorithm so that two drives can be used + at the same time. +04Dec05 +- Apply days keyword patch from Alexander.Bergolth at wu-wien.ac.at + If this patch is applied, the number of days can be specified with + "list nextvol days=xx" + or + "status dir days=xx" + My use case is to be able to preview the next scheduled job (and the + next tape to be used) on fridays if there are no scheduled jobs during + the weekend. +Changes to 1.39.1: +03Dec05 +- Fix font code in gnome2 console user patch. Fixes bug #501. +- Fix malformatted bnet error message that caused seg fault + fixes bug 502 +- Applied user patch to improve README.vc8 in src/win32. +29Nov05 +- Correct some more editing of JobId's (for 64 bit compatibility). +- Ensure that StorageId is stored in Media record when ever possible. +- Add Migration Job to Job. +- Change Start Storage daemon job to require read and write storage + pointers. +- Pass read storage data to SD as well as write storage data. +- Remove old code from winservice.cpp +- Break on error in scan. +- Fix typo in signal.c +- Separate read/write DCR in SD. Add jcr->read_dcr. +- Cleanup how find_device() works. +- Add read output to Status in SD. +21Nov05 +- Remove abs() in bfile.c so that it compiles on Solaris. + Bug #491. + Changes to 1.38.2: 22 November 2005 20Nov05 - Fix crash in tray-monitor when daemon disconnects. Bug #479. diff --git a/bacula/kes-1.39 b/bacula/kes-1.39 index f8792fe4b8..cf83dfeec8 100644 --- a/bacula/kes-1.39 +++ b/bacula/kes-1.39 @@ -4,6 +4,19 @@ General: Changes to 1.39.2: +10Dec05 +- Merge changes made to 1.38.3 into HEAD +- Add stubs for pygtk-console code +- Create Makefile.in for pygtk-console code +09Dec05 +- Merge updates into 1.38 branch +- Update specs to include mysql4 define. +- Fix when attributes are sent, must be after binit(). +- Stop read_record() if status not ok in second loop. +- Return rec->FileIndex in dcr->VolLastIndex for normal + and partial records in read_record(). This allows bscan + to get FileIndex at EOT correct. +- Fix butil.c to correctly set dcr -- fixes seg fault in bls. 08Dec05 - Fix Win32 built to work with new crypto code. - Apply patch supplied by user (slightly modified) to fix diff --git a/bacula/patches/1.38.1-to-1.38.2.patch b/bacula/patches/1.38.1-to-1.38.2.patch index 3c8e9b6485..a75062c69d 100644 --- a/bacula/patches/1.38.1-to-1.38.2.patch +++ b/bacula/patches/1.38.1-to-1.38.2.patch @@ -10,6 +10,8 @@ - Fix a couple of free()s in src/filed/acl.c - Fix memory overrun in bfile.c in building OS X resource fork filename. Bug #489 +- Add Pool name to SD status output. +- Add Python install dir for Solaris to configure. Bug #492 This patch is applied to Bacula source version 1.38.1 and will produce Bacula source version 1.38.2. Apply it with: @@ -20,39 +22,7557 @@ produce Bacula source version 1.38.2. Apply it with: make make install +Index: ChangeLog +=================================================================== +RCS file: /cvsroot/bacula/bacula/ChangeLog,v +retrieving revision 1.154.2.7 +retrieving revision 1.154.2.8 +diff -u -r1.154.2.7 -r1.154.2.8 +--- ChangeLog 15 Nov 2005 09:27:19 -0000 1.154.2.7 ++++ ChangeLog 22 Nov 2005 10:50:54 -0000 1.154.2.8 +@@ -1,4 +1,15 @@ + ++Changes to 1.38.2: ++- Fix crash in tray-monitor when daemon disconnects. Bug #479. ++- Fix bnet-server bug found on OpenBSD. Bug #486 ++- Fix cancel failure bug. Bug #481 ++- Fix failure when Pool name has spaces. Bug #487 ++- Fix SD crash in autochanger code. Mutex failure. Bug #488 ++- Fix a couple of free()s in src/filed/acl.c ++- Fix memory overrun in bfile.c in building OS X resource ++ fork filename. Bug #489 ++- Add Pool name to SD status output. ++- Add Python install dir for Solaris to configure. Bug #492 + + Changes to 1.38.1: + - Apply SunOS patch for ACLs submitted by David Duchscher. +Index: ReleaseNotes +=================================================================== +RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v +retrieving revision 1.147.2.9 +retrieving revision 1.147.2.10 +diff -u -r1.147.2.9 -r1.147.2.10 +--- ReleaseNotes 15 Nov 2005 09:27:19 -0000 1.147.2.9 ++++ ReleaseNotes 22 Nov 2005 10:50:54 -0000 1.147.2.10 +@@ -1,10 +1,22 @@ + +- Release Notes for Bacula 1.38.1 ++ Release Notes for Bacula 1.38.2 + + Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in) + 20,440 additional lines of code since version 1.36.3 + +-Changes since 1.38.0: ++Changes to 1.38.2: ++- Fix crash in tray-monitor when daemon disconnects. Bug #479. ++- Fix bnet-server bug found on OpenBSD. Bug #486 ++- Fix cancel failure bug. Bug #481 ++- Fix failure when Pool name has spaces. Bug #487 ++- Fix SD crash in autochanger code. Mutex failure. Bug #488 ++- Fix a couple of free()s in src/filed/acl.c ++- Fix memory overrun in bfile.c in building OS X resource ++ fork filename. Bug #489 ++- Add Pool name to SD status output. ++- Add Python install dir for Solaris to configure. Bug #492 ++ ++Changes to 1.38.1: + - Corrected ACL for Solaris (David Duchscher and Attila Fulop). + - Add bacula_mail_summary.sh to examples directory. It makes + a single email summary of any number of jobs. Submitted +Index: configure +=================================================================== +RCS file: /cvsroot/bacula/bacula/configure,v +retrieving revision 1.203.2.5 +retrieving revision 1.203.2.6 +diff -u -r1.203.2.5 -r1.203.2.6 +--- configure 13 Nov 2005 10:51:17 -0000 1.203.2.5 ++++ configure 22 Nov 2005 10:50:54 -0000 1.203.2.6 +@@ -14948,7 +14948,7 @@ + PYTHON_LIBS= + if test "$withval" != "no"; then + if test "$withval" = "yes"; then +- for python_root in /usr /usr/local; do ++ for python_root in /usr /usr/local /usr/sfw; do + if test -f $python_root/include/python2.2/Python.h; then + PYTHON_INCDIR=-I$python_root/include/python2.2 + PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2" +Index: kernstodo +=================================================================== +RCS file: /cvsroot/bacula/bacula/kernstodo,v +retrieving revision 1.570.2.6 +retrieving revision 1.570.2.7 +diff -u -r1.570.2.6 -r1.570.2.7 +--- kernstodo 4 Nov 2005 09:16:49 -0000 1.570.2.6 ++++ kernstodo 22 Nov 2005 10:50:55 -0000 1.570.2.7 +@@ -1,5 +1,5 @@ + Kern's ToDo List +- 03 November 2005 ++ 21 November 2005 + + Major development: + Project Developer +@@ -7,8 +7,6 @@ + Version 1.37 Kern (see below) + ======================================================== + +-Final items for 1.37 before release: +- + Document: + - Does ClientRunAfterJob fail the job on a bad return code? + - Document cleaning up the spool files: +@@ -18,6 +16,8 @@ + - Does WildFile match against full name? Doc. + + For 1.39: ++- Make sure that all do_prompt() calls in Dir check for ++ -1 (error) and -2 (cancel) returns. + - Look at -D_FORTIFY_SOURCE=2 + - Add Win32 FileSet definition somewhere + - Look at fixing restore status stats in SD. +@@ -27,6 +27,12 @@ + encountered, read many times (as it currently does), and if the + block cannot be read, skip to the next block, and try again. If + that fails, skip to the next file and try again, ... ++- Add level table: ++ create table LevelType (LevelType binary(1), LevelTypeLong tinyblob); ++ insert into LevelType (LevelType,LevelTypeLong) values ++ ("F","Full"), ++ ("D","Diff"), ++ ("I","Inc"); + - Add ACL to restore only to original location. + - Add a recursive mark command (rmark) to restore. + - "Minimum Job Interval = nnn" sets minimum interval between Jobs +@@ -1246,219 +1252,4 @@ + ==== + + +-=== Done +-- Save mount point for directories not traversed with onefs=yes. +-- Add seconds to start and end times in the Job report output. +-- if 2 concurrent backups are attempted on the same tape +- drive (autoloader) into different tape pools, one of them will exit +- fatally instead of halting until the drive is idle +-- Update StartTime if job held in Job Queue. +-- Look at www.nu2.nu/pebuilder as a helper for full windows +- bare metal restore. (done by Scott) +-- Fix orphanned buffers: +- Orphaned buffer: 24 bytes allocated at line 808 of rufus-dir job.c +- Orphaned buffer: 40 bytes allocated at line 45 of rufus-dir alist.c +-- Implement Preben's suggestion to add +- File System Types = ext2, ext3 +- to FileSets, thus simplifying backup of *all* local partitions. +-- Try to open a device on each Job if it was not opened +- when the SD started. +-- Add dump of VolSessionId/Time and FileIndex with bls. +-- If Bacula does not find the right tape in the Autochanger, +- then mark the tape in error and move on rather than asking +- for operator intervention. +-- Cancel command should include JobId in list of Jobs. +-- Add performance testing hooks +-- Bootstrap from JobMedia records. +-- Implement WildFile and WildDir to solve problem of +- saving only *.doc files. +-- Fix +- Please use the "label" command to create a new Volume for: +- Storage: DDS-4-changer +- Media type: +- Pool: Default +- label +- The defined Storage resources are: +-- Copy Changer Device and Changer Command from Autochanger +- to Device resource in SD if none given in Device resource. +-- 1. Automatic use of more than one drive in an autochanger (done) +-- 2. Automatic selection of the correct drive for each Job (i.e. +- selects a drive with an appropriate Volume for the Job) (done) +-- 6. Allow multiple simultaneous Jobs referencing the same pool write +- to several tapes (some new directive(s) are are probably needed for +- this) (done) +-- Locking (done) +-- Key on Storage rather than Pool (done) +-- Allow multiple drives to use same Pool (change jobq.c DIR) (done). +-- Synchronize multiple drives so that not more +- than one loads a tape and any time (done) +-- 4. Use Changer Device and Changer Command specified in the +- Autochanger resource, if none is found in the Device resource. +- You can continue to specify them in the Device resource if you want +- or need them to be different for each device. +-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") +- that can allow a Device be part of an Autochanger, and hence the changer +- script protected, but if set to no, will prevent the Device from being +- automatically selected from the changer. This allows the device to +- be directly accessed through its Device name, but not through the +- AutoChanger name. +-#6 Select one from among Multiple Storage Devices for Job +-#5 Events that call a Python program +- (Implemented in Dir/SD) +-- Make sure the Device name is in the Query packet returned. +-- Don't start a second file job if one is already running. +-- Implement EOF/EOV labels for ANSI labels +-- Implement IBM labels. +-- When Python creates a new label, the tape is immediately +- recycled and no label created. This happens when using +- autolabeling -- even when Python doesn't generate the name. +-- Scratch Pool where the volumes can be re-assigned to any Pool. +-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) +- is busy reading. Job 6 canceled. +-- Remove separate thread for opening devices in SD. On the other +- hand, don't block waiting for open() for devices. +-- Fix code to either handle updating NumVol or to calculate it in +- Dir next_vol.c +-- Ensure that you cannot exclude a directory or a file explicitly +- Included with File. +-#4 Embedded Python Scripting +- (Implemented in Dir/SD/FD) +-- Add Python writable variable for changing the Priority, +- Client, Storage, JobStatus (error), ... +-- SD Python +- - Solicit Events +-- Add disk seeking on restore; turn off seek on tapes. +- stored/match_bsr.c +-- Look at dird_conf.c:1000: warning: `int size' +- might be used uninitialized in this function +-- Indicate when a Job is purged/pruned during restore. +-- Implement some way to turn off automatic pruning in Jobs. +-- Implement a way an Admin Job can prune, possibly multiple +- clients -- Python script? +-- Look at Preben's acl.c error handling code. +-- SD crashes after a tape restore then doing a backup. +-- If drive is opened read/write, close it and re-open +- read-only if doing a restore, and vice-versa. +-- Windows restore: +- data-fd: RestoreFiles.2004-12-07_15.56.42 Error: +- > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der +- > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen +- > Prozess verwendet wird. +- Restore restores all files, but then fails at the end trying +- to set the attributes of e: +- from failed jobs.- Resolve the problem between Device name and Archive name, +- and fix SD messages. +-- Tell the "restore" user when browsing is no longer possible. +-- Add a restore directory-x +-- Write non-optimized bsrs from the JobMedia and Media records, +- even after Files are pruned. +-- Delete Stripe and Copy from VolParams to save space. +-- Fix option 2 of restore -- list where file is backed up -- require Client, +- then list last 20 backups. +-- Finish implementation of passing all Storage and Device needs to +- the SD. +-- Move test for max wait time exceeded in job.c up -- Peter's idea. +-## Consider moving docs to their own project. +-## Move rescue to its own project. +-- Add client version to the Client name line that prints in +- the Job report. +-- Fix the Rescue CDROM. +-- By the way: on page http://www.bacula.org/?page=tapedrives , at the +- bottom, the link to "Tape Testing Chapter" is broken. It goes to +- /html-manual/... while the others point to /rel-manual/... +-- Device resource needs the "name" of the SD. +-- Specify a single directory to restore. +-- Implement MediaType keyword in bsr? +-- Add a date and time stamp at the beginning of every line in the +- Job report (Volker Sauer). +-- Add level to estimate command. +-- Add "limit=n" for "list jobs" +-- Make bootstrap filename unique. +-- Make Dmsg look at global before calling subroutine. +-- From Chris Hull: +- it seems to be complaining about 12:00pm which should be a valid 12 +- hour time. I changed the time to 11:59am and everything works fine. +- Also 12:00am works fine. 0:00pm also works (which I don't think +- should). None of the values 12:00pm - 12:59pm work for that matter. +-- Require restore via the restore command or make a restore Job +- get the bootstrap file. +-- Implement Maximum Job Spool Size +-- Fix 3993 error in SD. It forgets to look at autochanger +- resource for device command, ... +-- 3. Prevent two drives requesting the same Volume in any given +- autochanger, by checking if a Volume is mounted on another drive +- in an Autochanger. +-- Upgrade to MySQL 4.1.12 See: +- http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html +-- Add # Job Level date to bsr file +-- Implement "PreferMountedVolumes = yes|no" in Job resource. +-## Integrate web-bacula into a new Bacula project with +- bimagemgr. +-- Cleaning tapes should have Status "Cleaning" rather than append. +-- Make sure that Python has access to Client address/port so that +- it can check if Clients are alive. +-- Review all items in "restore". +-- Fix PostgreSQL GROUP BY problems in restore. +-- Fix PostgreSQL sql problems in bugs. +-- After rename +- 04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume +- "DLT-13Feb04". +- Current Volume "DLT-04Jul05" not acceptable because: +- 1997 Volume "DLT-13Feb04" not in catalog. +- 04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device +- "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02 +-## Create a new GUI chapter explaining all the GUI programs. +-- Make "update slots" when pointing to Autochanger, remove +- all Volumes from other drives. "update slots all-drives"? +- No, this is done by modifying mtx-changer to list what is +- in the drives. +-- Finish TLS implementation. +-- Port limiting -m in iptables to prevent DoS attacks +- could cause broken pipes on Bacula. +-6. Build and test the Volume Shadow Copy (VSS) for Win32. +-- Allow cancel of unknown Job +-- State not saved when closing Win32 FD by icon +-- bsr-opt-test fails. bsr deleted. Fix. +-- Move Python daemon variables from Job to Bacula object. +- WorkingDir, ConfigFile +-- Document that Bootstrap files can be written with cataloging +- turned off. +-- Document details of ANSI/IBM labels +-- OS linux 2.4 +- 1) ADIC, DLT, FastStor 4000, 7*20GB +-- Linux Sony LIB-D81, AIT-3 library works. +-- Doc the following +- to activate, check or disable the hardware compression feature on my +- exb-8900 i use the exabyte "MammothTool" you can get it here: +- http://www.exabyte.com/support/online/downloads/index.cfm +- There is a solaris version of this tool. With option -C 0 or 1 you can +- disable or activate compression. Start this tool without any options for +- a small reference. +-- Document Heartbeat Interval in the dealing with firewalls section. +-- Document new CDROM directory. +-- On Win32 working directory must have drive letter ???? +-- On Win32 working directory must be writable by SYSTEM to +- do restores. +-- Document that ChangerDevice is used for Alert command. +-- Add better documentation on how restores can be done +-8. Take one more try at making DVD writing work (no go) +-7. Write a bacula-web document +-- Why isn't the DEVICE structure defined when doing +- a reservation? +-- Multi-drive changer seems to only use drive 0 +- Multiple drives don't seem to be opened. +-- My database is growing +-- Call GetLastError() in the berrno constructor rather +- than delaying until strerror. +-- Tape xxx in drive 0, requested in drive 1 +-- The mount command does not work with drives other than 0. +-- A mount should cause the SD to re-examine what Slot is +- loaded. +-- The SD locks on to the first available drive then +- wants a Volume that is released but in another drive -- +- chaos. +-- Run the regression scripts on Solaris and FreeBSD +-- Figure out how to package gui, and rescue programs. +-- Add a .dir command to restore tree code to eliminate the problem +-- Mount after manually unloading changer causes hang in SD +-- Fix JobACL with restore by JobId. ++=== Done -- see kernsdone Index: kes-1.38 =================================================================== RCS file: /cvsroot/bacula/bacula/kes-1.38,v retrieving revision 1.1.2.13 -diff -u -r1.1.2.13 kes-1.38 +retrieving revision 1.1.2.14 +diff -u -r1.1.2.13 -r1.1.2.14 --- kes-1.38 14 Nov 2005 20:20:38 -0000 1.1.2.13 -+++ kes-1.38 21 Nov 2005 12:53:36 -0000 -@@ -3,6 +3,17 @@ ++++ kes-1.38 22 Nov 2005 10:50:55 -0000 1.1.2.14 +@@ -3,6 +3,20 @@ General: -+Changes after release of 1.38.1: ++Changes to 1.38.2: +20Oct05 +- Fix crash in tray-monitor when daemon disconnects. Bug #479. -+- Fix bnet-server bug found on OpenBSD. Bug #486 ++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator ++ says this does not fix *his* bug). +- Fix cancel failure bug. Bug #481 +- Fix failure when Pool name has spaces. Bug #487 +- Fix SD crash in autochanger code. Mutex failure. Bug #488 +- Fix a couple of free()s in src/filed/acl.c +- Fix memory overrun in bfile.c in building OS X resource + fork filename. Bug #489 ++- Add Pool name to SD status output. ++- Add Python install dir for Solaris to configure. Bug #492 + Changes to 1.38.1: 14Oct05 - Apply SunOS patch for ACLs submitted by David Duchscher. +Index: projects +=================================================================== +RCS file: /cvsroot/bacula/bacula/projects,v +retrieving revision 1.12.2.3 +retrieving revision 1.12.2.4 +diff -u -r1.12.2.3 -r1.12.2.4 +--- projects 10 Nov 2005 20:25:27 -0000 1.12.2.3 ++++ projects 22 Nov 2005 10:50:55 -0000 1.12.2.4 +@@ -228,7 +228,175 @@ + + Why: Performance enhancement. + ++Item 13: Let Bacula log tape usage and handle drive cleaning cycles. ++ Date: November 11, 2005 ++ Origin: Arno Lehmann ++ Status: ++ ++ What: Make Bacula manage tape life cycle information and drive ++ cleaning cycles. ++ ++ Why: Both parts of this project are important when operating backups. ++ We need to know which tapes need replacement, and we need to ++ make sure the drives are cleaned when necessary. While many ++ tape libraries and even autoloaders can handle all this ++ automatically, support by Bacula can be helpful for smaller ++ (older) libraries and single drives. Also, checking drive ++ status during operation can prevent some failures (as I had to ++ learn the hard way...) ++ ++ Notes: First, Bacula could (and even does, to some limited extent) ++ record tape and drive usage. For tapes, the number of mounts, ++ the amount of data, and the time the tape has actually been ++ running could be recorded. Data fields for Read and Write time ++ and Nmber of mounts already exist in the catalog (I'm not sure ++ if VolBytes is the sum of all bytes ever written to that volume ++ by Bacula). This information can be important when determining ++ which media to replace. For the tape drives known to Bacula, ++ similar information is interesting to determine the device ++ status and expected life time: Time it's been Reading and ++ Writing, number of tape Loads / Unloads / Errors. This ++ information is not yet recorded as far as I know. ++ ++ The next step would be implementing drive cleaning setup. ++ Bacula already has knowledge about cleaning tapes. Once it has ++ some information about cleaning cycles (measured in drive run ++ time, number of tapes used, or calender days, for example) it ++ can automatically execute tape cleaning (with an autochanger, ++ obviously) or ask for operator assistence loading a cleaning ++ tape. ++ ++ The next step would be to implement TAPEALERT checks not only ++ when changing tapes and only sending he information to the ++ administrator, but rather checking after each tape error, ++ checking on a regular basis (for example after each tape file), ++ and also before unloading and after loading a new tape. Then, ++ depending on the drives TAPEALERT state and the know drive ++ cleaning state Bacula could automatically schedule later ++ cleaning, clean immediately, or inform the operator. ++ ++ Implementing this would perhaps require another catalog change ++ and perhaps major changes in SD code and the DIR-SD protocoll, ++ so I'd only consider this worth implementing if it would ++ actually be used or even needed by many people. ++ ++Item 14: Merging of multiple backups into a single one. (Also called Synthetic ++ Backup or Consolidation). ++ ++ Origin: Marc Cousin and Eric Bollengier ++ Date: 15 November 2005 ++ Status: Depends on first implementing project Item 1 (Migration). ++ ++ What: A merged backup is a backup made without connecting to the Client. ++ It would be a Merge of existing backups into a single backup. ++ In effect, it is like a restore but to the backup medium. ++ ++ For instance, say that last sunday we made a full backup. Then ++ all week long, we created incremental backups, in order to do ++ them fast. Now comes sunday again, and we need another full. ++ The merged backup makes it possible to do instead an incremental ++ backup (during the night for instance), and then create a merged ++ backup during the day, by using the full and incrementals from ++ the week. The merged backup will be exactly like a full made ++ sunday night on the tape, but the production interruption on the ++ Client will be minimal, as the Client will only have to send ++ incrementals. ++ ++ In fact, if it's done correctly, you could merge all the ++ Incrementals into single Incremental, or all the Incrementals ++ and the last Differential into a new Differential, or the Full, ++ last differential and all the Incrementals into a new Full ++ backup. And there is no need to involve the Client. ++ ++ Why: The benefit is that : ++ - the Client just does an incremental ; ++ - the merged backup on tape is just as a single full backup, ++ and can be restored very fast. ++ ++ This is also a way of reducing the backup data since the old ++ data can then be pruned (or not) from the catalog, possibly ++ allowing older volumes to be recycled ++ ++Item 15: Automatic disabling of devices ++ Date: 2005-11-11 ++ Origin: Peter Eriksson ++ Status: ++ ++ What: After a configurable amount of fatal errors with a tape drive ++ Bacula should automatically disable further use of a certain ++ tape drive. There should also be "disable"/"enable" commands in ++ the "bconsole" tool. ++ ++ Why: On a multi-drive jukebox there is a possibility of tape drives ++ going bad during large backups (needing a cleaning tape run, ++ tapes getting stuck). It would be advantageous if Bacula would ++ automatically disable further use of a problematic tape drive ++ after a configurable amount of errors has occured. ++ ++ An example: I have a multi-drive jukebox (6 drives, 380+ slots) ++ where tapes occasionally get stuck inside the drive. Bacula will ++ notice that the "mtx-changer" command will fail and then fail ++ any backup jobs trying to use that drive. However, it will still ++ keep on trying to run new jobs using that drive and fail - ++ forever, and thus failing lots and lots of jobs... Since we have ++ many drives Bacula could have just automatically disabled ++ further use of that drive and used one of the other ones ++ instead. ++ ++ ++Item 16: Directive/mode to backup only file changes, not entire file ++ Date: 11 November 2005 ++ Origin: Joshua Kugler ++ Marek Bajon ++ Status: RFC ++ ++ What: Currently when a file changes, the entire file will be backed up in ++ the next incremental or full backup. To save space on the tapes ++ it would be nice to have a mode whereby only the changes to the ++ file would be backed up when it is changed. ++ ++ Why: This would save lots of space when backing up large files such as ++ logs, mbox files, Outlook PST files and the like. ++ ++ Notes: This would require the usage of disk-based volumes as comparing ++ files would not be feasible using a tape drive. ++ ++Item 17: Quick release of FD-SD connection ++ Origin: Frank Volf (frank at deze dot org) ++ Date: 17 november 2005 ++ Status: ++ ++ What: In the bacula implementation a backup is finished after all data ++ and attributes are succesfully written to storage. When using a ++ tape backup it is very annoying that a backup can take a day, ++ simply because the current tape (or whatever) is full and the ++ administrator has not put a new one in. During that time the ++ system cannot be taken off-line, because there is still an open ++ session between the storage daemon and the file daemon on the ++ client. ++ ++ Although this is a very good strategey for making "safe backups" ++ This can be annoying for e.g. laptops, that must remain ++ connected until the bacukp is completed. ++ ++ Using a new feature called "migration" it will be possible to ++ spool first to harddisk (using a special 'spool' migration ++ scheme) and then migrate the backup to tape. ++ ++ There is still the problem of getting the attributes committed. ++ If it takes a very long time to do, with the current code, the ++ job has not terminated, and the File daemon is not freed up. The ++ Storage daemon should release the File daemon as soon as all the ++ file data and all the attributes have been sent to it (the SD). ++ Currently the SD waits until everything is on tape and all the ++ attributes are transmitted to the Director before signalling ++ completion to the FD. I don't think I would have any problem ++ changing this. The reason is that even if the FD reports back to ++ the Dir that all is OK, the job will not terminate until the SD ++ has done the same thing -- so in a way keeping the SD-FD link ++ open to the very end is not really very productive ... + ++ Why: Makes backup of laptops much easier. + + + ============= Empty RFC form =========== +@@ -245,33 +413,4 @@ + ============== End RFC form ============== + + +-Items completed for release 1.38.0: +-#4 Embedded Python Scripting (implemented in all Daemons) +-#5 Events that call a Python program (Implemented in all +- daemons, but more cleanup work to be done). +-#6 Select one from among Multiple Storage Devices for Job. +- This is already implemented in 1.37. +-#7 Single Job Writing to Multiple Storage Devices. This is +- currently implemented with a Clone feature. +-#- Full multiple drive Autochanger support (done in 1.37) +-#- Built in support for communications encryption (TLS) +- done by Landon Fuller. +-# Support for Unicode characters +- (via UTF-8) on Win32 machines thanks to Thorsten Engel. +-Item 8: Break the one-to-one Relationship between a Job and a +- Specific Storage Device (or Devices if #10 is implemented). +- +-Completed items from last year's list: +-Item 1: Multiple simultaneous Jobs. (done) +-Item 3: Write the bscan program -- also write a bcopy program (done). +-Item 5: Implement Label templates (done). +-Item 6: Write a regression script (done) +-Item 9: Add SSL to daemon communications (done by Landon Fuller) +-Item 10: Define definitive tape format (done) +-Item 3: GUI for interactive restore. Partially Implemented in 1.34 +- Note, there is now a complete Webmin plugin, a partial +- GNOME console, and an excellent wx-console GUI. +-Item 4: GUI for interactive backup +-Item 2: Job Data Spooling. +- Done: Regular expression matching. +-Item 10: New daemon communication protocol (this has been dropped). ++Items completed for release 1.38.0 -- see kernsdone +Index: autoconf/configure.in +=================================================================== +RCS file: /cvsroot/bacula/bacula/autoconf/configure.in,v +retrieving revision 1.184.2.4 +retrieving revision 1.184.2.5 +diff -u -r1.184.2.4 -r1.184.2.5 +--- autoconf/configure.in 13 Nov 2005 10:51:17 -0000 1.184.2.4 ++++ autoconf/configure.in 22 Nov 2005 10:50:55 -0000 1.184.2.5 +@@ -604,7 +604,7 @@ + PYTHON_LIBS= + if test "$withval" != "no"; then + if test "$withval" = "yes"; then +- for python_root in /usr /usr/local; do ++ for python_root in /usr /usr/local /usr/sfw; do + if test -f $python_root/include/python2.2/Python.h; then + PYTHON_INCDIR=-I$python_root/include/python2.2 + PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2" +Index: patches/1.38.1-to-1.38.2.patch +=================================================================== +RCS file: patches/1.38.1-to-1.38.2.patch +diff -N patches/1.38.1-to-1.38.2.patch +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ patches/1.38.1-to-1.38.2.patch 22 Nov 2005 10:52:49 -0000 1.1.2.3 +@@ -0,0 +1,6901 @@ ++ ++ This patch fixes the following bugs: ++ ++- Fix crash in tray-monitor when daemon disconnects. Bug #479. ++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator ++ says that this patch does not fix his problem) ++- Fix cancel failure bug. Bug #481 ++- Fix failure when Pool name has spaces. Bug #487 ++- Fix SD crash in autochanger code. Mutex failure. Bug #488 ++- Fix a couple of free()s in src/filed/acl.c ++- Fix memory overrun in bfile.c in building OS X resource ++ fork filename. Bug #489 ++- Add Pool name to SD status output. ++- Add Python install dir for Solaris to configure. Bug #492 ++ ++This patch is applied to Bacula source version 1.38.1 and will ++produce Bacula source version 1.38.2. Apply it with: ++ ++ cd ++ ./configure (your options) if not already done ++ patch -p0 <1.38.1-to-1.38.2.patch ++ make ++ make install ++ ++Index: ChangeLog ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/ChangeLog,v ++retrieving revision 1.154.2.7 ++retrieving revision 1.154.2.8 ++diff -u -r1.154.2.7 -r1.154.2.8 ++--- ChangeLog 15 Nov 2005 09:27:19 -0000 1.154.2.7 +++++ ChangeLog 22 Nov 2005 10:50:54 -0000 1.154.2.8 ++@@ -1,4 +1,15 @@ ++ +++Changes to 1.38.2: +++- Fix crash in tray-monitor when daemon disconnects. Bug #479. +++- Fix bnet-server bug found on OpenBSD. Bug #486 +++- Fix cancel failure bug. Bug #481 +++- Fix failure when Pool name has spaces. Bug #487 +++- Fix SD crash in autochanger code. Mutex failure. Bug #488 +++- Fix a couple of free()s in src/filed/acl.c +++- Fix memory overrun in bfile.c in building OS X resource +++ fork filename. Bug #489 +++- Add Pool name to SD status output. +++- Add Python install dir for Solaris to configure. Bug #492 ++ ++ Changes to 1.38.1: ++ - Apply SunOS patch for ACLs submitted by David Duchscher. ++Index: ReleaseNotes ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v ++retrieving revision 1.147.2.9 ++retrieving revision 1.147.2.10 ++diff -u -r1.147.2.9 -r1.147.2.10 ++--- ReleaseNotes 15 Nov 2005 09:27:19 -0000 1.147.2.9 +++++ ReleaseNotes 22 Nov 2005 10:50:54 -0000 1.147.2.10 ++@@ -1,10 +1,22 @@ ++ ++- Release Notes for Bacula 1.38.1 +++ Release Notes for Bacula 1.38.2 ++ ++ Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in) ++ 20,440 additional lines of code since version 1.36.3 ++ ++-Changes since 1.38.0: +++Changes to 1.38.2: +++- Fix crash in tray-monitor when daemon disconnects. Bug #479. +++- Fix bnet-server bug found on OpenBSD. Bug #486 +++- Fix cancel failure bug. Bug #481 +++- Fix failure when Pool name has spaces. Bug #487 +++- Fix SD crash in autochanger code. Mutex failure. Bug #488 +++- Fix a couple of free()s in src/filed/acl.c +++- Fix memory overrun in bfile.c in building OS X resource +++ fork filename. Bug #489 +++- Add Pool name to SD status output. +++- Add Python install dir for Solaris to configure. Bug #492 +++ +++Changes to 1.38.1: ++ - Corrected ACL for Solaris (David Duchscher and Attila Fulop). ++ - Add bacula_mail_summary.sh to examples directory. It makes ++ a single email summary of any number of jobs. Submitted ++Index: configure ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/configure,v ++retrieving revision 1.203.2.5 ++retrieving revision 1.203.2.6 ++diff -u -r1.203.2.5 -r1.203.2.6 ++--- configure 13 Nov 2005 10:51:17 -0000 1.203.2.5 +++++ configure 22 Nov 2005 10:50:54 -0000 1.203.2.6 ++@@ -14948,7 +14948,7 @@ ++ PYTHON_LIBS= ++ if test "$withval" != "no"; then ++ if test "$withval" = "yes"; then ++- for python_root in /usr /usr/local; do +++ for python_root in /usr /usr/local /usr/sfw; do ++ if test -f $python_root/include/python2.2/Python.h; then ++ PYTHON_INCDIR=-I$python_root/include/python2.2 ++ PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2" ++Index: kernstodo ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/kernstodo,v ++retrieving revision 1.570.2.6 ++retrieving revision 1.570.2.7 ++diff -u -r1.570.2.6 -r1.570.2.7 ++--- kernstodo 4 Nov 2005 09:16:49 -0000 1.570.2.6 +++++ kernstodo 22 Nov 2005 10:50:55 -0000 1.570.2.7 ++@@ -1,5 +1,5 @@ ++ Kern's ToDo List ++- 03 November 2005 +++ 21 November 2005 ++ ++ Major development: ++ Project Developer ++@@ -7,8 +7,6 @@ ++ Version 1.37 Kern (see below) ++ ======================================================== ++ ++-Final items for 1.37 before release: ++- ++ Document: ++ - Does ClientRunAfterJob fail the job on a bad return code? ++ - Document cleaning up the spool files: ++@@ -18,6 +16,8 @@ ++ - Does WildFile match against full name? Doc. ++ ++ For 1.39: +++- Make sure that all do_prompt() calls in Dir check for +++ -1 (error) and -2 (cancel) returns. ++ - Look at -D_FORTIFY_SOURCE=2 ++ - Add Win32 FileSet definition somewhere ++ - Look at fixing restore status stats in SD. ++@@ -27,6 +27,12 @@ ++ encountered, read many times (as it currently does), and if the ++ block cannot be read, skip to the next block, and try again. If ++ that fails, skip to the next file and try again, ... +++- Add level table: +++ create table LevelType (LevelType binary(1), LevelTypeLong tinyblob); +++ insert into LevelType (LevelType,LevelTypeLong) values +++ ("F","Full"), +++ ("D","Diff"), +++ ("I","Inc"); ++ - Add ACL to restore only to original location. ++ - Add a recursive mark command (rmark) to restore. ++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs ++@@ -1246,219 +1252,4 @@ ++ ==== ++ ++ ++-=== Done ++-- Save mount point for directories not traversed with onefs=yes. ++-- Add seconds to start and end times in the Job report output. ++-- if 2 concurrent backups are attempted on the same tape ++- drive (autoloader) into different tape pools, one of them will exit ++- fatally instead of halting until the drive is idle ++-- Update StartTime if job held in Job Queue. ++-- Look at www.nu2.nu/pebuilder as a helper for full windows ++- bare metal restore. (done by Scott) ++-- Fix orphanned buffers: ++- Orphaned buffer: 24 bytes allocated at line 808 of rufus-dir job.c ++- Orphaned buffer: 40 bytes allocated at line 45 of rufus-dir alist.c ++-- Implement Preben's suggestion to add ++- File System Types = ext2, ext3 ++- to FileSets, thus simplifying backup of *all* local partitions. ++-- Try to open a device on each Job if it was not opened ++- when the SD started. ++-- Add dump of VolSessionId/Time and FileIndex with bls. ++-- If Bacula does not find the right tape in the Autochanger, ++- then mark the tape in error and move on rather than asking ++- for operator intervention. ++-- Cancel command should include JobId in list of Jobs. ++-- Add performance testing hooks ++-- Bootstrap from JobMedia records. ++-- Implement WildFile and WildDir to solve problem of ++- saving only *.doc files. ++-- Fix ++- Please use the "label" command to create a new Volume for: ++- Storage: DDS-4-changer ++- Media type: ++- Pool: Default ++- label ++- The defined Storage resources are: ++-- Copy Changer Device and Changer Command from Autochanger ++- to Device resource in SD if none given in Device resource. ++-- 1. Automatic use of more than one drive in an autochanger (done) ++-- 2. Automatic selection of the correct drive for each Job (i.e. ++- selects a drive with an appropriate Volume for the Job) (done) ++-- 6. Allow multiple simultaneous Jobs referencing the same pool write ++- to several tapes (some new directive(s) are are probably needed for ++- this) (done) ++-- Locking (done) ++-- Key on Storage rather than Pool (done) ++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done). ++-- Synchronize multiple drives so that not more ++- than one loads a tape and any time (done) ++-- 4. Use Changer Device and Changer Command specified in the ++- Autochanger resource, if none is found in the Device resource. ++- You can continue to specify them in the Device resource if you want ++- or need them to be different for each device. ++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") ++- that can allow a Device be part of an Autochanger, and hence the changer ++- script protected, but if set to no, will prevent the Device from being ++- automatically selected from the changer. This allows the device to ++- be directly accessed through its Device name, but not through the ++- AutoChanger name. ++-#6 Select one from among Multiple Storage Devices for Job ++-#5 Events that call a Python program ++- (Implemented in Dir/SD) ++-- Make sure the Device name is in the Query packet returned. ++-- Don't start a second file job if one is already running. ++-- Implement EOF/EOV labels for ANSI labels ++-- Implement IBM labels. ++-- When Python creates a new label, the tape is immediately ++- recycled and no label created. This happens when using ++- autolabeling -- even when Python doesn't generate the name. ++-- Scratch Pool where the volumes can be re-assigned to any Pool. ++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) ++- is busy reading. Job 6 canceled. ++-- Remove separate thread for opening devices in SD. On the other ++- hand, don't block waiting for open() for devices. ++-- Fix code to either handle updating NumVol or to calculate it in ++- Dir next_vol.c ++-- Ensure that you cannot exclude a directory or a file explicitly ++- Included with File. ++-#4 Embedded Python Scripting ++- (Implemented in Dir/SD/FD) ++-- Add Python writable variable for changing the Priority, ++- Client, Storage, JobStatus (error), ... ++-- SD Python ++- - Solicit Events ++-- Add disk seeking on restore; turn off seek on tapes. ++- stored/match_bsr.c ++-- Look at dird_conf.c:1000: warning: `int size' ++- might be used uninitialized in this function ++-- Indicate when a Job is purged/pruned during restore. ++-- Implement some way to turn off automatic pruning in Jobs. ++-- Implement a way an Admin Job can prune, possibly multiple ++- clients -- Python script? ++-- Look at Preben's acl.c error handling code. ++-- SD crashes after a tape restore then doing a backup. ++-- If drive is opened read/write, close it and re-open ++- read-only if doing a restore, and vice-versa. ++-- Windows restore: ++- data-fd: RestoreFiles.2004-12-07_15.56.42 Error: ++- > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der ++- > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen ++- > Prozess verwendet wird. ++- Restore restores all files, but then fails at the end trying ++- to set the attributes of e: ++- from failed jobs.- Resolve the problem between Device name and Archive name, ++- and fix SD messages. ++-- Tell the "restore" user when browsing is no longer possible. ++-- Add a restore directory-x ++-- Write non-optimized bsrs from the JobMedia and Media records, ++- even after Files are pruned. ++-- Delete Stripe and Copy from VolParams to save space. ++-- Fix option 2 of restore -- list where file is backed up -- require Client, ++- then list last 20 backups. ++-- Finish implementation of passing all Storage and Device needs to ++- the SD. ++-- Move test for max wait time exceeded in job.c up -- Peter's idea. ++-## Consider moving docs to their own project. ++-## Move rescue to its own project. ++-- Add client version to the Client name line that prints in ++- the Job report. ++-- Fix the Rescue CDROM. ++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the ++- bottom, the link to "Tape Testing Chapter" is broken. It goes to ++- /html-manual/... while the others point to /rel-manual/... ++-- Device resource needs the "name" of the SD. ++-- Specify a single directory to restore. ++-- Implement MediaType keyword in bsr? ++-- Add a date and time stamp at the beginning of every line in the ++- Job report (Volker Sauer). ++-- Add level to estimate command. ++-- Add "limit=n" for "list jobs" ++-- Make bootstrap filename unique. ++-- Make Dmsg look at global before calling subroutine. ++-- From Chris Hull: ++- it seems to be complaining about 12:00pm which should be a valid 12 ++- hour time. I changed the time to 11:59am and everything works fine. ++- Also 12:00am works fine. 0:00pm also works (which I don't think ++- should). None of the values 12:00pm - 12:59pm work for that matter. ++-- Require restore via the restore command or make a restore Job ++- get the bootstrap file. ++-- Implement Maximum Job Spool Size ++-- Fix 3993 error in SD. It forgets to look at autochanger ++- resource for device command, ... ++-- 3. Prevent two drives requesting the same Volume in any given ++- autochanger, by checking if a Volume is mounted on another drive ++- in an Autochanger. ++-- Upgrade to MySQL 4.1.12 See: ++- http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html ++-- Add # Job Level date to bsr file ++-- Implement "PreferMountedVolumes = yes|no" in Job resource. ++-## Integrate web-bacula into a new Bacula project with ++- bimagemgr. ++-- Cleaning tapes should have Status "Cleaning" rather than append. ++-- Make sure that Python has access to Client address/port so that ++- it can check if Clients are alive. ++-- Review all items in "restore". ++-- Fix PostgreSQL GROUP BY problems in restore. ++-- Fix PostgreSQL sql problems in bugs. ++-- After rename ++- 04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume ++- "DLT-13Feb04". ++- Current Volume "DLT-04Jul05" not acceptable because: ++- 1997 Volume "DLT-13Feb04" not in catalog. ++- 04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device ++- "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02 ++-## Create a new GUI chapter explaining all the GUI programs. ++-- Make "update slots" when pointing to Autochanger, remove ++- all Volumes from other drives. "update slots all-drives"? ++- No, this is done by modifying mtx-changer to list what is ++- in the drives. ++-- Finish TLS implementation. ++-- Port limiting -m in iptables to prevent DoS attacks ++- could cause broken pipes on Bacula. ++-6. Build and test the Volume Shadow Copy (VSS) for Win32. ++-- Allow cancel of unknown Job ++-- State not saved when closing Win32 FD by icon ++-- bsr-opt-test fails. bsr deleted. Fix. ++-- Move Python daemon variables from Job to Bacula object. ++- WorkingDir, ConfigFile ++-- Document that Bootstrap files can be written with cataloging ++- turned off. ++-- Document details of ANSI/IBM labels ++-- OS linux 2.4 ++- 1) ADIC, DLT, FastStor 4000, 7*20GB ++-- Linux Sony LIB-D81, AIT-3 library works. ++-- Doc the following ++- to activate, check or disable the hardware compression feature on my ++- exb-8900 i use the exabyte "MammothTool" you can get it here: ++- http://www.exabyte.com/support/online/downloads/index.cfm ++- There is a solaris version of this tool. With option -C 0 or 1 you can ++- disable or activate compression. Start this tool without any options for ++- a small reference. ++-- Document Heartbeat Interval in the dealing with firewalls section. ++-- Document new CDROM directory. ++-- On Win32 working directory must have drive letter ???? ++-- On Win32 working directory must be writable by SYSTEM to ++- do restores. ++-- Document that ChangerDevice is used for Alert command. ++-- Add better documentation on how restores can be done ++-8. Take one more try at making DVD writing work (no go) ++-7. Write a bacula-web document ++-- Why isn't the DEVICE structure defined when doing ++- a reservation? ++-- Multi-drive changer seems to only use drive 0 ++- Multiple drives don't seem to be opened. ++-- My database is growing ++-- Call GetLastError() in the berrno constructor rather ++- than delaying until strerror. ++-- Tape xxx in drive 0, requested in drive 1 ++-- The mount command does not work with drives other than 0. ++-- A mount should cause the SD to re-examine what Slot is ++- loaded. ++-- The SD locks on to the first available drive then ++- wants a Volume that is released but in another drive -- ++- chaos. ++-- Run the regression scripts on Solaris and FreeBSD ++-- Figure out how to package gui, and rescue programs. ++-- Add a .dir command to restore tree code to eliminate the problem ++-- Mount after manually unloading changer causes hang in SD ++-- Fix JobACL with restore by JobId. +++=== Done -- see kernsdone ++Index: kes-1.38 ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/kes-1.38,v ++retrieving revision 1.1.2.13 ++retrieving revision 1.1.2.14 ++diff -u -r1.1.2.13 -r1.1.2.14 ++--- kes-1.38 14 Nov 2005 20:20:38 -0000 1.1.2.13 +++++ kes-1.38 22 Nov 2005 10:50:55 -0000 1.1.2.14 ++@@ -3,6 +3,20 @@ ++ ++ General: ++ +++Changes to 1.38.2: +++20Oct05 +++- Fix crash in tray-monitor when daemon disconnects. Bug #479. +++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator +++ says this does not fix *his* bug). +++- Fix cancel failure bug. Bug #481 +++- Fix failure when Pool name has spaces. Bug #487 +++- Fix SD crash in autochanger code. Mutex failure. Bug #488 +++- Fix a couple of free()s in src/filed/acl.c +++- Fix memory overrun in bfile.c in building OS X resource +++ fork filename. Bug #489 +++- Add Pool name to SD status output. +++- Add Python install dir for Solaris to configure. Bug #492 +++ ++ Changes to 1.38.1: ++ 14Oct05 ++ - Apply SunOS patch for ACLs submitted by David Duchscher. ++Index: projects ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/projects,v ++retrieving revision 1.12.2.3 ++retrieving revision 1.12.2.4 ++diff -u -r1.12.2.3 -r1.12.2.4 ++--- projects 10 Nov 2005 20:25:27 -0000 1.12.2.3 +++++ projects 22 Nov 2005 10:50:55 -0000 1.12.2.4 ++@@ -228,7 +228,175 @@ ++ ++ Why: Performance enhancement. ++ +++Item 13: Let Bacula log tape usage and handle drive cleaning cycles. +++ Date: November 11, 2005 +++ Origin: Arno Lehmann +++ Status: +++ +++ What: Make Bacula manage tape life cycle information and drive +++ cleaning cycles. +++ +++ Why: Both parts of this project are important when operating backups. +++ We need to know which tapes need replacement, and we need to +++ make sure the drives are cleaned when necessary. While many +++ tape libraries and even autoloaders can handle all this +++ automatically, support by Bacula can be helpful for smaller +++ (older) libraries and single drives. Also, checking drive +++ status during operation can prevent some failures (as I had to +++ learn the hard way...) +++ +++ Notes: First, Bacula could (and even does, to some limited extent) +++ record tape and drive usage. For tapes, the number of mounts, +++ the amount of data, and the time the tape has actually been +++ running could be recorded. Data fields for Read and Write time +++ and Nmber of mounts already exist in the catalog (I'm not sure +++ if VolBytes is the sum of all bytes ever written to that volume +++ by Bacula). This information can be important when determining +++ which media to replace. For the tape drives known to Bacula, +++ similar information is interesting to determine the device +++ status and expected life time: Time it's been Reading and +++ Writing, number of tape Loads / Unloads / Errors. This +++ information is not yet recorded as far as I know. +++ +++ The next step would be implementing drive cleaning setup. +++ Bacula already has knowledge about cleaning tapes. Once it has +++ some information about cleaning cycles (measured in drive run +++ time, number of tapes used, or calender days, for example) it +++ can automatically execute tape cleaning (with an autochanger, +++ obviously) or ask for operator assistence loading a cleaning +++ tape. +++ +++ The next step would be to implement TAPEALERT checks not only +++ when changing tapes and only sending he information to the +++ administrator, but rather checking after each tape error, +++ checking on a regular basis (for example after each tape file), +++ and also before unloading and after loading a new tape. Then, +++ depending on the drives TAPEALERT state and the know drive +++ cleaning state Bacula could automatically schedule later +++ cleaning, clean immediately, or inform the operator. +++ +++ Implementing this would perhaps require another catalog change +++ and perhaps major changes in SD code and the DIR-SD protocoll, +++ so I'd only consider this worth implementing if it would +++ actually be used or even needed by many people. +++ +++Item 14: Merging of multiple backups into a single one. (Also called Synthetic +++ Backup or Consolidation). +++ +++ Origin: Marc Cousin and Eric Bollengier +++ Date: 15 November 2005 +++ Status: Depends on first implementing project Item 1 (Migration). +++ +++ What: A merged backup is a backup made without connecting to the Client. +++ It would be a Merge of existing backups into a single backup. +++ In effect, it is like a restore but to the backup medium. +++ +++ For instance, say that last sunday we made a full backup. Then +++ all week long, we created incremental backups, in order to do +++ them fast. Now comes sunday again, and we need another full. +++ The merged backup makes it possible to do instead an incremental +++ backup (during the night for instance), and then create a merged +++ backup during the day, by using the full and incrementals from +++ the week. The merged backup will be exactly like a full made +++ sunday night on the tape, but the production interruption on the +++ Client will be minimal, as the Client will only have to send +++ incrementals. +++ +++ In fact, if it's done correctly, you could merge all the +++ Incrementals into single Incremental, or all the Incrementals +++ and the last Differential into a new Differential, or the Full, +++ last differential and all the Incrementals into a new Full +++ backup. And there is no need to involve the Client. +++ +++ Why: The benefit is that : +++ - the Client just does an incremental ; +++ - the merged backup on tape is just as a single full backup, +++ and can be restored very fast. +++ +++ This is also a way of reducing the backup data since the old +++ data can then be pruned (or not) from the catalog, possibly +++ allowing older volumes to be recycled +++ +++Item 15: Automatic disabling of devices +++ Date: 2005-11-11 +++ Origin: Peter Eriksson +++ Status: +++ +++ What: After a configurable amount of fatal errors with a tape drive +++ Bacula should automatically disable further use of a certain +++ tape drive. There should also be "disable"/"enable" commands in +++ the "bconsole" tool. +++ +++ Why: On a multi-drive jukebox there is a possibility of tape drives +++ going bad during large backups (needing a cleaning tape run, +++ tapes getting stuck). It would be advantageous if Bacula would +++ automatically disable further use of a problematic tape drive +++ after a configurable amount of errors has occured. +++ +++ An example: I have a multi-drive jukebox (6 drives, 380+ slots) +++ where tapes occasionally get stuck inside the drive. Bacula will +++ notice that the "mtx-changer" command will fail and then fail +++ any backup jobs trying to use that drive. However, it will still +++ keep on trying to run new jobs using that drive and fail - +++ forever, and thus failing lots and lots of jobs... Since we have +++ many drives Bacula could have just automatically disabled +++ further use of that drive and used one of the other ones +++ instead. +++ +++ +++Item 16: Directive/mode to backup only file changes, not entire file +++ Date: 11 November 2005 +++ Origin: Joshua Kugler +++ Marek Bajon +++ Status: RFC +++ +++ What: Currently when a file changes, the entire file will be backed up in +++ the next incremental or full backup. To save space on the tapes +++ it would be nice to have a mode whereby only the changes to the +++ file would be backed up when it is changed. +++ +++ Why: This would save lots of space when backing up large files such as +++ logs, mbox files, Outlook PST files and the like. +++ +++ Notes: This would require the usage of disk-based volumes as comparing +++ files would not be feasible using a tape drive. +++ +++Item 17: Quick release of FD-SD connection +++ Origin: Frank Volf (frank at deze dot org) +++ Date: 17 november 2005 +++ Status: +++ +++ What: In the bacula implementation a backup is finished after all data +++ and attributes are succesfully written to storage. When using a +++ tape backup it is very annoying that a backup can take a day, +++ simply because the current tape (or whatever) is full and the +++ administrator has not put a new one in. During that time the +++ system cannot be taken off-line, because there is still an open +++ session between the storage daemon and the file daemon on the +++ client. +++ +++ Although this is a very good strategey for making "safe backups" +++ This can be annoying for e.g. laptops, that must remain +++ connected until the bacukp is completed. +++ +++ Using a new feature called "migration" it will be possible to +++ spool first to harddisk (using a special 'spool' migration +++ scheme) and then migrate the backup to tape. +++ +++ There is still the problem of getting the attributes committed. +++ If it takes a very long time to do, with the current code, the +++ job has not terminated, and the File daemon is not freed up. The +++ Storage daemon should release the File daemon as soon as all the +++ file data and all the attributes have been sent to it (the SD). +++ Currently the SD waits until everything is on tape and all the +++ attributes are transmitted to the Director before signalling +++ completion to the FD. I don't think I would have any problem +++ changing this. The reason is that even if the FD reports back to +++ the Dir that all is OK, the job will not terminate until the SD +++ has done the same thing -- so in a way keeping the SD-FD link +++ open to the very end is not really very productive ... ++ +++ Why: Makes backup of laptops much easier. ++ ++ ++ ============= Empty RFC form =========== ++@@ -245,33 +413,4 @@ ++ ============== End RFC form ============== ++ ++ ++-Items completed for release 1.38.0: ++-#4 Embedded Python Scripting (implemented in all Daemons) ++-#5 Events that call a Python program (Implemented in all ++- daemons, but more cleanup work to be done). ++-#6 Select one from among Multiple Storage Devices for Job. ++- This is already implemented in 1.37. ++-#7 Single Job Writing to Multiple Storage Devices. This is ++- currently implemented with a Clone feature. ++-#- Full multiple drive Autochanger support (done in 1.37) ++-#- Built in support for communications encryption (TLS) ++- done by Landon Fuller. ++-# Support for Unicode characters ++- (via UTF-8) on Win32 machines thanks to Thorsten Engel. ++-Item 8: Break the one-to-one Relationship between a Job and a ++- Specific Storage Device (or Devices if #10 is implemented). ++- ++-Completed items from last year's list: ++-Item 1: Multiple simultaneous Jobs. (done) ++-Item 3: Write the bscan program -- also write a bcopy program (done). ++-Item 5: Implement Label templates (done). ++-Item 6: Write a regression script (done) ++-Item 9: Add SSL to daemon communications (done by Landon Fuller) ++-Item 10: Define definitive tape format (done) ++-Item 3: GUI for interactive restore. Partially Implemented in 1.34 ++- Note, there is now a complete Webmin plugin, a partial ++- GNOME console, and an excellent wx-console GUI. ++-Item 4: GUI for interactive backup ++-Item 2: Job Data Spooling. ++- Done: Regular expression matching. ++-Item 10: New daemon communication protocol (this has been dropped). +++Items completed for release 1.38.0 -- see kernsdone ++Index: autoconf/configure.in ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/autoconf/configure.in,v ++retrieving revision 1.184.2.4 ++retrieving revision 1.184.2.5 ++diff -u -r1.184.2.4 -r1.184.2.5 ++--- autoconf/configure.in 13 Nov 2005 10:51:17 -0000 1.184.2.4 +++++ autoconf/configure.in 22 Nov 2005 10:50:55 -0000 1.184.2.5 ++@@ -604,7 +604,7 @@ ++ PYTHON_LIBS= ++ if test "$withval" != "no"; then ++ if test "$withval" = "yes"; then ++- for python_root in /usr /usr/local; do +++ for python_root in /usr /usr/local /usr/sfw; do ++ if test -f $python_root/include/python2.2/Python.h; then ++ PYTHON_INCDIR=-I$python_root/include/python2.2 ++ PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2" ++Index: patches/1.38.1-to-1.38.2.patch ++=================================================================== ++RCS file: patches/1.38.1-to-1.38.2.patch ++diff -N patches/1.38.1-to-1.38.2.patch ++--- /dev/null 1 Jan 1970 00:00:00 -0000 +++++ patches/1.38.1-to-1.38.2.patch 22 Nov 2005 10:50:55 -0000 1.1.2.2 ++@@ -0,0 +1,5704 @@ +++ +++ This patch fixes the following bugs: +++ +++- Fix crash in tray-monitor when daemon disconnects. Bug #479. +++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator +++ says that this patch does not fix his problem) +++- Fix cancel failure bug. Bug #481 +++- Fix failure when Pool name has spaces. Bug #487 +++- Fix SD crash in autochanger code. Mutex failure. Bug #488 +++- Fix a couple of free()s in src/filed/acl.c +++- Fix memory overrun in bfile.c in building OS X resource +++ fork filename. Bug #489 +++- Add Pool name to SD status output. +++- Add Python install dir for Solaris to configure. Bug #492 +++ +++This patch is applied to Bacula source version 1.38.1 and will +++produce Bacula source version 1.38.2. Apply it with: +++ +++ cd +++ ./configure (your options) if not already done +++ patch -p0 <1.38.1-to-1.38.2.patch +++ make +++ make install +++ +++? osx_finder.patch +++Index: ChangeLog +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/ChangeLog,v +++retrieving revision 1.154.2.7 +++diff -u -r1.154.2.7 ChangeLog +++--- ChangeLog 15 Nov 2005 09:27:19 -0000 1.154.2.7 ++++++ ChangeLog 22 Nov 2005 10:42:14 -0000 +++@@ -1,4 +1,14 @@ +++ ++++Changes to 1.38.2: ++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. ++++- Fix bnet-server bug found on OpenBSD. Bug #486 ++++- Fix cancel failure bug. Bug #481 ++++- Fix failure when Pool name has spaces. Bug #487 ++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 ++++- Fix a couple of free()s in src/filed/acl.c ++++- Fix memory overrun in bfile.c in building OS X resource ++++ fork filename. Bug #489 ++++- Add Pool name to SD status output. +++ +++ Changes to 1.38.1: +++ - Apply SunOS patch for ACLs submitted by David Duchscher. +++Index: ReleaseNotes +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v +++retrieving revision 1.147.2.9 +++diff -u -r1.147.2.9 ReleaseNotes +++--- ReleaseNotes 15 Nov 2005 09:27:19 -0000 1.147.2.9 ++++++ ReleaseNotes 22 Nov 2005 10:42:15 -0000 +++@@ -1,10 +1,21 @@ +++ +++- Release Notes for Bacula 1.38.1 ++++ Release Notes for Bacula 1.38.2 +++ +++ Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in) +++ 20,440 additional lines of code since version 1.36.3 +++ +++-Changes since 1.38.0: ++++Changes to 1.38.2: ++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. ++++- Fix bnet-server bug found on OpenBSD. Bug #486 ++++- Fix cancel failure bug. Bug #481 ++++- Fix failure when Pool name has spaces. Bug #487 ++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 ++++- Fix a couple of free()s in src/filed/acl.c ++++- Fix memory overrun in bfile.c in building OS X resource ++++ fork filename. Bug #489 ++++- Add Pool name to SD status output. ++++ ++++Changes to 1.38.1: +++ - Corrected ACL for Solaris (David Duchscher and Attila Fulop). +++ - Add bacula_mail_summary.sh to examples directory. It makes +++ a single email summary of any number of jobs. Submitted +++Index: configure +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/configure,v +++retrieving revision 1.203.2.5 +++diff -u -r1.203.2.5 configure +++--- configure 13 Nov 2005 10:51:17 -0000 1.203.2.5 ++++++ configure 22 Nov 2005 10:42:19 -0000 +++@@ -14948,7 +14948,7 @@ +++ PYTHON_LIBS= +++ if test "$withval" != "no"; then +++ if test "$withval" = "yes"; then +++- for python_root in /usr /usr/local; do ++++ for python_root in /usr /usr/local /usr/sfw; do +++ if test -f $python_root/include/python2.2/Python.h; then +++ PYTHON_INCDIR=-I$python_root/include/python2.2 +++ PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2" +++Index: kernstodo +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/kernstodo,v +++retrieving revision 1.570.2.6 +++diff -u -r1.570.2.6 kernstodo +++--- kernstodo 4 Nov 2005 09:16:49 -0000 1.570.2.6 ++++++ kernstodo 22 Nov 2005 10:42:20 -0000 +++@@ -1,5 +1,5 @@ +++ Kern's ToDo List +++- 03 November 2005 ++++ 21 November 2005 +++ +++ Major development: +++ Project Developer +++@@ -7,8 +7,6 @@ +++ Version 1.37 Kern (see below) +++ ======================================================== +++ +++-Final items for 1.37 before release: +++- +++ Document: +++ - Does ClientRunAfterJob fail the job on a bad return code? +++ - Document cleaning up the spool files: +++@@ -18,6 +16,8 @@ +++ - Does WildFile match against full name? Doc. +++ +++ For 1.39: ++++- Make sure that all do_prompt() calls in Dir check for ++++ -1 (error) and -2 (cancel) returns. +++ - Look at -D_FORTIFY_SOURCE=2 +++ - Add Win32 FileSet definition somewhere +++ - Look at fixing restore status stats in SD. +++@@ -27,6 +27,12 @@ +++ encountered, read many times (as it currently does), and if the +++ block cannot be read, skip to the next block, and try again. If +++ that fails, skip to the next file and try again, ... ++++- Add level table: ++++ create table LevelType (LevelType binary(1), LevelTypeLong tinyblob); ++++ insert into LevelType (LevelType,LevelTypeLong) values ++++ ("F","Full"), ++++ ("D","Diff"), ++++ ("I","Inc"); +++ - Add ACL to restore only to original location. +++ - Add a recursive mark command (rmark) to restore. +++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs +++@@ -1246,219 +1252,4 @@ +++ ==== +++ +++ +++-=== Done +++-- Save mount point for directories not traversed with onefs=yes. +++-- Add seconds to start and end times in the Job report output. +++-- if 2 concurrent backups are attempted on the same tape +++- drive (autoloader) into different tape pools, one of them will exit +++- fatally instead of halting until the drive is idle +++-- Update StartTime if job held in Job Queue. +++-- Look at www.nu2.nu/pebuilder as a helper for full windows +++- bare metal restore. (done by Scott) +++-- Fix orphanned buffers: +++- Orphaned buffer: 24 bytes allocated at line 808 of rufus-dir job.c +++- Orphaned buffer: 40 bytes allocated at line 45 of rufus-dir alist.c +++-- Implement Preben's suggestion to add +++- File System Types = ext2, ext3 +++- to FileSets, thus simplifying backup of *all* local partitions. +++-- Try to open a device on each Job if it was not opened +++- when the SD started. +++-- Add dump of VolSessionId/Time and FileIndex with bls. +++-- If Bacula does not find the right tape in the Autochanger, +++- then mark the tape in error and move on rather than asking +++- for operator intervention. +++-- Cancel command should include JobId in list of Jobs. +++-- Add performance testing hooks +++-- Bootstrap from JobMedia records. +++-- Implement WildFile and WildDir to solve problem of +++- saving only *.doc files. +++-- Fix +++- Please use the "label" command to create a new Volume for: +++- Storage: DDS-4-changer +++- Media type: +++- Pool: Default +++- label +++- The defined Storage resources are: +++-- Copy Changer Device and Changer Command from Autochanger +++- to Device resource in SD if none given in Device resource. +++-- 1. Automatic use of more than one drive in an autochanger (done) +++-- 2. Automatic selection of the correct drive for each Job (i.e. +++- selects a drive with an appropriate Volume for the Job) (done) +++-- 6. Allow multiple simultaneous Jobs referencing the same pool write +++- to several tapes (some new directive(s) are are probably needed for +++- this) (done) +++-- Locking (done) +++-- Key on Storage rather than Pool (done) +++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done). +++-- Synchronize multiple drives so that not more +++- than one loads a tape and any time (done) +++-- 4. Use Changer Device and Changer Command specified in the +++- Autochanger resource, if none is found in the Device resource. +++- You can continue to specify them in the Device resource if you want +++- or need them to be different for each device. +++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") +++- that can allow a Device be part of an Autochanger, and hence the changer +++- script protected, but if set to no, will prevent the Device from being +++- automatically selected from the changer. This allows the device to +++- be directly accessed through its Device name, but not through the +++- AutoChanger name. +++-#6 Select one from among Multiple Storage Devices for Job +++-#5 Events that call a Python program +++- (Implemented in Dir/SD) +++-- Make sure the Device name is in the Query packet returned. +++-- Don't start a second file job if one is already running. +++-- Implement EOF/EOV labels for ANSI labels +++-- Implement IBM labels. +++-- When Python creates a new label, the tape is immediately +++- recycled and no label created. This happens when using +++- autolabeling -- even when Python doesn't generate the name. +++-- Scratch Pool where the volumes can be re-assigned to any Pool. +++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) +++- is busy reading. Job 6 canceled. +++-- Remove separate thread for opening devices in SD. On the other +++- hand, don't block waiting for open() for devices. +++-- Fix code to either handle updating NumVol or to calculate it in +++- Dir next_vol.c +++-- Ensure that you cannot exclude a directory or a file explicitly +++- Included with File. +++-#4 Embedded Python Scripting +++- (Implemented in Dir/SD/FD) +++-- Add Python writable variable for changing the Priority, +++- Client, Storage, JobStatus (error), ... +++-- SD Python +++- - Solicit Events +++-- Add disk seeking on restore; turn off seek on tapes. +++- stored/match_bsr.c +++-- Look at dird_conf.c:1000: warning: `int size' +++- might be used uninitialized in this function +++-- Indicate when a Job is purged/pruned during restore. +++-- Implement some way to turn off automatic pruning in Jobs. +++-- Implement a way an Admin Job can prune, possibly multiple +++- clients -- Python script? +++-- Look at Preben's acl.c error handling code. +++-- SD crashes after a tape restore then doing a backup. +++-- If drive is opened read/write, close it and re-open +++- read-only if doing a restore, and vice-versa. +++-- Windows restore: +++- data-fd: RestoreFiles.2004-12-07_15.56.42 Error: +++- > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der +++- > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen +++- > Prozess verwendet wird. +++- Restore restores all files, but then fails at the end trying +++- to set the attributes of e: +++- from failed jobs.- Resolve the problem between Device name and Archive name, +++- and fix SD messages. +++-- Tell the "restore" user when browsing is no longer possible. +++-- Add a restore directory-x +++-- Write non-optimized bsrs from the JobMedia and Media records, +++- even after Files are pruned. +++-- Delete Stripe and Copy from VolParams to save space. +++-- Fix option 2 of restore -- list where file is backed up -- require Client, +++- then list last 20 backups. +++-- Finish implementation of passing all Storage and Device needs to +++- the SD. +++-- Move test for max wait time exceeded in job.c up -- Peter's idea. +++-## Consider moving docs to their own project. +++-## Move rescue to its own project. +++-- Add client version to the Client name line that prints in +++- the Job report. +++-- Fix the Rescue CDROM. +++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the +++- bottom, the link to "Tape Testing Chapter" is broken. It goes to +++- /html-manual/... while the others point to /rel-manual/... +++-- Device resource needs the "name" of the SD. +++-- Specify a single directory to restore. +++-- Implement MediaType keyword in bsr? +++-- Add a date and time stamp at the beginning of every line in the +++- Job report (Volker Sauer). +++-- Add level to estimate command. +++-- Add "limit=n" for "list jobs" +++-- Make bootstrap filename unique. +++-- Make Dmsg look at global before calling subroutine. +++-- From Chris Hull: +++- it seems to be complaining about 12:00pm which should be a valid 12 +++- hour time. I changed the time to 11:59am and everything works fine. +++- Also 12:00am works fine. 0:00pm also works (which I don't think +++- should). None of the values 12:00pm - 12:59pm work for that matter. +++-- Require restore via the restore command or make a restore Job +++- get the bootstrap file. +++-- Implement Maximum Job Spool Size +++-- Fix 3993 error in SD. It forgets to look at autochanger +++- resource for device command, ... +++-- 3. Prevent two drives requesting the same Volume in any given +++- autochanger, by checking if a Volume is mounted on another drive +++- in an Autochanger. +++-- Upgrade to MySQL 4.1.12 See: +++- http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html +++-- Add # Job Level date to bsr file +++-- Implement "PreferMountedVolumes = yes|no" in Job resource. +++-## Integrate web-bacula into a new Bacula project with +++- bimagemgr. +++-- Cleaning tapes should have Status "Cleaning" rather than append. +++-- Make sure that Python has access to Client address/port so that +++- it can check if Clients are alive. +++-- Review all items in "restore". +++-- Fix PostgreSQL GROUP BY problems in restore. +++-- Fix PostgreSQL sql problems in bugs. +++-- After rename +++- 04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume +++- "DLT-13Feb04". +++- Current Volume "DLT-04Jul05" not acceptable because: +++- 1997 Volume "DLT-13Feb04" not in catalog. +++- 04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device +++- "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02 +++-## Create a new GUI chapter explaining all the GUI programs. +++-- Make "update slots" when pointing to Autochanger, remove +++- all Volumes from other drives. "update slots all-drives"? +++- No, this is done by modifying mtx-changer to list what is +++- in the drives. +++-- Finish TLS implementation. +++-- Port limiting -m in iptables to prevent DoS attacks +++- could cause broken pipes on Bacula. +++-6. Build and test the Volume Shadow Copy (VSS) for Win32. +++-- Allow cancel of unknown Job +++-- State not saved when closing Win32 FD by icon +++-- bsr-opt-test fails. bsr deleted. Fix. +++-- Move Python daemon variables from Job to Bacula object. +++- WorkingDir, ConfigFile +++-- Document that Bootstrap files can be written with cataloging +++- turned off. +++-- Document details of ANSI/IBM labels +++-- OS linux 2.4 +++- 1) ADIC, DLT, FastStor 4000, 7*20GB +++-- Linux Sony LIB-D81, AIT-3 library works. +++-- Doc the following +++- to activate, check or disable the hardware compression feature on my +++- exb-8900 i use the exabyte "MammothTool" you can get it here: +++- http://www.exabyte.com/support/online/downloads/index.cfm +++- There is a solaris version of this tool. With option -C 0 or 1 you can +++- disable or activate compression. Start this tool without any options for +++- a small reference. +++-- Document Heartbeat Interval in the dealing with firewalls section. +++-- Document new CDROM directory. +++-- On Win32 working directory must have drive letter ???? +++-- On Win32 working directory must be writable by SYSTEM to +++- do restores. +++-- Document that ChangerDevice is used for Alert command. +++-- Add better documentation on how restores can be done +++-8. Take one more try at making DVD writing work (no go) +++-7. Write a bacula-web document +++-- Why isn't the DEVICE structure defined when doing +++- a reservation? +++-- Multi-drive changer seems to only use drive 0 +++- Multiple drives don't seem to be opened. +++-- My database is growing +++-- Call GetLastError() in the berrno constructor rather +++- than delaying until strerror. +++-- Tape xxx in drive 0, requested in drive 1 +++-- The mount command does not work with drives other than 0. +++-- A mount should cause the SD to re-examine what Slot is +++- loaded. +++-- The SD locks on to the first available drive then +++- wants a Volume that is released but in another drive -- +++- chaos. +++-- Run the regression scripts on Solaris and FreeBSD +++-- Figure out how to package gui, and rescue programs. +++-- Add a .dir command to restore tree code to eliminate the problem +++-- Mount after manually unloading changer causes hang in SD +++-- Fix JobACL with restore by JobId. ++++=== Done -- see kernsdone +++Index: kes-1.38 +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/kes-1.38,v +++retrieving revision 1.1.2.13 +++diff -u -r1.1.2.13 kes-1.38 +++--- kes-1.38 14 Nov 2005 20:20:38 -0000 1.1.2.13 ++++++ kes-1.38 22 Nov 2005 10:42:20 -0000 +++@@ -3,6 +3,19 @@ +++ +++ General: +++ ++++Changes to 1.38.2: ++++20Oct05 ++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. ++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator ++++ says this does not fix *his* bug). ++++- Fix cancel failure bug. Bug #481 ++++- Fix failure when Pool name has spaces. Bug #487 ++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 ++++- Fix a couple of free()s in src/filed/acl.c ++++- Fix memory overrun in bfile.c in building OS X resource ++++ fork filename. Bug #489 ++++- Add Pool name to SD status output. ++++ +++ Changes to 1.38.1: +++ 14Oct05 +++ - Apply SunOS patch for ACLs submitted by David Duchscher. +++Index: projects +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/projects,v +++retrieving revision 1.12.2.3 +++diff -u -r1.12.2.3 projects +++--- projects 10 Nov 2005 20:25:27 -0000 1.12.2.3 ++++++ projects 22 Nov 2005 10:42:20 -0000 +++@@ -228,7 +228,175 @@ +++ +++ Why: Performance enhancement. +++ ++++Item 13: Let Bacula log tape usage and handle drive cleaning cycles. ++++ Date: November 11, 2005 ++++ Origin: Arno Lehmann ++++ Status: ++++ ++++ What: Make Bacula manage tape life cycle information and drive ++++ cleaning cycles. ++++ ++++ Why: Both parts of this project are important when operating backups. ++++ We need to know which tapes need replacement, and we need to ++++ make sure the drives are cleaned when necessary. While many ++++ tape libraries and even autoloaders can handle all this ++++ automatically, support by Bacula can be helpful for smaller ++++ (older) libraries and single drives. Also, checking drive ++++ status during operation can prevent some failures (as I had to ++++ learn the hard way...) ++++ ++++ Notes: First, Bacula could (and even does, to some limited extent) ++++ record tape and drive usage. For tapes, the number of mounts, ++++ the amount of data, and the time the tape has actually been ++++ running could be recorded. Data fields for Read and Write time ++++ and Nmber of mounts already exist in the catalog (I'm not sure ++++ if VolBytes is the sum of all bytes ever written to that volume ++++ by Bacula). This information can be important when determining ++++ which media to replace. For the tape drives known to Bacula, ++++ similar information is interesting to determine the device ++++ status and expected life time: Time it's been Reading and ++++ Writing, number of tape Loads / Unloads / Errors. This ++++ information is not yet recorded as far as I know. ++++ ++++ The next step would be implementing drive cleaning setup. ++++ Bacula already has knowledge about cleaning tapes. Once it has ++++ some information about cleaning cycles (measured in drive run ++++ time, number of tapes used, or calender days, for example) it ++++ can automatically execute tape cleaning (with an autochanger, ++++ obviously) or ask for operator assistence loading a cleaning ++++ tape. ++++ ++++ The next step would be to implement TAPEALERT checks not only ++++ when changing tapes and only sending he information to the ++++ administrator, but rather checking after each tape error, ++++ checking on a regular basis (for example after each tape file), ++++ and also before unloading and after loading a new tape. Then, ++++ depending on the drives TAPEALERT state and the know drive ++++ cleaning state Bacula could automatically schedule later ++++ cleaning, clean immediately, or inform the operator. ++++ ++++ Implementing this would perhaps require another catalog change ++++ and perhaps major changes in SD code and the DIR-SD protocoll, ++++ so I'd only consider this worth implementing if it would ++++ actually be used or even needed by many people. ++++ ++++Item 14: Merging of multiple backups into a single one. (Also called Synthetic ++++ Backup or Consolidation). ++++ ++++ Origin: Marc Cousin and Eric Bollengier ++++ Date: 15 November 2005 ++++ Status: Depends on first implementing project Item 1 (Migration). ++++ ++++ What: A merged backup is a backup made without connecting to the Client. ++++ It would be a Merge of existing backups into a single backup. ++++ In effect, it is like a restore but to the backup medium. ++++ ++++ For instance, say that last sunday we made a full backup. Then ++++ all week long, we created incremental backups, in order to do ++++ them fast. Now comes sunday again, and we need another full. ++++ The merged backup makes it possible to do instead an incremental ++++ backup (during the night for instance), and then create a merged ++++ backup during the day, by using the full and incrementals from ++++ the week. The merged backup will be exactly like a full made ++++ sunday night on the tape, but the production interruption on the ++++ Client will be minimal, as the Client will only have to send ++++ incrementals. ++++ ++++ In fact, if it's done correctly, you could merge all the ++++ Incrementals into single Incremental, or all the Incrementals ++++ and the last Differential into a new Differential, or the Full, ++++ last differential and all the Incrementals into a new Full ++++ backup. And there is no need to involve the Client. ++++ ++++ Why: The benefit is that : ++++ - the Client just does an incremental ; ++++ - the merged backup on tape is just as a single full backup, ++++ and can be restored very fast. ++++ ++++ This is also a way of reducing the backup data since the old ++++ data can then be pruned (or not) from the catalog, possibly ++++ allowing older volumes to be recycled ++++ ++++Item 15: Automatic disabling of devices ++++ Date: 2005-11-11 ++++ Origin: Peter Eriksson ++++ Status: ++++ ++++ What: After a configurable amount of fatal errors with a tape drive ++++ Bacula should automatically disable further use of a certain ++++ tape drive. There should also be "disable"/"enable" commands in ++++ the "bconsole" tool. ++++ ++++ Why: On a multi-drive jukebox there is a possibility of tape drives ++++ going bad during large backups (needing a cleaning tape run, ++++ tapes getting stuck). It would be advantageous if Bacula would ++++ automatically disable further use of a problematic tape drive ++++ after a configurable amount of errors has occured. ++++ ++++ An example: I have a multi-drive jukebox (6 drives, 380+ slots) ++++ where tapes occasionally get stuck inside the drive. Bacula will ++++ notice that the "mtx-changer" command will fail and then fail ++++ any backup jobs trying to use that drive. However, it will still ++++ keep on trying to run new jobs using that drive and fail - ++++ forever, and thus failing lots and lots of jobs... Since we have ++++ many drives Bacula could have just automatically disabled ++++ further use of that drive and used one of the other ones ++++ instead. ++++ ++++ ++++Item 16: Directive/mode to backup only file changes, not entire file ++++ Date: 11 November 2005 ++++ Origin: Joshua Kugler ++++ Marek Bajon ++++ Status: RFC ++++ ++++ What: Currently when a file changes, the entire file will be backed up in ++++ the next incremental or full backup. To save space on the tapes ++++ it would be nice to have a mode whereby only the changes to the ++++ file would be backed up when it is changed. ++++ ++++ Why: This would save lots of space when backing up large files such as ++++ logs, mbox files, Outlook PST files and the like. ++++ ++++ Notes: This would require the usage of disk-based volumes as comparing ++++ files would not be feasible using a tape drive. ++++ ++++Item 17: Quick release of FD-SD connection ++++ Origin: Frank Volf (frank at deze dot org) ++++ Date: 17 november 2005 ++++ Status: ++++ ++++ What: In the bacula implementation a backup is finished after all data ++++ and attributes are succesfully written to storage. When using a ++++ tape backup it is very annoying that a backup can take a day, ++++ simply because the current tape (or whatever) is full and the ++++ administrator has not put a new one in. During that time the ++++ system cannot be taken off-line, because there is still an open ++++ session between the storage daemon and the file daemon on the ++++ client. ++++ ++++ Although this is a very good strategey for making "safe backups" ++++ This can be annoying for e.g. laptops, that must remain ++++ connected until the bacukp is completed. ++++ ++++ Using a new feature called "migration" it will be possible to ++++ spool first to harddisk (using a special 'spool' migration ++++ scheme) and then migrate the backup to tape. ++++ ++++ There is still the problem of getting the attributes committed. ++++ If it takes a very long time to do, with the current code, the ++++ job has not terminated, and the File daemon is not freed up. The ++++ Storage daemon should release the File daemon as soon as all the ++++ file data and all the attributes have been sent to it (the SD). ++++ Currently the SD waits until everything is on tape and all the ++++ attributes are transmitted to the Director before signalling ++++ completion to the FD. I don't think I would have any problem ++++ changing this. The reason is that even if the FD reports back to ++++ the Dir that all is OK, the job will not terminate until the SD ++++ has done the same thing -- so in a way keeping the SD-FD link ++++ open to the very end is not really very productive ... +++ ++++ Why: Makes backup of laptops much easier. +++ +++ +++ ============= Empty RFC form =========== +++@@ -245,33 +413,4 @@ +++ ============== End RFC form ============== +++ +++ +++-Items completed for release 1.38.0: +++-#4 Embedded Python Scripting (implemented in all Daemons) +++-#5 Events that call a Python program (Implemented in all +++- daemons, but more cleanup work to be done). +++-#6 Select one from among Multiple Storage Devices for Job. +++- This is already implemented in 1.37. +++-#7 Single Job Writing to Multiple Storage Devices. This is +++- currently implemented with a Clone feature. +++-#- Full multiple drive Autochanger support (done in 1.37) +++-#- Built in support for communications encryption (TLS) +++- done by Landon Fuller. +++-# Support for Unicode characters +++- (via UTF-8) on Win32 machines thanks to Thorsten Engel. +++-Item 8: Break the one-to-one Relationship between a Job and a +++- Specific Storage Device (or Devices if #10 is implemented). +++- +++-Completed items from last year's list: +++-Item 1: Multiple simultaneous Jobs. (done) +++-Item 3: Write the bscan program -- also write a bcopy program (done). +++-Item 5: Implement Label templates (done). +++-Item 6: Write a regression script (done) +++-Item 9: Add SSL to daemon communications (done by Landon Fuller) +++-Item 10: Define definitive tape format (done) +++-Item 3: GUI for interactive restore. Partially Implemented in 1.34 +++- Note, there is now a complete Webmin plugin, a partial +++- GNOME console, and an excellent wx-console GUI. +++-Item 4: GUI for interactive backup +++-Item 2: Job Data Spooling. +++- Done: Regular expression matching. +++-Item 10: New daemon communication protocol (this has been dropped). ++++Items completed for release 1.38.0 -- see kernsdone +++Index: autoconf/configure.in +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/autoconf/configure.in,v +++retrieving revision 1.184.2.4 +++diff -u -r1.184.2.4 configure.in +++--- autoconf/configure.in 13 Nov 2005 10:51:17 -0000 1.184.2.4 ++++++ autoconf/configure.in 22 Nov 2005 10:42:21 -0000 +++@@ -604,7 +604,7 @@ +++ PYTHON_LIBS= +++ if test "$withval" != "no"; then +++ if test "$withval" = "yes"; then +++- for python_root in /usr /usr/local; do ++++ for python_root in /usr /usr/local /usr/sfw; do +++ if test -f $python_root/include/python2.2/Python.h; then +++ PYTHON_INCDIR=-I$python_root/include/python2.2 +++ PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2" +++Index: patches/1.38.1-to-1.38.2.patch +++=================================================================== +++RCS file: patches/1.38.1-to-1.38.2.patch +++diff -N patches/1.38.1-to-1.38.2.patch +++--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++++ patches/1.38.1-to-1.38.2.patch 22 Nov 2005 10:42:22 -0000 +++@@ -0,0 +1,4586 @@ ++++ ++++ This patch fixes the following bugs: ++++ ++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. ++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator ++++ says that this patch does not fix his problem) ++++- Fix cancel failure bug. Bug #481 ++++- Fix failure when Pool name has spaces. Bug #487 ++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 ++++- Fix a couple of free()s in src/filed/acl.c ++++- Fix memory overrun in bfile.c in building OS X resource ++++ fork filename. Bug #489 ++++ ++++This patch is applied to Bacula source version 1.38.1 and will ++++produce Bacula source version 1.38.2. Apply it with: ++++ ++++ cd ++++ ./configure (your options) if not already done ++++ patch -p0 <1.38.1-to-1.38.2.patch ++++ make ++++ make install ++++ ++++? osx_finder.patch ++++Index: ChangeLog ++++=================================================================== ++++RCS file: /cvsroot/bacula/bacula/ChangeLog,v ++++retrieving revision 1.154.2.7 ++++diff -u -r1.154.2.7 ChangeLog ++++--- ChangeLog 15 Nov 2005 09:27:19 -0000 1.154.2.7 +++++++ ChangeLog 21 Nov 2005 18:19:03 -0000 ++++@@ -1,4 +1,14 @@ ++++ +++++Changes to 1.38.2: +++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. +++++- Fix bnet-server bug found on OpenBSD. Bug #486 +++++- Fix cancel failure bug. Bug #481 +++++- Fix failure when Pool name has spaces. Bug #487 +++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 +++++- Fix a couple of free()s in src/filed/acl.c +++++- Fix memory overrun in bfile.c in building OS X resource +++++ fork filename. Bug #489 +++++- Add Pool name to SD status output. ++++ ++++ Changes to 1.38.1: ++++ - Apply SunOS patch for ACLs submitted by David Duchscher. ++++Index: ReleaseNotes ++++=================================================================== ++++RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v ++++retrieving revision 1.147.2.9 ++++diff -u -r1.147.2.9 ReleaseNotes ++++--- ReleaseNotes 15 Nov 2005 09:27:19 -0000 1.147.2.9 +++++++ ReleaseNotes 21 Nov 2005 18:19:04 -0000 ++++@@ -1,10 +1,21 @@ ++++ ++++- Release Notes for Bacula 1.38.1 +++++ Release Notes for Bacula 1.38.2 ++++ ++++ Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in) ++++ 20,440 additional lines of code since version 1.36.3 ++++ ++++-Changes since 1.38.0: +++++Changes to 1.38.2: +++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. +++++- Fix bnet-server bug found on OpenBSD. Bug #486 +++++- Fix cancel failure bug. Bug #481 +++++- Fix failure when Pool name has spaces. Bug #487 +++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 +++++- Fix a couple of free()s in src/filed/acl.c +++++- Fix memory overrun in bfile.c in building OS X resource +++++ fork filename. Bug #489 +++++- Add Pool name to SD status output. +++++ +++++Changes to 1.38.1: ++++ - Corrected ACL for Solaris (David Duchscher and Attila Fulop). ++++ - Add bacula_mail_summary.sh to examples directory. It makes ++++ a single email summary of any number of jobs. Submitted ++++Index: kernstodo ++++=================================================================== ++++RCS file: /cvsroot/bacula/bacula/kernstodo,v ++++retrieving revision 1.570.2.6 ++++diff -u -r1.570.2.6 kernstodo ++++--- kernstodo 4 Nov 2005 09:16:49 -0000 1.570.2.6 +++++++ kernstodo 21 Nov 2005 18:19:04 -0000 ++++@@ -1,5 +1,5 @@ ++++ Kern's ToDo List ++++- 03 November 2005 +++++ 21 November 2005 ++++ ++++ Major development: ++++ Project Developer ++++@@ -7,8 +7,6 @@ ++++ Version 1.37 Kern (see below) ++++ ======================================================== ++++ ++++-Final items for 1.37 before release: ++++- ++++ Document: ++++ - Does ClientRunAfterJob fail the job on a bad return code? ++++ - Document cleaning up the spool files: ++++@@ -18,6 +16,8 @@ ++++ - Does WildFile match against full name? Doc. ++++ ++++ For 1.39: +++++- Make sure that all do_prompt() calls in Dir check for +++++ -1 (error) and -2 (cancel) returns. ++++ - Look at -D_FORTIFY_SOURCE=2 ++++ - Add Win32 FileSet definition somewhere ++++ - Look at fixing restore status stats in SD. ++++@@ -27,6 +27,12 @@ ++++ encountered, read many times (as it currently does), and if the ++++ block cannot be read, skip to the next block, and try again. If ++++ that fails, skip to the next file and try again, ... +++++- Add level table: +++++ create table LevelType (LevelType binary(1), LevelTypeLong tinyblob); +++++ insert into LevelType (LevelType,LevelTypeLong) values +++++ ("F","Full"), +++++ ("D","Diff"), +++++ ("I","Inc"); ++++ - Add ACL to restore only to original location. ++++ - Add a recursive mark command (rmark) to restore. ++++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs ++++@@ -1246,219 +1252,4 @@ ++++ ==== ++++ ++++ ++++-=== Done ++++-- Save mount point for directories not traversed with onefs=yes. ++++-- Add seconds to start and end times in the Job report output. ++++-- if 2 concurrent backups are attempted on the same tape ++++- drive (autoloader) into different tape pools, one of them will exit ++++- fatally instead of halting until the drive is idle ++++-- Update StartTime if job held in Job Queue. ++++-- Look at www.nu2.nu/pebuilder as a helper for full windows ++++- bare metal restore. (done by Scott) ++++-- Fix orphanned buffers: ++++- Orphaned buffer: 24 bytes allocated at line 808 of rufus-dir job.c ++++- Orphaned buffer: 40 bytes allocated at line 45 of rufus-dir alist.c ++++-- Implement Preben's suggestion to add ++++- File System Types = ext2, ext3 ++++- to FileSets, thus simplifying backup of *all* local partitions. ++++-- Try to open a device on each Job if it was not opened ++++- when the SD started. ++++-- Add dump of VolSessionId/Time and FileIndex with bls. ++++-- If Bacula does not find the right tape in the Autochanger, ++++- then mark the tape in error and move on rather than asking ++++- for operator intervention. ++++-- Cancel command should include JobId in list of Jobs. ++++-- Add performance testing hooks ++++-- Bootstrap from JobMedia records. ++++-- Implement WildFile and WildDir to solve problem of ++++- saving only *.doc files. ++++-- Fix ++++- Please use the "label" command to create a new Volume for: ++++- Storage: DDS-4-changer ++++- Media type: ++++- Pool: Default ++++- label ++++- The defined Storage resources are: ++++-- Copy Changer Device and Changer Command from Autochanger ++++- to Device resource in SD if none given in Device resource. ++++-- 1. Automatic use of more than one drive in an autochanger (done) ++++-- 2. Automatic selection of the correct drive for each Job (i.e. ++++- selects a drive with an appropriate Volume for the Job) (done) ++++-- 6. Allow multiple simultaneous Jobs referencing the same pool write ++++- to several tapes (some new directive(s) are are probably needed for ++++- this) (done) ++++-- Locking (done) ++++-- Key on Storage rather than Pool (done) ++++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done). ++++-- Synchronize multiple drives so that not more ++++- than one loads a tape and any time (done) ++++-- 4. Use Changer Device and Changer Command specified in the ++++- Autochanger resource, if none is found in the Device resource. ++++- You can continue to specify them in the Device resource if you want ++++- or need them to be different for each device. ++++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") ++++- that can allow a Device be part of an Autochanger, and hence the changer ++++- script protected, but if set to no, will prevent the Device from being ++++- automatically selected from the changer. This allows the device to ++++- be directly accessed through its Device name, but not through the ++++- AutoChanger name. ++++-#6 Select one from among Multiple Storage Devices for Job ++++-#5 Events that call a Python program ++++- (Implemented in Dir/SD) ++++-- Make sure the Device name is in the Query packet returned. ++++-- Don't start a second file job if one is already running. ++++-- Implement EOF/EOV labels for ANSI labels ++++-- Implement IBM labels. ++++-- When Python creates a new label, the tape is immediately ++++- recycled and no label created. This happens when using ++++- autolabeling -- even when Python doesn't generate the name. ++++-- Scratch Pool where the volumes can be re-assigned to any Pool. ++++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) ++++- is busy reading. Job 6 canceled. ++++-- Remove separate thread for opening devices in SD. On the other ++++- hand, don't block waiting for open() for devices. ++++-- Fix code to either handle updating NumVol or to calculate it in ++++- Dir next_vol.c ++++-- Ensure that you cannot exclude a directory or a file explicitly ++++- Included with File. ++++-#4 Embedded Python Scripting ++++- (Implemented in Dir/SD/FD) ++++-- Add Python writable variable for changing the Priority, ++++- Client, Storage, JobStatus (error), ... ++++-- SD Python ++++- - Solicit Events ++++-- Add disk seeking on restore; turn off seek on tapes. ++++- stored/match_bsr.c ++++-- Look at dird_conf.c:1000: warning: `int size' ++++- might be used uninitialized in this function ++++-- Indicate when a Job is purged/pruned during restore. ++++-- Implement some way to turn off automatic pruning in Jobs. ++++-- Implement a way an Admin Job can prune, possibly multiple ++++- clients -- Python script? ++++-- Look at Preben's acl.c error handling code. ++++-- SD crashes after a tape restore then doing a backup. ++++-- If drive is opened read/write, close it and re-open ++++- read-only if doing a restore, and vice-versa. ++++-- Windows restore: ++++- data-fd: RestoreFiles.2004-12-07_15.56.42 Error: ++++- > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der ++++- > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen ++++- > Prozess verwendet wird. ++++- Restore restores all files, but then fails at the end trying ++++- to set the attributes of e: ++++- from failed jobs.- Resolve the problem between Device name and Archive name, ++++- and fix SD messages. ++++-- Tell the "restore" user when browsing is no longer possible. ++++-- Add a restore directory-x ++++-- Write non-optimized bsrs from the JobMedia and Media records, ++++- even after Files are pruned. ++++-- Delete Stripe and Copy from VolParams to save space. ++++-- Fix option 2 of restore -- list where file is backed up -- require Client, ++++- then list last 20 backups. ++++-- Finish implementation of passing all Storage and Device needs to ++++- the SD. ++++-- Move test for max wait time exceeded in job.c up -- Peter's idea. ++++-## Consider moving docs to their own project. ++++-## Move rescue to its own project. ++++-- Add client version to the Client name line that prints in ++++- the Job report. ++++-- Fix the Rescue CDROM. ++++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the ++++- bottom, the link to "Tape Testing Chapter" is broken. It goes to ++++- /html-manual/... while the others point to /rel-manual/... ++++-- Device resource needs the "name" of the SD. ++++-- Specify a single directory to restore. ++++-- Implement MediaType keyword in bsr? ++++-- Add a date and time stamp at the beginning of every line in the ++++- Job report (Volker Sauer). ++++-- Add level to estimate command. ++++-- Add "limit=n" for "list jobs" ++++-- Make bootstrap filename unique. ++++-- Make Dmsg look at global before calling subroutine. ++++-- From Chris Hull: ++++- it seems to be complaining about 12:00pm which should be a valid 12 ++++- hour time. I changed the time to 11:59am and everything works fine. ++++- Also 12:00am works fine. 0:00pm also works (which I don't think ++++- should). None of the values 12:00pm - 12:59pm work for that matter. ++++-- Require restore via the restore command or make a restore Job ++++- get the bootstrap file. ++++-- Implement Maximum Job Spool Size ++++-- Fix 3993 error in SD. It forgets to look at autochanger ++++- resource for device command, ... ++++-- 3. Prevent two drives requesting the same Volume in any given ++++- autochanger, by checking if a Volume is mounted on another drive ++++- in an Autochanger. ++++-- Upgrade to MySQL 4.1.12 See: ++++- http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html ++++-- Add # Job Level date to bsr file ++++-- Implement "PreferMountedVolumes = yes|no" in Job resource. ++++-## Integrate web-bacula into a new Bacula project with ++++- bimagemgr. ++++-- Cleaning tapes should have Status "Cleaning" rather than append. ++++-- Make sure that Python has access to Client address/port so that ++++- it can check if Clients are alive. ++++-- Review all items in "restore". ++++-- Fix PostgreSQL GROUP BY problems in restore. ++++-- Fix PostgreSQL sql problems in bugs. ++++-- After rename ++++- 04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume ++++- "DLT-13Feb04". ++++- Current Volume "DLT-04Jul05" not acceptable because: ++++- 1997 Volume "DLT-13Feb04" not in catalog. ++++- 04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device ++++- "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02 ++++-## Create a new GUI chapter explaining all the GUI programs. ++++-- Make "update slots" when pointing to Autochanger, remove ++++- all Volumes from other drives. "update slots all-drives"? ++++- No, this is done by modifying mtx-changer to list what is ++++- in the drives. ++++-- Finish TLS implementation. ++++-- Port limiting -m in iptables to prevent DoS attacks ++++- could cause broken pipes on Bacula. ++++-6. Build and test the Volume Shadow Copy (VSS) for Win32. ++++-- Allow cancel of unknown Job ++++-- State not saved when closing Win32 FD by icon ++++-- bsr-opt-test fails. bsr deleted. Fix. ++++-- Move Python daemon variables from Job to Bacula object. ++++- WorkingDir, ConfigFile ++++-- Document that Bootstrap files can be written with cataloging ++++- turned off. ++++-- Document details of ANSI/IBM labels ++++-- OS linux 2.4 ++++- 1) ADIC, DLT, FastStor 4000, 7*20GB ++++-- Linux Sony LIB-D81, AIT-3 library works. ++++-- Doc the following ++++- to activate, check or disable the hardware compression feature on my ++++- exb-8900 i use the exabyte "MammothTool" you can get it here: ++++- http://www.exabyte.com/support/online/downloads/index.cfm ++++- There is a solaris version of this tool. With option -C 0 or 1 you can ++++- disable or activate compression. Start this tool without any options for ++++- a small reference. ++++-- Document Heartbeat Interval in the dealing with firewalls section. ++++-- Document new CDROM directory. ++++-- On Win32 working directory must have drive letter ???? ++++-- On Win32 working directory must be writable by SYSTEM to ++++- do restores. ++++-- Document that ChangerDevice is used for Alert command. ++++-- Add better documentation on how restores can be done ++++-8. Take one more try at making DVD writing work (no go) ++++-7. Write a bacula-web document ++++-- Why isn't the DEVICE structure defined when doing ++++- a reservation? ++++-- Multi-drive changer seems to only use drive 0 ++++- Multiple drives don't seem to be opened. ++++-- My database is growing ++++-- Call GetLastError() in the berrno constructor rather ++++- than delaying until strerror. ++++-- Tape xxx in drive 0, requested in drive 1 ++++-- The mount command does not work with drives other than 0. ++++-- A mount should cause the SD to re-examine what Slot is ++++- loaded. ++++-- The SD locks on to the first available drive then ++++- wants a Volume that is released but in another drive -- ++++- chaos. ++++-- Run the regression scripts on Solaris and FreeBSD ++++-- Figure out how to package gui, and rescue programs. ++++-- Add a .dir command to restore tree code to eliminate the problem ++++-- Mount after manually unloading changer causes hang in SD ++++-- Fix JobACL with restore by JobId. +++++=== Done -- see kernsdone ++++Index: kes-1.38 ++++=================================================================== ++++RCS file: /cvsroot/bacula/bacula/kes-1.38,v ++++retrieving revision 1.1.2.13 ++++diff -u -r1.1.2.13 kes-1.38 ++++--- kes-1.38 14 Nov 2005 20:20:38 -0000 1.1.2.13 +++++++ kes-1.38 21 Nov 2005 18:19:04 -0000 ++++@@ -3,6 +3,19 @@ ++++ ++++ General: ++++ +++++Changes to 1.38.2: +++++20Oct05 +++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. +++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator +++++ says this does not fix *his* bug). +++++- Fix cancel failure bug. Bug #481 +++++- Fix failure when Pool name has spaces. Bug #487 +++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 +++++- Fix a couple of free()s in src/filed/acl.c +++++- Fix memory overrun in bfile.c in building OS X resource +++++ fork filename. Bug #489 +++++- Add Pool name to SD status output. +++++ ++++ Changes to 1.38.1: ++++ 14Oct05 ++++ - Apply SunOS patch for ACLs submitted by David Duchscher. ++++Index: projects ++++=================================================================== ++++RCS file: /cvsroot/bacula/bacula/projects,v ++++retrieving revision 1.12.2.3 ++++diff -u -r1.12.2.3 projects ++++--- projects 10 Nov 2005 20:25:27 -0000 1.12.2.3 +++++++ projects 21 Nov 2005 18:19:05 -0000 ++++@@ -228,7 +228,175 @@ ++++ ++++ Why: Performance enhancement. ++++ +++++Item 13: Let Bacula log tape usage and handle drive cleaning cycles. +++++ Date: November 11, 2005 +++++ Origin: Arno Lehmann +++++ Status: +++++ +++++ What: Make Bacula manage tape life cycle information and drive +++++ cleaning cycles. +++++ +++++ Why: Both parts of this project are important when operating backups. +++++ We need to know which tapes need replacement, and we need to +++++ make sure the drives are cleaned when necessary. While many +++++ tape libraries and even autoloaders can handle all this +++++ automatically, support by Bacula can be helpful for smaller +++++ (older) libraries and single drives. Also, checking drive +++++ status during operation can prevent some failures (as I had to +++++ learn the hard way...) +++++ +++++ Notes: First, Bacula could (and even does, to some limited extent) +++++ record tape and drive usage. For tapes, the number of mounts, +++++ the amount of data, and the time the tape has actually been +++++ running could be recorded. Data fields for Read and Write time +++++ and Nmber of mounts already exist in the catalog (I'm not sure +++++ if VolBytes is the sum of all bytes ever written to that volume +++++ by Bacula). This information can be important when determining +++++ which media to replace. For the tape drives known to Bacula, +++++ similar information is interesting to determine the device +++++ status and expected life time: Time it's been Reading and +++++ Writing, number of tape Loads / Unloads / Errors. This +++++ information is not yet recorded as far as I know. +++++ +++++ The next step would be implementing drive cleaning setup. +++++ Bacula already has knowledge about cleaning tapes. Once it has +++++ some information about cleaning cycles (measured in drive run +++++ time, number of tapes used, or calender days, for example) it +++++ can automatically execute tape cleaning (with an autochanger, +++++ obviously) or ask for operator assistence loading a cleaning +++++ tape. +++++ +++++ The next step would be to implement TAPEALERT checks not only +++++ when changing tapes and only sending he information to the +++++ administrator, but rather checking after each tape error, +++++ checking on a regular basis (for example after each tape file), +++++ and also before unloading and after loading a new tape. Then, +++++ depending on the drives TAPEALERT state and the know drive +++++ cleaning state Bacula could automatically schedule later +++++ cleaning, clean immediately, or inform the operator. +++++ +++++ Implementing this would perhaps require another catalog change +++++ and perhaps major changes in SD code and the DIR-SD protocoll, +++++ so I'd only consider this worth implementing if it would +++++ actually be used or even needed by many people. +++++ +++++Item 14: Merging of multiple backups into a single one. (Also called Synthetic +++++ Backup or Consolidation). +++++ +++++ Origin: Marc Cousin and Eric Bollengier +++++ Date: 15 November 2005 +++++ Status: Depends on first implementing project Item 1 (Migration). +++++ +++++ What: A merged backup is a backup made without connecting to the Client. +++++ It would be a Merge of existing backups into a single backup. +++++ In effect, it is like a restore but to the backup medium. +++++ +++++ For instance, say that last sunday we made a full backup. Then +++++ all week long, we created incremental backups, in order to do +++++ them fast. Now comes sunday again, and we need another full. +++++ The merged backup makes it possible to do instead an incremental +++++ backup (during the night for instance), and then create a merged +++++ backup during the day, by using the full and incrementals from +++++ the week. The merged backup will be exactly like a full made +++++ sunday night on the tape, but the production interruption on the +++++ Client will be minimal, as the Client will only have to send +++++ incrementals. +++++ +++++ In fact, if it's done correctly, you could merge all the +++++ Incrementals into single Incremental, or all the Incrementals +++++ and the last Differential into a new Differential, or the Full, +++++ last differential and all the Incrementals into a new Full +++++ backup. And there is no need to involve the Client. +++++ +++++ Why: The benefit is that : +++++ - the Client just does an incremental ; +++++ - the merged backup on tape is just as a single full backup, +++++ and can be restored very fast. +++++ +++++ This is also a way of reducing the backup data since the old +++++ data can then be pruned (or not) from the catalog, possibly +++++ allowing older volumes to be recycled +++++ +++++Item 15: Automatic disabling of devices +++++ Date: 2005-11-11 +++++ Origin: Peter Eriksson +++++ Status: +++++ +++++ What: After a configurable amount of fatal errors with a tape drive +++++ Bacula should automatically disable further use of a certain +++++ tape drive. There should also be "disable"/"enable" commands in +++++ the "bconsole" tool. +++++ +++++ Why: On a multi-drive jukebox there is a possibility of tape drives +++++ going bad during large backups (needing a cleaning tape run, +++++ tapes getting stuck). It would be advantageous if Bacula would +++++ automatically disable further use of a problematic tape drive +++++ after a configurable amount of errors has occured. +++++ +++++ An example: I have a multi-drive jukebox (6 drives, 380+ slots) +++++ where tapes occasionally get stuck inside the drive. Bacula will +++++ notice that the "mtx-changer" command will fail and then fail +++++ any backup jobs trying to use that drive. However, it will still +++++ keep on trying to run new jobs using that drive and fail - +++++ forever, and thus failing lots and lots of jobs... Since we have +++++ many drives Bacula could have just automatically disabled +++++ further use of that drive and used one of the other ones +++++ instead. +++++ +++++ +++++Item 16: Directive/mode to backup only file changes, not entire file +++++ Date: 11 November 2005 +++++ Origin: Joshua Kugler +++++ Marek Bajon +++++ Status: RFC +++++ +++++ What: Currently when a file changes, the entire file will be backed up in +++++ the next incremental or full backup. To save space on the tapes +++++ it would be nice to have a mode whereby only the changes to the +++++ file would be backed up when it is changed. +++++ +++++ Why: This would save lots of space when backing up large files such as +++++ logs, mbox files, Outlook PST files and the like. +++++ +++++ Notes: This would require the usage of disk-based volumes as comparing +++++ files would not be feasible using a tape drive. +++++ +++++Item 17: Quick release of FD-SD connection +++++ Origin: Frank Volf (frank at deze dot org) +++++ Date: 17 november 2005 +++++ Status: +++++ +++++ What: In the bacula implementation a backup is finished after all data +++++ and attributes are succesfully written to storage. When using a +++++ tape backup it is very annoying that a backup can take a day, +++++ simply because the current tape (or whatever) is full and the +++++ administrator has not put a new one in. During that time the +++++ system cannot be taken off-line, because there is still an open +++++ session between the storage daemon and the file daemon on the +++++ client. +++++ +++++ Although this is a very good strategey for making "safe backups" +++++ This can be annoying for e.g. laptops, that must remain +++++ connected until the bacukp is completed. +++++ +++++ Using a new feature called "migration" it will be possible to +++++ spool first to harddisk (using a special 'spool' migration +++++ scheme) and then migrate the backup to tape. +++++ +++++ There is still the problem of getting the attributes committed. +++++ If it takes a very long time to do, with the current code, the +++++ job has not terminated, and the File daemon is not freed up. The +++++ Storage daemon should release the File daemon as soon as all the +++++ file data and all the attributes have been sent to it (the SD). +++++ Currently the SD waits until everything is on tape and all the +++++ attributes are transmitted to the Director before signalling +++++ completion to the FD. I don't think I would have any problem +++++ changing this. The reason is that even if the FD reports back to +++++ the Dir that all is OK, the job will not terminate until the SD +++++ has done the same thing -- so in a way keeping the SD-FD link +++++ open to the very end is not really very productive ... ++++ +++++ Why: Makes backup of laptops much easier. ++++ ++++ ++++ ============= Empty RFC form =========== ++++@@ -245,33 +413,4 @@ ++++ ============== End RFC form ============== ++++ ++++ ++++-Items completed for release 1.38.0: ++++-#4 Embedded Python Scripting (implemented in all Daemons) ++++-#5 Events that call a Python program (Implemented in all ++++- daemons, but more cleanup work to be done). ++++-#6 Select one from among Multiple Storage Devices for Job. ++++- This is already implemented in 1.37. ++++-#7 Single Job Writing to Multiple Storage Devices. This is ++++- currently implemented with a Clone feature. ++++-#- Full multiple drive Autochanger support (done in 1.37) ++++-#- Built in support for communications encryption (TLS) ++++- done by Landon Fuller. ++++-# Support for Unicode characters ++++- (via UTF-8) on Win32 machines thanks to Thorsten Engel. ++++-Item 8: Break the one-to-one Relationship between a Job and a ++++- Specific Storage Device (or Devices if #10 is implemented). ++++- ++++-Completed items from last year's list: ++++-Item 1: Multiple simultaneous Jobs. (done) ++++-Item 3: Write the bscan program -- also write a bcopy program (done). ++++-Item 5: Implement Label templates (done). ++++-Item 6: Write a regression script (done) ++++-Item 9: Add SSL to daemon communications (done by Landon Fuller) ++++-Item 10: Define definitive tape format (done) ++++-Item 3: GUI for interactive restore. Partially Implemented in 1.34 ++++- Note, there is now a complete Webmin plugin, a partial ++++- GNOME console, and an excellent wx-console GUI. ++++-Item 4: GUI for interactive backup ++++-Item 2: Job Data Spooling. ++++- Done: Regular expression matching. ++++-Item 10: New daemon communication protocol (this has been dropped). +++++Items completed for release 1.38.0 -- see kernsdone ++++Index: patches/1.38.1-to-1.38.2.patch ++++=================================================================== ++++RCS file: patches/1.38.1-to-1.38.2.patch ++++diff -N patches/1.38.1-to-1.38.2.patch ++++--- /dev/null 1 Jan 1970 00:00:00 -0000 +++++++ patches/1.38.1-to-1.38.2.patch 21 Nov 2005 18:19:05 -0000 ++++@@ -0,0 +1,3528 @@ +++++ +++++ This patch fixes the following bugs: +++++ +++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. +++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator +++++ says that this patch does not fix his problem) +++++- Fix cancel failure bug. Bug #481 +++++- Fix failure when Pool name has spaces. Bug #487 +++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 +++++- Fix a couple of free()s in src/filed/acl.c +++++- Fix memory overrun in bfile.c in building OS X resource +++++ fork filename. Bug #489 +++++ +++++This patch is applied to Bacula source version 1.38.1 and will +++++produce Bacula source version 1.38.2. Apply it with: +++++ +++++ cd +++++ ./configure (your options) if not already done +++++ patch -p0 <1.38.1-to-1.38.2.patch +++++ make +++++ make install +++++ +++++? osx_finder.patch +++++Index: ChangeLog +++++=================================================================== +++++RCS file: /cvsroot/bacula/bacula/ChangeLog,v +++++retrieving revision 1.154.2.7 +++++diff -u -r1.154.2.7 ChangeLog +++++--- ChangeLog 15 Nov 2005 09:27:19 -0000 1.154.2.7 ++++++++ ChangeLog 21 Nov 2005 13:17:56 -0000 +++++@@ -1,4 +1,14 @@ +++++ ++++++Changes to 1.38.2: ++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. ++++++- Fix bnet-server bug found on OpenBSD. Bug #486 ++++++- Fix cancel failure bug. Bug #481 ++++++- Fix failure when Pool name has spaces. Bug #487 ++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 ++++++- Fix a couple of free()s in src/filed/acl.c ++++++- Fix memory overrun in bfile.c in building OS X resource ++++++ fork filename. Bug #489 ++++++- Add Pool name to SD status output. +++++ +++++ Changes to 1.38.1: +++++ - Apply SunOS patch for ACLs submitted by David Duchscher. +++++Index: ReleaseNotes +++++=================================================================== +++++RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v +++++retrieving revision 1.147.2.9 +++++diff -u -r1.147.2.9 ReleaseNotes +++++--- ReleaseNotes 15 Nov 2005 09:27:19 -0000 1.147.2.9 ++++++++ ReleaseNotes 21 Nov 2005 13:17:57 -0000 +++++@@ -1,10 +1,21 @@ +++++ +++++- Release Notes for Bacula 1.38.1 ++++++ Release Notes for Bacula 1.38.2 +++++ +++++ Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in) +++++ 20,440 additional lines of code since version 1.36.3 +++++ +++++-Changes since 1.38.0: ++++++Changes to 1.38.2: ++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. ++++++- Fix bnet-server bug found on OpenBSD. Bug #486 ++++++- Fix cancel failure bug. Bug #481 ++++++- Fix failure when Pool name has spaces. Bug #487 ++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 ++++++- Fix a couple of free()s in src/filed/acl.c ++++++- Fix memory overrun in bfile.c in building OS X resource ++++++ fork filename. Bug #489 ++++++- Add Pool name to SD status output. ++++++ ++++++Changes to 1.38.1: +++++ - Corrected ACL for Solaris (David Duchscher and Attila Fulop). +++++ - Add bacula_mail_summary.sh to examples directory. It makes +++++ a single email summary of any number of jobs. Submitted +++++Index: kernstodo +++++=================================================================== +++++RCS file: /cvsroot/bacula/bacula/kernstodo,v +++++retrieving revision 1.570.2.6 +++++diff -u -r1.570.2.6 kernstodo +++++--- kernstodo 4 Nov 2005 09:16:49 -0000 1.570.2.6 ++++++++ kernstodo 21 Nov 2005 13:17:57 -0000 +++++@@ -1,5 +1,5 @@ +++++ Kern's ToDo List +++++- 03 November 2005 ++++++ 21 November 2005 +++++ +++++ Major development: +++++ Project Developer +++++@@ -7,8 +7,6 @@ +++++ Version 1.37 Kern (see below) +++++ ======================================================== +++++ +++++-Final items for 1.37 before release: +++++- +++++ Document: +++++ - Does ClientRunAfterJob fail the job on a bad return code? +++++ - Document cleaning up the spool files: +++++@@ -18,6 +16,8 @@ +++++ - Does WildFile match against full name? Doc. +++++ +++++ For 1.39: ++++++- Make sure that all do_prompt() calls in Dir check for ++++++ -1 (error) and -2 (cancel) returns. +++++ - Look at -D_FORTIFY_SOURCE=2 +++++ - Add Win32 FileSet definition somewhere +++++ - Look at fixing restore status stats in SD. +++++@@ -27,6 +27,12 @@ +++++ encountered, read many times (as it currently does), and if the +++++ block cannot be read, skip to the next block, and try again. If +++++ that fails, skip to the next file and try again, ... ++++++- Add level table: ++++++ create table LevelType (LevelType binary(1), LevelTypeLong tinyblob); ++++++ insert into LevelType (LevelType,LevelTypeLong) values ++++++ ("F","Full"), ++++++ ("D","Diff"), ++++++ ("I","Inc"); +++++ - Add ACL to restore only to original location. +++++ - Add a recursive mark command (rmark) to restore. +++++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs +++++@@ -1246,219 +1252,4 @@ +++++ ==== +++++ +++++ +++++-=== Done +++++-- Save mount point for directories not traversed with onefs=yes. +++++-- Add seconds to start and end times in the Job report output. +++++-- if 2 concurrent backups are attempted on the same tape +++++- drive (autoloader) into different tape pools, one of them will exit +++++- fatally instead of halting until the drive is idle +++++-- Update StartTime if job held in Job Queue. +++++-- Look at www.nu2.nu/pebuilder as a helper for full windows +++++- bare metal restore. (done by Scott) +++++-- Fix orphanned buffers: +++++- Orphaned buffer: 24 bytes allocated at line 808 of rufus-dir job.c +++++- Orphaned buffer: 40 bytes allocated at line 45 of rufus-dir alist.c +++++-- Implement Preben's suggestion to add +++++- File System Types = ext2, ext3 +++++- to FileSets, thus simplifying backup of *all* local partitions. +++++-- Try to open a device on each Job if it was not opened +++++- when the SD started. +++++-- Add dump of VolSessionId/Time and FileIndex with bls. +++++-- If Bacula does not find the right tape in the Autochanger, +++++- then mark the tape in error and move on rather than asking +++++- for operator intervention. +++++-- Cancel command should include JobId in list of Jobs. +++++-- Add performance testing hooks +++++-- Bootstrap from JobMedia records. +++++-- Implement WildFile and WildDir to solve problem of +++++- saving only *.doc files. +++++-- Fix +++++- Please use the "label" command to create a new Volume for: +++++- Storage: DDS-4-changer +++++- Media type: +++++- Pool: Default +++++- label +++++- The defined Storage resources are: +++++-- Copy Changer Device and Changer Command from Autochanger +++++- to Device resource in SD if none given in Device resource. +++++-- 1. Automatic use of more than one drive in an autochanger (done) +++++-- 2. Automatic selection of the correct drive for each Job (i.e. +++++- selects a drive with an appropriate Volume for the Job) (done) +++++-- 6. Allow multiple simultaneous Jobs referencing the same pool write +++++- to several tapes (some new directive(s) are are probably needed for +++++- this) (done) +++++-- Locking (done) +++++-- Key on Storage rather than Pool (done) +++++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done). +++++-- Synchronize multiple drives so that not more +++++- than one loads a tape and any time (done) +++++-- 4. Use Changer Device and Changer Command specified in the +++++- Autochanger resource, if none is found in the Device resource. +++++- You can continue to specify them in the Device resource if you want +++++- or need them to be different for each device. +++++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") +++++- that can allow a Device be part of an Autochanger, and hence the changer +++++- script protected, but if set to no, will prevent the Device from being +++++- automatically selected from the changer. This allows the device to +++++- be directly accessed through its Device name, but not through the +++++- AutoChanger name. +++++-#6 Select one from among Multiple Storage Devices for Job +++++-#5 Events that call a Python program +++++- (Implemented in Dir/SD) +++++-- Make sure the Device name is in the Query packet returned. +++++-- Don't start a second file job if one is already running. +++++-- Implement EOF/EOV labels for ANSI labels +++++-- Implement IBM labels. +++++-- When Python creates a new label, the tape is immediately +++++- recycled and no label created. This happens when using +++++- autolabeling -- even when Python doesn't generate the name. +++++-- Scratch Pool where the volumes can be re-assigned to any Pool. +++++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) +++++- is busy reading. Job 6 canceled. +++++-- Remove separate thread for opening devices in SD. On the other +++++- hand, don't block waiting for open() for devices. +++++-- Fix code to either handle updating NumVol or to calculate it in +++++- Dir next_vol.c +++++-- Ensure that you cannot exclude a directory or a file explicitly +++++- Included with File. +++++-#4 Embedded Python Scripting +++++- (Implemented in Dir/SD/FD) +++++-- Add Python writable variable for changing the Priority, +++++- Client, Storage, JobStatus (error), ... +++++-- SD Python +++++- - Solicit Events +++++-- Add disk seeking on restore; turn off seek on tapes. +++++- stored/match_bsr.c +++++-- Look at dird_conf.c:1000: warning: `int size' +++++- might be used uninitialized in this function +++++-- Indicate when a Job is purged/pruned during restore. +++++-- Implement some way to turn off automatic pruning in Jobs. +++++-- Implement a way an Admin Job can prune, possibly multiple +++++- clients -- Python script? +++++-- Look at Preben's acl.c error handling code. +++++-- SD crashes after a tape restore then doing a backup. +++++-- If drive is opened read/write, close it and re-open +++++- read-only if doing a restore, and vice-versa. +++++-- Windows restore: +++++- data-fd: RestoreFiles.2004-12-07_15.56.42 Error: +++++- > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der +++++- > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen +++++- > Prozess verwendet wird. +++++- Restore restores all files, but then fails at the end trying +++++- to set the attributes of e: +++++- from failed jobs.- Resolve the problem between Device name and Archive name, +++++- and fix SD messages. +++++-- Tell the "restore" user when browsing is no longer possible. +++++-- Add a restore directory-x +++++-- Write non-optimized bsrs from the JobMedia and Media records, +++++- even after Files are pruned. +++++-- Delete Stripe and Copy from VolParams to save space. +++++-- Fix option 2 of restore -- list where file is backed up -- require Client, +++++- then list last 20 backups. +++++-- Finish implementation of passing all Storage and Device needs to +++++- the SD. +++++-- Move test for max wait time exceeded in job.c up -- Peter's idea. +++++-## Consider moving docs to their own project. +++++-## Move rescue to its own project. +++++-- Add client version to the Client name line that prints in +++++- the Job report. +++++-- Fix the Rescue CDROM. +++++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the +++++- bottom, the link to "Tape Testing Chapter" is broken. It goes to +++++- /html-manual/... while the others point to /rel-manual/... +++++-- Device resource needs the "name" of the SD. +++++-- Specify a single directory to restore. +++++-- Implement MediaType keyword in bsr? +++++-- Add a date and time stamp at the beginning of every line in the +++++- Job report (Volker Sauer). +++++-- Add level to estimate command. +++++-- Add "limit=n" for "list jobs" +++++-- Make bootstrap filename unique. +++++-- Make Dmsg look at global before calling subroutine. +++++-- From Chris Hull: +++++- it seems to be complaining about 12:00pm which should be a valid 12 +++++- hour time. I changed the time to 11:59am and everything works fine. +++++- Also 12:00am works fine. 0:00pm also works (which I don't think +++++- should). None of the values 12:00pm - 12:59pm work for that matter. +++++-- Require restore via the restore command or make a restore Job +++++- get the bootstrap file. +++++-- Implement Maximum Job Spool Size +++++-- Fix 3993 error in SD. It forgets to look at autochanger +++++- resource for device command, ... +++++-- 3. Prevent two drives requesting the same Volume in any given +++++- autochanger, by checking if a Volume is mounted on another drive +++++- in an Autochanger. +++++-- Upgrade to MySQL 4.1.12 See: +++++- http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html +++++-- Add # Job Level date to bsr file +++++-- Implement "PreferMountedVolumes = yes|no" in Job resource. +++++-## Integrate web-bacula into a new Bacula project with +++++- bimagemgr. +++++-- Cleaning tapes should have Status "Cleaning" rather than append. +++++-- Make sure that Python has access to Client address/port so that +++++- it can check if Clients are alive. +++++-- Review all items in "restore". +++++-- Fix PostgreSQL GROUP BY problems in restore. +++++-- Fix PostgreSQL sql problems in bugs. +++++-- After rename +++++- 04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume +++++- "DLT-13Feb04". +++++- Current Volume "DLT-04Jul05" not acceptable because: +++++- 1997 Volume "DLT-13Feb04" not in catalog. +++++- 04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device +++++- "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02 +++++-## Create a new GUI chapter explaining all the GUI programs. +++++-- Make "update slots" when pointing to Autochanger, remove +++++- all Volumes from other drives. "update slots all-drives"? +++++- No, this is done by modifying mtx-changer to list what is +++++- in the drives. +++++-- Finish TLS implementation. +++++-- Port limiting -m in iptables to prevent DoS attacks +++++- could cause broken pipes on Bacula. +++++-6. Build and test the Volume Shadow Copy (VSS) for Win32. +++++-- Allow cancel of unknown Job +++++-- State not saved when closing Win32 FD by icon +++++-- bsr-opt-test fails. bsr deleted. Fix. +++++-- Move Python daemon variables from Job to Bacula object. +++++- WorkingDir, ConfigFile +++++-- Document that Bootstrap files can be written with cataloging +++++- turned off. +++++-- Document details of ANSI/IBM labels +++++-- OS linux 2.4 +++++- 1) ADIC, DLT, FastStor 4000, 7*20GB +++++-- Linux Sony LIB-D81, AIT-3 library works. +++++-- Doc the following +++++- to activate, check or disable the hardware compression feature on my +++++- exb-8900 i use the exabyte "MammothTool" you can get it here: +++++- http://www.exabyte.com/support/online/downloads/index.cfm +++++- There is a solaris version of this tool. With option -C 0 or 1 you can +++++- disable or activate compression. Start this tool without any options for +++++- a small reference. +++++-- Document Heartbeat Interval in the dealing with firewalls section. +++++-- Document new CDROM directory. +++++-- On Win32 working directory must have drive letter ???? +++++-- On Win32 working directory must be writable by SYSTEM to +++++- do restores. +++++-- Document that ChangerDevice is used for Alert command. +++++-- Add better documentation on how restores can be done +++++-8. Take one more try at making DVD writing work (no go) +++++-7. Write a bacula-web document +++++-- Why isn't the DEVICE structure defined when doing +++++- a reservation? +++++-- Multi-drive changer seems to only use drive 0 +++++- Multiple drives don't seem to be opened. +++++-- My database is growing +++++-- Call GetLastError() in the berrno constructor rather +++++- than delaying until strerror. +++++-- Tape xxx in drive 0, requested in drive 1 +++++-- The mount command does not work with drives other than 0. +++++-- A mount should cause the SD to re-examine what Slot is +++++- loaded. +++++-- The SD locks on to the first available drive then +++++- wants a Volume that is released but in another drive -- +++++- chaos. +++++-- Run the regression scripts on Solaris and FreeBSD +++++-- Figure out how to package gui, and rescue programs. +++++-- Add a .dir command to restore tree code to eliminate the problem +++++-- Mount after manually unloading changer causes hang in SD +++++-- Fix JobACL with restore by JobId. ++++++=== Done -- see kernsdone +++++Index: kes-1.38 +++++=================================================================== +++++RCS file: /cvsroot/bacula/bacula/kes-1.38,v +++++retrieving revision 1.1.2.13 +++++diff -u -r1.1.2.13 kes-1.38 +++++--- kes-1.38 14 Nov 2005 20:20:38 -0000 1.1.2.13 ++++++++ kes-1.38 21 Nov 2005 13:17:57 -0000 +++++@@ -3,6 +3,18 @@ +++++ +++++ General: +++++ ++++++Changes to 1.38.2: ++++++20Oct05 ++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. ++++++- Fix bnet-server bug found on OpenBSD. Bug #486 ++++++- Fix cancel failure bug. Bug #481 ++++++- Fix failure when Pool name has spaces. Bug #487 ++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 ++++++- Fix a couple of free()s in src/filed/acl.c ++++++- Fix memory overrun in bfile.c in building OS X resource ++++++ fork filename. Bug #489 ++++++- Add Pool name to SD status output. ++++++ +++++ Changes to 1.38.1: +++++ 14Oct05 +++++ - Apply SunOS patch for ACLs submitted by David Duchscher. +++++Index: projects +++++=================================================================== +++++RCS file: /cvsroot/bacula/bacula/projects,v +++++retrieving revision 1.12.2.3 +++++diff -u -r1.12.2.3 projects +++++--- projects 10 Nov 2005 20:25:27 -0000 1.12.2.3 ++++++++ projects 21 Nov 2005 13:17:58 -0000 +++++@@ -228,7 +228,175 @@ +++++ +++++ Why: Performance enhancement. +++++ ++++++Item 13: Let Bacula log tape usage and handle drive cleaning cycles. ++++++ Date: November 11, 2005 ++++++ Origin: Arno Lehmann ++++++ Status: ++++++ ++++++ What: Make Bacula manage tape life cycle information and drive ++++++ cleaning cycles. ++++++ ++++++ Why: Both parts of this project are important when operating backups. ++++++ We need to know which tapes need replacement, and we need to ++++++ make sure the drives are cleaned when necessary. While many ++++++ tape libraries and even autoloaders can handle all this ++++++ automatically, support by Bacula can be helpful for smaller ++++++ (older) libraries and single drives. Also, checking drive ++++++ status during operation can prevent some failures (as I had to ++++++ learn the hard way...) ++++++ ++++++ Notes: First, Bacula could (and even does, to some limited extent) ++++++ record tape and drive usage. For tapes, the number of mounts, ++++++ the amount of data, and the time the tape has actually been ++++++ running could be recorded. Data fields for Read and Write time ++++++ and Nmber of mounts already exist in the catalog (I'm not sure ++++++ if VolBytes is the sum of all bytes ever written to that volume ++++++ by Bacula). This information can be important when determining ++++++ which media to replace. For the tape drives known to Bacula, ++++++ similar information is interesting to determine the device ++++++ status and expected life time: Time it's been Reading and ++++++ Writing, number of tape Loads / Unloads / Errors. This ++++++ information is not yet recorded as far as I know. ++++++ ++++++ The next step would be implementing drive cleaning setup. ++++++ Bacula already has knowledge about cleaning tapes. Once it has ++++++ some information about cleaning cycles (measured in drive run ++++++ time, number of tapes used, or calender days, for example) it ++++++ can automatically execute tape cleaning (with an autochanger, ++++++ obviously) or ask for operator assistence loading a cleaning ++++++ tape. ++++++ ++++++ The next step would be to implement TAPEALERT checks not only ++++++ when changing tapes and only sending he information to the ++++++ administrator, but rather checking after each tape error, ++++++ checking on a regular basis (for example after each tape file), ++++++ and also before unloading and after loading a new tape. Then, ++++++ depending on the drives TAPEALERT state and the know drive ++++++ cleaning state Bacula could automatically schedule later ++++++ cleaning, clean immediately, or inform the operator. ++++++ ++++++ Implementing this would perhaps require another catalog change ++++++ and perhaps major changes in SD code and the DIR-SD protocoll, ++++++ so I'd only consider this worth implementing if it would ++++++ actually be used or even needed by many people. ++++++ ++++++Item 14: Merging of multiple backups into a single one. (Also called Synthetic ++++++ Backup or Consolidation). ++++++ ++++++ Origin: Marc Cousin and Eric Bollengier ++++++ Date: 15 November 2005 ++++++ Status: Depends on first implementing project Item 1 (Migration). ++++++ ++++++ What: A merged backup is a backup made without connecting to the Client. ++++++ It would be a Merge of existing backups into a single backup. ++++++ In effect, it is like a restore but to the backup medium. ++++++ ++++++ For instance, say that last sunday we made a full backup. Then ++++++ all week long, we created incremental backups, in order to do ++++++ them fast. Now comes sunday again, and we need another full. ++++++ The merged backup makes it possible to do instead an incremental ++++++ backup (during the night for instance), and then create a merged ++++++ backup during the day, by using the full and incrementals from ++++++ the week. The merged backup will be exactly like a full made ++++++ sunday night on the tape, but the production interruption on the ++++++ Client will be minimal, as the Client will only have to send ++++++ incrementals. ++++++ ++++++ In fact, if it's done correctly, you could merge all the ++++++ Incrementals into single Incremental, or all the Incrementals ++++++ and the last Differential into a new Differential, or the Full, ++++++ last differential and all the Incrementals into a new Full ++++++ backup. And there is no need to involve the Client. ++++++ ++++++ Why: The benefit is that : ++++++ - the Client just does an incremental ; ++++++ - the merged backup on tape is just as a single full backup, ++++++ and can be restored very fast. ++++++ ++++++ This is also a way of reducing the backup data since the old ++++++ data can then be pruned (or not) from the catalog, possibly ++++++ allowing older volumes to be recycled ++++++ ++++++Item 15: Automatic disabling of devices ++++++ Date: 2005-11-11 ++++++ Origin: Peter Eriksson ++++++ Status: ++++++ ++++++ What: After a configurable amount of fatal errors with a tape drive ++++++ Bacula should automatically disable further use of a certain ++++++ tape drive. There should also be "disable"/"enable" commands in ++++++ the "bconsole" tool. ++++++ ++++++ Why: On a multi-drive jukebox there is a possibility of tape drives ++++++ going bad during large backups (needing a cleaning tape run, ++++++ tapes getting stuck). It would be advantageous if Bacula would ++++++ automatically disable further use of a problematic tape drive ++++++ after a configurable amount of errors has occured. ++++++ ++++++ An example: I have a multi-drive jukebox (6 drives, 380+ slots) ++++++ where tapes occasionally get stuck inside the drive. Bacula will ++++++ notice that the "mtx-changer" command will fail and then fail ++++++ any backup jobs trying to use that drive. However, it will still ++++++ keep on trying to run new jobs using that drive and fail - ++++++ forever, and thus failing lots and lots of jobs... Since we have ++++++ many drives Bacula could have just automatically disabled ++++++ further use of that drive and used one of the other ones ++++++ instead. ++++++ ++++++ ++++++Item 16: Directive/mode to backup only file changes, not entire file ++++++ Date: 11 November 2005 ++++++ Origin: Joshua Kugler ++++++ Marek Bajon ++++++ Status: RFC ++++++ ++++++ What: Currently when a file changes, the entire file will be backed up in ++++++ the next incremental or full backup. To save space on the tapes ++++++ it would be nice to have a mode whereby only the changes to the ++++++ file would be backed up when it is changed. ++++++ ++++++ Why: This would save lots of space when backing up large files such as ++++++ logs, mbox files, Outlook PST files and the like. ++++++ ++++++ Notes: This would require the usage of disk-based volumes as comparing ++++++ files would not be feasible using a tape drive. ++++++ ++++++Item 17: Quick release of FD-SD connection ++++++ Origin: Frank Volf (frank at deze dot org) ++++++ Date: 17 november 2005 ++++++ Status: ++++++ ++++++ What: In the bacula implementation a backup is finished after all data ++++++ and attributes are succesfully written to storage. When using a ++++++ tape backup it is very annoying that a backup can take a day, ++++++ simply because the current tape (or whatever) is full and the ++++++ administrator has not put a new one in. During that time the ++++++ system cannot be taken off-line, because there is still an open ++++++ session between the storage daemon and the file daemon on the ++++++ client. ++++++ ++++++ Although this is a very good strategey for making "safe backups" ++++++ This can be annoying for e.g. laptops, that must remain ++++++ connected until the bacukp is completed. ++++++ ++++++ Using a new feature called "migration" it will be possible to ++++++ spool first to harddisk (using a special 'spool' migration ++++++ scheme) and then migrate the backup to tape. ++++++ ++++++ There is still the problem of getting the attributes committed. ++++++ If it takes a very long time to do, with the current code, the ++++++ job has not terminated, and the File daemon is not freed up. The ++++++ Storage daemon should release the File daemon as soon as all the ++++++ file data and all the attributes have been sent to it (the SD). ++++++ Currently the SD waits until everything is on tape and all the ++++++ attributes are transmitted to the Director before signalling ++++++ completion to the FD. I don't think I would have any problem ++++++ changing this. The reason is that even if the FD reports back to ++++++ the Dir that all is OK, the job will not terminate until the SD ++++++ has done the same thing -- so in a way keeping the SD-FD link ++++++ open to the very end is not really very productive ... +++++ ++++++ Why: Makes backup of laptops much easier. +++++ +++++ +++++ ============= Empty RFC form =========== +++++@@ -245,33 +413,4 @@ +++++ ============== End RFC form ============== +++++ +++++ +++++-Items completed for release 1.38.0: +++++-#4 Embedded Python Scripting (implemented in all Daemons) +++++-#5 Events that call a Python program (Implemented in all +++++- daemons, but more cleanup work to be done). +++++-#6 Select one from among Multiple Storage Devices for Job. +++++- This is already implemented in 1.37. +++++-#7 Single Job Writing to Multiple Storage Devices. This is +++++- currently implemented with a Clone feature. +++++-#- Full multiple drive Autochanger support (done in 1.37) +++++-#- Built in support for communications encryption (TLS) +++++- done by Landon Fuller. +++++-# Support for Unicode characters +++++- (via UTF-8) on Win32 machines thanks to Thorsten Engel. +++++-Item 8: Break the one-to-one Relationship between a Job and a +++++- Specific Storage Device (or Devices if #10 is implemented). +++++- +++++-Completed items from last year's list: +++++-Item 1: Multiple simultaneous Jobs. (done) +++++-Item 3: Write the bscan program -- also write a bcopy program (done). +++++-Item 5: Implement Label templates (done). +++++-Item 6: Write a regression script (done) +++++-Item 9: Add SSL to daemon communications (done by Landon Fuller) +++++-Item 10: Define definitive tape format (done) +++++-Item 3: GUI for interactive restore. Partially Implemented in 1.34 +++++- Note, there is now a complete Webmin plugin, a partial +++++- GNOME console, and an excellent wx-console GUI. +++++-Item 4: GUI for interactive backup +++++-Item 2: Job Data Spooling. +++++- Done: Regular expression matching. +++++-Item 10: New daemon communication protocol (this has been dropped). ++++++Items completed for release 1.38.0 -- see kernsdone +++++Index: patches/1.38.1-to-1.38.2.patch +++++=================================================================== +++++RCS file: patches/1.38.1-to-1.38.2.patch +++++diff -N patches/1.38.1-to-1.38.2.patch +++++--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++++++ patches/1.38.1-to-1.38.2.patch 21 Nov 2005 13:17:58 -0000 +++++@@ -0,0 +1,2471 @@ ++++++ ++++++ This patch fixes the following bugs: ++++++ ++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. ++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator ++++++ says that this patch does not fix his problem) ++++++- Fix cancel failure bug. Bug #481 ++++++- Fix failure when Pool name has spaces. Bug #487 ++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 ++++++- Fix a couple of free()s in src/filed/acl.c ++++++- Fix memory overrun in bfile.c in building OS X resource ++++++ fork filename. Bug #489 ++++++ ++++++This patch is applied to Bacula source version 1.38.1 and will ++++++produce Bacula source version 1.38.2. Apply it with: ++++++ ++++++ cd ++++++ ./configure (your options) if not already done ++++++ patch -p0 <1.38.1-to-1.38.2.patch ++++++ make ++++++ make install ++++++ ++++++? osx_finder.patch ++++++Index: ChangeLog ++++++=================================================================== ++++++RCS file: /cvsroot/bacula/bacula/ChangeLog,v ++++++retrieving revision 1.154.2.7 ++++++diff -u -r1.154.2.7 ChangeLog ++++++--- ChangeLog 15 Nov 2005 09:27:19 -0000 1.154.2.7 +++++++++ ChangeLog 21 Nov 2005 13:12:58 -0000 ++++++@@ -1,4 +1,14 @@ ++++++ +++++++Changes to 1.38.2: +++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. +++++++- Fix bnet-server bug found on OpenBSD. Bug #486 +++++++- Fix cancel failure bug. Bug #481 +++++++- Fix failure when Pool name has spaces. Bug #487 +++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 +++++++- Fix a couple of free()s in src/filed/acl.c +++++++- Fix memory overrun in bfile.c in building OS X resource +++++++ fork filename. Bug #489 +++++++- Add Pool name to SD status output. ++++++ ++++++ Changes to 1.38.1: ++++++ - Apply SunOS patch for ACLs submitted by David Duchscher. ++++++Index: ReleaseNotes ++++++=================================================================== ++++++RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v ++++++retrieving revision 1.147.2.9 ++++++diff -u -r1.147.2.9 ReleaseNotes ++++++--- ReleaseNotes 15 Nov 2005 09:27:19 -0000 1.147.2.9 +++++++++ ReleaseNotes 21 Nov 2005 13:12:59 -0000 ++++++@@ -1,10 +1,21 @@ ++++++ ++++++- Release Notes for Bacula 1.38.1 +++++++ Release Notes for Bacula 1.38.2 ++++++ ++++++ Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in) ++++++ 20,440 additional lines of code since version 1.36.3 ++++++ ++++++-Changes since 1.38.0: +++++++Changes to 1.38.2: +++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. +++++++- Fix bnet-server bug found on OpenBSD. Bug #486 +++++++- Fix cancel failure bug. Bug #481 +++++++- Fix failure when Pool name has spaces. Bug #487 +++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 +++++++- Fix a couple of free()s in src/filed/acl.c +++++++- Fix memory overrun in bfile.c in building OS X resource +++++++ fork filename. Bug #489 +++++++- Add Pool name to SD status output. +++++++ +++++++Changes to 1.38.1: ++++++ - Corrected ACL for Solaris (David Duchscher and Attila Fulop). ++++++ - Add bacula_mail_summary.sh to examples directory. It makes ++++++ a single email summary of any number of jobs. Submitted ++++++Index: kernstodo ++++++=================================================================== ++++++RCS file: /cvsroot/bacula/bacula/kernstodo,v ++++++retrieving revision 1.570.2.6 ++++++diff -u -r1.570.2.6 kernstodo ++++++--- kernstodo 4 Nov 2005 09:16:49 -0000 1.570.2.6 +++++++++ kernstodo 21 Nov 2005 13:13:00 -0000 ++++++@@ -1,5 +1,5 @@ ++++++ Kern's ToDo List ++++++- 03 November 2005 +++++++ 21 November 2005 ++++++ ++++++ Major development: ++++++ Project Developer ++++++@@ -7,8 +7,6 @@ ++++++ Version 1.37 Kern (see below) ++++++ ======================================================== ++++++ ++++++-Final items for 1.37 before release: ++++++- ++++++ Document: ++++++ - Does ClientRunAfterJob fail the job on a bad return code? ++++++ - Document cleaning up the spool files: ++++++@@ -18,6 +16,8 @@ ++++++ - Does WildFile match against full name? Doc. ++++++ ++++++ For 1.39: +++++++- Make sure that all do_prompt() calls in Dir check for +++++++ -1 (error) and -2 (cancel) returns. ++++++ - Look at -D_FORTIFY_SOURCE=2 ++++++ - Add Win32 FileSet definition somewhere ++++++ - Look at fixing restore status stats in SD. ++++++@@ -27,6 +27,12 @@ ++++++ encountered, read many times (as it currently does), and if the ++++++ block cannot be read, skip to the next block, and try again. If ++++++ that fails, skip to the next file and try again, ... +++++++- Add level table: +++++++ create table LevelType (LevelType binary(1), LevelTypeLong tinyblob); +++++++ insert into LevelType (LevelType,LevelTypeLong) values +++++++ ("F","Full"), +++++++ ("D","Diff"), +++++++ ("I","Inc"); ++++++ - Add ACL to restore only to original location. ++++++ - Add a recursive mark command (rmark) to restore. ++++++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs ++++++@@ -1246,219 +1252,4 @@ ++++++ ==== ++++++ ++++++ ++++++-=== Done ++++++-- Save mount point for directories not traversed with onefs=yes. ++++++-- Add seconds to start and end times in the Job report output. ++++++-- if 2 concurrent backups are attempted on the same tape ++++++- drive (autoloader) into different tape pools, one of them will exit ++++++- fatally instead of halting until the drive is idle ++++++-- Update StartTime if job held in Job Queue. ++++++-- Look at www.nu2.nu/pebuilder as a helper for full windows ++++++- bare metal restore. (done by Scott) ++++++-- Fix orphanned buffers: ++++++- Orphaned buffer: 24 bytes allocated at line 808 of rufus-dir job.c ++++++- Orphaned buffer: 40 bytes allocated at line 45 of rufus-dir alist.c ++++++-- Implement Preben's suggestion to add ++++++- File System Types = ext2, ext3 ++++++- to FileSets, thus simplifying backup of *all* local partitions. ++++++-- Try to open a device on each Job if it was not opened ++++++- when the SD started. ++++++-- Add dump of VolSessionId/Time and FileIndex with bls. ++++++-- If Bacula does not find the right tape in the Autochanger, ++++++- then mark the tape in error and move on rather than asking ++++++- for operator intervention. ++++++-- Cancel command should include JobId in list of Jobs. ++++++-- Add performance testing hooks ++++++-- Bootstrap from JobMedia records. ++++++-- Implement WildFile and WildDir to solve problem of ++++++- saving only *.doc files. ++++++-- Fix ++++++- Please use the "label" command to create a new Volume for: ++++++- Storage: DDS-4-changer ++++++- Media type: ++++++- Pool: Default ++++++- label ++++++- The defined Storage resources are: ++++++-- Copy Changer Device and Changer Command from Autochanger ++++++- to Device resource in SD if none given in Device resource. ++++++-- 1. Automatic use of more than one drive in an autochanger (done) ++++++-- 2. Automatic selection of the correct drive for each Job (i.e. ++++++- selects a drive with an appropriate Volume for the Job) (done) ++++++-- 6. Allow multiple simultaneous Jobs referencing the same pool write ++++++- to several tapes (some new directive(s) are are probably needed for ++++++- this) (done) ++++++-- Locking (done) ++++++-- Key on Storage rather than Pool (done) ++++++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done). ++++++-- Synchronize multiple drives so that not more ++++++- than one loads a tape and any time (done) ++++++-- 4. Use Changer Device and Changer Command specified in the ++++++- Autochanger resource, if none is found in the Device resource. ++++++- You can continue to specify them in the Device resource if you want ++++++- or need them to be different for each device. ++++++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") ++++++- that can allow a Device be part of an Autochanger, and hence the changer ++++++- script protected, but if set to no, will prevent the Device from being ++++++- automatically selected from the changer. This allows the device to ++++++- be directly accessed through its Device name, but not through the ++++++- AutoChanger name. ++++++-#6 Select one from among Multiple Storage Devices for Job ++++++-#5 Events that call a Python program ++++++- (Implemented in Dir/SD) ++++++-- Make sure the Device name is in the Query packet returned. ++++++-- Don't start a second file job if one is already running. ++++++-- Implement EOF/EOV labels for ANSI labels ++++++-- Implement IBM labels. ++++++-- When Python creates a new label, the tape is immediately ++++++- recycled and no label created. This happens when using ++++++- autolabeling -- even when Python doesn't generate the name. ++++++-- Scratch Pool where the volumes can be re-assigned to any Pool. ++++++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) ++++++- is busy reading. Job 6 canceled. ++++++-- Remove separate thread for opening devices in SD. On the other ++++++- hand, don't block waiting for open() for devices. ++++++-- Fix code to either handle updating NumVol or to calculate it in ++++++- Dir next_vol.c ++++++-- Ensure that you cannot exclude a directory or a file explicitly ++++++- Included with File. ++++++-#4 Embedded Python Scripting ++++++- (Implemented in Dir/SD/FD) ++++++-- Add Python writable variable for changing the Priority, ++++++- Client, Storage, JobStatus (error), ... ++++++-- SD Python ++++++- - Solicit Events ++++++-- Add disk seeking on restore; turn off seek on tapes. ++++++- stored/match_bsr.c ++++++-- Look at dird_conf.c:1000: warning: `int size' ++++++- might be used uninitialized in this function ++++++-- Indicate when a Job is purged/pruned during restore. ++++++-- Implement some way to turn off automatic pruning in Jobs. ++++++-- Implement a way an Admin Job can prune, possibly multiple ++++++- clients -- Python script? ++++++-- Look at Preben's acl.c error handling code. ++++++-- SD crashes after a tape restore then doing a backup. ++++++-- If drive is opened read/write, close it and re-open ++++++- read-only if doing a restore, and vice-versa. ++++++-- Windows restore: ++++++- data-fd: RestoreFiles.2004-12-07_15.56.42 Error: ++++++- > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der ++++++- > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen ++++++- > Prozess verwendet wird. ++++++- Restore restores all files, but then fails at the end trying ++++++- to set the attributes of e: ++++++- from failed jobs.- Resolve the problem between Device name and Archive name, ++++++- and fix SD messages. ++++++-- Tell the "restore" user when browsing is no longer possible. ++++++-- Add a restore directory-x ++++++-- Write non-optimized bsrs from the JobMedia and Media records, ++++++- even after Files are pruned. ++++++-- Delete Stripe and Copy from VolParams to save space. ++++++-- Fix option 2 of restore -- list where file is backed up -- require Client, ++++++- then list last 20 backups. ++++++-- Finish implementation of passing all Storage and Device needs to ++++++- the SD. ++++++-- Move test for max wait time exceeded in job.c up -- Peter's idea. ++++++-## Consider moving docs to their own project. ++++++-## Move rescue to its own project. ++++++-- Add client version to the Client name line that prints in ++++++- the Job report. ++++++-- Fix the Rescue CDROM. ++++++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the ++++++- bottom, the link to "Tape Testing Chapter" is broken. It goes to ++++++- /html-manual/... while the others point to /rel-manual/... ++++++-- Device resource needs the "name" of the SD. ++++++-- Specify a single directory to restore. ++++++-- Implement MediaType keyword in bsr? ++++++-- Add a date and time stamp at the beginning of every line in the ++++++- Job report (Volker Sauer). ++++++-- Add level to estimate command. ++++++-- Add "limit=n" for "list jobs" ++++++-- Make bootstrap filename unique. ++++++-- Make Dmsg look at global before calling subroutine. ++++++-- From Chris Hull: ++++++- it seems to be complaining about 12:00pm which should be a valid 12 ++++++- hour time. I changed the time to 11:59am and everything works fine. ++++++- Also 12:00am works fine. 0:00pm also works (which I don't think ++++++- should). None of the values 12:00pm - 12:59pm work for that matter. ++++++-- Require restore via the restore command or make a restore Job ++++++- get the bootstrap file. ++++++-- Implement Maximum Job Spool Size ++++++-- Fix 3993 error in SD. It forgets to look at autochanger ++++++- resource for device command, ... ++++++-- 3. Prevent two drives requesting the same Volume in any given ++++++- autochanger, by checking if a Volume is mounted on another drive ++++++- in an Autochanger. ++++++-- Upgrade to MySQL 4.1.12 See: ++++++- http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html ++++++-- Add # Job Level date to bsr file ++++++-- Implement "PreferMountedVolumes = yes|no" in Job resource. ++++++-## Integrate web-bacula into a new Bacula project with ++++++- bimagemgr. ++++++-- Cleaning tapes should have Status "Cleaning" rather than append. ++++++-- Make sure that Python has access to Client address/port so that ++++++- it can check if Clients are alive. ++++++-- Review all items in "restore". ++++++-- Fix PostgreSQL GROUP BY problems in restore. ++++++-- Fix PostgreSQL sql problems in bugs. ++++++-- After rename ++++++- 04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume ++++++- "DLT-13Feb04". ++++++- Current Volume "DLT-04Jul05" not acceptable because: ++++++- 1997 Volume "DLT-13Feb04" not in catalog. ++++++- 04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device ++++++- "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02 ++++++-## Create a new GUI chapter explaining all the GUI programs. ++++++-- Make "update slots" when pointing to Autochanger, remove ++++++- all Volumes from other drives. "update slots all-drives"? ++++++- No, this is done by modifying mtx-changer to list what is ++++++- in the drives. ++++++-- Finish TLS implementation. ++++++-- Port limiting -m in iptables to prevent DoS attacks ++++++- could cause broken pipes on Bacula. ++++++-6. Build and test the Volume Shadow Copy (VSS) for Win32. ++++++-- Allow cancel of unknown Job ++++++-- State not saved when closing Win32 FD by icon ++++++-- bsr-opt-test fails. bsr deleted. Fix. ++++++-- Move Python daemon variables from Job to Bacula object. ++++++- WorkingDir, ConfigFile ++++++-- Document that Bootstrap files can be written with cataloging ++++++- turned off. ++++++-- Document details of ANSI/IBM labels ++++++-- OS linux 2.4 ++++++- 1) ADIC, DLT, FastStor 4000, 7*20GB ++++++-- Linux Sony LIB-D81, AIT-3 library works. ++++++-- Doc the following ++++++- to activate, check or disable the hardware compression feature on my ++++++- exb-8900 i use the exabyte "MammothTool" you can get it here: ++++++- http://www.exabyte.com/support/online/downloads/index.cfm ++++++- There is a solaris version of this tool. With option -C 0 or 1 you can ++++++- disable or activate compression. Start this tool without any options for ++++++- a small reference. ++++++-- Document Heartbeat Interval in the dealing with firewalls section. ++++++-- Document new CDROM directory. ++++++-- On Win32 working directory must have drive letter ???? ++++++-- On Win32 working directory must be writable by SYSTEM to ++++++- do restores. ++++++-- Document that ChangerDevice is used for Alert command. ++++++-- Add better documentation on how restores can be done ++++++-8. Take one more try at making DVD writing work (no go) ++++++-7. Write a bacula-web document ++++++-- Why isn't the DEVICE structure defined when doing ++++++- a reservation? ++++++-- Multi-drive changer seems to only use drive 0 ++++++- Multiple drives don't seem to be opened. ++++++-- My database is growing ++++++-- Call GetLastError() in the berrno constructor rather ++++++- than delaying until strerror. ++++++-- Tape xxx in drive 0, requested in drive 1 ++++++-- The mount command does not work with drives other than 0. ++++++-- A mount should cause the SD to re-examine what Slot is ++++++- loaded. ++++++-- The SD locks on to the first available drive then ++++++- wants a Volume that is released but in another drive -- ++++++- chaos. ++++++-- Run the regression scripts on Solaris and FreeBSD ++++++-- Figure out how to package gui, and rescue programs. ++++++-- Add a .dir command to restore tree code to eliminate the problem ++++++-- Mount after manually unloading changer causes hang in SD ++++++-- Fix JobACL with restore by JobId. +++++++=== Done -- see kernsdone ++++++Index: kes-1.38 ++++++=================================================================== ++++++RCS file: /cvsroot/bacula/bacula/kes-1.38,v ++++++retrieving revision 1.1.2.13 ++++++diff -u -r1.1.2.13 kes-1.38 ++++++--- kes-1.38 14 Nov 2005 20:20:38 -0000 1.1.2.13 +++++++++ kes-1.38 21 Nov 2005 13:13:00 -0000 ++++++@@ -3,6 +3,18 @@ ++++++ ++++++ General: ++++++ +++++++Changes to 1.38.2: +++++++20Oct05 +++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. +++++++- Fix bnet-server bug found on OpenBSD. Bug #486 +++++++- Fix cancel failure bug. Bug #481 +++++++- Fix failure when Pool name has spaces. Bug #487 +++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 +++++++- Fix a couple of free()s in src/filed/acl.c +++++++- Fix memory overrun in bfile.c in building OS X resource +++++++ fork filename. Bug #489 +++++++- Add Pool name to SD status output. +++++++ ++++++ Changes to 1.38.1: ++++++ 14Oct05 ++++++ - Apply SunOS patch for ACLs submitted by David Duchscher. ++++++Index: projects ++++++=================================================================== ++++++RCS file: /cvsroot/bacula/bacula/projects,v ++++++retrieving revision 1.12.2.3 ++++++diff -u -r1.12.2.3 projects ++++++--- projects 10 Nov 2005 20:25:27 -0000 1.12.2.3 +++++++++ projects 21 Nov 2005 13:13:00 -0000 ++++++@@ -228,7 +228,175 @@ ++++++ ++++++ Why: Performance enhancement. ++++++ +++++++Item 13: Let Bacula log tape usage and handle drive cleaning cycles. +++++++ Date: November 11, 2005 +++++++ Origin: Arno Lehmann +++++++ Status: +++++++ +++++++ What: Make Bacula manage tape life cycle information and drive +++++++ cleaning cycles. +++++++ +++++++ Why: Both parts of this project are important when operating backups. +++++++ We need to know which tapes need replacement, and we need to +++++++ make sure the drives are cleaned when necessary. While many +++++++ tape libraries and even autoloaders can handle all this +++++++ automatically, support by Bacula can be helpful for smaller +++++++ (older) libraries and single drives. Also, checking drive +++++++ status during operation can prevent some failures (as I had to +++++++ learn the hard way...) +++++++ +++++++ Notes: First, Bacula could (and even does, to some limited extent) +++++++ record tape and drive usage. For tapes, the number of mounts, +++++++ the amount of data, and the time the tape has actually been +++++++ running could be recorded. Data fields for Read and Write time +++++++ and Nmber of mounts already exist in the catalog (I'm not sure +++++++ if VolBytes is the sum of all bytes ever written to that volume +++++++ by Bacula). This information can be important when determining +++++++ which media to replace. For the tape drives known to Bacula, +++++++ similar information is interesting to determine the device +++++++ status and expected life time: Time it's been Reading and +++++++ Writing, number of tape Loads / Unloads / Errors. This +++++++ information is not yet recorded as far as I know. +++++++ +++++++ The next step would be implementing drive cleaning setup. +++++++ Bacula already has knowledge about cleaning tapes. Once it has +++++++ some information about cleaning cycles (measured in drive run +++++++ time, number of tapes used, or calender days, for example) it +++++++ can automatically execute tape cleaning (with an autochanger, +++++++ obviously) or ask for operator assistence loading a cleaning +++++++ tape. +++++++ +++++++ The next step would be to implement TAPEALERT checks not only +++++++ when changing tapes and only sending he information to the +++++++ administrator, but rather checking after each tape error, +++++++ checking on a regular basis (for example after each tape file), +++++++ and also before unloading and after loading a new tape. Then, +++++++ depending on the drives TAPEALERT state and the know drive +++++++ cleaning state Bacula could automatically schedule later +++++++ cleaning, clean immediately, or inform the operator. +++++++ +++++++ Implementing this would perhaps require another catalog change +++++++ and perhaps major changes in SD code and the DIR-SD protocoll, +++++++ so I'd only consider this worth implementing if it would +++++++ actually be used or even needed by many people. +++++++ +++++++Item 14: Merging of multiple backups into a single one. (Also called Synthetic +++++++ Backup or Consolidation). +++++++ +++++++ Origin: Marc Cousin and Eric Bollengier +++++++ Date: 15 November 2005 +++++++ Status: Depends on first implementing project Item 1 (Migration). +++++++ +++++++ What: A merged backup is a backup made without connecting to the Client. +++++++ It would be a Merge of existing backups into a single backup. +++++++ In effect, it is like a restore but to the backup medium. +++++++ +++++++ For instance, say that last sunday we made a full backup. Then +++++++ all week long, we created incremental backups, in order to do +++++++ them fast. Now comes sunday again, and we need another full. +++++++ The merged backup makes it possible to do instead an incremental +++++++ backup (during the night for instance), and then create a merged +++++++ backup during the day, by using the full and incrementals from +++++++ the week. The merged backup will be exactly like a full made +++++++ sunday night on the tape, but the production interruption on the +++++++ Client will be minimal, as the Client will only have to send +++++++ incrementals. +++++++ +++++++ In fact, if it's done correctly, you could merge all the +++++++ Incrementals into single Incremental, or all the Incrementals +++++++ and the last Differential into a new Differential, or the Full, +++++++ last differential and all the Incrementals into a new Full +++++++ backup. And there is no need to involve the Client. +++++++ +++++++ Why: The benefit is that : +++++++ - the Client just does an incremental ; +++++++ - the merged backup on tape is just as a single full backup, +++++++ and can be restored very fast. +++++++ +++++++ This is also a way of reducing the backup data since the old +++++++ data can then be pruned (or not) from the catalog, possibly +++++++ allowing older volumes to be recycled +++++++ +++++++Item 15: Automatic disabling of devices +++++++ Date: 2005-11-11 +++++++ Origin: Peter Eriksson +++++++ Status: +++++++ +++++++ What: After a configurable amount of fatal errors with a tape drive +++++++ Bacula should automatically disable further use of a certain +++++++ tape drive. There should also be "disable"/"enable" commands in +++++++ the "bconsole" tool. +++++++ +++++++ Why: On a multi-drive jukebox there is a possibility of tape drives +++++++ going bad during large backups (needing a cleaning tape run, +++++++ tapes getting stuck). It would be advantageous if Bacula would +++++++ automatically disable further use of a problematic tape drive +++++++ after a configurable amount of errors has occured. +++++++ +++++++ An example: I have a multi-drive jukebox (6 drives, 380+ slots) +++++++ where tapes occasionally get stuck inside the drive. Bacula will +++++++ notice that the "mtx-changer" command will fail and then fail +++++++ any backup jobs trying to use that drive. However, it will still +++++++ keep on trying to run new jobs using that drive and fail - +++++++ forever, and thus failing lots and lots of jobs... Since we have +++++++ many drives Bacula could have just automatically disabled +++++++ further use of that drive and used one of the other ones +++++++ instead. +++++++ +++++++ +++++++Item 16: Directive/mode to backup only file changes, not entire file +++++++ Date: 11 November 2005 +++++++ Origin: Joshua Kugler +++++++ Marek Bajon +++++++ Status: RFC +++++++ +++++++ What: Currently when a file changes, the entire file will be backed up in +++++++ the next incremental or full backup. To save space on the tapes +++++++ it would be nice to have a mode whereby only the changes to the +++++++ file would be backed up when it is changed. +++++++ +++++++ Why: This would save lots of space when backing up large files such as +++++++ logs, mbox files, Outlook PST files and the like. +++++++ +++++++ Notes: This would require the usage of disk-based volumes as comparing +++++++ files would not be feasible using a tape drive. +++++++ +++++++Item 17: Quick release of FD-SD connection +++++++ Origin: Frank Volf (frank at deze dot org) +++++++ Date: 17 november 2005 +++++++ Status: +++++++ +++++++ What: In the bacula implementation a backup is finished after all data +++++++ and attributes are succesfully written to storage. When using a +++++++ tape backup it is very annoying that a backup can take a day, +++++++ simply because the current tape (or whatever) is full and the +++++++ administrator has not put a new one in. During that time the +++++++ system cannot be taken off-line, because there is still an open +++++++ session between the storage daemon and the file daemon on the +++++++ client. +++++++ +++++++ Although this is a very good strategey for making "safe backups" +++++++ This can be annoying for e.g. laptops, that must remain +++++++ connected until the bacukp is completed. +++++++ +++++++ Using a new feature called "migration" it will be possible to +++++++ spool first to harddisk (using a special 'spool' migration +++++++ scheme) and then migrate the backup to tape. +++++++ +++++++ There is still the problem of getting the attributes committed. +++++++ If it takes a very long time to do, with the current code, the +++++++ job has not terminated, and the File daemon is not freed up. The +++++++ Storage daemon should release the File daemon as soon as all the +++++++ file data and all the attributes have been sent to it (the SD). +++++++ Currently the SD waits until everything is on tape and all the +++++++ attributes are transmitted to the Director before signalling +++++++ completion to the FD. I don't think I would have any problem +++++++ changing this. The reason is that even if the FD reports back to +++++++ the Dir that all is OK, the job will not terminate until the SD +++++++ has done the same thing -- so in a way keeping the SD-FD link +++++++ open to the very end is not really very productive ... ++++++ +++++++ Why: Makes backup of laptops much easier. ++++++ ++++++ ++++++ ============= Empty RFC form =========== ++++++@@ -245,33 +413,4 @@ ++++++ ============== End RFC form ============== ++++++ ++++++ ++++++-Items completed for release 1.38.0: ++++++-#4 Embedded Python Scripting (implemented in all Daemons) ++++++-#5 Events that call a Python program (Implemented in all ++++++- daemons, but more cleanup work to be done). ++++++-#6 Select one from among Multiple Storage Devices for Job. ++++++- This is already implemented in 1.37. ++++++-#7 Single Job Writing to Multiple Storage Devices. This is ++++++- currently implemented with a Clone feature. ++++++-#- Full multiple drive Autochanger support (done in 1.37) ++++++-#- Built in support for communications encryption (TLS) ++++++- done by Landon Fuller. ++++++-# Support for Unicode characters ++++++- (via UTF-8) on Win32 machines thanks to Thorsten Engel. ++++++-Item 8: Break the one-to-one Relationship between a Job and a ++++++- Specific Storage Device (or Devices if #10 is implemented). ++++++- ++++++-Completed items from last year's list: ++++++-Item 1: Multiple simultaneous Jobs. (done) ++++++-Item 3: Write the bscan program -- also write a bcopy program (done). ++++++-Item 5: Implement Label templates (done). ++++++-Item 6: Write a regression script (done) ++++++-Item 9: Add SSL to daemon communications (done by Landon Fuller) ++++++-Item 10: Define definitive tape format (done) ++++++-Item 3: GUI for interactive restore. Partially Implemented in 1.34 ++++++- Note, there is now a complete Webmin plugin, a partial ++++++- GNOME console, and an excellent wx-console GUI. ++++++-Item 4: GUI for interactive backup ++++++-Item 2: Job Data Spooling. ++++++- Done: Regular expression matching. ++++++-Item 10: New daemon communication protocol (this has been dropped). +++++++Items completed for release 1.38.0 -- see kernsdone ++++++Index: patches/1.38.1-to-1.38.2.patch ++++++=================================================================== ++++++RCS file: patches/1.38.1-to-1.38.2.patch ++++++diff -N patches/1.38.1-to-1.38.2.patch ++++++--- /dev/null 1 Jan 1970 00:00:00 -0000 +++++++++ patches/1.38.1-to-1.38.2.patch 21 Nov 2005 13:13:01 -0000 ++++++@@ -0,0 +1,1414 @@ +++++++ +++++++ This patch fixes the following bugs: +++++++ +++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. +++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator +++++++ says that this patch does not fix his problem) +++++++- Fix cancel failure bug. Bug #481 +++++++- Fix failure when Pool name has spaces. Bug #487 +++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 +++++++- Fix a couple of free()s in src/filed/acl.c +++++++- Fix memory overrun in bfile.c in building OS X resource +++++++ fork filename. Bug #489 +++++++ +++++++This patch is applied to Bacula source version 1.38.1 and will +++++++produce Bacula source version 1.38.2. Apply it with: +++++++ +++++++ cd +++++++ ./configure (your options) if not already done +++++++ patch -p0 <1.38.1-to-1.38.2.patch +++++++ make +++++++ make install +++++++ +++++++? osx_finder.patch +++++++Index: kernstodo +++++++=================================================================== +++++++RCS file: /cvsroot/bacula/bacula/kernstodo,v +++++++retrieving revision 1.570.2.6 +++++++diff -u -r1.570.2.6 kernstodo +++++++--- kernstodo 4 Nov 2005 09:16:49 -0000 1.570.2.6 ++++++++++ kernstodo 21 Nov 2005 13:06:36 -0000 +++++++@@ -1,5 +1,5 @@ +++++++ Kern's ToDo List +++++++- 03 November 2005 ++++++++ 21 November 2005 +++++++ +++++++ Major development: +++++++ Project Developer +++++++@@ -7,8 +7,6 @@ +++++++ Version 1.37 Kern (see below) +++++++ ======================================================== +++++++ +++++++-Final items for 1.37 before release: +++++++- +++++++ Document: +++++++ - Does ClientRunAfterJob fail the job on a bad return code? +++++++ - Document cleaning up the spool files: +++++++@@ -18,6 +16,8 @@ +++++++ - Does WildFile match against full name? Doc. +++++++ +++++++ For 1.39: ++++++++- Make sure that all do_prompt() calls in Dir check for ++++++++ -1 (error) and -2 (cancel) returns. +++++++ - Look at -D_FORTIFY_SOURCE=2 +++++++ - Add Win32 FileSet definition somewhere +++++++ - Look at fixing restore status stats in SD. +++++++@@ -27,6 +27,12 @@ +++++++ encountered, read many times (as it currently does), and if the +++++++ block cannot be read, skip to the next block, and try again. If +++++++ that fails, skip to the next file and try again, ... ++++++++- Add level table: ++++++++ create table LevelType (LevelType binary(1), LevelTypeLong tinyblob); ++++++++ insert into LevelType (LevelType,LevelTypeLong) values ++++++++ ("F","Full"), ++++++++ ("D","Diff"), ++++++++ ("I","Inc"); +++++++ - Add ACL to restore only to original location. +++++++ - Add a recursive mark command (rmark) to restore. +++++++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs +++++++@@ -1246,219 +1252,4 @@ +++++++ ==== +++++++ +++++++ +++++++-=== Done +++++++-- Save mount point for directories not traversed with onefs=yes. +++++++-- Add seconds to start and end times in the Job report output. +++++++-- if 2 concurrent backups are attempted on the same tape +++++++- drive (autoloader) into different tape pools, one of them will exit +++++++- fatally instead of halting until the drive is idle +++++++-- Update StartTime if job held in Job Queue. +++++++-- Look at www.nu2.nu/pebuilder as a helper for full windows +++++++- bare metal restore. (done by Scott) +++++++-- Fix orphanned buffers: +++++++- Orphaned buffer: 24 bytes allocated at line 808 of rufus-dir job.c +++++++- Orphaned buffer: 40 bytes allocated at line 45 of rufus-dir alist.c +++++++-- Implement Preben's suggestion to add +++++++- File System Types = ext2, ext3 +++++++- to FileSets, thus simplifying backup of *all* local partitions. +++++++-- Try to open a device on each Job if it was not opened +++++++- when the SD started. +++++++-- Add dump of VolSessionId/Time and FileIndex with bls. +++++++-- If Bacula does not find the right tape in the Autochanger, +++++++- then mark the tape in error and move on rather than asking +++++++- for operator intervention. +++++++-- Cancel command should include JobId in list of Jobs. +++++++-- Add performance testing hooks +++++++-- Bootstrap from JobMedia records. +++++++-- Implement WildFile and WildDir to solve problem of +++++++- saving only *.doc files. +++++++-- Fix +++++++- Please use the "label" command to create a new Volume for: +++++++- Storage: DDS-4-changer +++++++- Media type: +++++++- Pool: Default +++++++- label +++++++- The defined Storage resources are: +++++++-- Copy Changer Device and Changer Command from Autochanger +++++++- to Device resource in SD if none given in Device resource. +++++++-- 1. Automatic use of more than one drive in an autochanger (done) +++++++-- 2. Automatic selection of the correct drive for each Job (i.e. +++++++- selects a drive with an appropriate Volume for the Job) (done) +++++++-- 6. Allow multiple simultaneous Jobs referencing the same pool write +++++++- to several tapes (some new directive(s) are are probably needed for +++++++- this) (done) +++++++-- Locking (done) +++++++-- Key on Storage rather than Pool (done) +++++++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done). +++++++-- Synchronize multiple drives so that not more +++++++- than one loads a tape and any time (done) +++++++-- 4. Use Changer Device and Changer Command specified in the +++++++- Autochanger resource, if none is found in the Device resource. +++++++- You can continue to specify them in the Device resource if you want +++++++- or need them to be different for each device. +++++++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") +++++++- that can allow a Device be part of an Autochanger, and hence the changer +++++++- script protected, but if set to no, will prevent the Device from being +++++++- automatically selected from the changer. This allows the device to +++++++- be directly accessed through its Device name, but not through the +++++++- AutoChanger name. +++++++-#6 Select one from among Multiple Storage Devices for Job +++++++-#5 Events that call a Python program +++++++- (Implemented in Dir/SD) +++++++-- Make sure the Device name is in the Query packet returned. +++++++-- Don't start a second file job if one is already running. +++++++-- Implement EOF/EOV labels for ANSI labels +++++++-- Implement IBM labels. +++++++-- When Python creates a new label, the tape is immediately +++++++- recycled and no label created. This happens when using +++++++- autolabeling -- even when Python doesn't generate the name. +++++++-- Scratch Pool where the volumes can be re-assigned to any Pool. +++++++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) +++++++- is busy reading. Job 6 canceled. +++++++-- Remove separate thread for opening devices in SD. On the other +++++++- hand, don't block waiting for open() for devices. +++++++-- Fix code to either handle updating NumVol or to calculate it in +++++++- Dir next_vol.c +++++++-- Ensure that you cannot exclude a directory or a file explicitly +++++++- Included with File. +++++++-#4 Embedded Python Scripting +++++++- (Implemented in Dir/SD/FD) +++++++-- Add Python writable variable for changing the Priority, +++++++- Client, Storage, JobStatus (error), ... +++++++-- SD Python +++++++- - Solicit Events +++++++-- Add disk seeking on restore; turn off seek on tapes. +++++++- stored/match_bsr.c +++++++-- Look at dird_conf.c:1000: warning: `int size' +++++++- might be used uninitialized in this function +++++++-- Indicate when a Job is purged/pruned during restore. +++++++-- Implement some way to turn off automatic pruning in Jobs. +++++++-- Implement a way an Admin Job can prune, possibly multiple +++++++- clients -- Python script? +++++++-- Look at Preben's acl.c error handling code. +++++++-- SD crashes after a tape restore then doing a backup. +++++++-- If drive is opened read/write, close it and re-open +++++++- read-only if doing a restore, and vice-versa. +++++++-- Windows restore: +++++++- data-fd: RestoreFiles.2004-12-07_15.56.42 Error: +++++++- > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der +++++++- > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen +++++++- > Prozess verwendet wird. +++++++- Restore restores all files, but then fails at the end trying +++++++- to set the attributes of e: +++++++- from failed jobs.- Resolve the problem between Device name and Archive name, +++++++- and fix SD messages. +++++++-- Tell the "restore" user when browsing is no longer possible. +++++++-- Add a restore directory-x +++++++-- Write non-optimized bsrs from the JobMedia and Media records, +++++++- even after Files are pruned. +++++++-- Delete Stripe and Copy from VolParams to save space. +++++++-- Fix option 2 of restore -- list where file is backed up -- require Client, +++++++- then list last 20 backups. +++++++-- Finish implementation of passing all Storage and Device needs to +++++++- the SD. +++++++-- Move test for max wait time exceeded in job.c up -- Peter's idea. +++++++-## Consider moving docs to their own project. +++++++-## Move rescue to its own project. +++++++-- Add client version to the Client name line that prints in +++++++- the Job report. +++++++-- Fix the Rescue CDROM. +++++++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the +++++++- bottom, the link to "Tape Testing Chapter" is broken. It goes to +++++++- /html-manual/... while the others point to /rel-manual/... +++++++-- Device resource needs the "name" of the SD. +++++++-- Specify a single directory to restore. +++++++-- Implement MediaType keyword in bsr? +++++++-- Add a date and time stamp at the beginning of every line in the +++++++- Job report (Volker Sauer). +++++++-- Add level to estimate command. +++++++-- Add "limit=n" for "list jobs" +++++++-- Make bootstrap filename unique. +++++++-- Make Dmsg look at global before calling subroutine. +++++++-- From Chris Hull: +++++++- it seems to be complaining about 12:00pm which should be a valid 12 +++++++- hour time. I changed the time to 11:59am and everything works fine. +++++++- Also 12:00am works fine. 0:00pm also works (which I don't think +++++++- should). None of the values 12:00pm - 12:59pm work for that matter. +++++++-- Require restore via the restore command or make a restore Job +++++++- get the bootstrap file. +++++++-- Implement Maximum Job Spool Size +++++++-- Fix 3993 error in SD. It forgets to look at autochanger +++++++- resource for device command, ... +++++++-- 3. Prevent two drives requesting the same Volume in any given +++++++- autochanger, by checking if a Volume is mounted on another drive +++++++- in an Autochanger. +++++++-- Upgrade to MySQL 4.1.12 See: +++++++- http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html +++++++-- Add # Job Level date to bsr file +++++++-- Implement "PreferMountedVolumes = yes|no" in Job resource. +++++++-## Integrate web-bacula into a new Bacula project with +++++++- bimagemgr. +++++++-- Cleaning tapes should have Status "Cleaning" rather than append. +++++++-- Make sure that Python has access to Client address/port so that +++++++- it can check if Clients are alive. +++++++-- Review all items in "restore". +++++++-- Fix PostgreSQL GROUP BY problems in restore. +++++++-- Fix PostgreSQL sql problems in bugs. +++++++-- After rename +++++++- 04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume +++++++- "DLT-13Feb04". +++++++- Current Volume "DLT-04Jul05" not acceptable because: +++++++- 1997 Volume "DLT-13Feb04" not in catalog. +++++++- 04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device +++++++- "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02 +++++++-## Create a new GUI chapter explaining all the GUI programs. +++++++-- Make "update slots" when pointing to Autochanger, remove +++++++- all Volumes from other drives. "update slots all-drives"? +++++++- No, this is done by modifying mtx-changer to list what is +++++++- in the drives. +++++++-- Finish TLS implementation. +++++++-- Port limiting -m in iptables to prevent DoS attacks +++++++- could cause broken pipes on Bacula. +++++++-6. Build and test the Volume Shadow Copy (VSS) for Win32. +++++++-- Allow cancel of unknown Job +++++++-- State not saved when closing Win32 FD by icon +++++++-- bsr-opt-test fails. bsr deleted. Fix. +++++++-- Move Python daemon variables from Job to Bacula object. +++++++- WorkingDir, ConfigFile +++++++-- Document that Bootstrap files can be written with cataloging +++++++- turned off. +++++++-- Document details of ANSI/IBM labels +++++++-- OS linux 2.4 +++++++- 1) ADIC, DLT, FastStor 4000, 7*20GB +++++++-- Linux Sony LIB-D81, AIT-3 library works. +++++++-- Doc the following +++++++- to activate, check or disable the hardware compression feature on my +++++++- exb-8900 i use the exabyte "MammothTool" you can get it here: +++++++- http://www.exabyte.com/support/online/downloads/index.cfm +++++++- There is a solaris version of this tool. With option -C 0 or 1 you can +++++++- disable or activate compression. Start this tool without any options for +++++++- a small reference. +++++++-- Document Heartbeat Interval in the dealing with firewalls section. +++++++-- Document new CDROM directory. +++++++-- On Win32 working directory must have drive letter ???? +++++++-- On Win32 working directory must be writable by SYSTEM to +++++++- do restores. +++++++-- Document that ChangerDevice is used for Alert command. +++++++-- Add better documentation on how restores can be done +++++++-8. Take one more try at making DVD writing work (no go) +++++++-7. Write a bacula-web document +++++++-- Why isn't the DEVICE structure defined when doing +++++++- a reservation? +++++++-- Multi-drive changer seems to only use drive 0 +++++++- Multiple drives don't seem to be opened. +++++++-- My database is growing +++++++-- Call GetLastError() in the berrno constructor rather +++++++- than delaying until strerror. +++++++-- Tape xxx in drive 0, requested in drive 1 +++++++-- The mount command does not work with drives other than 0. +++++++-- A mount should cause the SD to re-examine what Slot is +++++++- loaded. +++++++-- The SD locks on to the first available drive then +++++++- wants a Volume that is released but in another drive -- +++++++- chaos. +++++++-- Run the regression scripts on Solaris and FreeBSD +++++++-- Figure out how to package gui, and rescue programs. +++++++-- Add a .dir command to restore tree code to eliminate the problem +++++++-- Mount after manually unloading changer causes hang in SD +++++++-- Fix JobACL with restore by JobId. ++++++++=== Done -- see kernsdone +++++++Index: kes-1.38 +++++++=================================================================== +++++++RCS file: /cvsroot/bacula/bacula/kes-1.38,v +++++++retrieving revision 1.1.2.13 +++++++diff -u -r1.1.2.13 kes-1.38 +++++++--- kes-1.38 14 Nov 2005 20:20:38 -0000 1.1.2.13 ++++++++++ kes-1.38 21 Nov 2005 13:06:36 -0000 +++++++@@ -3,6 +3,17 @@ +++++++ +++++++ General: +++++++ ++++++++Changes after release of 1.38.1: ++++++++20Oct05 ++++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. ++++++++- Fix bnet-server bug found on OpenBSD. Bug #486 ++++++++- Fix cancel failure bug. Bug #481 ++++++++- Fix failure when Pool name has spaces. Bug #487 ++++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 ++++++++- Fix a couple of free()s in src/filed/acl.c ++++++++- Fix memory overrun in bfile.c in building OS X resource ++++++++ fork filename. Bug #489 ++++++++ +++++++ Changes to 1.38.1: +++++++ 14Oct05 +++++++ - Apply SunOS patch for ACLs submitted by David Duchscher. +++++++Index: projects +++++++=================================================================== +++++++RCS file: /cvsroot/bacula/bacula/projects,v +++++++retrieving revision 1.12.2.3 +++++++diff -u -r1.12.2.3 projects +++++++--- projects 10 Nov 2005 20:25:27 -0000 1.12.2.3 ++++++++++ projects 21 Nov 2005 13:06:37 -0000 +++++++@@ -228,7 +228,175 @@ +++++++ +++++++ Why: Performance enhancement. +++++++ ++++++++Item 13: Let Bacula log tape usage and handle drive cleaning cycles. ++++++++ Date: November 11, 2005 ++++++++ Origin: Arno Lehmann ++++++++ Status: ++++++++ ++++++++ What: Make Bacula manage tape life cycle information and drive ++++++++ cleaning cycles. ++++++++ ++++++++ Why: Both parts of this project are important when operating backups. ++++++++ We need to know which tapes need replacement, and we need to ++++++++ make sure the drives are cleaned when necessary. While many ++++++++ tape libraries and even autoloaders can handle all this ++++++++ automatically, support by Bacula can be helpful for smaller ++++++++ (older) libraries and single drives. Also, checking drive ++++++++ status during operation can prevent some failures (as I had to ++++++++ learn the hard way...) ++++++++ ++++++++ Notes: First, Bacula could (and even does, to some limited extent) ++++++++ record tape and drive usage. For tapes, the number of mounts, ++++++++ the amount of data, and the time the tape has actually been ++++++++ running could be recorded. Data fields for Read and Write time ++++++++ and Nmber of mounts already exist in the catalog (I'm not sure ++++++++ if VolBytes is the sum of all bytes ever written to that volume ++++++++ by Bacula). This information can be important when determining ++++++++ which media to replace. For the tape drives known to Bacula, ++++++++ similar information is interesting to determine the device ++++++++ status and expected life time: Time it's been Reading and ++++++++ Writing, number of tape Loads / Unloads / Errors. This ++++++++ information is not yet recorded as far as I know. ++++++++ ++++++++ The next step would be implementing drive cleaning setup. ++++++++ Bacula already has knowledge about cleaning tapes. Once it has ++++++++ some information about cleaning cycles (measured in drive run ++++++++ time, number of tapes used, or calender days, for example) it ++++++++ can automatically execute tape cleaning (with an autochanger, ++++++++ obviously) or ask for operator assistence loading a cleaning ++++++++ tape. ++++++++ ++++++++ The next step would be to implement TAPEALERT checks not only ++++++++ when changing tapes and only sending he information to the ++++++++ administrator, but rather checking after each tape error, ++++++++ checking on a regular basis (for example after each tape file), ++++++++ and also before unloading and after loading a new tape. Then, ++++++++ depending on the drives TAPEALERT state and the know drive ++++++++ cleaning state Bacula could automatically schedule later ++++++++ cleaning, clean immediately, or inform the operator. ++++++++ ++++++++ Implementing this would perhaps require another catalog change ++++++++ and perhaps major changes in SD code and the DIR-SD protocoll, ++++++++ so I'd only consider this worth implementing if it would ++++++++ actually be used or even needed by many people. ++++++++ ++++++++Item 14: Merging of multiple backups into a single one. (Also called Synthetic ++++++++ Backup or Consolidation). ++++++++ ++++++++ Origin: Marc Cousin and Eric Bollengier ++++++++ Date: 15 November 2005 ++++++++ Status: Depends on first implementing project Item 1 (Migration). ++++++++ ++++++++ What: A merged backup is a backup made without connecting to the Client. ++++++++ It would be a Merge of existing backups into a single backup. ++++++++ In effect, it is like a restore but to the backup medium. ++++++++ ++++++++ For instance, say that last sunday we made a full backup. Then ++++++++ all week long, we created incremental backups, in order to do ++++++++ them fast. Now comes sunday again, and we need another full. ++++++++ The merged backup makes it possible to do instead an incremental ++++++++ backup (during the night for instance), and then create a merged ++++++++ backup during the day, by using the full and incrementals from ++++++++ the week. The merged backup will be exactly like a full made ++++++++ sunday night on the tape, but the production interruption on the ++++++++ Client will be minimal, as the Client will only have to send ++++++++ incrementals. ++++++++ ++++++++ In fact, if it's done correctly, you could merge all the ++++++++ Incrementals into single Incremental, or all the Incrementals ++++++++ and the last Differential into a new Differential, or the Full, ++++++++ last differential and all the Incrementals into a new Full ++++++++ backup. And there is no need to involve the Client. ++++++++ ++++++++ Why: The benefit is that : ++++++++ - the Client just does an incremental ; ++++++++ - the merged backup on tape is just as a single full backup, ++++++++ and can be restored very fast. ++++++++ ++++++++ This is also a way of reducing the backup data since the old ++++++++ data can then be pruned (or not) from the catalog, possibly ++++++++ allowing older volumes to be recycled ++++++++ ++++++++Item 15: Automatic disabling of devices ++++++++ Date: 2005-11-11 ++++++++ Origin: Peter Eriksson ++++++++ Status: ++++++++ ++++++++ What: After a configurable amount of fatal errors with a tape drive ++++++++ Bacula should automatically disable further use of a certain ++++++++ tape drive. There should also be "disable"/"enable" commands in ++++++++ the "bconsole" tool. ++++++++ ++++++++ Why: On a multi-drive jukebox there is a possibility of tape drives ++++++++ going bad during large backups (needing a cleaning tape run, ++++++++ tapes getting stuck). It would be advantageous if Bacula would ++++++++ automatically disable further use of a problematic tape drive ++++++++ after a configurable amount of errors has occured. ++++++++ ++++++++ An example: I have a multi-drive jukebox (6 drives, 380+ slots) ++++++++ where tapes occasionally get stuck inside the drive. Bacula will ++++++++ notice that the "mtx-changer" command will fail and then fail ++++++++ any backup jobs trying to use that drive. However, it will still ++++++++ keep on trying to run new jobs using that drive and fail - ++++++++ forever, and thus failing lots and lots of jobs... Since we have ++++++++ many drives Bacula could have just automatically disabled ++++++++ further use of that drive and used one of the other ones ++++++++ instead. ++++++++ ++++++++ ++++++++Item 16: Directive/mode to backup only file changes, not entire file ++++++++ Date: 11 November 2005 ++++++++ Origin: Joshua Kugler ++++++++ Marek Bajon ++++++++ Status: RFC ++++++++ ++++++++ What: Currently when a file changes, the entire file will be backed up in ++++++++ the next incremental or full backup. To save space on the tapes ++++++++ it would be nice to have a mode whereby only the changes to the ++++++++ file would be backed up when it is changed. ++++++++ ++++++++ Why: This would save lots of space when backing up large files such as ++++++++ logs, mbox files, Outlook PST files and the like. ++++++++ ++++++++ Notes: This would require the usage of disk-based volumes as comparing ++++++++ files would not be feasible using a tape drive. ++++++++ ++++++++Item 17: Quick release of FD-SD connection ++++++++ Origin: Frank Volf (frank at deze dot org) ++++++++ Date: 17 november 2005 ++++++++ Status: ++++++++ ++++++++ What: In the bacula implementation a backup is finished after all data ++++++++ and attributes are succesfully written to storage. When using a ++++++++ tape backup it is very annoying that a backup can take a day, ++++++++ simply because the current tape (or whatever) is full and the ++++++++ administrator has not put a new one in. During that time the ++++++++ system cannot be taken off-line, because there is still an open ++++++++ session between the storage daemon and the file daemon on the ++++++++ client. ++++++++ ++++++++ Although this is a very good strategey for making "safe backups" ++++++++ This can be annoying for e.g. laptops, that must remain ++++++++ connected until the bacukp is completed. ++++++++ ++++++++ Using a new feature called "migration" it will be possible to ++++++++ spool first to harddisk (using a special 'spool' migration ++++++++ scheme) and then migrate the backup to tape. ++++++++ ++++++++ There is still the problem of getting the attributes committed. ++++++++ If it takes a very long time to do, with the current code, the ++++++++ job has not terminated, and the File daemon is not freed up. The ++++++++ Storage daemon should release the File daemon as soon as all the ++++++++ file data and all the attributes have been sent to it (the SD). ++++++++ Currently the SD waits until everything is on tape and all the ++++++++ attributes are transmitted to the Director before signalling ++++++++ completion to the FD. I don't think I would have any problem ++++++++ changing this. The reason is that even if the FD reports back to ++++++++ the Dir that all is OK, the job will not terminate until the SD ++++++++ has done the same thing -- so in a way keeping the SD-FD link ++++++++ open to the very end is not really very productive ... +++++++ ++++++++ Why: Makes backup of laptops much easier. +++++++ +++++++ +++++++ ============= Empty RFC form =========== +++++++@@ -245,33 +413,4 @@ +++++++ ============== End RFC form ============== +++++++ +++++++ +++++++-Items completed for release 1.38.0: +++++++-#4 Embedded Python Scripting (implemented in all Daemons) +++++++-#5 Events that call a Python program (Implemented in all +++++++- daemons, but more cleanup work to be done). +++++++-#6 Select one from among Multiple Storage Devices for Job. +++++++- This is already implemented in 1.37. +++++++-#7 Single Job Writing to Multiple Storage Devices. This is +++++++- currently implemented with a Clone feature. +++++++-#- Full multiple drive Autochanger support (done in 1.37) +++++++-#- Built in support for communications encryption (TLS) +++++++- done by Landon Fuller. +++++++-# Support for Unicode characters +++++++- (via UTF-8) on Win32 machines thanks to Thorsten Engel. +++++++-Item 8: Break the one-to-one Relationship between a Job and a +++++++- Specific Storage Device (or Devices if #10 is implemented). +++++++- +++++++-Completed items from last year's list: +++++++-Item 1: Multiple simultaneous Jobs. (done) +++++++-Item 3: Write the bscan program -- also write a bcopy program (done). +++++++-Item 5: Implement Label templates (done). +++++++-Item 6: Write a regression script (done) +++++++-Item 9: Add SSL to daemon communications (done by Landon Fuller) +++++++-Item 10: Define definitive tape format (done) +++++++-Item 3: GUI for interactive restore. Partially Implemented in 1.34 +++++++- Note, there is now a complete Webmin plugin, a partial +++++++- GNOME console, and an excellent wx-console GUI. +++++++-Item 4: GUI for interactive backup +++++++-Item 2: Job Data Spooling. +++++++- Done: Regular expression matching. +++++++-Item 10: New daemon communication protocol (this has been dropped). ++++++++Items completed for release 1.38.0 -- see kernsdone +++++++Index: patches/1.38.1-to-1.38.2.patch +++++++=================================================================== +++++++RCS file: patches/1.38.1-to-1.38.2.patch +++++++diff -N patches/1.38.1-to-1.38.2.patch +++++++--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++++++++ patches/1.38.1-to-1.38.2.patch 21 Nov 2005 13:06:37 -0000 +++++++@@ -0,0 +1,412 @@ ++++++++ ++++++++ This patch fixes the following bugs: ++++++++ ++++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. ++++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator ++++++++ says that this patch does not fix his problem) ++++++++- Fix cancel failure bug. Bug #481 ++++++++- Fix failure when Pool name has spaces. Bug #487 ++++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 ++++++++- Fix a couple of free()s in src/filed/acl.c ++++++++- Fix memory overrun in bfile.c in building OS X resource ++++++++ fork filename. Bug #489 ++++++++ ++++++++This patch is applied to Bacula source version 1.38.1 and will ++++++++produce Bacula source version 1.38.2. Apply it with: ++++++++ ++++++++ cd ++++++++ ./configure (your options) if not already done ++++++++ patch -p0 <1.38.1-to-1.38.2.patch ++++++++ make ++++++++ make install ++++++++ ++++++++Index: kes-1.38 ++++++++=================================================================== ++++++++RCS file: /cvsroot/bacula/bacula/kes-1.38,v ++++++++retrieving revision 1.1.2.13 ++++++++diff -u -r1.1.2.13 kes-1.38 ++++++++--- kes-1.38 14 Nov 2005 20:20:38 -0000 1.1.2.13 +++++++++++ kes-1.38 21 Nov 2005 12:53:36 -0000 ++++++++@@ -3,6 +3,17 @@ ++++++++ ++++++++ General: ++++++++ +++++++++Changes after release of 1.38.1: +++++++++20Oct05 +++++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. +++++++++- Fix bnet-server bug found on OpenBSD. Bug #486 +++++++++- Fix cancel failure bug. Bug #481 +++++++++- Fix failure when Pool name has spaces. Bug #487 +++++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 +++++++++- Fix a couple of free()s in src/filed/acl.c +++++++++- Fix memory overrun in bfile.c in building OS X resource +++++++++ fork filename. Bug #489 +++++++++ ++++++++ Changes to 1.38.1: ++++++++ 14Oct05 ++++++++ - Apply SunOS patch for ACLs submitted by David Duchscher. ++++++++Index: src/version.h ++++++++=================================================================== ++++++++RCS file: /cvsroot/bacula/bacula/src/version.h,v ++++++++retrieving revision 1.554.2.14 ++++++++diff -u -r1.554.2.14 version.h ++++++++--- src/version.h 14 Nov 2005 14:21:58 -0000 1.554.2.14 +++++++++++ src/version.h 21 Nov 2005 12:53:37 -0000 ++++++++@@ -3,9 +3,9 @@ ++++++++ */ ++++++++ ++++++++ #undef VERSION ++++++++-#define VERSION "1.38.1" ++++++++-#define BDATE "14 November 2005" ++++++++-#define LSMDATE "14Nov05" +++++++++#define VERSION "1.38.2" +++++++++#define BDATE "20 November 2005" +++++++++#define LSMDATE "20Nov05" ++++++++ ++++++++ /* Debug flags */ ++++++++ #undef DEBUG ++++++++Index: src/dird/catreq.c ++++++++=================================================================== ++++++++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v ++++++++retrieving revision 1.77.2.1 ++++++++diff -u -r1.77.2.1 catreq.c ++++++++--- src/dird/catreq.c 26 Oct 2005 14:02:04 -0000 1.77.2.1 +++++++++++ src/dird/catreq.c 21 Nov 2005 12:53:37 -0000 ++++++++@@ -10,7 +10,7 @@ ++++++++ * Basic tasks done here: ++++++++ * Handle Catalog services. ++++++++ * ++++++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++++ */ ++++++++ /* ++++++++ Copyright (C) 2001-2005 Kern Sibbald ++++++++@@ -117,6 +117,7 @@ ++++++++ if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) { ++++++++ memset(&pr, 0, sizeof(pr)); ++++++++ bstrncpy(pr.Name, pool_name, sizeof(pr.Name)); +++++++++ unbash_spaces(pr.Name); ++++++++ ok = db_get_pool_record(jcr, jcr->db, &pr); ++++++++ if (ok) { ++++++++ mr.PoolId = pr.PoolId; ++++++++Index: src/dird/ua_restore.c ++++++++=================================================================== ++++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v ++++++++retrieving revision 1.101.2.1 ++++++++diff -u -r1.101.2.1 ua_restore.c ++++++++--- src/dird/ua_restore.c 26 Oct 2005 14:02:04 -0000 1.101.2.1 +++++++++++ src/dird/ua_restore.c 21 Nov 2005 12:53:37 -0000 ++++++++@@ -10,7 +10,7 @@ ++++++++ * ++++++++ * Kern Sibbald, July MMII ++++++++ * ++++++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++++ */ ++++++++ /* ++++++++ Copyright (C) 2002-2005 Kern Sibbald ++++++++@@ -573,6 +573,7 @@ ++++++++ } ++++++++ return 2; ++++++++ +++++++++ case -2: /* Period entered to cancel */ ++++++++ case 11: /* Cancel or quit */ ++++++++ return 0; ++++++++ } ++++++++Index: src/dird/ua_run.c ++++++++=================================================================== ++++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v ++++++++retrieving revision 1.71 ++++++++diff -u -r1.71 ua_run.c ++++++++--- src/dird/ua_run.c 10 Aug 2005 16:35:19 -0000 1.71 +++++++++++ src/dird/ua_run.c 21 Nov 2005 12:53:38 -0000 ++++++++@@ -851,6 +851,8 @@ ++++++++ bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n")); ++++++++ } ++++++++ goto try_again; +++++++++ case -1: /* error or cancel */ +++++++++ goto bail_out; ++++++++ default: ++++++++ goto try_again; ++++++++ } ++++++++Index: src/dird/ua_select.c ++++++++=================================================================== ++++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v ++++++++retrieving revision 1.65.2.1 ++++++++diff -u -r1.65.2.1 ua_select.c ++++++++--- src/dird/ua_select.c 12 Nov 2005 17:30:52 -0000 1.65.2.1 +++++++++++ src/dird/ua_select.c 21 Nov 2005 12:53:39 -0000 ++++++++@@ -4,7 +4,7 @@ ++++++++ * ++++++++ * Kern Sibbald, October MMI ++++++++ * ++++++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++++ */ ++++++++ /* ++++++++ Copyright (C) 2001-2005 Kern Sibbald ++++++++@@ -149,7 +149,9 @@ ++++++++ } ++++++++ } ++++++++ UnlockRes(); ++++++++- do_prompt(ua, _("Storage"), _("Select Storage resource"), name, sizeof(name)); +++++++++ if (do_prompt(ua, _("Storage"), _("Select Storage resource"), name, sizeof(name)) < 0) { +++++++++ return NULL; +++++++++ } ++++++++ store = (STORE *)GetResWithName(R_STORAGE, name); ++++++++ return store; ++++++++ } ++++++++@@ -170,7 +172,9 @@ ++++++++ } ++++++++ } ++++++++ UnlockRes(); ++++++++- do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)); +++++++++ if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) { +++++++++ return NULL; +++++++++ } ++++++++ fs = (FILESET *)GetResWithName(R_FILESET, name); ++++++++ return fs; ++++++++ } ++++++++@@ -202,7 +206,9 @@ ++++++++ } ++++++++ } ++++++++ UnlockRes(); ++++++++- do_prompt(ua, _("Catalog"), _("Select Catalog resource"), name, sizeof(name)); +++++++++ if (do_prompt(ua, _("Catalog"), _("Select Catalog resource"), name, sizeof(name)) < 0) { +++++++++ return NULL; +++++++++ } ++++++++ catalog = (CAT *)GetResWithName(R_CATALOG, name); ++++++++ } ++++++++ return catalog; ++++++++@@ -225,7 +231,9 @@ ++++++++ } ++++++++ } ++++++++ UnlockRes(); ++++++++- do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)); +++++++++ if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) { +++++++++ return NULL; +++++++++ } ++++++++ job = (JOB *)GetResWithName(R_JOB, name); ++++++++ return job; ++++++++ } ++++++++@@ -246,7 +254,9 @@ ++++++++ } ++++++++ } ++++++++ UnlockRes(); ++++++++- do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)); +++++++++ if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) { +++++++++ return NULL; +++++++++ } ++++++++ job = (JOB *)GetResWithName(R_JOB, name); ++++++++ return job; ++++++++ } ++++++++@@ -269,7 +279,9 @@ ++++++++ } ++++++++ } ++++++++ UnlockRes(); ++++++++- do_prompt(ua, _("Client"), _("Select Client (File daemon) resource"), name, sizeof(name)); +++++++++ if (do_prompt(ua, _("Client"), _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) { +++++++++ return NULL; +++++++++ } ++++++++ client = (CLIENT *)GetResWithName(R_CLIENT, name); ++++++++ return client; ++++++++ } ++++++++@@ -551,7 +563,9 @@ ++++++++ } ++++++++ } ++++++++ UnlockRes(); ++++++++- do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)); +++++++++ if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) { +++++++++ return NULL; +++++++++ } ++++++++ pool = (POOL *)GetResWithName(R_POOL, name); ++++++++ return pool; ++++++++ } ++++++++@@ -673,12 +687,16 @@ ++++++++ * Returns: -1 on error ++++++++ * index base 0 on success, and choice ++++++++ * is copied to prompt if not NULL +++++++++ * prompt is set to the chosen prompt item string ++++++++ */ ++++++++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt) ++++++++ { ++++++++ int i, item; ++++++++ char pmsg[MAXSTRING]; ++++++++ +++++++++ if (prompt) { +++++++++ *prompt = 0; +++++++++ } ++++++++ if (ua->num_prompts == 2) { ++++++++ item = 1; ++++++++ if (prompt) { ++++++++@@ -698,15 +716,11 @@ ++++++++ bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]); ++++++++ } ++++++++ ++++++++- if (prompt) { ++++++++- *prompt = 0; ++++++++- } ++++++++- ++++++++ for ( ;; ) { ++++++++ /* First item is the prompt string, not the items */ ++++++++ if (ua->num_prompts == 1) { ++++++++ bsendmsg(ua, _("Selection is empty!\n")); ++++++++- item = 0; /* list is empty ! */ +++++++++ item = -1; /* list is empty ! */ ++++++++ break; ++++++++ } ++++++++ if (ua->num_prompts == 2) { ++++++++@@ -741,7 +755,7 @@ ++++++++ free(ua->prompt[i]); ++++++++ } ++++++++ ua->num_prompts = 0; ++++++++- return item - 1; +++++++++ return item>0 ? item-1 : item; ++++++++ } ++++++++ ++++++++ ++++++++Index: src/dird/ua_update.c ++++++++=================================================================== ++++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v ++++++++retrieving revision 1.7 ++++++++diff -u -r1.7 ua_update.c ++++++++--- src/dird/ua_update.c 28 Aug 2005 12:22:02 -0000 1.7 +++++++++++ src/dird/ua_update.c 21 Nov 2005 12:53:39 -0000 ++++++++@@ -590,7 +590,7 @@ ++++++++ update_all_vols_from_pool(ua); ++++++++ return 1; ++++++++ default: /* Done or error */ ++++++++- bsendmsg(ua, _("Selection done.\n")); +++++++++ bsendmsg(ua, _("Selection terminated.\n")); ++++++++ return 1; ++++++++ } ++++++++ } ++++++++Index: src/filed/acl.c ++++++++=================================================================== ++++++++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v ++++++++retrieving revision 1.10.2.1 ++++++++diff -u -r1.10.2.1 acl.c ++++++++--- src/filed/acl.c 14 Nov 2005 20:20:38 -0000 1.10.2.1 +++++++++++ src/filed/acl.c 21 Nov 2005 12:53:39 -0000 ++++++++@@ -26,7 +26,7 @@ ++++++++ * ++++++++ * Written by Preben 'Peppe' Guldberg, December MMIV ++++++++ * ++++++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++++ */ ++++++++ /* ++++++++ Copyright (C) 2004-2005 Kern Sibbald ++++++++@@ -140,7 +140,7 @@ ++++++++ ++++++++ if ((acl_text = acl_get(jcr->last_fname)) != NULL) { ++++++++ len = pm_strcpy(jcr->acl_text, acl_text); ++++++++- free(acl_text); +++++++++ actuallyfree(acl_text); ++++++++ return len; ++++++++ } ++++++++ return -1; ++++++++@@ -270,7 +270,7 @@ ++++++++ if ((n = getacl(jcr->last_fname, n, acls)) > 0) { ++++++++ if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) { ++++++++ len = pm_strcpy(jcr->acl_text, acl_text); ++++++++- free(acl_text); +++++++++ actuallyfree(acl_text); ++++++++ return len; ++++++++ } ++++++++ } ++++++++Index: src/findlib/bfile.c ++++++++=================================================================== ++++++++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v ++++++++retrieving revision 1.40 ++++++++diff -u -r1.40 bfile.c ++++++++--- src/findlib/bfile.c 10 Aug 2005 16:35:19 -0000 1.40 +++++++++++ src/findlib/bfile.c 21 Nov 2005 12:53:39 -0000 ++++++++@@ -623,13 +623,10 @@ ++++++++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode) ++++++++ { ++++++++ POOLMEM *rsrc_fname; ++++++++- size_t fname_len; ++++++++ ++++++++- fname_len = strlen(fname); ++++++++ rsrc_fname = get_pool_memory(PM_FNAME); ++++++++- bstrncpy(rsrc_fname, fname, fname_len + 1); ++++++++- bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC, ++++++++- strlen(_PATH_RSRCFORKSPEC) + 1); +++++++++ pm_strcpy(rsrc_fname, fname); +++++++++ pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC); ++++++++ bopen(bfd, rsrc_fname, flags, mode); ++++++++ free_pool_memory(rsrc_fname); ++++++++ return bfd->fid; ++++++++Index: src/lib/bnet_server.c ++++++++=================================================================== ++++++++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v ++++++++retrieving revision 1.39 ++++++++diff -u -r1.39 bnet_server.c ++++++++--- src/lib/bnet_server.c 18 Aug 2005 15:37:40 -0000 1.39 +++++++++++ src/lib/bnet_server.c 21 Nov 2005 12:53:39 -0000 ++++++++@@ -153,7 +153,6 @@ ++++++++ /* Error, get out */ ++++++++ foreach_dlist(fd_ptr, &sockfds) { ++++++++ close(fd_ptr->fd); ++++++++- free((void *)fd_ptr); ++++++++ } ++++++++ Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror()); ++++++++ break; ++++++++Index: src/stored/autochanger.c ++++++++=================================================================== ++++++++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v ++++++++retrieving revision 1.47.2.3 ++++++++diff -u -r1.47.2.3 autochanger.c ++++++++--- src/stored/autochanger.c 12 Nov 2005 17:30:53 -0000 1.47.2.3 +++++++++++ src/stored/autochanger.c 21 Nov 2005 12:53:39 -0000 ++++++++@@ -4,7 +4,7 @@ ++++++++ * ++++++++ * Kern Sibbald, August MMII ++++++++ * ++++++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++++ */ ++++++++ /* ++++++++ Copyright (C) 2002-2005 Kern Sibbald ++++++++@@ -163,6 +163,7 @@ ++++++++ rtn_stat = -1; /* hard error */ ++++++++ } ++++++++ Dmsg2(400, "load slot %d status=%d\n", slot, status); +++++++++ unlock_changer(dcr); ++++++++ } else { ++++++++ status = 0; /* we got what we want */ ++++++++ dev->Slot = slot; /* set currently loaded slot */ ++++++++@@ -174,7 +175,6 @@ ++++++++ } else { ++++++++ rtn_stat = 0; /* no changer found */ ++++++++ } ++++++++- unlock_changer(dcr); ++++++++ free_pool_memory(changer); ++++++++ return rtn_stat; ++++++++ ++++++++Index: src/tray-monitor/tray-monitor.c ++++++++=================================================================== ++++++++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v ++++++++retrieving revision 1.25.2.1 ++++++++diff -u -r1.25.2.1 tray-monitor.c ++++++++--- src/tray-monitor/tray-monitor.c 1 Oct 2005 10:20:18 -0000 1.25.2.1 +++++++++++ src/tray-monitor/tray-monitor.c 21 Nov 2005 12:53:39 -0000 ++++++++@@ -4,7 +4,7 @@ ++++++++ * ++++++++ * Nicolas Boichat, August MMIV ++++++++ * ++++++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++++ */ ++++++++ ++++++++ /* ++++++++@@ -881,7 +881,7 @@ ++++++++ } ++++++++ ++++++++ if (item->D_sock == NULL) { ++++++++- g_slist_append(*list, (void *)_("Cannot connect to daemon.\n")); +++++++++ g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n"))); ++++++++ changeStatusMessage(item, _("Cannot connect to daemon.")); ++++++++ item->state = error; ++++++++ item->oldstate = error; +++++++Index: patches/patches-1.38.0 +++++++=================================================================== +++++++RCS file: patches/patches-1.38.0 +++++++diff -N patches/patches-1.38.0 +++++++Index: patches/patches-1.38.1 +++++++=================================================================== +++++++RCS file: patches/patches-1.38.1 +++++++diff -N patches/patches-1.38.1 +++++++--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++++++++ patches/patches-1.38.1 21 Nov 2005 13:06:37 -0000 +++++++@@ -0,0 +1,14 @@ ++++++++20Nov05 1.38.1-to-1.38.2.patch ++++++++ This patch fixes the following bugs: ++++++++ ++++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. ++++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator ++++++++ says this patch does not fix his problem) ++++++++- Fix cancel failure bug. Bug #481 ++++++++- Fix failure when Pool name has spaces. Bug #487 ++++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 ++++++++- Fix a couple of free()s in src/filed/acl.c ++++++++- Fix memory overrun in bfile.c in building OS X resource ++++++++ fork filename. Bug #489 ++++++++ ++++++++ +++++++Index: src/version.h +++++++=================================================================== +++++++RCS file: /cvsroot/bacula/bacula/src/version.h,v +++++++retrieving revision 1.554.2.14 +++++++diff -u -r1.554.2.14 version.h +++++++--- src/version.h 14 Nov 2005 14:21:58 -0000 1.554.2.14 ++++++++++ src/version.h 21 Nov 2005 13:06:37 -0000 +++++++@@ -3,9 +3,9 @@ +++++++ */ +++++++ +++++++ #undef VERSION +++++++-#define VERSION "1.38.1" +++++++-#define BDATE "14 November 2005" +++++++-#define LSMDATE "14Nov05" ++++++++#define VERSION "1.38.2" ++++++++#define BDATE "20 November 2005" ++++++++#define LSMDATE "20Nov05" +++++++ +++++++ /* Debug flags */ +++++++ #undef DEBUG +++++++Index: src/dird/catreq.c +++++++=================================================================== +++++++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v +++++++retrieving revision 1.77.2.1 +++++++diff -u -r1.77.2.1 catreq.c +++++++--- src/dird/catreq.c 26 Oct 2005 14:02:04 -0000 1.77.2.1 ++++++++++ src/dird/catreq.c 21 Nov 2005 13:06:37 -0000 +++++++@@ -10,7 +10,7 @@ +++++++ * Basic tasks done here: +++++++ * Handle Catalog services. +++++++ * +++++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++++ */ +++++++ /* +++++++ Copyright (C) 2001-2005 Kern Sibbald +++++++@@ -117,6 +117,7 @@ +++++++ if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) { +++++++ memset(&pr, 0, sizeof(pr)); +++++++ bstrncpy(pr.Name, pool_name, sizeof(pr.Name)); ++++++++ unbash_spaces(pr.Name); +++++++ ok = db_get_pool_record(jcr, jcr->db, &pr); +++++++ if (ok) { +++++++ mr.PoolId = pr.PoolId; +++++++Index: src/dird/ua_restore.c +++++++=================================================================== +++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v +++++++retrieving revision 1.101.2.1 +++++++diff -u -r1.101.2.1 ua_restore.c +++++++--- src/dird/ua_restore.c 26 Oct 2005 14:02:04 -0000 1.101.2.1 ++++++++++ src/dird/ua_restore.c 21 Nov 2005 13:06:37 -0000 +++++++@@ -10,7 +10,7 @@ +++++++ * +++++++ * Kern Sibbald, July MMII +++++++ * +++++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++++ */ +++++++ /* +++++++ Copyright (C) 2002-2005 Kern Sibbald +++++++@@ -573,6 +573,7 @@ +++++++ } +++++++ return 2; +++++++ ++++++++ case -2: /* Period entered to cancel */ +++++++ case 11: /* Cancel or quit */ +++++++ return 0; +++++++ } +++++++Index: src/dird/ua_run.c +++++++=================================================================== +++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v +++++++retrieving revision 1.71 +++++++diff -u -r1.71 ua_run.c +++++++--- src/dird/ua_run.c 10 Aug 2005 16:35:19 -0000 1.71 ++++++++++ src/dird/ua_run.c 21 Nov 2005 13:06:38 -0000 +++++++@@ -851,6 +851,8 @@ +++++++ bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n")); +++++++ } +++++++ goto try_again; ++++++++ case -1: /* error or cancel */ ++++++++ goto bail_out; +++++++ default: +++++++ goto try_again; +++++++ } +++++++Index: src/dird/ua_select.c +++++++=================================================================== +++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v +++++++retrieving revision 1.65.2.1 +++++++diff -u -r1.65.2.1 ua_select.c +++++++--- src/dird/ua_select.c 12 Nov 2005 17:30:52 -0000 1.65.2.1 ++++++++++ src/dird/ua_select.c 21 Nov 2005 13:06:38 -0000 +++++++@@ -4,7 +4,7 @@ +++++++ * +++++++ * Kern Sibbald, October MMI +++++++ * +++++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++++ */ +++++++ /* +++++++ Copyright (C) 2001-2005 Kern Sibbald +++++++@@ -149,7 +149,9 @@ +++++++ } +++++++ } +++++++ UnlockRes(); +++++++- do_prompt(ua, _("Storage"), _("Select Storage resource"), name, sizeof(name)); ++++++++ if (do_prompt(ua, _("Storage"), _("Select Storage resource"), name, sizeof(name)) < 0) { ++++++++ return NULL; ++++++++ } +++++++ store = (STORE *)GetResWithName(R_STORAGE, name); +++++++ return store; +++++++ } +++++++@@ -170,7 +172,9 @@ +++++++ } +++++++ } +++++++ UnlockRes(); +++++++- do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)); ++++++++ if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) { ++++++++ return NULL; ++++++++ } +++++++ fs = (FILESET *)GetResWithName(R_FILESET, name); +++++++ return fs; +++++++ } +++++++@@ -202,7 +206,9 @@ +++++++ } +++++++ } +++++++ UnlockRes(); +++++++- do_prompt(ua, _("Catalog"), _("Select Catalog resource"), name, sizeof(name)); ++++++++ if (do_prompt(ua, _("Catalog"), _("Select Catalog resource"), name, sizeof(name)) < 0) { ++++++++ return NULL; ++++++++ } +++++++ catalog = (CAT *)GetResWithName(R_CATALOG, name); +++++++ } +++++++ return catalog; +++++++@@ -225,7 +231,9 @@ +++++++ } +++++++ } +++++++ UnlockRes(); +++++++- do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)); ++++++++ if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) { ++++++++ return NULL; ++++++++ } +++++++ job = (JOB *)GetResWithName(R_JOB, name); +++++++ return job; +++++++ } +++++++@@ -246,7 +254,9 @@ +++++++ } +++++++ } +++++++ UnlockRes(); +++++++- do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)); ++++++++ if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) { ++++++++ return NULL; ++++++++ } +++++++ job = (JOB *)GetResWithName(R_JOB, name); +++++++ return job; +++++++ } +++++++@@ -269,7 +279,9 @@ +++++++ } +++++++ } +++++++ UnlockRes(); +++++++- do_prompt(ua, _("Client"), _("Select Client (File daemon) resource"), name, sizeof(name)); ++++++++ if (do_prompt(ua, _("Client"), _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) { ++++++++ return NULL; ++++++++ } +++++++ client = (CLIENT *)GetResWithName(R_CLIENT, name); +++++++ return client; +++++++ } +++++++@@ -551,7 +563,9 @@ +++++++ } +++++++ } +++++++ UnlockRes(); +++++++- do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)); ++++++++ if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) { ++++++++ return NULL; ++++++++ } +++++++ pool = (POOL *)GetResWithName(R_POOL, name); +++++++ return pool; +++++++ } +++++++@@ -673,12 +687,16 @@ +++++++ * Returns: -1 on error +++++++ * index base 0 on success, and choice +++++++ * is copied to prompt if not NULL ++++++++ * prompt is set to the chosen prompt item string +++++++ */ +++++++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt) +++++++ { +++++++ int i, item; +++++++ char pmsg[MAXSTRING]; +++++++ ++++++++ if (prompt) { ++++++++ *prompt = 0; ++++++++ } +++++++ if (ua->num_prompts == 2) { +++++++ item = 1; +++++++ if (prompt) { +++++++@@ -698,15 +716,11 @@ +++++++ bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]); +++++++ } +++++++ +++++++- if (prompt) { +++++++- *prompt = 0; +++++++- } +++++++- +++++++ for ( ;; ) { +++++++ /* First item is the prompt string, not the items */ +++++++ if (ua->num_prompts == 1) { +++++++ bsendmsg(ua, _("Selection is empty!\n")); +++++++- item = 0; /* list is empty ! */ ++++++++ item = -1; /* list is empty ! */ +++++++ break; +++++++ } +++++++ if (ua->num_prompts == 2) { +++++++@@ -741,7 +755,7 @@ +++++++ free(ua->prompt[i]); +++++++ } +++++++ ua->num_prompts = 0; +++++++- return item - 1; ++++++++ return item>0 ? item-1 : item; +++++++ } +++++++ +++++++ +++++++Index: src/dird/ua_update.c +++++++=================================================================== +++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v +++++++retrieving revision 1.7 +++++++diff -u -r1.7 ua_update.c +++++++--- src/dird/ua_update.c 28 Aug 2005 12:22:02 -0000 1.7 ++++++++++ src/dird/ua_update.c 21 Nov 2005 13:06:38 -0000 +++++++@@ -590,7 +590,7 @@ +++++++ update_all_vols_from_pool(ua); +++++++ return 1; +++++++ default: /* Done or error */ +++++++- bsendmsg(ua, _("Selection done.\n")); ++++++++ bsendmsg(ua, _("Selection terminated.\n")); +++++++ return 1; +++++++ } +++++++ } +++++++Index: src/filed/acl.c +++++++=================================================================== +++++++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v +++++++retrieving revision 1.10.2.1 +++++++diff -u -r1.10.2.1 acl.c +++++++--- src/filed/acl.c 14 Nov 2005 20:20:38 -0000 1.10.2.1 ++++++++++ src/filed/acl.c 21 Nov 2005 13:06:38 -0000 +++++++@@ -26,7 +26,7 @@ +++++++ * +++++++ * Written by Preben 'Peppe' Guldberg, December MMIV +++++++ * +++++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++++ */ +++++++ /* +++++++ Copyright (C) 2004-2005 Kern Sibbald +++++++@@ -140,7 +140,7 @@ +++++++ +++++++ if ((acl_text = acl_get(jcr->last_fname)) != NULL) { +++++++ len = pm_strcpy(jcr->acl_text, acl_text); +++++++- free(acl_text); ++++++++ actuallyfree(acl_text); +++++++ return len; +++++++ } +++++++ return -1; +++++++@@ -270,7 +270,7 @@ +++++++ if ((n = getacl(jcr->last_fname, n, acls)) > 0) { +++++++ if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) { +++++++ len = pm_strcpy(jcr->acl_text, acl_text); +++++++- free(acl_text); ++++++++ actuallyfree(acl_text); +++++++ return len; +++++++ } +++++++ } +++++++Index: src/findlib/bfile.c +++++++=================================================================== +++++++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v +++++++retrieving revision 1.40 +++++++diff -u -r1.40 bfile.c +++++++--- src/findlib/bfile.c 10 Aug 2005 16:35:19 -0000 1.40 ++++++++++ src/findlib/bfile.c 21 Nov 2005 13:06:38 -0000 +++++++@@ -623,13 +623,10 @@ +++++++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode) +++++++ { +++++++ POOLMEM *rsrc_fname; +++++++- size_t fname_len; +++++++ +++++++- fname_len = strlen(fname); +++++++ rsrc_fname = get_pool_memory(PM_FNAME); +++++++- bstrncpy(rsrc_fname, fname, fname_len + 1); +++++++- bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC, +++++++- strlen(_PATH_RSRCFORKSPEC) + 1); ++++++++ pm_strcpy(rsrc_fname, fname); ++++++++ pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC); +++++++ bopen(bfd, rsrc_fname, flags, mode); +++++++ free_pool_memory(rsrc_fname); +++++++ return bfd->fid; +++++++Index: src/lib/bnet_server.c +++++++=================================================================== +++++++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v +++++++retrieving revision 1.39 +++++++diff -u -r1.39 bnet_server.c +++++++--- src/lib/bnet_server.c 18 Aug 2005 15:37:40 -0000 1.39 ++++++++++ src/lib/bnet_server.c 21 Nov 2005 13:06:38 -0000 +++++++@@ -153,7 +153,6 @@ +++++++ /* Error, get out */ +++++++ foreach_dlist(fd_ptr, &sockfds) { +++++++ close(fd_ptr->fd); +++++++- free((void *)fd_ptr); +++++++ } +++++++ Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror()); +++++++ break; +++++++Index: src/stored/autochanger.c +++++++=================================================================== +++++++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v +++++++retrieving revision 1.47.2.3 +++++++diff -u -r1.47.2.3 autochanger.c +++++++--- src/stored/autochanger.c 12 Nov 2005 17:30:53 -0000 1.47.2.3 ++++++++++ src/stored/autochanger.c 21 Nov 2005 13:06:38 -0000 +++++++@@ -4,7 +4,7 @@ +++++++ * +++++++ * Kern Sibbald, August MMII +++++++ * +++++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++++ */ +++++++ /* +++++++ Copyright (C) 2002-2005 Kern Sibbald +++++++@@ -163,6 +163,7 @@ +++++++ rtn_stat = -1; /* hard error */ +++++++ } +++++++ Dmsg2(400, "load slot %d status=%d\n", slot, status); ++++++++ unlock_changer(dcr); +++++++ } else { +++++++ status = 0; /* we got what we want */ +++++++ dev->Slot = slot; /* set currently loaded slot */ +++++++@@ -174,7 +175,6 @@ +++++++ } else { +++++++ rtn_stat = 0; /* no changer found */ +++++++ } +++++++- unlock_changer(dcr); +++++++ free_pool_memory(changer); +++++++ return rtn_stat; +++++++ +++++++Index: src/stored/status.c +++++++=================================================================== +++++++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v +++++++retrieving revision 1.44.2.1 +++++++diff -u -r1.44.2.1 status.c +++++++--- src/stored/status.c 6 Oct 2005 07:04:13 -0000 1.44.2.1 ++++++++++ src/stored/status.c 21 Nov 2005 13:06:39 -0000 +++++++@@ -264,6 +264,7 @@ +++++++ bool found = false; +++++++ int bps, sec; +++++++ JCR *jcr; ++++++++ DCR *dcr; +++++++ char JobName[MAX_NAME_LENGTH]; +++++++ char b1[30], b2[30], b3[30]; +++++++ +++++++@@ -273,7 +274,8 @@ +++++++ bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"), +++++++ job_type_to_str(jcr->JobType), jcr->Job); +++++++ } +++++++- if (jcr->dcr && jcr->dcr->device) { ++++++++ dcr = jcr->dcr; ++++++++ if (dcr && dcr->device) { +++++++ bstrncpy(JobName, jcr->Job, sizeof(JobName)); +++++++ /* There are three periods after the Job name */ +++++++ char *p; +++++++@@ -282,13 +284,16 @@ +++++++ *p = 0; +++++++ } +++++++ } +++++++- bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"), ++++++++ bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n" ++++++++ " pool=\"%s\" device=\"%s\"\n"), +++++++ job_level_to_str(jcr->JobLevel), +++++++ job_type_to_str(jcr->JobType), +++++++ JobName, +++++++ jcr->JobId, +++++++- jcr->dcr->VolumeName, +++++++- jcr->dcr->device->device_name); ++++++++ dcr->VolumeName, ++++++++ dcr->pool_name, ++++++++ dcr->dev?dcr->dev->print_name(): ++++++++ dcr->device->device_name); +++++++ sec = time(NULL) - jcr->run_time; +++++++ if (sec <= 0) { +++++++ sec = 1; +++++++Index: src/stored/stored_conf.c +++++++=================================================================== +++++++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v +++++++retrieving revision 1.76 +++++++diff -u -r1.76 stored_conf.c +++++++--- src/stored/stored_conf.c 9 Sep 2005 09:40:04 -0000 1.76 ++++++++++ src/stored/stored_conf.c 21 Nov 2005 13:06:39 -0000 +++++++@@ -222,16 +222,16 @@ +++++++ res->res_dev.hdr.name, +++++++ res->res_dev.media_type, res->res_dev.device_name, +++++++ res->res_dev.label_type); +++++++- sendit(sock, " rew_wait=%d min_bs=%d max_bs=%d\n", ++++++++ sendit(sock, " rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n", +++++++ res->res_dev.max_rewind_wait, res->res_dev.min_block_size, +++++++- res->res_dev.max_block_size); ++++++++ res->res_dev.max_block_size, res->res_dev.max_changer_wait); +++++++ sendit(sock, " max_jobs=%d max_files=%" lld " max_size=%" lld "\n", +++++++ res->res_dev.max_volume_jobs, res->res_dev.max_volume_files, +++++++ res->res_dev.max_volume_size); +++++++ sendit(sock, " max_file_size=%" lld " capacity=%" lld "\n", +++++++ res->res_dev.max_file_size, res->res_dev.volume_capacity); +++++++- sendit(sock, " spool_directory=%s\n", NPRT(res->res_dev.spool_directory)); +++++++- sendit(sock, " max_spool_size=%" lld " max_job_spool_size=%" lld "\n", ++++++++ sendit(sock, " spool_directory=%s\n", NPRT(res->res_dev.spool_directory)); ++++++++ sendit(sock, " max_spool_size=%" lld " max_job_spool_size=%" lld "\n", +++++++ res->res_dev.max_spool_size, res->res_dev.max_job_spool_size); +++++++ if (res->res_dev.changer_res) { +++++++ sendit(sock, " changer=%p\n", res->res_dev.changer_res); +++++++Index: src/tray-monitor/tray-monitor.c +++++++=================================================================== +++++++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v +++++++retrieving revision 1.25.2.1 +++++++diff -u -r1.25.2.1 tray-monitor.c +++++++--- src/tray-monitor/tray-monitor.c 1 Oct 2005 10:20:18 -0000 1.25.2.1 ++++++++++ src/tray-monitor/tray-monitor.c 21 Nov 2005 13:06:39 -0000 +++++++@@ -4,7 +4,7 @@ +++++++ * +++++++ * Nicolas Boichat, August MMIV +++++++ * +++++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++++ */ +++++++ +++++++ /* +++++++@@ -881,7 +881,7 @@ +++++++ } +++++++ +++++++ if (item->D_sock == NULL) { +++++++- g_slist_append(*list, (void *)_("Cannot connect to daemon.\n")); ++++++++ g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n"))); +++++++ changeStatusMessage(item, _("Cannot connect to daemon.")); +++++++ item->state = error; +++++++ item->oldstate = error; ++++++Index: patches/patches-1.38.0 ++++++=================================================================== ++++++RCS file: patches/patches-1.38.0 ++++++diff -N patches/patches-1.38.0 ++++++Index: patches/patches-1.38.1 ++++++=================================================================== ++++++RCS file: patches/patches-1.38.1 ++++++diff -N patches/patches-1.38.1 ++++++--- /dev/null 1 Jan 1970 00:00:00 -0000 +++++++++ patches/patches-1.38.1 21 Nov 2005 13:13:01 -0000 ++++++@@ -0,0 +1,14 @@ +++++++20Nov05 1.38.1-to-1.38.2.patch +++++++ This patch fixes the following bugs: +++++++ +++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. +++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator +++++++ says this patch does not fix his problem) +++++++- Fix cancel failure bug. Bug #481 +++++++- Fix failure when Pool name has spaces. Bug #487 +++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 +++++++- Fix a couple of free()s in src/filed/acl.c +++++++- Fix memory overrun in bfile.c in building OS X resource +++++++ fork filename. Bug #489 +++++++ +++++++ ++++++Index: src/version.h ++++++=================================================================== ++++++RCS file: /cvsroot/bacula/bacula/src/version.h,v ++++++retrieving revision 1.554.2.14 ++++++diff -u -r1.554.2.14 version.h ++++++--- src/version.h 14 Nov 2005 14:21:58 -0000 1.554.2.14 +++++++++ src/version.h 21 Nov 2005 13:13:01 -0000 ++++++@@ -3,9 +3,9 @@ ++++++ */ ++++++ ++++++ #undef VERSION ++++++-#define VERSION "1.38.1" ++++++-#define BDATE "14 November 2005" ++++++-#define LSMDATE "14Nov05" +++++++#define VERSION "1.38.2" +++++++#define BDATE "20 November 2005" +++++++#define LSMDATE "20Nov05" ++++++ ++++++ /* Debug flags */ ++++++ #undef DEBUG ++++++Index: src/dird/catreq.c ++++++=================================================================== ++++++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v ++++++retrieving revision 1.77.2.1 ++++++diff -u -r1.77.2.1 catreq.c ++++++--- src/dird/catreq.c 26 Oct 2005 14:02:04 -0000 1.77.2.1 +++++++++ src/dird/catreq.c 21 Nov 2005 13:13:01 -0000 ++++++@@ -10,7 +10,7 @@ ++++++ * Basic tasks done here: ++++++ * Handle Catalog services. ++++++ * ++++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++ */ ++++++ /* ++++++ Copyright (C) 2001-2005 Kern Sibbald ++++++@@ -117,6 +117,7 @@ ++++++ if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) { ++++++ memset(&pr, 0, sizeof(pr)); ++++++ bstrncpy(pr.Name, pool_name, sizeof(pr.Name)); +++++++ unbash_spaces(pr.Name); ++++++ ok = db_get_pool_record(jcr, jcr->db, &pr); ++++++ if (ok) { ++++++ mr.PoolId = pr.PoolId; ++++++Index: src/dird/ua_restore.c ++++++=================================================================== ++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v ++++++retrieving revision 1.101.2.1 ++++++diff -u -r1.101.2.1 ua_restore.c ++++++--- src/dird/ua_restore.c 26 Oct 2005 14:02:04 -0000 1.101.2.1 +++++++++ src/dird/ua_restore.c 21 Nov 2005 13:13:01 -0000 ++++++@@ -10,7 +10,7 @@ ++++++ * ++++++ * Kern Sibbald, July MMII ++++++ * ++++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++ */ ++++++ /* ++++++ Copyright (C) 2002-2005 Kern Sibbald ++++++@@ -409,7 +409,7 @@ ++++++ } ++++++ done = true; ++++++ switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) { ++++++- case -1: /* error */ +++++++ case -1: /* error or cancel */ ++++++ return 0; ++++++ case 0: /* list last 20 Jobs run */ ++++++ gui_save = ua->jcr->gui; ++++++Index: src/dird/ua_run.c ++++++=================================================================== ++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v ++++++retrieving revision 1.71 ++++++diff -u -r1.71 ua_run.c ++++++--- src/dird/ua_run.c 10 Aug 2005 16:35:19 -0000 1.71 +++++++++ src/dird/ua_run.c 21 Nov 2005 13:13:02 -0000 ++++++@@ -851,6 +851,8 @@ ++++++ bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n")); ++++++ } ++++++ goto try_again; +++++++ case -1: /* error or cancel */ +++++++ goto bail_out; ++++++ default: ++++++ goto try_again; ++++++ } ++++++Index: src/dird/ua_select.c ++++++=================================================================== ++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v ++++++retrieving revision 1.65.2.1 ++++++diff -u -r1.65.2.1 ua_select.c ++++++--- src/dird/ua_select.c 12 Nov 2005 17:30:52 -0000 1.65.2.1 +++++++++ src/dird/ua_select.c 21 Nov 2005 13:13:02 -0000 ++++++@@ -4,7 +4,7 @@ ++++++ * ++++++ * Kern Sibbald, October MMI ++++++ * ++++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++ */ ++++++ /* ++++++ Copyright (C) 2001-2005 Kern Sibbald ++++++@@ -149,7 +149,9 @@ ++++++ } ++++++ } ++++++ UnlockRes(); ++++++- do_prompt(ua, _("Storage"), _("Select Storage resource"), name, sizeof(name)); +++++++ if (do_prompt(ua, _("Storage"), _("Select Storage resource"), name, sizeof(name)) < 0) { +++++++ return NULL; +++++++ } ++++++ store = (STORE *)GetResWithName(R_STORAGE, name); ++++++ return store; ++++++ } ++++++@@ -170,7 +172,9 @@ ++++++ } ++++++ } ++++++ UnlockRes(); ++++++- do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)); +++++++ if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) { +++++++ return NULL; +++++++ } ++++++ fs = (FILESET *)GetResWithName(R_FILESET, name); ++++++ return fs; ++++++ } ++++++@@ -202,7 +206,9 @@ ++++++ } ++++++ } ++++++ UnlockRes(); ++++++- do_prompt(ua, _("Catalog"), _("Select Catalog resource"), name, sizeof(name)); +++++++ if (do_prompt(ua, _("Catalog"), _("Select Catalog resource"), name, sizeof(name)) < 0) { +++++++ return NULL; +++++++ } ++++++ catalog = (CAT *)GetResWithName(R_CATALOG, name); ++++++ } ++++++ return catalog; ++++++@@ -225,7 +231,9 @@ ++++++ } ++++++ } ++++++ UnlockRes(); ++++++- do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)); +++++++ if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) { +++++++ return NULL; +++++++ } ++++++ job = (JOB *)GetResWithName(R_JOB, name); ++++++ return job; ++++++ } ++++++@@ -246,7 +254,9 @@ ++++++ } ++++++ } ++++++ UnlockRes(); ++++++- do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)); +++++++ if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) { +++++++ return NULL; +++++++ } ++++++ job = (JOB *)GetResWithName(R_JOB, name); ++++++ return job; ++++++ } ++++++@@ -269,7 +279,9 @@ ++++++ } ++++++ } ++++++ UnlockRes(); ++++++- do_prompt(ua, _("Client"), _("Select Client (File daemon) resource"), name, sizeof(name)); +++++++ if (do_prompt(ua, _("Client"), _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) { +++++++ return NULL; +++++++ } ++++++ client = (CLIENT *)GetResWithName(R_CLIENT, name); ++++++ return client; ++++++ } ++++++@@ -551,7 +563,9 @@ ++++++ } ++++++ } ++++++ UnlockRes(); ++++++- do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)); +++++++ if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) { +++++++ return NULL; +++++++ } ++++++ pool = (POOL *)GetResWithName(R_POOL, name); ++++++ return pool; ++++++ } ++++++@@ -673,12 +687,16 @@ ++++++ * Returns: -1 on error ++++++ * index base 0 on success, and choice ++++++ * is copied to prompt if not NULL +++++++ * prompt is set to the chosen prompt item string ++++++ */ ++++++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt) ++++++ { ++++++ int i, item; ++++++ char pmsg[MAXSTRING]; ++++++ +++++++ if (prompt) { +++++++ *prompt = 0; +++++++ } ++++++ if (ua->num_prompts == 2) { ++++++ item = 1; ++++++ if (prompt) { ++++++@@ -698,15 +716,11 @@ ++++++ bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]); ++++++ } ++++++ ++++++- if (prompt) { ++++++- *prompt = 0; ++++++- } ++++++- ++++++ for ( ;; ) { ++++++ /* First item is the prompt string, not the items */ ++++++ if (ua->num_prompts == 1) { ++++++ bsendmsg(ua, _("Selection is empty!\n")); ++++++- item = 0; /* list is empty ! */ +++++++ item = -1; /* list is empty ! */ ++++++ break; ++++++ } ++++++ if (ua->num_prompts == 2) { ++++++@@ -741,7 +755,7 @@ ++++++ free(ua->prompt[i]); ++++++ } ++++++ ua->num_prompts = 0; ++++++- return item - 1; +++++++ return item>0 ? item-1 : item; ++++++ } ++++++ ++++++ ++++++Index: src/dird/ua_update.c ++++++=================================================================== ++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v ++++++retrieving revision 1.7 ++++++diff -u -r1.7 ua_update.c ++++++--- src/dird/ua_update.c 28 Aug 2005 12:22:02 -0000 1.7 +++++++++ src/dird/ua_update.c 21 Nov 2005 13:13:02 -0000 ++++++@@ -590,7 +590,7 @@ ++++++ update_all_vols_from_pool(ua); ++++++ return 1; ++++++ default: /* Done or error */ ++++++- bsendmsg(ua, _("Selection done.\n")); +++++++ bsendmsg(ua, _("Selection terminated.\n")); ++++++ return 1; ++++++ } ++++++ } ++++++Index: src/filed/acl.c ++++++=================================================================== ++++++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v ++++++retrieving revision 1.10.2.1 ++++++diff -u -r1.10.2.1 acl.c ++++++--- src/filed/acl.c 14 Nov 2005 20:20:38 -0000 1.10.2.1 +++++++++ src/filed/acl.c 21 Nov 2005 13:13:02 -0000 ++++++@@ -26,7 +26,7 @@ ++++++ * ++++++ * Written by Preben 'Peppe' Guldberg, December MMIV ++++++ * ++++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++ */ ++++++ /* ++++++ Copyright (C) 2004-2005 Kern Sibbald ++++++@@ -140,7 +140,7 @@ ++++++ ++++++ if ((acl_text = acl_get(jcr->last_fname)) != NULL) { ++++++ len = pm_strcpy(jcr->acl_text, acl_text); ++++++- free(acl_text); +++++++ actuallyfree(acl_text); ++++++ return len; ++++++ } ++++++ return -1; ++++++@@ -270,7 +270,7 @@ ++++++ if ((n = getacl(jcr->last_fname, n, acls)) > 0) { ++++++ if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) { ++++++ len = pm_strcpy(jcr->acl_text, acl_text); ++++++- free(acl_text); +++++++ actuallyfree(acl_text); ++++++ return len; ++++++ } ++++++ } ++++++Index: src/findlib/bfile.c ++++++=================================================================== ++++++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v ++++++retrieving revision 1.40 ++++++diff -u -r1.40 bfile.c ++++++--- src/findlib/bfile.c 10 Aug 2005 16:35:19 -0000 1.40 +++++++++ src/findlib/bfile.c 21 Nov 2005 13:13:02 -0000 ++++++@@ -623,13 +623,10 @@ ++++++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode) ++++++ { ++++++ POOLMEM *rsrc_fname; ++++++- size_t fname_len; ++++++ ++++++- fname_len = strlen(fname); ++++++ rsrc_fname = get_pool_memory(PM_FNAME); ++++++- bstrncpy(rsrc_fname, fname, fname_len + 1); ++++++- bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC, ++++++- strlen(_PATH_RSRCFORKSPEC) + 1); +++++++ pm_strcpy(rsrc_fname, fname); +++++++ pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC); ++++++ bopen(bfd, rsrc_fname, flags, mode); ++++++ free_pool_memory(rsrc_fname); ++++++ return bfd->fid; ++++++Index: src/lib/bnet_server.c ++++++=================================================================== ++++++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v ++++++retrieving revision 1.39 ++++++diff -u -r1.39 bnet_server.c ++++++--- src/lib/bnet_server.c 18 Aug 2005 15:37:40 -0000 1.39 +++++++++ src/lib/bnet_server.c 21 Nov 2005 13:13:03 -0000 ++++++@@ -153,7 +153,6 @@ ++++++ /* Error, get out */ ++++++ foreach_dlist(fd_ptr, &sockfds) { ++++++ close(fd_ptr->fd); ++++++- free((void *)fd_ptr); ++++++ } ++++++ Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror()); ++++++ break; ++++++Index: src/stored/autochanger.c ++++++=================================================================== ++++++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v ++++++retrieving revision 1.47.2.3 ++++++diff -u -r1.47.2.3 autochanger.c ++++++--- src/stored/autochanger.c 12 Nov 2005 17:30:53 -0000 1.47.2.3 +++++++++ src/stored/autochanger.c 21 Nov 2005 13:13:03 -0000 ++++++@@ -4,7 +4,7 @@ ++++++ * ++++++ * Kern Sibbald, August MMII ++++++ * ++++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++ */ ++++++ /* ++++++ Copyright (C) 2002-2005 Kern Sibbald ++++++@@ -163,6 +163,7 @@ ++++++ rtn_stat = -1; /* hard error */ ++++++ } ++++++ Dmsg2(400, "load slot %d status=%d\n", slot, status); +++++++ unlock_changer(dcr); ++++++ } else { ++++++ status = 0; /* we got what we want */ ++++++ dev->Slot = slot; /* set currently loaded slot */ ++++++@@ -174,7 +175,6 @@ ++++++ } else { ++++++ rtn_stat = 0; /* no changer found */ ++++++ } ++++++- unlock_changer(dcr); ++++++ free_pool_memory(changer); ++++++ return rtn_stat; ++++++ ++++++Index: src/stored/status.c ++++++=================================================================== ++++++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v ++++++retrieving revision 1.44.2.1 ++++++diff -u -r1.44.2.1 status.c ++++++--- src/stored/status.c 6 Oct 2005 07:04:13 -0000 1.44.2.1 +++++++++ src/stored/status.c 21 Nov 2005 13:13:03 -0000 ++++++@@ -264,6 +264,7 @@ ++++++ bool found = false; ++++++ int bps, sec; ++++++ JCR *jcr; +++++++ DCR *dcr; ++++++ char JobName[MAX_NAME_LENGTH]; ++++++ char b1[30], b2[30], b3[30]; ++++++ ++++++@@ -273,7 +274,8 @@ ++++++ bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"), ++++++ job_type_to_str(jcr->JobType), jcr->Job); ++++++ } ++++++- if (jcr->dcr && jcr->dcr->device) { +++++++ dcr = jcr->dcr; +++++++ if (dcr && dcr->device) { ++++++ bstrncpy(JobName, jcr->Job, sizeof(JobName)); ++++++ /* There are three periods after the Job name */ ++++++ char *p; ++++++@@ -282,13 +284,16 @@ ++++++ *p = 0; ++++++ } ++++++ } ++++++- bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"), +++++++ bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n" +++++++ " pool=\"%s\" device=\"%s\"\n"), ++++++ job_level_to_str(jcr->JobLevel), ++++++ job_type_to_str(jcr->JobType), ++++++ JobName, ++++++ jcr->JobId, ++++++- jcr->dcr->VolumeName, ++++++- jcr->dcr->device->device_name); +++++++ dcr->VolumeName, +++++++ dcr->pool_name, +++++++ dcr->dev?dcr->dev->print_name(): +++++++ dcr->device->device_name); ++++++ sec = time(NULL) - jcr->run_time; ++++++ if (sec <= 0) { ++++++ sec = 1; ++++++Index: src/stored/stored_conf.c ++++++=================================================================== ++++++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v ++++++retrieving revision 1.76 ++++++diff -u -r1.76 stored_conf.c ++++++--- src/stored/stored_conf.c 9 Sep 2005 09:40:04 -0000 1.76 +++++++++ src/stored/stored_conf.c 21 Nov 2005 13:13:04 -0000 ++++++@@ -222,16 +222,16 @@ ++++++ res->res_dev.hdr.name, ++++++ res->res_dev.media_type, res->res_dev.device_name, ++++++ res->res_dev.label_type); ++++++- sendit(sock, " rew_wait=%d min_bs=%d max_bs=%d\n", +++++++ sendit(sock, " rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n", ++++++ res->res_dev.max_rewind_wait, res->res_dev.min_block_size, ++++++- res->res_dev.max_block_size); +++++++ res->res_dev.max_block_size, res->res_dev.max_changer_wait); ++++++ sendit(sock, " max_jobs=%d max_files=%" lld " max_size=%" lld "\n", ++++++ res->res_dev.max_volume_jobs, res->res_dev.max_volume_files, ++++++ res->res_dev.max_volume_size); ++++++ sendit(sock, " max_file_size=%" lld " capacity=%" lld "\n", ++++++ res->res_dev.max_file_size, res->res_dev.volume_capacity); ++++++- sendit(sock, " spool_directory=%s\n", NPRT(res->res_dev.spool_directory)); ++++++- sendit(sock, " max_spool_size=%" lld " max_job_spool_size=%" lld "\n", +++++++ sendit(sock, " spool_directory=%s\n", NPRT(res->res_dev.spool_directory)); +++++++ sendit(sock, " max_spool_size=%" lld " max_job_spool_size=%" lld "\n", ++++++ res->res_dev.max_spool_size, res->res_dev.max_job_spool_size); ++++++ if (res->res_dev.changer_res) { ++++++ sendit(sock, " changer=%p\n", res->res_dev.changer_res); ++++++Index: src/tray-monitor/tray-monitor.c ++++++=================================================================== ++++++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v ++++++retrieving revision 1.25.2.1 ++++++diff -u -r1.25.2.1 tray-monitor.c ++++++--- src/tray-monitor/tray-monitor.c 1 Oct 2005 10:20:18 -0000 1.25.2.1 +++++++++ src/tray-monitor/tray-monitor.c 21 Nov 2005 13:13:04 -0000 ++++++@@ -4,7 +4,7 @@ ++++++ * ++++++ * Nicolas Boichat, August MMIV ++++++ * ++++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++ */ ++++++ ++++++ /* ++++++@@ -881,7 +881,7 @@ ++++++ } ++++++ ++++++ if (item->D_sock == NULL) { ++++++- g_slist_append(*list, (void *)_("Cannot connect to daemon.\n")); +++++++ g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n"))); ++++++ changeStatusMessage(item, _("Cannot connect to daemon.")); ++++++ item->state = error; ++++++ item->oldstate = error; +++++Index: patches/patches-1.38.0 +++++=================================================================== +++++RCS file: patches/patches-1.38.0 +++++diff -N patches/patches-1.38.0 +++++Index: patches/patches-1.38.1 +++++=================================================================== +++++RCS file: patches/patches-1.38.1 +++++diff -N patches/patches-1.38.1 +++++--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++++++ patches/patches-1.38.1 21 Nov 2005 13:17:58 -0000 +++++@@ -0,0 +1,14 @@ ++++++20Nov05 1.38.1-to-1.38.2.patch ++++++ This patch fixes the following bugs: ++++++ ++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. ++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator ++++++ says this patch does not fix his problem) ++++++- Fix cancel failure bug. Bug #481 ++++++- Fix failure when Pool name has spaces. Bug #487 ++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 ++++++- Fix a couple of free()s in src/filed/acl.c ++++++- Fix memory overrun in bfile.c in building OS X resource ++++++ fork filename. Bug #489 ++++++ ++++++ +++++Index: src/version.h +++++=================================================================== +++++RCS file: /cvsroot/bacula/bacula/src/version.h,v +++++retrieving revision 1.554.2.14 +++++diff -u -r1.554.2.14 version.h +++++--- src/version.h 14 Nov 2005 14:21:58 -0000 1.554.2.14 ++++++++ src/version.h 21 Nov 2005 13:17:58 -0000 +++++@@ -3,9 +3,9 @@ +++++ */ +++++ +++++ #undef VERSION +++++-#define VERSION "1.38.1" +++++-#define BDATE "14 November 2005" +++++-#define LSMDATE "14Nov05" ++++++#define VERSION "1.38.2" ++++++#define BDATE "20 November 2005" ++++++#define LSMDATE "20Nov05" +++++ +++++ /* Debug flags */ +++++ #undef DEBUG +++++Index: src/dird/catreq.c +++++=================================================================== +++++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v +++++retrieving revision 1.77.2.1 +++++diff -u -r1.77.2.1 catreq.c +++++--- src/dird/catreq.c 26 Oct 2005 14:02:04 -0000 1.77.2.1 ++++++++ src/dird/catreq.c 21 Nov 2005 13:17:59 -0000 +++++@@ -10,7 +10,7 @@ +++++ * Basic tasks done here: +++++ * Handle Catalog services. +++++ * +++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++ */ +++++ /* +++++ Copyright (C) 2001-2005 Kern Sibbald +++++@@ -117,6 +117,7 @@ +++++ if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) { +++++ memset(&pr, 0, sizeof(pr)); +++++ bstrncpy(pr.Name, pool_name, sizeof(pr.Name)); ++++++ unbash_spaces(pr.Name); +++++ ok = db_get_pool_record(jcr, jcr->db, &pr); +++++ if (ok) { +++++ mr.PoolId = pr.PoolId; +++++Index: src/dird/ua_restore.c +++++=================================================================== +++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v +++++retrieving revision 1.101.2.1 +++++diff -u -r1.101.2.1 ua_restore.c +++++--- src/dird/ua_restore.c 26 Oct 2005 14:02:04 -0000 1.101.2.1 ++++++++ src/dird/ua_restore.c 21 Nov 2005 13:17:59 -0000 +++++@@ -10,7 +10,7 @@ +++++ * +++++ * Kern Sibbald, July MMII +++++ * +++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++ */ +++++ /* +++++ Copyright (C) 2002-2005 Kern Sibbald +++++@@ -409,7 +409,7 @@ +++++ } +++++ done = true; +++++ switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) { +++++- case -1: /* error */ ++++++ case -1: /* error or cancel */ +++++ return 0; +++++ case 0: /* list last 20 Jobs run */ +++++ gui_save = ua->jcr->gui; +++++Index: src/dird/ua_run.c +++++=================================================================== +++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v +++++retrieving revision 1.71 +++++diff -u -r1.71 ua_run.c +++++--- src/dird/ua_run.c 10 Aug 2005 16:35:19 -0000 1.71 ++++++++ src/dird/ua_run.c 21 Nov 2005 13:17:59 -0000 +++++@@ -851,6 +851,8 @@ +++++ bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n")); +++++ } +++++ goto try_again; ++++++ case -1: /* error or cancel */ ++++++ goto bail_out; +++++ default: +++++ goto try_again; +++++ } +++++Index: src/dird/ua_select.c +++++=================================================================== +++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v +++++retrieving revision 1.65.2.1 +++++diff -u -r1.65.2.1 ua_select.c +++++--- src/dird/ua_select.c 12 Nov 2005 17:30:52 -0000 1.65.2.1 ++++++++ src/dird/ua_select.c 21 Nov 2005 13:17:59 -0000 +++++@@ -4,7 +4,7 @@ +++++ * +++++ * Kern Sibbald, October MMI +++++ * +++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++ */ +++++ /* +++++ Copyright (C) 2001-2005 Kern Sibbald +++++@@ -149,7 +149,9 @@ +++++ } +++++ } +++++ UnlockRes(); +++++- do_prompt(ua, _("Storage"), _("Select Storage resource"), name, sizeof(name)); ++++++ if (do_prompt(ua, _("Storage"), _("Select Storage resource"), name, sizeof(name)) < 0) { ++++++ return NULL; ++++++ } +++++ store = (STORE *)GetResWithName(R_STORAGE, name); +++++ return store; +++++ } +++++@@ -170,7 +172,9 @@ +++++ } +++++ } +++++ UnlockRes(); +++++- do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)); ++++++ if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) { ++++++ return NULL; ++++++ } +++++ fs = (FILESET *)GetResWithName(R_FILESET, name); +++++ return fs; +++++ } +++++@@ -202,7 +206,9 @@ +++++ } +++++ } +++++ UnlockRes(); +++++- do_prompt(ua, _("Catalog"), _("Select Catalog resource"), name, sizeof(name)); ++++++ if (do_prompt(ua, _("Catalog"), _("Select Catalog resource"), name, sizeof(name)) < 0) { ++++++ return NULL; ++++++ } +++++ catalog = (CAT *)GetResWithName(R_CATALOG, name); +++++ } +++++ return catalog; +++++@@ -225,7 +231,9 @@ +++++ } +++++ } +++++ UnlockRes(); +++++- do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)); ++++++ if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) { ++++++ return NULL; ++++++ } +++++ job = (JOB *)GetResWithName(R_JOB, name); +++++ return job; +++++ } +++++@@ -246,7 +254,9 @@ +++++ } +++++ } +++++ UnlockRes(); +++++- do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)); ++++++ if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) { ++++++ return NULL; ++++++ } +++++ job = (JOB *)GetResWithName(R_JOB, name); +++++ return job; +++++ } +++++@@ -269,7 +279,9 @@ +++++ } +++++ } +++++ UnlockRes(); +++++- do_prompt(ua, _("Client"), _("Select Client (File daemon) resource"), name, sizeof(name)); ++++++ if (do_prompt(ua, _("Client"), _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) { ++++++ return NULL; ++++++ } +++++ client = (CLIENT *)GetResWithName(R_CLIENT, name); +++++ return client; +++++ } +++++@@ -551,7 +563,9 @@ +++++ } +++++ } +++++ UnlockRes(); +++++- do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)); ++++++ if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) { ++++++ return NULL; ++++++ } +++++ pool = (POOL *)GetResWithName(R_POOL, name); +++++ return pool; +++++ } +++++@@ -673,12 +687,16 @@ +++++ * Returns: -1 on error +++++ * index base 0 on success, and choice +++++ * is copied to prompt if not NULL ++++++ * prompt is set to the chosen prompt item string +++++ */ +++++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt) +++++ { +++++ int i, item; +++++ char pmsg[MAXSTRING]; +++++ ++++++ if (prompt) { ++++++ *prompt = 0; ++++++ } +++++ if (ua->num_prompts == 2) { +++++ item = 1; +++++ if (prompt) { +++++@@ -698,15 +716,11 @@ +++++ bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]); +++++ } +++++ +++++- if (prompt) { +++++- *prompt = 0; +++++- } +++++- +++++ for ( ;; ) { +++++ /* First item is the prompt string, not the items */ +++++ if (ua->num_prompts == 1) { +++++ bsendmsg(ua, _("Selection is empty!\n")); +++++- item = 0; /* list is empty ! */ ++++++ item = -1; /* list is empty ! */ +++++ break; +++++ } +++++ if (ua->num_prompts == 2) { +++++@@ -741,7 +755,7 @@ +++++ free(ua->prompt[i]); +++++ } +++++ ua->num_prompts = 0; +++++- return item - 1; ++++++ return item>0 ? item-1 : item; +++++ } +++++ +++++ +++++Index: src/dird/ua_update.c +++++=================================================================== +++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v +++++retrieving revision 1.7 +++++diff -u -r1.7 ua_update.c +++++--- src/dird/ua_update.c 28 Aug 2005 12:22:02 -0000 1.7 ++++++++ src/dird/ua_update.c 21 Nov 2005 13:17:59 -0000 +++++@@ -590,7 +590,7 @@ +++++ update_all_vols_from_pool(ua); +++++ return 1; +++++ default: /* Done or error */ +++++- bsendmsg(ua, _("Selection done.\n")); ++++++ bsendmsg(ua, _("Selection terminated.\n")); +++++ return 1; +++++ } +++++ } +++++Index: src/filed/acl.c +++++=================================================================== +++++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v +++++retrieving revision 1.10.2.1 +++++diff -u -r1.10.2.1 acl.c +++++--- src/filed/acl.c 14 Nov 2005 20:20:38 -0000 1.10.2.1 ++++++++ src/filed/acl.c 21 Nov 2005 13:17:59 -0000 +++++@@ -26,7 +26,7 @@ +++++ * +++++ * Written by Preben 'Peppe' Guldberg, December MMIV +++++ * +++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++ */ +++++ /* +++++ Copyright (C) 2004-2005 Kern Sibbald +++++@@ -140,7 +140,7 @@ +++++ +++++ if ((acl_text = acl_get(jcr->last_fname)) != NULL) { +++++ len = pm_strcpy(jcr->acl_text, acl_text); +++++- free(acl_text); ++++++ actuallyfree(acl_text); +++++ return len; +++++ } +++++ return -1; +++++@@ -270,7 +270,7 @@ +++++ if ((n = getacl(jcr->last_fname, n, acls)) > 0) { +++++ if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) { +++++ len = pm_strcpy(jcr->acl_text, acl_text); +++++- free(acl_text); ++++++ actuallyfree(acl_text); +++++ return len; +++++ } +++++ } +++++Index: src/findlib/bfile.c +++++=================================================================== +++++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v +++++retrieving revision 1.40 +++++diff -u -r1.40 bfile.c +++++--- src/findlib/bfile.c 10 Aug 2005 16:35:19 -0000 1.40 ++++++++ src/findlib/bfile.c 21 Nov 2005 13:17:59 -0000 +++++@@ -623,13 +623,10 @@ +++++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode) +++++ { +++++ POOLMEM *rsrc_fname; +++++- size_t fname_len; +++++ +++++- fname_len = strlen(fname); +++++ rsrc_fname = get_pool_memory(PM_FNAME); +++++- bstrncpy(rsrc_fname, fname, fname_len + 1); +++++- bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC, +++++- strlen(_PATH_RSRCFORKSPEC) + 1); ++++++ pm_strcpy(rsrc_fname, fname); ++++++ pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC); +++++ bopen(bfd, rsrc_fname, flags, mode); +++++ free_pool_memory(rsrc_fname); +++++ return bfd->fid; +++++Index: src/lib/bnet_server.c +++++=================================================================== +++++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v +++++retrieving revision 1.39 +++++diff -u -r1.39 bnet_server.c +++++--- src/lib/bnet_server.c 18 Aug 2005 15:37:40 -0000 1.39 ++++++++ src/lib/bnet_server.c 21 Nov 2005 13:18:00 -0000 +++++@@ -153,7 +153,6 @@ +++++ /* Error, get out */ +++++ foreach_dlist(fd_ptr, &sockfds) { +++++ close(fd_ptr->fd); +++++- free((void *)fd_ptr); +++++ } +++++ Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror()); +++++ break; +++++Index: src/stored/autochanger.c +++++=================================================================== +++++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v +++++retrieving revision 1.47.2.3 +++++diff -u -r1.47.2.3 autochanger.c +++++--- src/stored/autochanger.c 12 Nov 2005 17:30:53 -0000 1.47.2.3 ++++++++ src/stored/autochanger.c 21 Nov 2005 13:18:00 -0000 +++++@@ -4,7 +4,7 @@ +++++ * +++++ * Kern Sibbald, August MMII +++++ * +++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++ */ +++++ /* +++++ Copyright (C) 2002-2005 Kern Sibbald +++++@@ -163,6 +163,7 @@ +++++ rtn_stat = -1; /* hard error */ +++++ } +++++ Dmsg2(400, "load slot %d status=%d\n", slot, status); ++++++ unlock_changer(dcr); +++++ } else { +++++ status = 0; /* we got what we want */ +++++ dev->Slot = slot; /* set currently loaded slot */ +++++@@ -174,7 +175,6 @@ +++++ } else { +++++ rtn_stat = 0; /* no changer found */ +++++ } +++++- unlock_changer(dcr); +++++ free_pool_memory(changer); +++++ return rtn_stat; +++++ +++++Index: src/stored/status.c +++++=================================================================== +++++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v +++++retrieving revision 1.44.2.1 +++++diff -u -r1.44.2.1 status.c +++++--- src/stored/status.c 6 Oct 2005 07:04:13 -0000 1.44.2.1 ++++++++ src/stored/status.c 21 Nov 2005 13:18:00 -0000 +++++@@ -264,6 +264,7 @@ +++++ bool found = false; +++++ int bps, sec; +++++ JCR *jcr; ++++++ DCR *dcr; +++++ char JobName[MAX_NAME_LENGTH]; +++++ char b1[30], b2[30], b3[30]; +++++ +++++@@ -273,7 +274,8 @@ +++++ bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"), +++++ job_type_to_str(jcr->JobType), jcr->Job); +++++ } +++++- if (jcr->dcr && jcr->dcr->device) { ++++++ dcr = jcr->dcr; ++++++ if (dcr && dcr->device) { +++++ bstrncpy(JobName, jcr->Job, sizeof(JobName)); +++++ /* There are three periods after the Job name */ +++++ char *p; +++++@@ -282,13 +284,16 @@ +++++ *p = 0; +++++ } +++++ } +++++- bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"), ++++++ bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n" ++++++ " pool=\"%s\" device=\"%s\"\n"), +++++ job_level_to_str(jcr->JobLevel), +++++ job_type_to_str(jcr->JobType), +++++ JobName, +++++ jcr->JobId, +++++- jcr->dcr->VolumeName, +++++- jcr->dcr->device->device_name); ++++++ dcr->VolumeName, ++++++ dcr->pool_name, ++++++ dcr->dev?dcr->dev->print_name(): ++++++ dcr->device->device_name); +++++ sec = time(NULL) - jcr->run_time; +++++ if (sec <= 0) { +++++ sec = 1; +++++Index: src/stored/stored_conf.c +++++=================================================================== +++++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v +++++retrieving revision 1.76 +++++diff -u -r1.76 stored_conf.c +++++--- src/stored/stored_conf.c 9 Sep 2005 09:40:04 -0000 1.76 ++++++++ src/stored/stored_conf.c 21 Nov 2005 13:18:00 -0000 +++++@@ -222,16 +222,16 @@ +++++ res->res_dev.hdr.name, +++++ res->res_dev.media_type, res->res_dev.device_name, +++++ res->res_dev.label_type); +++++- sendit(sock, " rew_wait=%d min_bs=%d max_bs=%d\n", ++++++ sendit(sock, " rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n", +++++ res->res_dev.max_rewind_wait, res->res_dev.min_block_size, +++++- res->res_dev.max_block_size); ++++++ res->res_dev.max_block_size, res->res_dev.max_changer_wait); +++++ sendit(sock, " max_jobs=%d max_files=%" lld " max_size=%" lld "\n", +++++ res->res_dev.max_volume_jobs, res->res_dev.max_volume_files, +++++ res->res_dev.max_volume_size); +++++ sendit(sock, " max_file_size=%" lld " capacity=%" lld "\n", +++++ res->res_dev.max_file_size, res->res_dev.volume_capacity); +++++- sendit(sock, " spool_directory=%s\n", NPRT(res->res_dev.spool_directory)); +++++- sendit(sock, " max_spool_size=%" lld " max_job_spool_size=%" lld "\n", ++++++ sendit(sock, " spool_directory=%s\n", NPRT(res->res_dev.spool_directory)); ++++++ sendit(sock, " max_spool_size=%" lld " max_job_spool_size=%" lld "\n", +++++ res->res_dev.max_spool_size, res->res_dev.max_job_spool_size); +++++ if (res->res_dev.changer_res) { +++++ sendit(sock, " changer=%p\n", res->res_dev.changer_res); +++++Index: src/tray-monitor/tray-monitor.c +++++=================================================================== +++++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v +++++retrieving revision 1.25.2.1 +++++diff -u -r1.25.2.1 tray-monitor.c +++++--- src/tray-monitor/tray-monitor.c 1 Oct 2005 10:20:18 -0000 1.25.2.1 ++++++++ src/tray-monitor/tray-monitor.c 21 Nov 2005 13:18:00 -0000 +++++@@ -4,7 +4,7 @@ +++++ * +++++ * Nicolas Boichat, August MMIV +++++ * +++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++ */ +++++ +++++ /* +++++@@ -881,7 +881,7 @@ +++++ } +++++ +++++ if (item->D_sock == NULL) { +++++- g_slist_append(*list, (void *)_("Cannot connect to daemon.\n")); ++++++ g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n"))); +++++ changeStatusMessage(item, _("Cannot connect to daemon.")); +++++ item->state = error; +++++ item->oldstate = error; ++++Index: patches/patches-1.38.0 ++++=================================================================== ++++RCS file: patches/patches-1.38.0 ++++diff -N patches/patches-1.38.0 ++++Index: patches/patches-1.38.1 ++++=================================================================== ++++RCS file: patches/patches-1.38.1 ++++diff -N patches/patches-1.38.1 ++++--- /dev/null 1 Jan 1970 00:00:00 -0000 +++++++ patches/patches-1.38.1 21 Nov 2005 18:19:05 -0000 ++++@@ -0,0 +1,14 @@ +++++20Nov05 1.38.1-to-1.38.2.patch +++++ This patch fixes the following bugs: +++++ +++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. +++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator +++++ says this patch does not fix his problem) +++++- Fix cancel failure bug. Bug #481 +++++- Fix failure when Pool name has spaces. Bug #487 +++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 +++++- Fix a couple of free()s in src/filed/acl.c +++++- Fix memory overrun in bfile.c in building OS X resource +++++ fork filename. Bug #489 +++++ +++++ ++++Index: src/version.h ++++=================================================================== ++++RCS file: /cvsroot/bacula/bacula/src/version.h,v ++++retrieving revision 1.554.2.14 ++++diff -u -r1.554.2.14 version.h ++++--- src/version.h 14 Nov 2005 14:21:58 -0000 1.554.2.14 +++++++ src/version.h 21 Nov 2005 18:19:06 -0000 ++++@@ -3,9 +3,9 @@ ++++ */ ++++ ++++ #undef VERSION ++++-#define VERSION "1.38.1" ++++-#define BDATE "14 November 2005" ++++-#define LSMDATE "14Nov05" +++++#define VERSION "1.38.2" +++++#define BDATE "20 November 2005" +++++#define LSMDATE "20Nov05" ++++ ++++ /* Debug flags */ ++++ #undef DEBUG ++++Index: src/dird/catreq.c ++++=================================================================== ++++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v ++++retrieving revision 1.77.2.1 ++++diff -u -r1.77.2.1 catreq.c ++++--- src/dird/catreq.c 26 Oct 2005 14:02:04 -0000 1.77.2.1 +++++++ src/dird/catreq.c 21 Nov 2005 18:19:06 -0000 ++++@@ -10,7 +10,7 @@ ++++ * Basic tasks done here: ++++ * Handle Catalog services. ++++ * ++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++ */ ++++ /* ++++ Copyright (C) 2001-2005 Kern Sibbald ++++@@ -117,6 +117,7 @@ ++++ if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) { ++++ memset(&pr, 0, sizeof(pr)); ++++ bstrncpy(pr.Name, pool_name, sizeof(pr.Name)); +++++ unbash_spaces(pr.Name); ++++ ok = db_get_pool_record(jcr, jcr->db, &pr); ++++ if (ok) { ++++ mr.PoolId = pr.PoolId; ++++Index: src/dird/ua_restore.c ++++=================================================================== ++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v ++++retrieving revision 1.101.2.1 ++++diff -u -r1.101.2.1 ua_restore.c ++++--- src/dird/ua_restore.c 26 Oct 2005 14:02:04 -0000 1.101.2.1 +++++++ src/dird/ua_restore.c 21 Nov 2005 18:19:06 -0000 ++++@@ -10,7 +10,7 @@ ++++ * ++++ * Kern Sibbald, July MMII ++++ * ++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++ */ ++++ /* ++++ Copyright (C) 2002-2005 Kern Sibbald ++++@@ -409,7 +409,7 @@ ++++ } ++++ done = true; ++++ switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) { ++++- case -1: /* error */ +++++ case -1: /* error or cancel */ ++++ return 0; ++++ case 0: /* list last 20 Jobs run */ ++++ gui_save = ua->jcr->gui; ++++Index: src/dird/ua_run.c ++++=================================================================== ++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v ++++retrieving revision 1.71 ++++diff -u -r1.71 ua_run.c ++++--- src/dird/ua_run.c 10 Aug 2005 16:35:19 -0000 1.71 +++++++ src/dird/ua_run.c 21 Nov 2005 18:19:06 -0000 ++++@@ -851,6 +851,8 @@ ++++ bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n")); ++++ } ++++ goto try_again; +++++ case -1: /* error or cancel */ +++++ goto bail_out; ++++ default: ++++ goto try_again; ++++ } ++++Index: src/dird/ua_select.c ++++=================================================================== ++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v ++++retrieving revision 1.65.2.1 ++++diff -u -r1.65.2.1 ua_select.c ++++--- src/dird/ua_select.c 12 Nov 2005 17:30:52 -0000 1.65.2.1 +++++++ src/dird/ua_select.c 21 Nov 2005 18:19:06 -0000 ++++@@ -4,7 +4,7 @@ ++++ * ++++ * Kern Sibbald, October MMI ++++ * ++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++ */ ++++ /* ++++ Copyright (C) 2001-2005 Kern Sibbald ++++@@ -149,7 +149,9 @@ ++++ } ++++ } ++++ UnlockRes(); ++++- do_prompt(ua, _("Storage"), _("Select Storage resource"), name, sizeof(name)); +++++ if (do_prompt(ua, _("Storage"), _("Select Storage resource"), name, sizeof(name)) < 0) { +++++ return NULL; +++++ } ++++ store = (STORE *)GetResWithName(R_STORAGE, name); ++++ return store; ++++ } ++++@@ -170,7 +172,9 @@ ++++ } ++++ } ++++ UnlockRes(); ++++- do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)); +++++ if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) { +++++ return NULL; +++++ } ++++ fs = (FILESET *)GetResWithName(R_FILESET, name); ++++ return fs; ++++ } ++++@@ -202,7 +206,9 @@ ++++ } ++++ } ++++ UnlockRes(); ++++- do_prompt(ua, _("Catalog"), _("Select Catalog resource"), name, sizeof(name)); +++++ if (do_prompt(ua, _("Catalog"), _("Select Catalog resource"), name, sizeof(name)) < 0) { +++++ return NULL; +++++ } ++++ catalog = (CAT *)GetResWithName(R_CATALOG, name); ++++ } ++++ return catalog; ++++@@ -225,7 +231,9 @@ ++++ } ++++ } ++++ UnlockRes(); ++++- do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)); +++++ if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) { +++++ return NULL; +++++ } ++++ job = (JOB *)GetResWithName(R_JOB, name); ++++ return job; ++++ } ++++@@ -246,7 +254,9 @@ ++++ } ++++ } ++++ UnlockRes(); ++++- do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)); +++++ if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) { +++++ return NULL; +++++ } ++++ job = (JOB *)GetResWithName(R_JOB, name); ++++ return job; ++++ } ++++@@ -269,7 +279,9 @@ ++++ } ++++ } ++++ UnlockRes(); ++++- do_prompt(ua, _("Client"), _("Select Client (File daemon) resource"), name, sizeof(name)); +++++ if (do_prompt(ua, _("Client"), _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) { +++++ return NULL; +++++ } ++++ client = (CLIENT *)GetResWithName(R_CLIENT, name); ++++ return client; ++++ } ++++@@ -551,7 +563,9 @@ ++++ } ++++ } ++++ UnlockRes(); ++++- do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)); +++++ if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) { +++++ return NULL; +++++ } ++++ pool = (POOL *)GetResWithName(R_POOL, name); ++++ return pool; ++++ } ++++@@ -673,12 +687,16 @@ ++++ * Returns: -1 on error ++++ * index base 0 on success, and choice ++++ * is copied to prompt if not NULL +++++ * prompt is set to the chosen prompt item string ++++ */ ++++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt) ++++ { ++++ int i, item; ++++ char pmsg[MAXSTRING]; ++++ +++++ if (prompt) { +++++ *prompt = 0; +++++ } ++++ if (ua->num_prompts == 2) { ++++ item = 1; ++++ if (prompt) { ++++@@ -698,15 +716,11 @@ ++++ bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]); ++++ } ++++ ++++- if (prompt) { ++++- *prompt = 0; ++++- } ++++- ++++ for ( ;; ) { ++++ /* First item is the prompt string, not the items */ ++++ if (ua->num_prompts == 1) { ++++ bsendmsg(ua, _("Selection is empty!\n")); ++++- item = 0; /* list is empty ! */ +++++ item = -1; /* list is empty ! */ ++++ break; ++++ } ++++ if (ua->num_prompts == 2) { ++++@@ -741,7 +755,7 @@ ++++ free(ua->prompt[i]); ++++ } ++++ ua->num_prompts = 0; ++++- return item - 1; +++++ return item>0 ? item-1 : item; ++++ } ++++ ++++ ++++Index: src/dird/ua_update.c ++++=================================================================== ++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v ++++retrieving revision 1.7 ++++diff -u -r1.7 ua_update.c ++++--- src/dird/ua_update.c 28 Aug 2005 12:22:02 -0000 1.7 +++++++ src/dird/ua_update.c 21 Nov 2005 18:19:06 -0000 ++++@@ -590,7 +590,7 @@ ++++ update_all_vols_from_pool(ua); ++++ return 1; ++++ default: /* Done or error */ ++++- bsendmsg(ua, _("Selection done.\n")); +++++ bsendmsg(ua, _("Selection terminated.\n")); ++++ return 1; ++++ } ++++ } ++++Index: src/filed/acl.c ++++=================================================================== ++++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v ++++retrieving revision 1.10.2.1 ++++diff -u -r1.10.2.1 acl.c ++++--- src/filed/acl.c 14 Nov 2005 20:20:38 -0000 1.10.2.1 +++++++ src/filed/acl.c 21 Nov 2005 18:19:07 -0000 ++++@@ -26,7 +26,7 @@ ++++ * ++++ * Written by Preben 'Peppe' Guldberg, December MMIV ++++ * ++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++ */ ++++ /* ++++ Copyright (C) 2004-2005 Kern Sibbald ++++@@ -140,7 +140,7 @@ ++++ ++++ if ((acl_text = acl_get(jcr->last_fname)) != NULL) { ++++ len = pm_strcpy(jcr->acl_text, acl_text); ++++- free(acl_text); +++++ actuallyfree(acl_text); ++++ return len; ++++ } ++++ return -1; ++++@@ -270,7 +270,7 @@ ++++ if ((n = getacl(jcr->last_fname, n, acls)) > 0) { ++++ if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) { ++++ len = pm_strcpy(jcr->acl_text, acl_text); ++++- free(acl_text); +++++ actuallyfree(acl_text); ++++ return len; ++++ } ++++ } ++++Index: src/findlib/bfile.c ++++=================================================================== ++++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v ++++retrieving revision 1.40 ++++diff -u -r1.40 bfile.c ++++--- src/findlib/bfile.c 10 Aug 2005 16:35:19 -0000 1.40 +++++++ src/findlib/bfile.c 21 Nov 2005 18:19:07 -0000 ++++@@ -623,13 +623,10 @@ ++++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode) ++++ { ++++ POOLMEM *rsrc_fname; ++++- size_t fname_len; ++++ ++++- fname_len = strlen(fname); ++++ rsrc_fname = get_pool_memory(PM_FNAME); ++++- bstrncpy(rsrc_fname, fname, fname_len + 1); ++++- bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC, ++++- strlen(_PATH_RSRCFORKSPEC) + 1); +++++ pm_strcpy(rsrc_fname, fname); +++++ pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC); ++++ bopen(bfd, rsrc_fname, flags, mode); ++++ free_pool_memory(rsrc_fname); ++++ return bfd->fid; ++++Index: src/lib/bnet_server.c ++++=================================================================== ++++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v ++++retrieving revision 1.39 ++++diff -u -r1.39 bnet_server.c ++++--- src/lib/bnet_server.c 18 Aug 2005 15:37:40 -0000 1.39 +++++++ src/lib/bnet_server.c 21 Nov 2005 18:19:07 -0000 ++++@@ -153,7 +153,6 @@ ++++ /* Error, get out */ ++++ foreach_dlist(fd_ptr, &sockfds) { ++++ close(fd_ptr->fd); ++++- free((void *)fd_ptr); ++++ } ++++ Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror()); ++++ break; ++++Index: src/stored/autochanger.c ++++=================================================================== ++++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v ++++retrieving revision 1.47.2.3 ++++diff -u -r1.47.2.3 autochanger.c ++++--- src/stored/autochanger.c 12 Nov 2005 17:30:53 -0000 1.47.2.3 +++++++ src/stored/autochanger.c 21 Nov 2005 18:19:07 -0000 ++++@@ -4,7 +4,7 @@ ++++ * ++++ * Kern Sibbald, August MMII ++++ * ++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++ */ ++++ /* ++++ Copyright (C) 2002-2005 Kern Sibbald ++++@@ -163,6 +163,7 @@ ++++ rtn_stat = -1; /* hard error */ ++++ } ++++ Dmsg2(400, "load slot %d status=%d\n", slot, status); +++++ unlock_changer(dcr); ++++ } else { ++++ status = 0; /* we got what we want */ ++++ dev->Slot = slot; /* set currently loaded slot */ ++++@@ -174,7 +175,6 @@ ++++ } else { ++++ rtn_stat = 0; /* no changer found */ ++++ } ++++- unlock_changer(dcr); ++++ free_pool_memory(changer); ++++ return rtn_stat; ++++ ++++Index: src/stored/status.c ++++=================================================================== ++++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v ++++retrieving revision 1.44.2.1 ++++diff -u -r1.44.2.1 status.c ++++--- src/stored/status.c 6 Oct 2005 07:04:13 -0000 1.44.2.1 +++++++ src/stored/status.c 21 Nov 2005 18:19:08 -0000 ++++@@ -264,6 +264,7 @@ ++++ bool found = false; ++++ int bps, sec; ++++ JCR *jcr; +++++ DCR *dcr; ++++ char JobName[MAX_NAME_LENGTH]; ++++ char b1[30], b2[30], b3[30]; ++++ ++++@@ -273,7 +274,8 @@ ++++ bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"), ++++ job_type_to_str(jcr->JobType), jcr->Job); ++++ } ++++- if (jcr->dcr && jcr->dcr->device) { +++++ dcr = jcr->dcr; +++++ if (dcr && dcr->device) { ++++ bstrncpy(JobName, jcr->Job, sizeof(JobName)); ++++ /* There are three periods after the Job name */ ++++ char *p; ++++@@ -282,13 +284,16 @@ ++++ *p = 0; ++++ } ++++ } ++++- bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"), +++++ bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n" +++++ " pool=\"%s\" device=\"%s\"\n"), ++++ job_level_to_str(jcr->JobLevel), ++++ job_type_to_str(jcr->JobType), ++++ JobName, ++++ jcr->JobId, ++++- jcr->dcr->VolumeName, ++++- jcr->dcr->device->device_name); +++++ dcr->VolumeName, +++++ dcr->pool_name, +++++ dcr->dev?dcr->dev->print_name(): +++++ dcr->device->device_name); ++++ sec = time(NULL) - jcr->run_time; ++++ if (sec <= 0) { ++++ sec = 1; ++++Index: src/stored/stored_conf.c ++++=================================================================== ++++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v ++++retrieving revision 1.76 ++++diff -u -r1.76 stored_conf.c ++++--- src/stored/stored_conf.c 9 Sep 2005 09:40:04 -0000 1.76 +++++++ src/stored/stored_conf.c 21 Nov 2005 18:19:08 -0000 ++++@@ -222,16 +222,16 @@ ++++ res->res_dev.hdr.name, ++++ res->res_dev.media_type, res->res_dev.device_name, ++++ res->res_dev.label_type); ++++- sendit(sock, " rew_wait=%d min_bs=%d max_bs=%d\n", +++++ sendit(sock, " rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n", ++++ res->res_dev.max_rewind_wait, res->res_dev.min_block_size, ++++- res->res_dev.max_block_size); +++++ res->res_dev.max_block_size, res->res_dev.max_changer_wait); ++++ sendit(sock, " max_jobs=%d max_files=%" lld " max_size=%" lld "\n", ++++ res->res_dev.max_volume_jobs, res->res_dev.max_volume_files, ++++ res->res_dev.max_volume_size); ++++ sendit(sock, " max_file_size=%" lld " capacity=%" lld "\n", ++++ res->res_dev.max_file_size, res->res_dev.volume_capacity); ++++- sendit(sock, " spool_directory=%s\n", NPRT(res->res_dev.spool_directory)); ++++- sendit(sock, " max_spool_size=%" lld " max_job_spool_size=%" lld "\n", +++++ sendit(sock, " spool_directory=%s\n", NPRT(res->res_dev.spool_directory)); +++++ sendit(sock, " max_spool_size=%" lld " max_job_spool_size=%" lld "\n", ++++ res->res_dev.max_spool_size, res->res_dev.max_job_spool_size); ++++ if (res->res_dev.changer_res) { ++++ sendit(sock, " changer=%p\n", res->res_dev.changer_res); ++++Index: src/tray-monitor/tray-monitor.c ++++=================================================================== ++++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v ++++retrieving revision 1.25.2.1 ++++diff -u -r1.25.2.1 tray-monitor.c ++++--- src/tray-monitor/tray-monitor.c 1 Oct 2005 10:20:18 -0000 1.25.2.1 +++++++ src/tray-monitor/tray-monitor.c 21 Nov 2005 18:19:08 -0000 ++++@@ -4,7 +4,7 @@ ++++ * ++++ * Nicolas Boichat, August MMIV ++++ * ++++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++ */ ++++ ++++ /* ++++@@ -881,7 +881,7 @@ ++++ } ++++ ++++ if (item->D_sock == NULL) { ++++- g_slist_append(*list, (void *)_("Cannot connect to daemon.\n")); +++++ g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n"))); ++++ changeStatusMessage(item, _("Cannot connect to daemon.")); ++++ item->state = error; ++++ item->oldstate = error; +++Index: patches/patches-1.38.0 +++=================================================================== +++RCS file: patches/patches-1.38.0 +++diff -N patches/patches-1.38.0 +++Index: patches/patches-1.38.1 +++=================================================================== +++RCS file: patches/patches-1.38.1 +++diff -N patches/patches-1.38.1 +++--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++++ patches/patches-1.38.1 22 Nov 2005 10:42:22 -0000 +++@@ -0,0 +1,14 @@ ++++20Nov05 1.38.1-to-1.38.2.patch ++++ This patch fixes the following bugs: ++++ ++++- Fix crash in tray-monitor when daemon disconnects. Bug #479. ++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator ++++ says this patch does not fix his problem) ++++- Fix cancel failure bug. Bug #481 ++++- Fix failure when Pool name has spaces. Bug #487 ++++- Fix SD crash in autochanger code. Mutex failure. Bug #488 ++++- Fix a couple of free()s in src/filed/acl.c ++++- Fix memory overrun in bfile.c in building OS X resource ++++ fork filename. Bug #489 ++++ ++++ +++Index: src/version.h +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/src/version.h,v +++retrieving revision 1.554.2.14 +++diff -u -r1.554.2.14 version.h +++--- src/version.h 14 Nov 2005 14:21:58 -0000 1.554.2.14 ++++++ src/version.h 22 Nov 2005 10:42:22 -0000 +++@@ -3,9 +3,9 @@ +++ */ +++ +++ #undef VERSION +++-#define VERSION "1.38.1" +++-#define BDATE "14 November 2005" +++-#define LSMDATE "14Nov05" ++++#define VERSION "1.38.2" ++++#define BDATE "20 November 2005" ++++#define LSMDATE "20Nov05" +++ +++ /* Debug flags */ +++ #undef DEBUG +++Index: src/dird/catreq.c +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v +++retrieving revision 1.77.2.1 +++diff -u -r1.77.2.1 catreq.c +++--- src/dird/catreq.c 26 Oct 2005 14:02:04 -0000 1.77.2.1 ++++++ src/dird/catreq.c 22 Nov 2005 10:42:22 -0000 +++@@ -10,7 +10,7 @@ +++ * Basic tasks done here: +++ * Handle Catalog services. +++ * +++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ */ +++ /* +++ Copyright (C) 2001-2005 Kern Sibbald +++@@ -117,6 +117,7 @@ +++ if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) { +++ memset(&pr, 0, sizeof(pr)); +++ bstrncpy(pr.Name, pool_name, sizeof(pr.Name)); ++++ unbash_spaces(pr.Name); +++ ok = db_get_pool_record(jcr, jcr->db, &pr); +++ if (ok) { +++ mr.PoolId = pr.PoolId; +++Index: src/dird/ua_restore.c +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v +++retrieving revision 1.101.2.1 +++diff -u -r1.101.2.1 ua_restore.c +++--- src/dird/ua_restore.c 26 Oct 2005 14:02:04 -0000 1.101.2.1 ++++++ src/dird/ua_restore.c 22 Nov 2005 10:42:23 -0000 +++@@ -10,7 +10,7 @@ +++ * +++ * Kern Sibbald, July MMII +++ * +++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ */ +++ /* +++ Copyright (C) 2002-2005 Kern Sibbald +++@@ -409,7 +409,7 @@ +++ } +++ done = true; +++ switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) { +++- case -1: /* error */ ++++ case -1: /* error or cancel */ +++ return 0; +++ case 0: /* list last 20 Jobs run */ +++ gui_save = ua->jcr->gui; +++Index: src/dird/ua_run.c +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v +++retrieving revision 1.71 +++diff -u -r1.71 ua_run.c +++--- src/dird/ua_run.c 10 Aug 2005 16:35:19 -0000 1.71 ++++++ src/dird/ua_run.c 22 Nov 2005 10:42:23 -0000 +++@@ -851,6 +851,8 @@ +++ bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n")); +++ } +++ goto try_again; ++++ case -1: /* error or cancel */ ++++ goto bail_out; +++ default: +++ goto try_again; +++ } +++Index: src/dird/ua_select.c +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v +++retrieving revision 1.65.2.1 +++diff -u -r1.65.2.1 ua_select.c +++--- src/dird/ua_select.c 12 Nov 2005 17:30:52 -0000 1.65.2.1 ++++++ src/dird/ua_select.c 22 Nov 2005 10:42:23 -0000 +++@@ -4,7 +4,7 @@ +++ * +++ * Kern Sibbald, October MMI +++ * +++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ */ +++ /* +++ Copyright (C) 2001-2005 Kern Sibbald +++@@ -149,7 +149,9 @@ +++ } +++ } +++ UnlockRes(); +++- do_prompt(ua, _("Storage"), _("Select Storage resource"), name, sizeof(name)); ++++ if (do_prompt(ua, _("Storage"), _("Select Storage resource"), name, sizeof(name)) < 0) { ++++ return NULL; ++++ } +++ store = (STORE *)GetResWithName(R_STORAGE, name); +++ return store; +++ } +++@@ -170,7 +172,9 @@ +++ } +++ } +++ UnlockRes(); +++- do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)); ++++ if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) { ++++ return NULL; ++++ } +++ fs = (FILESET *)GetResWithName(R_FILESET, name); +++ return fs; +++ } +++@@ -202,7 +206,9 @@ +++ } +++ } +++ UnlockRes(); +++- do_prompt(ua, _("Catalog"), _("Select Catalog resource"), name, sizeof(name)); ++++ if (do_prompt(ua, _("Catalog"), _("Select Catalog resource"), name, sizeof(name)) < 0) { ++++ return NULL; ++++ } +++ catalog = (CAT *)GetResWithName(R_CATALOG, name); +++ } +++ return catalog; +++@@ -225,7 +231,9 @@ +++ } +++ } +++ UnlockRes(); +++- do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)); ++++ if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) { ++++ return NULL; ++++ } +++ job = (JOB *)GetResWithName(R_JOB, name); +++ return job; +++ } +++@@ -246,7 +254,9 @@ +++ } +++ } +++ UnlockRes(); +++- do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)); ++++ if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) { ++++ return NULL; ++++ } +++ job = (JOB *)GetResWithName(R_JOB, name); +++ return job; +++ } +++@@ -269,7 +279,9 @@ +++ } +++ } +++ UnlockRes(); +++- do_prompt(ua, _("Client"), _("Select Client (File daemon) resource"), name, sizeof(name)); ++++ if (do_prompt(ua, _("Client"), _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) { ++++ return NULL; ++++ } +++ client = (CLIENT *)GetResWithName(R_CLIENT, name); +++ return client; +++ } +++@@ -551,7 +563,9 @@ +++ } +++ } +++ UnlockRes(); +++- do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)); ++++ if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) { ++++ return NULL; ++++ } +++ pool = (POOL *)GetResWithName(R_POOL, name); +++ return pool; +++ } +++@@ -673,12 +687,16 @@ +++ * Returns: -1 on error +++ * index base 0 on success, and choice +++ * is copied to prompt if not NULL ++++ * prompt is set to the chosen prompt item string +++ */ +++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt) +++ { +++ int i, item; +++ char pmsg[MAXSTRING]; +++ ++++ if (prompt) { ++++ *prompt = 0; ++++ } +++ if (ua->num_prompts == 2) { +++ item = 1; +++ if (prompt) { +++@@ -698,15 +716,11 @@ +++ bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]); +++ } +++ +++- if (prompt) { +++- *prompt = 0; +++- } +++- +++ for ( ;; ) { +++ /* First item is the prompt string, not the items */ +++ if (ua->num_prompts == 1) { +++ bsendmsg(ua, _("Selection is empty!\n")); +++- item = 0; /* list is empty ! */ ++++ item = -1; /* list is empty ! */ +++ break; +++ } +++ if (ua->num_prompts == 2) { +++@@ -741,7 +755,7 @@ +++ free(ua->prompt[i]); +++ } +++ ua->num_prompts = 0; +++- return item - 1; ++++ return item>0 ? item-1 : item; +++ } +++ +++ +++Index: src/dird/ua_update.c +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v +++retrieving revision 1.7 +++diff -u -r1.7 ua_update.c +++--- src/dird/ua_update.c 28 Aug 2005 12:22:02 -0000 1.7 ++++++ src/dird/ua_update.c 22 Nov 2005 10:42:23 -0000 +++@@ -590,7 +590,7 @@ +++ update_all_vols_from_pool(ua); +++ return 1; +++ default: /* Done or error */ +++- bsendmsg(ua, _("Selection done.\n")); ++++ bsendmsg(ua, _("Selection terminated.\n")); +++ return 1; +++ } +++ } +++Index: src/filed/acl.c +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v +++retrieving revision 1.10.2.1 +++diff -u -r1.10.2.1 acl.c +++--- src/filed/acl.c 14 Nov 2005 20:20:38 -0000 1.10.2.1 ++++++ src/filed/acl.c 22 Nov 2005 10:42:23 -0000 +++@@ -26,7 +26,7 @@ +++ * +++ * Written by Preben 'Peppe' Guldberg, December MMIV +++ * +++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ */ +++ /* +++ Copyright (C) 2004-2005 Kern Sibbald +++@@ -140,7 +140,7 @@ +++ +++ if ((acl_text = acl_get(jcr->last_fname)) != NULL) { +++ len = pm_strcpy(jcr->acl_text, acl_text); +++- free(acl_text); ++++ actuallyfree(acl_text); +++ return len; +++ } +++ return -1; +++@@ -270,7 +270,7 @@ +++ if ((n = getacl(jcr->last_fname, n, acls)) > 0) { +++ if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) { +++ len = pm_strcpy(jcr->acl_text, acl_text); +++- free(acl_text); ++++ actuallyfree(acl_text); +++ return len; +++ } +++ } +++Index: src/findlib/bfile.c +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v +++retrieving revision 1.40 +++diff -u -r1.40 bfile.c +++--- src/findlib/bfile.c 10 Aug 2005 16:35:19 -0000 1.40 ++++++ src/findlib/bfile.c 22 Nov 2005 10:42:24 -0000 +++@@ -623,13 +623,10 @@ +++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode) +++ { +++ POOLMEM *rsrc_fname; +++- size_t fname_len; +++ +++- fname_len = strlen(fname); +++ rsrc_fname = get_pool_memory(PM_FNAME); +++- bstrncpy(rsrc_fname, fname, fname_len + 1); +++- bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC, +++- strlen(_PATH_RSRCFORKSPEC) + 1); ++++ pm_strcpy(rsrc_fname, fname); ++++ pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC); +++ bopen(bfd, rsrc_fname, flags, mode); +++ free_pool_memory(rsrc_fname); +++ return bfd->fid; +++Index: src/lib/bnet_server.c +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v +++retrieving revision 1.39 +++diff -u -r1.39 bnet_server.c +++--- src/lib/bnet_server.c 18 Aug 2005 15:37:40 -0000 1.39 ++++++ src/lib/bnet_server.c 22 Nov 2005 10:42:24 -0000 +++@@ -153,7 +153,6 @@ +++ /* Error, get out */ +++ foreach_dlist(fd_ptr, &sockfds) { +++ close(fd_ptr->fd); +++- free((void *)fd_ptr); +++ } +++ Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror()); +++ break; +++Index: src/stored/autochanger.c +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v +++retrieving revision 1.47.2.3 +++diff -u -r1.47.2.3 autochanger.c +++--- src/stored/autochanger.c 12 Nov 2005 17:30:53 -0000 1.47.2.3 ++++++ src/stored/autochanger.c 22 Nov 2005 10:42:24 -0000 +++@@ -4,7 +4,7 @@ +++ * +++ * Kern Sibbald, August MMII +++ * +++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ */ +++ /* +++ Copyright (C) 2002-2005 Kern Sibbald +++@@ -163,6 +163,7 @@ +++ rtn_stat = -1; /* hard error */ +++ } +++ Dmsg2(400, "load slot %d status=%d\n", slot, status); ++++ unlock_changer(dcr); +++ } else { +++ status = 0; /* we got what we want */ +++ dev->Slot = slot; /* set currently loaded slot */ +++@@ -174,7 +175,6 @@ +++ } else { +++ rtn_stat = 0; /* no changer found */ +++ } +++- unlock_changer(dcr); +++ free_pool_memory(changer); +++ return rtn_stat; +++ +++Index: src/stored/status.c +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v +++retrieving revision 1.44.2.1 +++diff -u -r1.44.2.1 status.c +++--- src/stored/status.c 6 Oct 2005 07:04:13 -0000 1.44.2.1 ++++++ src/stored/status.c 22 Nov 2005 10:42:24 -0000 +++@@ -264,6 +264,7 @@ +++ bool found = false; +++ int bps, sec; +++ JCR *jcr; ++++ DCR *dcr; +++ char JobName[MAX_NAME_LENGTH]; +++ char b1[30], b2[30], b3[30]; +++ +++@@ -273,7 +274,8 @@ +++ bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"), +++ job_type_to_str(jcr->JobType), jcr->Job); +++ } +++- if (jcr->dcr && jcr->dcr->device) { ++++ dcr = jcr->dcr; ++++ if (dcr && dcr->device) { +++ bstrncpy(JobName, jcr->Job, sizeof(JobName)); +++ /* There are three periods after the Job name */ +++ char *p; +++@@ -282,13 +284,16 @@ +++ *p = 0; +++ } +++ } +++- bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"), ++++ bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n" ++++ " pool=\"%s\" device=\"%s\"\n"), +++ job_level_to_str(jcr->JobLevel), +++ job_type_to_str(jcr->JobType), +++ JobName, +++ jcr->JobId, +++- jcr->dcr->VolumeName, +++- jcr->dcr->device->device_name); ++++ dcr->VolumeName, ++++ dcr->pool_name, ++++ dcr->dev?dcr->dev->print_name(): ++++ dcr->device->device_name); +++ sec = time(NULL) - jcr->run_time; +++ if (sec <= 0) { +++ sec = 1; +++Index: src/stored/stored_conf.c +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v +++retrieving revision 1.76 +++diff -u -r1.76 stored_conf.c +++--- src/stored/stored_conf.c 9 Sep 2005 09:40:04 -0000 1.76 ++++++ src/stored/stored_conf.c 22 Nov 2005 10:42:24 -0000 +++@@ -222,16 +222,16 @@ +++ res->res_dev.hdr.name, +++ res->res_dev.media_type, res->res_dev.device_name, +++ res->res_dev.label_type); +++- sendit(sock, " rew_wait=%d min_bs=%d max_bs=%d\n", ++++ sendit(sock, " rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n", +++ res->res_dev.max_rewind_wait, res->res_dev.min_block_size, +++- res->res_dev.max_block_size); ++++ res->res_dev.max_block_size, res->res_dev.max_changer_wait); +++ sendit(sock, " max_jobs=%d max_files=%" lld " max_size=%" lld "\n", +++ res->res_dev.max_volume_jobs, res->res_dev.max_volume_files, +++ res->res_dev.max_volume_size); +++ sendit(sock, " max_file_size=%" lld " capacity=%" lld "\n", +++ res->res_dev.max_file_size, res->res_dev.volume_capacity); +++- sendit(sock, " spool_directory=%s\n", NPRT(res->res_dev.spool_directory)); +++- sendit(sock, " max_spool_size=%" lld " max_job_spool_size=%" lld "\n", ++++ sendit(sock, " spool_directory=%s\n", NPRT(res->res_dev.spool_directory)); ++++ sendit(sock, " max_spool_size=%" lld " max_job_spool_size=%" lld "\n", +++ res->res_dev.max_spool_size, res->res_dev.max_job_spool_size); +++ if (res->res_dev.changer_res) { +++ sendit(sock, " changer=%p\n", res->res_dev.changer_res); +++Index: src/tray-monitor/tray-monitor.c +++=================================================================== +++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v +++retrieving revision 1.25.2.1 +++diff -u -r1.25.2.1 tray-monitor.c +++--- src/tray-monitor/tray-monitor.c 1 Oct 2005 10:20:18 -0000 1.25.2.1 ++++++ src/tray-monitor/tray-monitor.c 22 Nov 2005 10:42:24 -0000 +++@@ -4,7 +4,7 @@ +++ * +++ * Nicolas Boichat, August MMIV +++ * +++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ */ +++ +++ /* +++@@ -881,7 +881,7 @@ +++ } +++ +++ if (item->D_sock == NULL) { +++- g_slist_append(*list, (void *)_("Cannot connect to daemon.\n")); ++++ g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n"))); +++ changeStatusMessage(item, _("Cannot connect to daemon.")); +++ item->state = error; +++ item->oldstate = error; +++Index: updatedb/kes-1.38 +++=================================================================== +++RCS file: updatedb/kes-1.38 +++diff -N updatedb/kes-1.38 +++--- updatedb/kes-1.38 3 Nov 2005 14:54:28 -0000 1.1.2.1 ++++++ /dev/null 1 Jan 1970 00:00:00 -0000 +++@@ -1,19 +0,0 @@ +++- Technical notes on version 1.38 +++- Kern Sibbald +++- +++-General: +++- +++-Changes to 1.38.0: +++-- Modify configure.in to add execute option to sqlite3 catalog +++- scripts. +++-- Create update_xxx_table_8_to_9 scripts for updatedb +++-- Fix wrong variable in bpipe.c debug output reported by user. +++-- Fix improper placement of encode_and_send_attributes() in +++- FD backup.c causing first file of non-portable Win32 backup +++- to have wrong stream. Reported by Thorsten. +++-- Move the -lcrypt for PostgreSQL after the PostgreSQL libs in +++- autoconf/bacula-macros/db.m4 as suggested by user. Fixes bug #457. +++-- Remove @STATIC_CONS@ from tray-monitor Makefile as suggested +++- by user. Fixes bug #456. +++- +++-Released 1.38.0 (28Oct05): 31 October 2005 ++Index: patches/patches-1.38.0 ++=================================================================== ++RCS file: patches/patches-1.38.0 ++diff -N patches/patches-1.38.0 ++Index: patches/patches-1.38.1 ++=================================================================== ++RCS file: patches/patches-1.38.1 ++diff -N patches/patches-1.38.1 ++--- /dev/null 1 Jan 1970 00:00:00 -0000 +++++ patches/patches-1.38.1 22 Nov 2005 10:50:55 -0000 1.1.2.2 ++@@ -0,0 +1,14 @@ +++20Nov05 1.38.1-to-1.38.2.patch +++ This patch fixes the following bugs: +++ +++- Fix crash in tray-monitor when daemon disconnects. Bug #479. +++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator +++ says this patch does not fix his problem) +++- Fix cancel failure bug. Bug #481 +++- Fix failure when Pool name has spaces. Bug #487 +++- Fix SD crash in autochanger code. Mutex failure. Bug #488 +++- Fix a couple of free()s in src/filed/acl.c +++- Fix memory overrun in bfile.c in building OS X resource +++ fork filename. Bug #489 +++ +++ ++Index: src/version.h ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/src/version.h,v ++retrieving revision 1.554.2.14 ++retrieving revision 1.554.2.15 ++diff -u -r1.554.2.14 -r1.554.2.15 ++--- src/version.h 14 Nov 2005 14:21:58 -0000 1.554.2.14 +++++ src/version.h 22 Nov 2005 10:50:55 -0000 1.554.2.15 ++@@ -1,11 +1,11 @@ ++ /* ++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++ */ ++ ++ #undef VERSION ++-#define VERSION "1.38.1" ++-#define BDATE "14 November 2005" ++-#define LSMDATE "14Nov05" +++#define VERSION "1.38.2" +++#define BDATE "20 November 2005" +++#define LSMDATE "20Nov05" ++ ++ /* Debug flags */ ++ #undef DEBUG ++Index: src/dird/catreq.c ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v ++retrieving revision 1.77.2.1 ++retrieving revision 1.77.2.2 ++diff -u -r1.77.2.1 -r1.77.2.2 ++--- src/dird/catreq.c 26 Oct 2005 14:02:04 -0000 1.77.2.1 +++++ src/dird/catreq.c 22 Nov 2005 10:50:55 -0000 1.77.2.2 ++@@ -10,7 +10,7 @@ ++ * Basic tasks done here: ++ * Handle Catalog services. ++ * ++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++ */ ++ /* ++ Copyright (C) 2001-2005 Kern Sibbald ++@@ -117,6 +117,7 @@ ++ if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) { ++ memset(&pr, 0, sizeof(pr)); ++ bstrncpy(pr.Name, pool_name, sizeof(pr.Name)); +++ unbash_spaces(pr.Name); ++ ok = db_get_pool_record(jcr, jcr->db, &pr); ++ if (ok) { ++ mr.PoolId = pr.PoolId; ++Index: src/dird/ua_restore.c ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v ++retrieving revision 1.101.2.1 ++retrieving revision 1.101.2.2 ++diff -u -r1.101.2.1 -r1.101.2.2 ++--- src/dird/ua_restore.c 26 Oct 2005 14:02:04 -0000 1.101.2.1 +++++ src/dird/ua_restore.c 22 Nov 2005 10:50:55 -0000 1.101.2.2 ++@@ -10,7 +10,7 @@ ++ * ++ * Kern Sibbald, July MMII ++ * ++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++ */ ++ /* ++ Copyright (C) 2002-2005 Kern Sibbald ++@@ -409,7 +409,7 @@ ++ } ++ done = true; ++ switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) { ++- case -1: /* error */ +++ case -1: /* error or cancel */ ++ return 0; ++ case 0: /* list last 20 Jobs run */ ++ gui_save = ua->jcr->gui; ++Index: src/dird/ua_run.c ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v ++retrieving revision 1.71 ++retrieving revision 1.71.2.1 ++diff -u -r1.71 -r1.71.2.1 ++--- src/dird/ua_run.c 10 Aug 2005 16:35:19 -0000 1.71 +++++ src/dird/ua_run.c 22 Nov 2005 10:50:55 -0000 1.71.2.1 ++@@ -4,7 +4,7 @@ ++ * ++ * Kern Sibbald, December MMI ++ * ++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++ */ ++ /* ++ Copyright (C) 2001-2005 Kern Sibbald ++@@ -851,6 +851,8 @@ ++ bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n")); ++ } ++ goto try_again; +++ case -1: /* error or cancel */ +++ goto bail_out; ++ default: ++ goto try_again; ++ } ++Index: src/dird/ua_select.c ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v ++retrieving revision 1.65.2.1 ++retrieving revision 1.65.2.2 ++diff -u -r1.65.2.1 -r1.65.2.2 ++--- src/dird/ua_select.c 12 Nov 2005 17:30:52 -0000 1.65.2.1 +++++ src/dird/ua_select.c 22 Nov 2005 10:50:55 -0000 1.65.2.2 ++@@ -4,7 +4,7 @@ ++ * ++ * Kern Sibbald, October MMI ++ * ++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++ */ ++ /* ++ Copyright (C) 2001-2005 Kern Sibbald ++@@ -149,7 +149,9 @@ ++ } ++ } ++ UnlockRes(); ++- do_prompt(ua, _("Storage"), _("Select Storage resource"), name, sizeof(name)); +++ if (do_prompt(ua, _("Storage"), _("Select Storage resource"), name, sizeof(name)) < 0) { +++ return NULL; +++ } ++ store = (STORE *)GetResWithName(R_STORAGE, name); ++ return store; ++ } ++@@ -170,7 +172,9 @@ ++ } ++ } ++ UnlockRes(); ++- do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)); +++ if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) { +++ return NULL; +++ } ++ fs = (FILESET *)GetResWithName(R_FILESET, name); ++ return fs; ++ } ++@@ -202,7 +206,9 @@ ++ } ++ } ++ UnlockRes(); ++- do_prompt(ua, _("Catalog"), _("Select Catalog resource"), name, sizeof(name)); +++ if (do_prompt(ua, _("Catalog"), _("Select Catalog resource"), name, sizeof(name)) < 0) { +++ return NULL; +++ } ++ catalog = (CAT *)GetResWithName(R_CATALOG, name); ++ } ++ return catalog; ++@@ -225,7 +231,9 @@ ++ } ++ } ++ UnlockRes(); ++- do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)); +++ if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) { +++ return NULL; +++ } ++ job = (JOB *)GetResWithName(R_JOB, name); ++ return job; ++ } ++@@ -246,7 +254,9 @@ ++ } ++ } ++ UnlockRes(); ++- do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)); +++ if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) { +++ return NULL; +++ } ++ job = (JOB *)GetResWithName(R_JOB, name); ++ return job; ++ } ++@@ -269,7 +279,9 @@ ++ } ++ } ++ UnlockRes(); ++- do_prompt(ua, _("Client"), _("Select Client (File daemon) resource"), name, sizeof(name)); +++ if (do_prompt(ua, _("Client"), _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) { +++ return NULL; +++ } ++ client = (CLIENT *)GetResWithName(R_CLIENT, name); ++ return client; ++ } ++@@ -551,7 +563,9 @@ ++ } ++ } ++ UnlockRes(); ++- do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)); +++ if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) { +++ return NULL; +++ } ++ pool = (POOL *)GetResWithName(R_POOL, name); ++ return pool; ++ } ++@@ -673,12 +687,16 @@ ++ * Returns: -1 on error ++ * index base 0 on success, and choice ++ * is copied to prompt if not NULL +++ * prompt is set to the chosen prompt item string ++ */ ++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt) ++ { ++ int i, item; ++ char pmsg[MAXSTRING]; ++ +++ if (prompt) { +++ *prompt = 0; +++ } ++ if (ua->num_prompts == 2) { ++ item = 1; ++ if (prompt) { ++@@ -698,15 +716,11 @@ ++ bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]); ++ } ++ ++- if (prompt) { ++- *prompt = 0; ++- } ++- ++ for ( ;; ) { ++ /* First item is the prompt string, not the items */ ++ if (ua->num_prompts == 1) { ++ bsendmsg(ua, _("Selection is empty!\n")); ++- item = 0; /* list is empty ! */ +++ item = -1; /* list is empty ! */ ++ break; ++ } ++ if (ua->num_prompts == 2) { ++@@ -741,7 +755,7 @@ ++ free(ua->prompt[i]); ++ } ++ ua->num_prompts = 0; ++- return item - 1; +++ return item>0 ? item-1 : item; ++ } ++ ++ ++Index: src/dird/ua_update.c ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v ++retrieving revision 1.7 ++retrieving revision 1.7.2.1 ++diff -u -r1.7 -r1.7.2.1 ++--- src/dird/ua_update.c 28 Aug 2005 12:22:02 -0000 1.7 +++++ src/dird/ua_update.c 22 Nov 2005 10:50:55 -0000 1.7.2.1 ++@@ -5,7 +5,7 @@ ++ * ++ * Kern Sibbald, September MM ++ * ++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++ */ ++ /* ++ Copyright (C) 2000-2005 Kern Sibbald ++@@ -590,7 +590,7 @@ ++ update_all_vols_from_pool(ua); ++ return 1; ++ default: /* Done or error */ ++- bsendmsg(ua, _("Selection done.\n")); +++ bsendmsg(ua, _("Selection terminated.\n")); ++ return 1; ++ } ++ } ++Index: src/filed/acl.c ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v ++retrieving revision 1.10.2.1 ++retrieving revision 1.10.2.2 ++diff -u -r1.10.2.1 -r1.10.2.2 ++--- src/filed/acl.c 14 Nov 2005 20:20:38 -0000 1.10.2.1 +++++ src/filed/acl.c 22 Nov 2005 10:50:55 -0000 1.10.2.2 ++@@ -26,7 +26,7 @@ ++ * ++ * Written by Preben 'Peppe' Guldberg, December MMIV ++ * ++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++ */ ++ /* ++ Copyright (C) 2004-2005 Kern Sibbald ++@@ -140,7 +140,7 @@ ++ ++ if ((acl_text = acl_get(jcr->last_fname)) != NULL) { ++ len = pm_strcpy(jcr->acl_text, acl_text); ++- free(acl_text); +++ actuallyfree(acl_text); ++ return len; ++ } ++ return -1; ++@@ -270,7 +270,7 @@ ++ if ((n = getacl(jcr->last_fname, n, acls)) > 0) { ++ if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) { ++ len = pm_strcpy(jcr->acl_text, acl_text); ++- free(acl_text); +++ actuallyfree(acl_text); ++ return len; ++ } ++ } ++Index: src/findlib/bfile.c ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v ++retrieving revision 1.40 ++retrieving revision 1.40.2.1 ++diff -u -r1.40 -r1.40.2.1 ++--- src/findlib/bfile.c 10 Aug 2005 16:35:19 -0000 1.40 +++++ src/findlib/bfile.c 22 Nov 2005 10:50:55 -0000 1.40.2.1 ++@@ -5,7 +5,7 @@ ++ * ++ * Kern Sibbald, April MMIII ++ * ++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++ * ++ */ ++ /* ++@@ -623,13 +623,10 @@ ++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode) ++ { ++ POOLMEM *rsrc_fname; ++- size_t fname_len; ++ ++- fname_len = strlen(fname); ++ rsrc_fname = get_pool_memory(PM_FNAME); ++- bstrncpy(rsrc_fname, fname, fname_len + 1); ++- bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC, ++- strlen(_PATH_RSRCFORKSPEC) + 1); +++ pm_strcpy(rsrc_fname, fname); +++ pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC); ++ bopen(bfd, rsrc_fname, flags, mode); ++ free_pool_memory(rsrc_fname); ++ return bfd->fid; ++Index: src/lib/bnet_server.c ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v ++retrieving revision 1.39 ++retrieving revision 1.39.2.1 ++diff -u -r1.39 -r1.39.2.1 ++--- src/lib/bnet_server.c 18 Aug 2005 15:37:40 -0000 1.39 +++++ src/lib/bnet_server.c 22 Nov 2005 10:50:55 -0000 1.39.2.1 ++@@ -16,7 +16,7 @@ ++ * Originally written by Kern Sibbald for inclusion in apcupsd, ++ * but heavily modified for Bacula ++ * ++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++ */ ++ ++ #include "bacula.h" ++@@ -153,7 +153,6 @@ ++ /* Error, get out */ ++ foreach_dlist(fd_ptr, &sockfds) { ++ close(fd_ptr->fd); ++- free((void *)fd_ptr); ++ } ++ Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror()); ++ break; ++Index: src/stored/autochanger.c ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v ++retrieving revision 1.47.2.3 ++retrieving revision 1.47.2.4 ++diff -u -r1.47.2.3 -r1.47.2.4 ++--- src/stored/autochanger.c 12 Nov 2005 17:30:53 -0000 1.47.2.3 +++++ src/stored/autochanger.c 22 Nov 2005 10:50:55 -0000 1.47.2.4 ++@@ -4,7 +4,7 @@ ++ * ++ * Kern Sibbald, August MMII ++ * ++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++ */ ++ /* ++ Copyright (C) 2002-2005 Kern Sibbald ++@@ -163,6 +163,7 @@ ++ rtn_stat = -1; /* hard error */ ++ } ++ Dmsg2(400, "load slot %d status=%d\n", slot, status); +++ unlock_changer(dcr); ++ } else { ++ status = 0; /* we got what we want */ ++ dev->Slot = slot; /* set currently loaded slot */ ++@@ -174,7 +175,6 @@ ++ } else { ++ rtn_stat = 0; /* no changer found */ ++ } ++- unlock_changer(dcr); ++ free_pool_memory(changer); ++ return rtn_stat; ++ ++Index: src/stored/status.c ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v ++retrieving revision 1.44.2.1 ++retrieving revision 1.44.2.2 ++diff -u -r1.44.2.1 -r1.44.2.2 ++--- src/stored/status.c 6 Oct 2005 07:04:13 -0000 1.44.2.1 +++++ src/stored/status.c 22 Nov 2005 10:50:55 -0000 1.44.2.2 ++@@ -3,7 +3,7 @@ ++ * ++ * Kern Sibbald, May MMIII ++ * ++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++ * ++ */ ++ /* ++@@ -264,6 +264,7 @@ ++ bool found = false; ++ int bps, sec; ++ JCR *jcr; +++ DCR *dcr; ++ char JobName[MAX_NAME_LENGTH]; ++ char b1[30], b2[30], b3[30]; ++ ++@@ -273,7 +274,8 @@ ++ bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"), ++ job_type_to_str(jcr->JobType), jcr->Job); ++ } ++- if (jcr->dcr && jcr->dcr->device) { +++ dcr = jcr->dcr; +++ if (dcr && dcr->device) { ++ bstrncpy(JobName, jcr->Job, sizeof(JobName)); ++ /* There are three periods after the Job name */ ++ char *p; ++@@ -282,13 +284,16 @@ ++ *p = 0; ++ } ++ } ++- bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"), +++ bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n" +++ " pool=\"%s\" device=\"%s\"\n"), ++ job_level_to_str(jcr->JobLevel), ++ job_type_to_str(jcr->JobType), ++ JobName, ++ jcr->JobId, ++- jcr->dcr->VolumeName, ++- jcr->dcr->device->device_name); +++ dcr->VolumeName, +++ dcr->pool_name, +++ dcr->dev?dcr->dev->print_name(): +++ dcr->device->device_name); ++ sec = time(NULL) - jcr->run_time; ++ if (sec <= 0) { ++ sec = 1; ++Index: src/stored/stored_conf.c ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v ++retrieving revision 1.76 ++retrieving revision 1.76.2.1 ++diff -u -r1.76 -r1.76.2.1 ++--- src/stored/stored_conf.c 9 Sep 2005 09:40:04 -0000 1.76 +++++ src/stored/stored_conf.c 22 Nov 2005 10:50:55 -0000 1.76.2.1 ++@@ -3,7 +3,7 @@ ++ * ++ * Kern Sibbald, March MM ++ * ++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++ */ ++ /* ++ Copyright (C) 2000-2005 Kern Sibbald ++@@ -222,16 +222,16 @@ ++ res->res_dev.hdr.name, ++ res->res_dev.media_type, res->res_dev.device_name, ++ res->res_dev.label_type); ++- sendit(sock, " rew_wait=%d min_bs=%d max_bs=%d\n", +++ sendit(sock, " rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n", ++ res->res_dev.max_rewind_wait, res->res_dev.min_block_size, ++- res->res_dev.max_block_size); +++ res->res_dev.max_block_size, res->res_dev.max_changer_wait); ++ sendit(sock, " max_jobs=%d max_files=%" lld " max_size=%" lld "\n", ++ res->res_dev.max_volume_jobs, res->res_dev.max_volume_files, ++ res->res_dev.max_volume_size); ++ sendit(sock, " max_file_size=%" lld " capacity=%" lld "\n", ++ res->res_dev.max_file_size, res->res_dev.volume_capacity); ++- sendit(sock, " spool_directory=%s\n", NPRT(res->res_dev.spool_directory)); ++- sendit(sock, " max_spool_size=%" lld " max_job_spool_size=%" lld "\n", +++ sendit(sock, " spool_directory=%s\n", NPRT(res->res_dev.spool_directory)); +++ sendit(sock, " max_spool_size=%" lld " max_job_spool_size=%" lld "\n", ++ res->res_dev.max_spool_size, res->res_dev.max_job_spool_size); ++ if (res->res_dev.changer_res) { ++ sendit(sock, " changer=%p\n", res->res_dev.changer_res); ++Index: src/tray-monitor/tray-monitor.c ++=================================================================== ++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v ++retrieving revision 1.25.2.1 ++retrieving revision 1.25.2.2 ++diff -u -r1.25.2.1 -r1.25.2.2 ++--- src/tray-monitor/tray-monitor.c 1 Oct 2005 10:20:18 -0000 1.25.2.1 +++++ src/tray-monitor/tray-monitor.c 22 Nov 2005 10:50:55 -0000 1.25.2.2 ++@@ -4,7 +4,7 @@ ++ * ++ * Nicolas Boichat, August MMIV ++ * ++- * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ +++ * Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $ ++ */ ++ ++ /* ++@@ -881,7 +881,7 @@ ++ } ++ ++ if (item->D_sock == NULL) { ++- g_slist_append(*list, (void *)_("Cannot connect to daemon.\n")); +++ g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n"))); ++ changeStatusMessage(item, _("Cannot connect to daemon.")); ++ item->state = error; ++ item->oldstate = error; ++Index: updatedb/kes-1.38 ++=================================================================== ++RCS file: updatedb/kes-1.38 ++diff -N updatedb/kes-1.38 ++--- updatedb/kes-1.38 3 Nov 2005 14:54:28 -0000 1.1.2.1 +++++ /dev/null 1 Jan 1970 00:00:00 -0000 ++@@ -1,19 +0,0 @@ ++- Technical notes on version 1.38 ++- Kern Sibbald ++- ++-General: ++- ++-Changes to 1.38.0: ++-- Modify configure.in to add execute option to sqlite3 catalog ++- scripts. ++-- Create update_xxx_table_8_to_9 scripts for updatedb ++-- Fix wrong variable in bpipe.c debug output reported by user. ++-- Fix improper placement of encode_and_send_attributes() in ++- FD backup.c causing first file of non-portable Win32 backup ++- to have wrong stream. Reported by Thorsten. ++-- Move the -lcrypt for PostgreSQL after the PostgreSQL libs in ++- autoconf/bacula-macros/db.m4 as suggested by user. Fixes bug #457. ++-- Remove @STATIC_CONS@ from tray-monitor Makefile as suggested ++- by user. Fixes bug #456. ++- ++-Released 1.38.0 (28Oct05): 31 October 2005 +Index: patches/patches-1.38.0 +=================================================================== +RCS file: patches/patches-1.38.0 +diff -N patches/patches-1.38.0 +Index: patches/patches-1.38.1 +=================================================================== +RCS file: patches/patches-1.38.1 +diff -N patches/patches-1.38.1 +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ patches/patches-1.38.1 22 Nov 2005 10:50:55 -0000 1.1.2.2 +@@ -0,0 +1,14 @@ ++20Nov05 1.38.1-to-1.38.2.patch ++ This patch fixes the following bugs: ++ ++- Fix crash in tray-monitor when daemon disconnects. Bug #479. ++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator ++ says this patch does not fix his problem) ++- Fix cancel failure bug. Bug #481 ++- Fix failure when Pool name has spaces. Bug #487 ++- Fix SD crash in autochanger code. Mutex failure. Bug #488 ++- Fix a couple of free()s in src/filed/acl.c ++- Fix memory overrun in bfile.c in building OS X resource ++ fork filename. Bug #489 ++ ++ Index: src/version.h =================================================================== RCS file: /cvsroot/bacula/bacula/src/version.h,v retrieving revision 1.554.2.14 -diff -u -r1.554.2.14 version.h +retrieving revision 1.554.2.15 +diff -u -r1.554.2.14 -r1.554.2.15 --- src/version.h 14 Nov 2005 14:21:58 -0000 1.554.2.14 -+++ src/version.h 21 Nov 2005 12:53:37 -0000 -@@ -3,9 +3,9 @@ ++++ src/version.h 22 Nov 2005 10:50:55 -0000 1.554.2.15 +@@ -1,11 +1,11 @@ + /* +- * Version $Id: version.h,v 1.554.2.14 2005/11/14 14:21:58 kerns Exp $ ++ * Version $Id: version.h,v 1.554.2.15 2005/11/22 10:50:55 kerns Exp $ */ #undef VERSION @@ -69,15 +7589,16 @@ Index: src/dird/catreq.c =================================================================== RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v retrieving revision 1.77.2.1 -diff -u -r1.77.2.1 catreq.c +retrieving revision 1.77.2.2 +diff -u -r1.77.2.1 -r1.77.2.2 --- src/dird/catreq.c 26 Oct 2005 14:02:04 -0000 1.77.2.1 -+++ src/dird/catreq.c 21 Nov 2005 12:53:37 -0000 ++++ src/dird/catreq.c 22 Nov 2005 10:50:55 -0000 1.77.2.2 @@ -10,7 +10,7 @@ * Basic tasks done here: * Handle Catalog services. * - * Version $Id: catreq.c,v 1.77.2.1 2005/10/26 14:02:04 kerns Exp $ -+ * Version $Id: catreq.c,v 1.79 2005/10/11 20:40:52 kerns Exp $ ++ * Version $Id: catreq.c,v 1.77.2.2 2005/11/22 10:50:55 kerns Exp $ */ /* Copyright (C) 2001-2005 Kern Sibbald @@ -93,33 +7614,45 @@ Index: src/dird/ua_restore.c =================================================================== RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v retrieving revision 1.101.2.1 -diff -u -r1.101.2.1 ua_restore.c +retrieving revision 1.101.2.2 +diff -u -r1.101.2.1 -r1.101.2.2 --- src/dird/ua_restore.c 26 Oct 2005 14:02:04 -0000 1.101.2.1 -+++ src/dird/ua_restore.c 21 Nov 2005 12:53:37 -0000 ++++ src/dird/ua_restore.c 22 Nov 2005 10:50:55 -0000 1.101.2.2 @@ -10,7 +10,7 @@ * * Kern Sibbald, July MMII * - * Version $Id: ua_restore.c,v 1.101.2.1 2005/10/26 14:02:04 kerns Exp $ -+ * Version $Id: ua_restore.c,v 1.102 2005/10/25 17:06:42 kerns Exp $ ++ * Version $Id: ua_restore.c,v 1.101.2.2 2005/11/22 10:50:55 kerns Exp $ */ /* Copyright (C) 2002-2005 Kern Sibbald -@@ -573,6 +573,7 @@ - } - return 2; - -+ case -2: /* Period entered to cancel */ - case 11: /* Cancel or quit */ - return 0; +@@ -409,7 +409,7 @@ } + done = true; + switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) { +- case -1: /* error */ ++ case -1: /* error or cancel */ + return 0; + case 0: /* list last 20 Jobs run */ + gui_save = ua->jcr->gui; Index: src/dird/ua_run.c =================================================================== RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v retrieving revision 1.71 -diff -u -r1.71 ua_run.c +retrieving revision 1.71.2.1 +diff -u -r1.71 -r1.71.2.1 --- src/dird/ua_run.c 10 Aug 2005 16:35:19 -0000 1.71 -+++ src/dird/ua_run.c 21 Nov 2005 12:53:38 -0000 ++++ src/dird/ua_run.c 22 Nov 2005 10:50:55 -0000 1.71.2.1 +@@ -4,7 +4,7 @@ + * + * Kern Sibbald, December MMI + * +- * Version $Id: ua_run.c,v 1.71 2005/08/10 16:35:19 nboichat Exp $ ++ * Version $Id: ua_run.c,v 1.71.2.1 2005/11/22 10:50:55 kerns Exp $ + */ + /* + Copyright (C) 2001-2005 Kern Sibbald @@ -851,6 +851,8 @@ bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n")); } @@ -133,15 +7666,16 @@ Index: src/dird/ua_select.c =================================================================== RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v retrieving revision 1.65.2.1 -diff -u -r1.65.2.1 ua_select.c +retrieving revision 1.65.2.2 +diff -u -r1.65.2.1 -r1.65.2.2 --- src/dird/ua_select.c 12 Nov 2005 17:30:52 -0000 1.65.2.1 -+++ src/dird/ua_select.c 21 Nov 2005 12:53:39 -0000 ++++ src/dird/ua_select.c 22 Nov 2005 10:50:55 -0000 1.65.2.2 @@ -4,7 +4,7 @@ * * Kern Sibbald, October MMI * - * Version $Id: ua_select.c,v 1.65.2.1 2005/11/12 17:30:52 kerns Exp $ -+ * Version $Id: ua_select.c,v 1.66 2005/11/12 17:31:19 kerns Exp $ ++ * Version $Id: ua_select.c,v 1.65.2.2 2005/11/22 10:50:55 kerns Exp $ */ /* Copyright (C) 2001-2005 Kern Sibbald @@ -269,9 +7803,19 @@ Index: src/dird/ua_update.c =================================================================== RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v retrieving revision 1.7 -diff -u -r1.7 ua_update.c +retrieving revision 1.7.2.1 +diff -u -r1.7 -r1.7.2.1 --- src/dird/ua_update.c 28 Aug 2005 12:22:02 -0000 1.7 -+++ src/dird/ua_update.c 21 Nov 2005 12:53:39 -0000 ++++ src/dird/ua_update.c 22 Nov 2005 10:50:55 -0000 1.7.2.1 +@@ -5,7 +5,7 @@ + * + * Kern Sibbald, September MM + * +- * Version $Id: ua_update.c,v 1.7 2005/08/28 12:22:02 kerns Exp $ ++ * Version $Id: ua_update.c,v 1.7.2.1 2005/11/22 10:50:55 kerns Exp $ + */ + /* + Copyright (C) 2000-2005 Kern Sibbald @@ -590,7 +590,7 @@ update_all_vols_from_pool(ua); return 1; @@ -285,15 +7829,16 @@ Index: src/filed/acl.c =================================================================== RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v retrieving revision 1.10.2.1 -diff -u -r1.10.2.1 acl.c +retrieving revision 1.10.2.2 +diff -u -r1.10.2.1 -r1.10.2.2 --- src/filed/acl.c 14 Nov 2005 20:20:38 -0000 1.10.2.1 -+++ src/filed/acl.c 21 Nov 2005 12:53:39 -0000 ++++ src/filed/acl.c 22 Nov 2005 10:50:55 -0000 1.10.2.2 @@ -26,7 +26,7 @@ * * Written by Preben 'Peppe' Guldberg, December MMIV * - * Version $Id: acl.c,v 1.10.2.1 2005/11/14 20:20:38 kerns Exp $ -+ * Version $Id: acl.c,v 1.11 2005/11/14 20:20:20 kerns Exp $ ++ * Version $Id: acl.c,v 1.10.2.2 2005/11/22 10:50:55 kerns Exp $ */ /* Copyright (C) 2004-2005 Kern Sibbald @@ -319,9 +7864,19 @@ Index: src/findlib/bfile.c =================================================================== RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v retrieving revision 1.40 -diff -u -r1.40 bfile.c +retrieving revision 1.40.2.1 +diff -u -r1.40 -r1.40.2.1 --- src/findlib/bfile.c 10 Aug 2005 16:35:19 -0000 1.40 -+++ src/findlib/bfile.c 21 Nov 2005 12:53:39 -0000 ++++ src/findlib/bfile.c 22 Nov 2005 10:50:55 -0000 1.40.2.1 +@@ -5,7 +5,7 @@ + * + * Kern Sibbald, April MMIII + * +- * Version $Id: bfile.c,v 1.40 2005/08/10 16:35:19 nboichat Exp $ ++ * Version $Id: bfile.c,v 1.40.2.1 2005/11/22 10:50:55 kerns Exp $ + * + */ + /* @@ -623,13 +623,10 @@ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode) { @@ -342,9 +7897,19 @@ Index: src/lib/bnet_server.c =================================================================== RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v retrieving revision 1.39 -diff -u -r1.39 bnet_server.c +retrieving revision 1.39.2.1 +diff -u -r1.39 -r1.39.2.1 --- src/lib/bnet_server.c 18 Aug 2005 15:37:40 -0000 1.39 -+++ src/lib/bnet_server.c 21 Nov 2005 12:53:39 -0000 ++++ src/lib/bnet_server.c 22 Nov 2005 10:50:55 -0000 1.39.2.1 +@@ -16,7 +16,7 @@ + * Originally written by Kern Sibbald for inclusion in apcupsd, + * but heavily modified for Bacula + * +- * Version $Id: bnet_server.c,v 1.39 2005/08/18 15:37:40 kerns Exp $ ++ * Version $Id: bnet_server.c,v 1.39.2.1 2005/11/22 10:50:55 kerns Exp $ + */ + + #include "bacula.h" @@ -153,7 +153,6 @@ /* Error, get out */ foreach_dlist(fd_ptr, &sockfds) { @@ -357,15 +7922,16 @@ Index: src/stored/autochanger.c =================================================================== RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v retrieving revision 1.47.2.3 -diff -u -r1.47.2.3 autochanger.c +retrieving revision 1.47.2.4 +diff -u -r1.47.2.3 -r1.47.2.4 --- src/stored/autochanger.c 12 Nov 2005 17:30:53 -0000 1.47.2.3 -+++ src/stored/autochanger.c 21 Nov 2005 12:53:39 -0000 ++++ src/stored/autochanger.c 22 Nov 2005 10:50:55 -0000 1.47.2.4 @@ -4,7 +4,7 @@ * * Kern Sibbald, August MMII * - * Version $Id: autochanger.c,v 1.47.2.3 2005/11/12 17:30:53 kerns Exp $ -+ * Version $Id: autochanger.c,v 1.51 2005/11/12 17:31:19 kerns Exp $ ++ * Version $Id: autochanger.c,v 1.47.2.4 2005/11/22 10:50:55 kerns Exp $ */ /* Copyright (C) 2002-2005 Kern Sibbald @@ -385,19 +7951,113 @@ diff -u -r1.47.2.3 autochanger.c free_pool_memory(changer); return rtn_stat; +Index: src/stored/status.c +=================================================================== +RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v +retrieving revision 1.44.2.1 +retrieving revision 1.44.2.2 +diff -u -r1.44.2.1 -r1.44.2.2 +--- src/stored/status.c 6 Oct 2005 07:04:13 -0000 1.44.2.1 ++++ src/stored/status.c 22 Nov 2005 10:50:55 -0000 1.44.2.2 +@@ -3,7 +3,7 @@ + * + * Kern Sibbald, May MMIII + * +- * Version $Id: status.c,v 1.44.2.1 2005/10/06 07:04:13 kerns Exp $ ++ * Version $Id: status.c,v 1.44.2.2 2005/11/22 10:50:55 kerns Exp $ + * + */ + /* +@@ -264,6 +264,7 @@ + bool found = false; + int bps, sec; + JCR *jcr; ++ DCR *dcr; + char JobName[MAX_NAME_LENGTH]; + char b1[30], b2[30], b3[30]; + +@@ -273,7 +274,8 @@ + bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"), + job_type_to_str(jcr->JobType), jcr->Job); + } +- if (jcr->dcr && jcr->dcr->device) { ++ dcr = jcr->dcr; ++ if (dcr && dcr->device) { + bstrncpy(JobName, jcr->Job, sizeof(JobName)); + /* There are three periods after the Job name */ + char *p; +@@ -282,13 +284,16 @@ + *p = 0; + } + } +- bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"), ++ bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n" ++ " pool=\"%s\" device=\"%s\"\n"), + job_level_to_str(jcr->JobLevel), + job_type_to_str(jcr->JobType), + JobName, + jcr->JobId, +- jcr->dcr->VolumeName, +- jcr->dcr->device->device_name); ++ dcr->VolumeName, ++ dcr->pool_name, ++ dcr->dev?dcr->dev->print_name(): ++ dcr->device->device_name); + sec = time(NULL) - jcr->run_time; + if (sec <= 0) { + sec = 1; +Index: src/stored/stored_conf.c +=================================================================== +RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v +retrieving revision 1.76 +retrieving revision 1.76.2.1 +diff -u -r1.76 -r1.76.2.1 +--- src/stored/stored_conf.c 9 Sep 2005 09:40:04 -0000 1.76 ++++ src/stored/stored_conf.c 22 Nov 2005 10:50:55 -0000 1.76.2.1 +@@ -3,7 +3,7 @@ + * + * Kern Sibbald, March MM + * +- * Version $Id: stored_conf.c,v 1.76 2005/09/09 09:40:04 kerns Exp $ ++ * Version $Id: stored_conf.c,v 1.76.2.1 2005/11/22 10:50:55 kerns Exp $ + */ + /* + Copyright (C) 2000-2005 Kern Sibbald +@@ -222,16 +222,16 @@ + res->res_dev.hdr.name, + res->res_dev.media_type, res->res_dev.device_name, + res->res_dev.label_type); +- sendit(sock, " rew_wait=%d min_bs=%d max_bs=%d\n", ++ sendit(sock, " rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n", + res->res_dev.max_rewind_wait, res->res_dev.min_block_size, +- res->res_dev.max_block_size); ++ res->res_dev.max_block_size, res->res_dev.max_changer_wait); + sendit(sock, " max_jobs=%d max_files=%" lld " max_size=%" lld "\n", + res->res_dev.max_volume_jobs, res->res_dev.max_volume_files, + res->res_dev.max_volume_size); + sendit(sock, " max_file_size=%" lld " capacity=%" lld "\n", + res->res_dev.max_file_size, res->res_dev.volume_capacity); +- sendit(sock, " spool_directory=%s\n", NPRT(res->res_dev.spool_directory)); +- sendit(sock, " max_spool_size=%" lld " max_job_spool_size=%" lld "\n", ++ sendit(sock, " spool_directory=%s\n", NPRT(res->res_dev.spool_directory)); ++ sendit(sock, " max_spool_size=%" lld " max_job_spool_size=%" lld "\n", + res->res_dev.max_spool_size, res->res_dev.max_job_spool_size); + if (res->res_dev.changer_res) { + sendit(sock, " changer=%p\n", res->res_dev.changer_res); Index: src/tray-monitor/tray-monitor.c =================================================================== RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v retrieving revision 1.25.2.1 -diff -u -r1.25.2.1 tray-monitor.c +retrieving revision 1.25.2.2 +diff -u -r1.25.2.1 -r1.25.2.2 --- src/tray-monitor/tray-monitor.c 1 Oct 2005 10:20:18 -0000 1.25.2.1 -+++ src/tray-monitor/tray-monitor.c 21 Nov 2005 12:53:39 -0000 ++++ src/tray-monitor/tray-monitor.c 22 Nov 2005 10:50:55 -0000 1.25.2.2 @@ -4,7 +4,7 @@ * * Nicolas Boichat, August MMIV * - * Version $Id: tray-monitor.c,v 1.25.2.1 2005/10/01 10:20:18 kerns Exp $ -+ * Version $Id: tray-monitor.c,v 1.26 2005/09/28 19:24:57 kerns Exp $ ++ * Version $Id: tray-monitor.c,v 1.25.2.2 2005/11/22 10:50:55 kerns Exp $ */ /* @@ -410,3 +8070,29 @@ diff -u -r1.25.2.1 tray-monitor.c changeStatusMessage(item, _("Cannot connect to daemon.")); item->state = error; item->oldstate = error; +Index: updatedb/kes-1.38 +=================================================================== +RCS file: updatedb/kes-1.38 +diff -N updatedb/kes-1.38 +--- updatedb/kes-1.38 3 Nov 2005 14:54:28 -0000 1.1.2.1 ++++ /dev/null 1 Jan 1970 00:00:00 -0000 +@@ -1,19 +0,0 @@ +- Technical notes on version 1.38 +- Kern Sibbald +- +-General: +- +-Changes to 1.38.0: +-- Modify configure.in to add execute option to sqlite3 catalog +- scripts. +-- Create update_xxx_table_8_to_9 scripts for updatedb +-- Fix wrong variable in bpipe.c debug output reported by user. +-- Fix improper placement of encode_and_send_attributes() in +- FD backup.c causing first file of non-portable Win32 backup +- to have wrong stream. Reported by Thorsten. +-- Move the -lcrypt for PostgreSQL after the PostgreSQL libs in +- autoconf/bacula-macros/db.m4 as suggested by user. Fixes bug #457. +-- Remove @STATIC_CONS@ from tray-monitor Makefile as suggested +- by user. Fixes bug #456. +- +-Released 1.38.0 (28Oct05): 31 October 2005 diff --git a/bacula/platforms/mandrake/bacula.spec.in b/bacula/platforms/mandrake/bacula.spec.in index 7e82118e74..a98955c693 100644 --- a/bacula/platforms/mandrake/bacula.spec.in +++ b/bacula/platforms/mandrake/bacula.spec.in @@ -1,5 +1,5 @@ # Bacula RPM spec file -# Copyright (C) 2004 Kern Sibbald +# Copyright (C) 2000-2005 Kern Sibbald # Platform Build Configuration @@ -27,6 +27,8 @@ %{?build_fc1:%define fc1 1} %define fc3 0 %{?build_fc3:%define fc3 1} +%define fc4 0 +%{?build_fc4:%define fc4 1} # Whitebox Enterprise build %define wb3 0 %{?build_wb3:%define wb3 1} @@ -36,11 +38,11 @@ %{?build_rhel3:%define wb3 1} %define rhel4 0 %{?build_rhel4:%define rhel4 1} -%{?build_rhel4:%define fc3 1} +%{?build_rhel4:%define fc4 1} # CentOS build %define centos4 0 %{?build_centos4:%define centos4 1} -%{?build_centos4:%define fc3 1} +%{?build_centos4:%define fc4 1} # SuSE build %define su9 0 %{?build_su9:%define su9 1} @@ -49,7 +51,7 @@ %{?build_mdk:%define mdk 1} # test for a platform definition -%if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{fc3} && ! %{wb3} && ! %{su9} && ! %{mdk} +%if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{fc3} && ! %{fc4} && ! %{wb3} && ! %{su9} && ! %{mdk} %{error: You must specify a platform. Please examine the spec file.} exit 1 %endif @@ -62,13 +64,14 @@ exit 1 # currently: Mandrake 10.1, SuSE 9.2, RHEL4 and Fedora Core 4 %define mysql4 0 %{?build_mysql4:%define mysql4 1} +%{?build_mysql4:%define mysql 1} %define sqlite 0 %{?build_sqlite:%define sqlite 1} %define postgresql 0 %{?build_postgresql:%define postgresql 1} # test for a database definition -%if ! %{mysql} && ! %{sqlite} && ! %{postgresql} +%if ! %{mysql} && ! %{sqlite} && ! %{postgresql} && ! %{mysql4} %{error: You must specify database support. Please examine the spec file.} exit 1 %endif @@ -87,7 +90,7 @@ exit 1 %if %{centos4} %define _dist %(grep CentOS /etc/redhat-release) %endif -%if %{fc3} && ! %{rhel4} && ! %{centos4} +%if %{fc3} || %{fc4} && ! %{rhel4} && ! %{centos4} %define _dist %(grep Fedora /etc/redhat-release) %endif %if %{wb3} && ! %{rhel3} @@ -103,7 +106,7 @@ exit 1 Summary: Bacula - The Network Backup Solution Name: bacula Version: @VERSION@ -Release: 1 +Release: 2 Group: System Environment/Daemons License: GPL v2 Source0:http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz @@ -162,7 +165,7 @@ BuildRequires: libstdc++-static-devel BuildRequires: glibc-static-devel BuildRequires: freetype2-devel %endif -%if %{fc3} +%if %{fc3} || %{fc4} BuildRequires: libtermcap-devel BuildRequires: gtk2-devel >= 2.4 BuildRequires: libgnomeui-devel >= 2.8 @@ -175,7 +178,7 @@ BuildRequires: bonobo-activation-devel BuildRequires: GConf2-devel BuildRequires: freetype-devel %endif -%if ! %{rh7} && ! %{su9} && ! %{mdk} && ! %{fc3} +%if ! %{rh7} && ! %{su9} && ! %{mdk} && ! %{fc3} && !%{fc4} BuildRequires: libtermcap-devel BuildRequires: gtk2-devel >= 2.0 BuildRequires: libgnomeui-devel >= 2.0 @@ -405,7 +408,7 @@ Requires: libbonoboui >= 2.0 Requires: GConf2 Requires: freetype2 %endif -%if %{fc3} +%if %{fc3} || %{fc4} Requires: gtk2 >= 2.4 Requires: libgnomeui >= 2.8 Requires: glibc >= 2.3 @@ -417,7 +420,7 @@ Requires: bonobo-activation Requires: GConf2 Requires: freetype %endif -%if ! %{rh7} && ! %{su9} && ! %{mdk} && ! %{fc3} +%if ! %{rh7} && ! %{su9} && ! %{mdk} && ! %{fc3} && ! %{fc4} Requires: gtk2 >= 2.0 Requires: libgnomeui >= 2.0 Requires: glibc >= 2.3 @@ -509,7 +512,7 @@ export LDFLAGS=-L/usr/lib64/mysql --enable-smartalloc \ --enable-gnome \ %if ! %{rh7} && ! %{rh8} - --enable-tray-monitor \ + --enable-tray-monitor \ %endif %if %{mysql} --with-mysql \ @@ -523,12 +526,12 @@ export LDFLAGS=-L/usr/lib64/mysql --with-working-dir=%{working_dir} \ --with-pid-dir=/var/run \ --with-subsys-dir=/var/lock/subsys \ - --with-dir-user=%{daemon_user} \ - --with-dir-group=%{daemon_group} \ - --with-sd-user=%{daemon_user} \ - --with-sd-group=%{daemon_group} \ - --with-fd-user=%{daemon_user} \ - --with-fd-group=%{daemon_group} + --with-dir-user=%{daemon_user} \ + --with-dir-group=%{daemon_group} \ + --with-sd-user=%{daemon_user} \ + --with-sd-group=%{daemon_group} \ + --with-fd-user=%{daemon_user} \ + --with-fd-group=%{daemon_group} make %install @@ -620,7 +623,7 @@ cp -p scripts/gnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.ap cp -p scripts/gnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/gnome-console ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/gnome-console %endif -%if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{mdk} +%if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{mdk} cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png cp -p scripts/bacula.desktop.gnome2.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop cp -p scripts/gnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/gnome-console @@ -745,17 +748,17 @@ chmod 644 $RPM_BUILD_ROOT/etc/bacula/tray-monitor.conf DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1` if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "8" ]; then - echo "This bacula upgrade will update a bacula database from version 8 to 9." - echo "You appear to be running database version $DB_VER. You must first update" - echo "your database to version 8 and then install this upgrade. The alternative" - echo "is to use /etc/bacula/drop_mysql_tables to delete all your your current" - echo "catalog information, then do the upgrade. Information on updating a" - echo "database older than version 8 can be found in the release notes." - exit 1 + echo "This bacula upgrade will update a bacula database from version 8 to 9." + echo "You appear to be running database version $DB_VER. You must first update" + echo "your database to version 8 and then install this upgrade. The alternative" + echo "is to use /etc/bacula/drop_mysql_tables to delete all your your current" + echo "catalog information, then do the upgrade. Information on updating a" + echo "database older than version 8 can be found in the release notes." + exit 1 fi # check for and copy /etc/bacula/console.conf to bconsole.conf if [ -s /etc/bacula/console.conf ];then - cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf + cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf fi %post mysql @@ -773,31 +776,31 @@ DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1` # grant privileges and create tables if they do not exist if [ -z "$DB_VER" ]; then - echo "Hmm, doesn't look like you have an existing database." - echo "Granting privileges for MySQL user bacula..." - /etc/bacula/grant_mysql_privileges - echo "Creating MySQL bacula database..." - /etc/bacula/create_mysql_database - echo "Creating bacula tables..." - /etc/bacula/make_mysql_tables + echo "Hmm, doesn't look like you have an existing database." + echo "Granting privileges for MySQL user bacula..." + /etc/bacula/grant_mysql_privileges + echo "Creating MySQL bacula database..." + /etc/bacula/create_mysql_database + echo "Creating bacula tables..." + /etc/bacula/make_mysql_tables # check to see if we need to upgrade a 1.36 or lower database elif [ "$DB_VER" -lt "9" ]; then - echo "This release requires an upgrade to your bacula database." - echo "Backing up your current database..." - mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2 - echo "Upgrading bacula database ..." - /etc/bacula/update_mysql_tables - echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2" + echo "This release requires an upgrade to your bacula database." + echo "Backing up your current database..." + mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2 + echo "Upgrading bacula database ..." + /etc/bacula/update_mysql_tables + echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2" fi # create the daemon group HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null` if [ -z $HAVE_BACULA ]; then - %{groupadd} -r %{daemon_group} > /dev/null 2>&1 - echo "The group %{daemon_group} has been added to %{group_file}." - echo "See the manual chapter Running Bacula for details." + %{groupadd} -r %{daemon_group} > /dev/null 2>&1 + echo "The group %{daemon_group} has been added to %{group_file}." + echo "See the manual chapter Running Bacula for details." fi %preun mysql @@ -881,20 +884,20 @@ fi %pre sqlite # test for bacula database older than version 8 if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite ];then - DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1` - if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "8" ]; then - echo "This bacula upgrade will update a bacula database from version 8 to 9." - echo "You appear to be running database version $DB_VER. You must first update" - echo "your database to version 8 and then install this upgrade. The alternative" - echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current" - echo "catalog information, then do the upgrade. Information on updating a" - echo "database older than version 8 can be found in the release notes." - exit 1 - fi + DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1` + if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "8" ]; then + echo "This bacula upgrade will update a bacula database from version 8 to 9." + echo "You appear to be running database version $DB_VER. You must first update" + echo "your database to version 8 and then install this upgrade. The alternative" + echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current" + echo "catalog information, then do the upgrade. Information on updating a" + echo "database older than version 8 can be found in the release notes." + exit 1 + fi fi # check for and copy /etc/bacula/console.conf to bconsole.conf if [ -s /etc/bacula/console.conf ];then - cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf + cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf fi %post sqlite @@ -907,40 +910,40 @@ fi # test for an existing database if [ -s %{working_dir}/bacula.db ]; then - DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1` - # check to see if we need to upgrade a 1.36 or lower database - if [ "$DB_VER" -lt "8" ]; then - echo "This bacula upgrade requires a database update to version 9. You appear to" - echo "be running database version $DB_VER. You must update your database using the" - echo "upgrade scripts in the bacula-updatedb package. The alternative" - echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current" - echo "catalog information, then /etc/bacula/make_sqlite_tables. Information on updating a" - echo "database older than version 8 can be found in the release notes." - fi - - if [ "$DB_VER" -lt "9" ] && [ "$DB_VER" -ge "8" ]; then - echo "This release requires an upgrade to your bacula database." - echo "Backing up your current database..." - echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2 - echo "Upgrading bacula database ..." - /etc/bacula/update_sqlite_tables - echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2" - fi + DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1` + # check to see if we need to upgrade a 1.36 or lower database + if [ "$DB_VER" -lt "8" ]; then + echo "This bacula upgrade requires a database update to version 9. You appear to" + echo "be running database version $DB_VER. You must update your database using the" + echo "upgrade scripts in the bacula-updatedb package. The alternative" + echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current" + echo "catalog information, then /etc/bacula/make_sqlite_tables. Information on updating a" + echo "database older than version 8 can be found in the release notes." + fi + + if [ "$DB_VER" -lt "9" ] && [ "$DB_VER" -ge "8" ]; then + echo "This release requires an upgrade to your bacula database." + echo "Backing up your current database..." + echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2 + echo "Upgrading bacula database ..." + /etc/bacula/update_sqlite_tables + echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2" + fi else - # create the database and tables - echo "Hmm, doesn't look like you have an existing database." - echo "Creating SQLite database..." - /etc/bacula/create_sqlite_database - echo "Creating the SQLite tables..." - /etc/bacula/make_sqlite_tables + # create the database and tables + echo "Hmm, doesn't look like you have an existing database." + echo "Creating SQLite database..." + /etc/bacula/create_sqlite_database + echo "Creating the SQLite tables..." + /etc/bacula/make_sqlite_tables fi # create the daemon group HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null` if [ -z $HAVE_BACULA ]; then - %{groupadd} -r %{daemon_group} > /dev/null 2>&1 - echo "The group %{daemon_group} has been added to %{group_file}." - echo "See the manual chapter Running Bacula for details." + %{groupadd} -r %{daemon_group} > /dev/null 2>&1 + echo "The group %{daemon_group} has been added to %{group_file}." + echo "See the manual chapter Running Bacula for details." fi %preun sqlite @@ -1023,13 +1026,13 @@ fi DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1` if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "8" ]; then - echo "This bacula upgrade will update a bacula database from version 8 to 9." - echo "You appear to be running database version $DB_VER. You must first update" - echo "your database to version 8 and then install this upgrade. The alternative" - echo "is to use /etc/bacula/drop_postgresql_tables to delete all your your current" - echo "catalog information, then do the upgrade. Information on updating a" - echo "database older than version 8 can be found in the release notes." - exit 1 + echo "This bacula upgrade will update a bacula database from version 8 to 9." + echo "You appear to be running database version $DB_VER. You must first update" + echo "your database to version 8 and then install this upgrade. The alternative" + echo "is to use /etc/bacula/drop_postgresql_tables to delete all your your current" + echo "catalog information, then do the upgrade. Information on updating a" + echo "database older than version 8 can be found in the release notes." + exit 1 fi %post postgresql @@ -1046,33 +1049,33 @@ DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head # grant privileges and create tables if they do not exist if [ -z "$DB_VER" ]; then - echo "Hmm, doesn't look like you have an existing database." - echo "Creating PostgreSQL bacula database..." - /etc/bacula/create_postgresql_database - echo "Creating bacula tables..." - /etc/bacula/make_postgresql_tables - echo "Granting privileges for PostgreSQL user bacula..." - /etc/bacula/grant_postgresql_privileges + echo "Hmm, doesn't look like you have an existing database." + echo "Creating PostgreSQL bacula database..." + /etc/bacula/create_postgresql_database + echo "Creating bacula tables..." + /etc/bacula/make_postgresql_tables + echo "Granting privileges for PostgreSQL user bacula..." + /etc/bacula/grant_postgresql_privileges # check to see if we need to upgrade a 1.36 or lower database elif [ "$DB_VER" -lt "9" ]; then - echo "This release requires an upgrade to your bacula database." - echo "Backing up your current database..." - pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2 - echo "Upgrading bacula database ..." - /etc/bacula/update_postgresql_tables - echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2" - + echo "This release requires an upgrade to your bacula database." + echo "Backing up your current database..." + pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2 + echo "Upgrading bacula database ..." + /etc/bacula/update_postgresql_tables + echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2" + fi # create the daemon group HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null` if [ -z $HAVE_BACULA ]; then - %{groupadd} -r %{daemon_group} > /dev/null 2>&1 - echo "The group %{daemon_group} has been added to %{groupfile}." - echo "See the manual chapter Running Bacula for details." + %{groupadd} -r %{daemon_group} > /dev/null 2>&1 + echo "The group %{daemon_group} has been added to %{groupfile}." + echo "See the manual chapter Running Bacula for details." fi - + %preun postgresql # delete our links @@ -1117,9 +1120,9 @@ fi # create the daemon group HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null` if [ -z $HAVE_BACULA ]; then - %{groupadd} -r %{daemon_group} > /dev/null 2>&1 - echo "The group %{daemon_group} has been added to %{group_file}." - echo "See the manual chapter Running Bacula for details." + %{groupadd} -r %{daemon_group} > /dev/null 2>&1 + echo "The group %{daemon_group} has been added to %{group_file}." + echo "See the manual chapter Running Bacula for details." fi %preun client diff --git a/bacula/platforms/redhat/bacula.spec.in b/bacula/platforms/redhat/bacula.spec.in index 9743d8c8e1..a98955c693 100644 --- a/bacula/platforms/redhat/bacula.spec.in +++ b/bacula/platforms/redhat/bacula.spec.in @@ -64,13 +64,14 @@ exit 1 # currently: Mandrake 10.1, SuSE 9.2, RHEL4 and Fedora Core 4 %define mysql4 0 %{?build_mysql4:%define mysql4 1} +%{?build_mysql4:%define mysql 1} %define sqlite 0 %{?build_sqlite:%define sqlite 1} %define postgresql 0 %{?build_postgresql:%define postgresql 1} # test for a database definition -%if ! %{mysql} && ! %{sqlite} && ! %{postgresql} +%if ! %{mysql} && ! %{sqlite} && ! %{postgresql} && ! %{mysql4} %{error: You must specify database support. Please examine the spec file.} exit 1 %endif @@ -105,7 +106,7 @@ exit 1 Summary: Bacula - The Network Backup Solution Name: bacula Version: @VERSION@ -Release: 1 +Release: 2 Group: System Environment/Daemons License: GPL v2 Source0:http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz diff --git a/bacula/platforms/suse/bacula.spec.in b/bacula/platforms/suse/bacula.spec.in index 7e82118e74..a98955c693 100644 --- a/bacula/platforms/suse/bacula.spec.in +++ b/bacula/platforms/suse/bacula.spec.in @@ -1,5 +1,5 @@ # Bacula RPM spec file -# Copyright (C) 2004 Kern Sibbald +# Copyright (C) 2000-2005 Kern Sibbald # Platform Build Configuration @@ -27,6 +27,8 @@ %{?build_fc1:%define fc1 1} %define fc3 0 %{?build_fc3:%define fc3 1} +%define fc4 0 +%{?build_fc4:%define fc4 1} # Whitebox Enterprise build %define wb3 0 %{?build_wb3:%define wb3 1} @@ -36,11 +38,11 @@ %{?build_rhel3:%define wb3 1} %define rhel4 0 %{?build_rhel4:%define rhel4 1} -%{?build_rhel4:%define fc3 1} +%{?build_rhel4:%define fc4 1} # CentOS build %define centos4 0 %{?build_centos4:%define centos4 1} -%{?build_centos4:%define fc3 1} +%{?build_centos4:%define fc4 1} # SuSE build %define su9 0 %{?build_su9:%define su9 1} @@ -49,7 +51,7 @@ %{?build_mdk:%define mdk 1} # test for a platform definition -%if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{fc3} && ! %{wb3} && ! %{su9} && ! %{mdk} +%if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{fc3} && ! %{fc4} && ! %{wb3} && ! %{su9} && ! %{mdk} %{error: You must specify a platform. Please examine the spec file.} exit 1 %endif @@ -62,13 +64,14 @@ exit 1 # currently: Mandrake 10.1, SuSE 9.2, RHEL4 and Fedora Core 4 %define mysql4 0 %{?build_mysql4:%define mysql4 1} +%{?build_mysql4:%define mysql 1} %define sqlite 0 %{?build_sqlite:%define sqlite 1} %define postgresql 0 %{?build_postgresql:%define postgresql 1} # test for a database definition -%if ! %{mysql} && ! %{sqlite} && ! %{postgresql} +%if ! %{mysql} && ! %{sqlite} && ! %{postgresql} && ! %{mysql4} %{error: You must specify database support. Please examine the spec file.} exit 1 %endif @@ -87,7 +90,7 @@ exit 1 %if %{centos4} %define _dist %(grep CentOS /etc/redhat-release) %endif -%if %{fc3} && ! %{rhel4} && ! %{centos4} +%if %{fc3} || %{fc4} && ! %{rhel4} && ! %{centos4} %define _dist %(grep Fedora /etc/redhat-release) %endif %if %{wb3} && ! %{rhel3} @@ -103,7 +106,7 @@ exit 1 Summary: Bacula - The Network Backup Solution Name: bacula Version: @VERSION@ -Release: 1 +Release: 2 Group: System Environment/Daemons License: GPL v2 Source0:http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz @@ -162,7 +165,7 @@ BuildRequires: libstdc++-static-devel BuildRequires: glibc-static-devel BuildRequires: freetype2-devel %endif -%if %{fc3} +%if %{fc3} || %{fc4} BuildRequires: libtermcap-devel BuildRequires: gtk2-devel >= 2.4 BuildRequires: libgnomeui-devel >= 2.8 @@ -175,7 +178,7 @@ BuildRequires: bonobo-activation-devel BuildRequires: GConf2-devel BuildRequires: freetype-devel %endif -%if ! %{rh7} && ! %{su9} && ! %{mdk} && ! %{fc3} +%if ! %{rh7} && ! %{su9} && ! %{mdk} && ! %{fc3} && !%{fc4} BuildRequires: libtermcap-devel BuildRequires: gtk2-devel >= 2.0 BuildRequires: libgnomeui-devel >= 2.0 @@ -405,7 +408,7 @@ Requires: libbonoboui >= 2.0 Requires: GConf2 Requires: freetype2 %endif -%if %{fc3} +%if %{fc3} || %{fc4} Requires: gtk2 >= 2.4 Requires: libgnomeui >= 2.8 Requires: glibc >= 2.3 @@ -417,7 +420,7 @@ Requires: bonobo-activation Requires: GConf2 Requires: freetype %endif -%if ! %{rh7} && ! %{su9} && ! %{mdk} && ! %{fc3} +%if ! %{rh7} && ! %{su9} && ! %{mdk} && ! %{fc3} && ! %{fc4} Requires: gtk2 >= 2.0 Requires: libgnomeui >= 2.0 Requires: glibc >= 2.3 @@ -509,7 +512,7 @@ export LDFLAGS=-L/usr/lib64/mysql --enable-smartalloc \ --enable-gnome \ %if ! %{rh7} && ! %{rh8} - --enable-tray-monitor \ + --enable-tray-monitor \ %endif %if %{mysql} --with-mysql \ @@ -523,12 +526,12 @@ export LDFLAGS=-L/usr/lib64/mysql --with-working-dir=%{working_dir} \ --with-pid-dir=/var/run \ --with-subsys-dir=/var/lock/subsys \ - --with-dir-user=%{daemon_user} \ - --with-dir-group=%{daemon_group} \ - --with-sd-user=%{daemon_user} \ - --with-sd-group=%{daemon_group} \ - --with-fd-user=%{daemon_user} \ - --with-fd-group=%{daemon_group} + --with-dir-user=%{daemon_user} \ + --with-dir-group=%{daemon_group} \ + --with-sd-user=%{daemon_user} \ + --with-sd-group=%{daemon_group} \ + --with-fd-user=%{daemon_user} \ + --with-fd-group=%{daemon_group} make %install @@ -620,7 +623,7 @@ cp -p scripts/gnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.ap cp -p scripts/gnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/gnome-console ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/gnome-console %endif -%if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{mdk} +%if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{mdk} cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png cp -p scripts/bacula.desktop.gnome2.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop cp -p scripts/gnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/gnome-console @@ -745,17 +748,17 @@ chmod 644 $RPM_BUILD_ROOT/etc/bacula/tray-monitor.conf DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1` if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "8" ]; then - echo "This bacula upgrade will update a bacula database from version 8 to 9." - echo "You appear to be running database version $DB_VER. You must first update" - echo "your database to version 8 and then install this upgrade. The alternative" - echo "is to use /etc/bacula/drop_mysql_tables to delete all your your current" - echo "catalog information, then do the upgrade. Information on updating a" - echo "database older than version 8 can be found in the release notes." - exit 1 + echo "This bacula upgrade will update a bacula database from version 8 to 9." + echo "You appear to be running database version $DB_VER. You must first update" + echo "your database to version 8 and then install this upgrade. The alternative" + echo "is to use /etc/bacula/drop_mysql_tables to delete all your your current" + echo "catalog information, then do the upgrade. Information on updating a" + echo "database older than version 8 can be found in the release notes." + exit 1 fi # check for and copy /etc/bacula/console.conf to bconsole.conf if [ -s /etc/bacula/console.conf ];then - cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf + cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf fi %post mysql @@ -773,31 +776,31 @@ DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1` # grant privileges and create tables if they do not exist if [ -z "$DB_VER" ]; then - echo "Hmm, doesn't look like you have an existing database." - echo "Granting privileges for MySQL user bacula..." - /etc/bacula/grant_mysql_privileges - echo "Creating MySQL bacula database..." - /etc/bacula/create_mysql_database - echo "Creating bacula tables..." - /etc/bacula/make_mysql_tables + echo "Hmm, doesn't look like you have an existing database." + echo "Granting privileges for MySQL user bacula..." + /etc/bacula/grant_mysql_privileges + echo "Creating MySQL bacula database..." + /etc/bacula/create_mysql_database + echo "Creating bacula tables..." + /etc/bacula/make_mysql_tables # check to see if we need to upgrade a 1.36 or lower database elif [ "$DB_VER" -lt "9" ]; then - echo "This release requires an upgrade to your bacula database." - echo "Backing up your current database..." - mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2 - echo "Upgrading bacula database ..." - /etc/bacula/update_mysql_tables - echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2" + echo "This release requires an upgrade to your bacula database." + echo "Backing up your current database..." + mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2 + echo "Upgrading bacula database ..." + /etc/bacula/update_mysql_tables + echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2" fi # create the daemon group HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null` if [ -z $HAVE_BACULA ]; then - %{groupadd} -r %{daemon_group} > /dev/null 2>&1 - echo "The group %{daemon_group} has been added to %{group_file}." - echo "See the manual chapter Running Bacula for details." + %{groupadd} -r %{daemon_group} > /dev/null 2>&1 + echo "The group %{daemon_group} has been added to %{group_file}." + echo "See the manual chapter Running Bacula for details." fi %preun mysql @@ -881,20 +884,20 @@ fi %pre sqlite # test for bacula database older than version 8 if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite ];then - DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1` - if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "8" ]; then - echo "This bacula upgrade will update a bacula database from version 8 to 9." - echo "You appear to be running database version $DB_VER. You must first update" - echo "your database to version 8 and then install this upgrade. The alternative" - echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current" - echo "catalog information, then do the upgrade. Information on updating a" - echo "database older than version 8 can be found in the release notes." - exit 1 - fi + DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1` + if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "8" ]; then + echo "This bacula upgrade will update a bacula database from version 8 to 9." + echo "You appear to be running database version $DB_VER. You must first update" + echo "your database to version 8 and then install this upgrade. The alternative" + echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current" + echo "catalog information, then do the upgrade. Information on updating a" + echo "database older than version 8 can be found in the release notes." + exit 1 + fi fi # check for and copy /etc/bacula/console.conf to bconsole.conf if [ -s /etc/bacula/console.conf ];then - cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf + cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf fi %post sqlite @@ -907,40 +910,40 @@ fi # test for an existing database if [ -s %{working_dir}/bacula.db ]; then - DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1` - # check to see if we need to upgrade a 1.36 or lower database - if [ "$DB_VER" -lt "8" ]; then - echo "This bacula upgrade requires a database update to version 9. You appear to" - echo "be running database version $DB_VER. You must update your database using the" - echo "upgrade scripts in the bacula-updatedb package. The alternative" - echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current" - echo "catalog information, then /etc/bacula/make_sqlite_tables. Information on updating a" - echo "database older than version 8 can be found in the release notes." - fi - - if [ "$DB_VER" -lt "9" ] && [ "$DB_VER" -ge "8" ]; then - echo "This release requires an upgrade to your bacula database." - echo "Backing up your current database..." - echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2 - echo "Upgrading bacula database ..." - /etc/bacula/update_sqlite_tables - echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2" - fi + DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1` + # check to see if we need to upgrade a 1.36 or lower database + if [ "$DB_VER" -lt "8" ]; then + echo "This bacula upgrade requires a database update to version 9. You appear to" + echo "be running database version $DB_VER. You must update your database using the" + echo "upgrade scripts in the bacula-updatedb package. The alternative" + echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current" + echo "catalog information, then /etc/bacula/make_sqlite_tables. Information on updating a" + echo "database older than version 8 can be found in the release notes." + fi + + if [ "$DB_VER" -lt "9" ] && [ "$DB_VER" -ge "8" ]; then + echo "This release requires an upgrade to your bacula database." + echo "Backing up your current database..." + echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2 + echo "Upgrading bacula database ..." + /etc/bacula/update_sqlite_tables + echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2" + fi else - # create the database and tables - echo "Hmm, doesn't look like you have an existing database." - echo "Creating SQLite database..." - /etc/bacula/create_sqlite_database - echo "Creating the SQLite tables..." - /etc/bacula/make_sqlite_tables + # create the database and tables + echo "Hmm, doesn't look like you have an existing database." + echo "Creating SQLite database..." + /etc/bacula/create_sqlite_database + echo "Creating the SQLite tables..." + /etc/bacula/make_sqlite_tables fi # create the daemon group HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null` if [ -z $HAVE_BACULA ]; then - %{groupadd} -r %{daemon_group} > /dev/null 2>&1 - echo "The group %{daemon_group} has been added to %{group_file}." - echo "See the manual chapter Running Bacula for details." + %{groupadd} -r %{daemon_group} > /dev/null 2>&1 + echo "The group %{daemon_group} has been added to %{group_file}." + echo "See the manual chapter Running Bacula for details." fi %preun sqlite @@ -1023,13 +1026,13 @@ fi DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1` if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "8" ]; then - echo "This bacula upgrade will update a bacula database from version 8 to 9." - echo "You appear to be running database version $DB_VER. You must first update" - echo "your database to version 8 and then install this upgrade. The alternative" - echo "is to use /etc/bacula/drop_postgresql_tables to delete all your your current" - echo "catalog information, then do the upgrade. Information on updating a" - echo "database older than version 8 can be found in the release notes." - exit 1 + echo "This bacula upgrade will update a bacula database from version 8 to 9." + echo "You appear to be running database version $DB_VER. You must first update" + echo "your database to version 8 and then install this upgrade. The alternative" + echo "is to use /etc/bacula/drop_postgresql_tables to delete all your your current" + echo "catalog information, then do the upgrade. Information on updating a" + echo "database older than version 8 can be found in the release notes." + exit 1 fi %post postgresql @@ -1046,33 +1049,33 @@ DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head # grant privileges and create tables if they do not exist if [ -z "$DB_VER" ]; then - echo "Hmm, doesn't look like you have an existing database." - echo "Creating PostgreSQL bacula database..." - /etc/bacula/create_postgresql_database - echo "Creating bacula tables..." - /etc/bacula/make_postgresql_tables - echo "Granting privileges for PostgreSQL user bacula..." - /etc/bacula/grant_postgresql_privileges + echo "Hmm, doesn't look like you have an existing database." + echo "Creating PostgreSQL bacula database..." + /etc/bacula/create_postgresql_database + echo "Creating bacula tables..." + /etc/bacula/make_postgresql_tables + echo "Granting privileges for PostgreSQL user bacula..." + /etc/bacula/grant_postgresql_privileges # check to see if we need to upgrade a 1.36 or lower database elif [ "$DB_VER" -lt "9" ]; then - echo "This release requires an upgrade to your bacula database." - echo "Backing up your current database..." - pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2 - echo "Upgrading bacula database ..." - /etc/bacula/update_postgresql_tables - echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2" - + echo "This release requires an upgrade to your bacula database." + echo "Backing up your current database..." + pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2 + echo "Upgrading bacula database ..." + /etc/bacula/update_postgresql_tables + echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2" + fi # create the daemon group HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null` if [ -z $HAVE_BACULA ]; then - %{groupadd} -r %{daemon_group} > /dev/null 2>&1 - echo "The group %{daemon_group} has been added to %{groupfile}." - echo "See the manual chapter Running Bacula for details." + %{groupadd} -r %{daemon_group} > /dev/null 2>&1 + echo "The group %{daemon_group} has been added to %{groupfile}." + echo "See the manual chapter Running Bacula for details." fi - + %preun postgresql # delete our links @@ -1117,9 +1120,9 @@ fi # create the daemon group HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null` if [ -z $HAVE_BACULA ]; then - %{groupadd} -r %{daemon_group} > /dev/null 2>&1 - echo "The group %{daemon_group} has been added to %{group_file}." - echo "See the manual chapter Running Bacula for details." + %{groupadd} -r %{daemon_group} > /dev/null 2>&1 + echo "The group %{daemon_group} has been added to %{group_file}." + echo "See the manual chapter Running Bacula for details." fi %preun client diff --git a/bacula/scripts/logwatch/.cvsignore b/bacula/scripts/logwatch/.cvsignore index 7384c6cceb..b9d9954a20 100644 --- a/bacula/scripts/logwatch/.cvsignore +++ b/bacula/scripts/logwatch/.cvsignore @@ -1,2 +1,3 @@ +logfile.bacula.conf Makefile logfile.bacula.conf diff --git a/bacula/src/filed/backup.c b/bacula/src/filed/backup.c index 1d90a055d5..0431a0fc0a 100644 --- a/bacula/src/filed/backup.c +++ b/bacula/src/filed/backup.c @@ -1,5 +1,5 @@ /* - * Bacula File Daemon backup.c send file attributes and data + * Bacula File Daemon backup.c send file attributes and data * to the Storage daemon. * * Kern Sibbald, March MM @@ -61,7 +61,7 @@ bool blast_data_to_storage_daemon(JCR *jcr, char *addr) if (client) { buf_size = client->max_network_buffer_size; } else { - buf_size = 0; /* use default */ + buf_size = 0; /* use default */ } if (!bnet_set_buffer_size(sd, buf_size, BNET_SETBUF_WRITE)) { set_jcr_job_status(jcr, JS_ErrorTerminated); @@ -89,7 +89,7 @@ bool blast_data_to_storage_daemon(JCR *jcr, char *addr) /* Subroutine save_file() is called for each file */ if (!find_files(jcr, (FF_PKT *)jcr->ff, save_file, (void *)jcr)) { - ok = false; /* error */ + ok = false; /* error */ set_jcr_job_status(jcr, JS_ErrorTerminated); // Jmsg(jcr, M_FATAL, 0, _("Find files error.\n")); } @@ -98,7 +98,7 @@ bool blast_data_to_storage_daemon(JCR *jcr, char *addr) stop_heartbeat_monitor(jcr); - bnet_sig(sd, BNET_EOD); /* end of sending data */ + bnet_sig(sd, BNET_EOD); /* end of sending data */ if (jcr->big_buf) { free(jcr->big_buf); @@ -119,8 +119,8 @@ bool blast_data_to_storage_daemon(JCR *jcr, char *addr) * Send the file and its data to the Storage daemon. * * Returns: 1 if OK - * 0 if error - * -1 to ignore file/directory (not used here) + * 0 if error + * -1 to ignore file/directory (not used here) */ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) { @@ -142,10 +142,10 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) } sd = jcr->store_bsock; - jcr->num_files_examined++; /* bump total file count */ + jcr->num_files_examined++; /* bump total file count */ switch (ff_pkt->type) { - case FT_LNKSAVED: /* Hard linked, file already saved */ + case FT_LNKSAVED: /* Hard linked, file already saved */ Dmsg2(130, "FT_LNKSAVED hard link: %s => %s\n", ff_pkt->fname, ff_pkt->link); break; case FT_REGE: @@ -158,23 +158,23 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) Dmsg2(130, "FT_LNK saving: %s -> %s\n", ff_pkt->fname, ff_pkt->link); break; case FT_DIRBEGIN: - return 1; /* not used */ + return 1; /* not used */ case FT_NORECURSE: Jmsg(jcr, M_INFO, 1, _(" Recursion turned off. Will not descend into %s\n"), - ff_pkt->fname); + ff_pkt->fname); ff_pkt->type = FT_DIREND; /* Backup only the directory entry */ break; case FT_NOFSCHG: /* Suppress message for /dev filesystems */ if (strncmp(ff_pkt->fname, "/dev/", 5) != 0) { Jmsg(jcr, M_INFO, 1, _(" Filesystem change prohibited. Will not descend into %s\n"), - ff_pkt->fname); + ff_pkt->fname); } ff_pkt->type = FT_DIREND; /* Backup only the directory entry */ break; case FT_INVALIDFS: Jmsg(jcr, M_INFO, 1, _(" Disallowed filesystem. Will not descend into %s\n"), - ff_pkt->fname); + ff_pkt->fname); ff_pkt->type = FT_DIREND; /* Backup only the directory entry */ break; case FT_DIREND: @@ -192,21 +192,21 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) case FT_NOACCESS: { berrno be; Jmsg(jcr, M_NOTSAVED, 0, _(" Could not access %s: ERR=%s\n"), ff_pkt->fname, - be.strerror(ff_pkt->ff_errno)); + be.strerror(ff_pkt->ff_errno)); jcr->Errors++; return 1; } case FT_NOFOLLOW: { berrno be; Jmsg(jcr, M_NOTSAVED, 0, _(" Could not follow link %s: ERR=%s\n"), ff_pkt->fname, - be.strerror(ff_pkt->ff_errno)); + be.strerror(ff_pkt->ff_errno)); jcr->Errors++; return 1; } case FT_NOSTAT: { berrno be; Jmsg(jcr, M_NOTSAVED, 0, _(" Could not stat %s: ERR=%s\n"), ff_pkt->fname, - be.strerror(ff_pkt->ff_errno)); + be.strerror(ff_pkt->ff_errno)); jcr->Errors++; return 1; } @@ -220,7 +220,7 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) case FT_NOOPEN: { berrno be; Jmsg(jcr, M_NOTSAVED, 0, _(" Could not open directory %s: ERR=%s\n"), ff_pkt->fname, - be.strerror(ff_pkt->ff_errno)); + be.strerror(ff_pkt->ff_errno)); jcr->Errors++; return 1; } @@ -232,10 +232,6 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) Dmsg1(130, "bfiled: sending %s to stored\n", ff_pkt->fname); - if (!encode_and_send_attributes(jcr, ff_pkt, data_stream)) { - return 0; - } - /* * Setup for digest handling. If this fails, the digest will be set to NULL * and not used. @@ -260,7 +256,7 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) /* Did digest initialization fail? */ if (digest_stream != STREAM_NONE && digest == NULL) { Jmsg(jcr, M_WARNING, 0, _("%s digest initialization failed\n"), - stream_to_ascii(digest_stream)); + stream_to_ascii(digest_stream)); } /* @@ -275,7 +271,7 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) /* Full-stop if a failure occured initializing the signature digest */ if (jcr->pki_sign && signing_digest == NULL) { Jmsg(jcr, M_NOTSAVED, 0, _("%s signature digest initialization failed\n"), - stream_to_ascii(signing_algorithm)); + stream_to_ascii(signing_algorithm)); jcr->Errors++; return 1; } @@ -288,11 +284,16 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) if (ff_pkt->reader) { if (!set_prog(&ff_pkt->bfd, ff_pkt->reader, jcr)) { Jmsg(jcr, M_FATAL, 0, _("Python reader program \"%s\" not found.\n"), - ff_pkt->reader); - return 0; + ff_pkt->reader); + return 0; } } + /* Send attributes -- must be done after binit() */ + if (!encode_and_send_attributes(jcr, ff_pkt, data_stream)) { + return 0; + } + /* * Open any file with data that we intend to save, then save it. * @@ -300,63 +301,63 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) * the BackupRead will save its permissions and ownership streams. */ if (ff_pkt->type != FT_LNKSAVED && (S_ISREG(ff_pkt->statp.st_mode) && - ff_pkt->statp.st_size > 0) || - ff_pkt->type == FT_RAW || ff_pkt->type == FT_FIFO || - (!is_portable_backup(&ff_pkt->bfd) && ff_pkt->type == FT_DIREND)) { + ff_pkt->statp.st_size > 0) || + ff_pkt->type == FT_RAW || ff_pkt->type == FT_FIFO || + (!is_portable_backup(&ff_pkt->bfd) && ff_pkt->type == FT_DIREND)) { btimer_t *tid; if (ff_pkt->type == FT_FIFO) { - tid = start_thread_timer(pthread_self(), 60); + tid = start_thread_timer(pthread_self(), 60); } else { - tid = NULL; + tid = NULL; } if (bopen(&ff_pkt->bfd, ff_pkt->fname, O_RDONLY | O_BINARY, 0) < 0) { - ff_pkt->ff_errno = errno; - berrno be; + ff_pkt->ff_errno = errno; + berrno be; Jmsg(jcr, M_NOTSAVED, 0, _(" Cannot open %s: ERR=%s.\n"), ff_pkt->fname, - be.strerror()); - jcr->Errors++; - if (tid) { - stop_thread_timer(tid); - tid = NULL; - } - return 1; + be.strerror()); + jcr->Errors++; + if (tid) { + stop_thread_timer(tid); + tid = NULL; + } + return 1; } if (tid) { - stop_thread_timer(tid); - tid = NULL; + stop_thread_timer(tid); + tid = NULL; } stat = send_data(jcr, data_stream, ff_pkt, digest, signing_digest); bclose(&ff_pkt->bfd); if (!stat) { - return 0; + return 0; } } #ifdef HAVE_DARWIN_OS /* Regular files can have resource forks and Finder Info */ if (ff_pkt->type != FT_LNKSAVED && (S_ISREG(ff_pkt->statp.st_mode) && - ff_pkt->flags & FO_HFSPLUS)) { + ff_pkt->flags & FO_HFSPLUS)) { if (ff_pkt->hfsinfo.rsrclength > 0) { - int flags; - if (!bopen_rsrc(&ff_pkt->bfd, ff_pkt->fname, O_RDONLY | O_BINARY, 0) < 0) { - ff_pkt->ff_errno = errno; - berrno be; + int flags; + if (!bopen_rsrc(&ff_pkt->bfd, ff_pkt->fname, O_RDONLY | O_BINARY, 0) < 0) { + ff_pkt->ff_errno = errno; + berrno be; Jmsg(jcr, M_NOTSAVED, -1, _(" Cannot open resource fork for %s: ERR=%s.\n"), ff_pkt->fname, - be.strerror()); - jcr->Errors++; - if (is_bopen(&ff_pkt->bfd)) { - bclose(&ff_pkt->bfd); - } - return 1; - } - flags = ff_pkt->flags; - ff_pkt->flags &= ~(FO_GZIP|FO_SPARSE); - stat = send_data(jcr, STREAM_MACOS_FORK_DATA, ff_pkt, digest); - ff_pkt->flags = flags; - bclose(&ff_pkt->bfd); - if (!stat) { - return 0; - } + be.strerror()); + jcr->Errors++; + if (is_bopen(&ff_pkt->bfd)) { + bclose(&ff_pkt->bfd); + } + return 1; + } + flags = ff_pkt->flags; + ff_pkt->flags &= ~(FO_GZIP|FO_SPARSE); + stat = send_data(jcr, STREAM_MACOS_FORK_DATA, ff_pkt, digest); + ff_pkt->flags = flags; + bclose(&ff_pkt->bfd); + if (!stat) { + return 0; + } } Dmsg1(300, "Saving Finder Info for \"%s\"\n", ff_pkt->fname); @@ -365,10 +366,10 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) memcpy(sd->msg, ff_pkt->hfsinfo.fndrinfo, 32); sd->msglen = 32; if (digest) { - crypto_digest_update(digest, sd->msg, sd->msglen); + crypto_digest_update(digest, sd->msg, sd->msglen); } if (signature_digest) { - crypto_digest_update(signature_digest, sd->msg, sd->msglen); + crypto_digest_update(signature_digest, sd->msg, sd->msglen); } bnet_send(sd); bnet_sig(sd, BNET_EOD); @@ -378,13 +379,13 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) if (ff_pkt->flags & FO_ACL) { /* Read access ACLs for files, dirs and links */ if (!read_and_send_acl(jcr, BACL_TYPE_ACCESS, STREAM_UNIX_ATTRIBUTES_ACCESS_ACL)) { - return 0; + return 0; } /* Directories can have default ACLs too */ if (ff_pkt->type == FT_DIREND && (BACL_CAP & BACL_CAP_DEFAULTS_DIR)) { - if (!read_and_send_acl(jcr, BACL_TYPE_DEFAULT, STREAM_UNIX_ATTRIBUTES_DEFAULT_ACL)) { - return 0; - } + if (!read_and_send_acl(jcr, BACL_TYPE_DEFAULT, STREAM_UNIX_ATTRIBUTES_DEFAULT_ACL)) { + return 0; + } } } @@ -396,31 +397,31 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) if ((sig = crypto_sign_new()) == NULL) { Jmsg(jcr, M_FATAL, 0, _("Failed to allocate memory for stream signature.\n")); - return 0; + return 0; } if (crypto_sign_add_signer(sig, signing_digest, jcr->pki_keypair) == false) { Jmsg(jcr, M_FATAL, 0, _("An error occured while signing the stream.\n")); - return 0; + return 0; } /* Get signature size */ if (crypto_sign_encode(sig, NULL, &size) == false) { Jmsg(jcr, M_FATAL, 0, _("An error occured while signing the stream.\n")); - return 0; + return 0; } /* Allocate signature data buffer */ buf = malloc(size); if (!buf) { - free(buf); - return 0; + free(buf); + return 0; } /* Encode signature data */ if (crypto_sign_encode(sig, buf, &size) == false) { Jmsg(jcr, M_FATAL, 0, _("An error occured while signing the stream.\n")); - return 0; + return 0; } /* Send our header */ @@ -429,17 +430,17 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) /* Grow the bsock buffer to fit our message if necessary */ if ((size_t) sizeof_pool_memory(sd->msg) < size) { - sd->msg = realloc_pool_memory(sd->msg, size); + sd->msg = realloc_pool_memory(sd->msg, size); } /* Copy our message over and send it */ memcpy(sd->msg, buf, size); sd->msglen = size; bnet_send(sd); - bnet_sig(sd, BNET_EOD); /* end of checksum */ + bnet_sig(sd, BNET_EOD); /* end of checksum */ crypto_digest_free(signing_digest); - crypto_sign_free(sig); + crypto_sign_free(sig); free(buf); } @@ -453,10 +454,10 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) if (crypto_digest_finalize(digest, &md, &size)) { bnet_fsend(sd, "%ld %d 0", jcr->JobFiles, digest_stream); Dmsg1(300, "bfiled>stored:header %s\n", sd->msg); - memcpy(sd->msg, md, size); - sd->msglen = size; - bnet_send(sd); - bnet_sig(sd, BNET_EOD); /* end of checksum */ + memcpy(sd->msg, md, size); + sd->msglen = size; + bnet_send(sd); + bnet_sig(sd, BNET_EOD); /* end of checksum */ } crypto_digest_free(digest); @@ -478,17 +479,17 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, DIGEST *digest, DIGEST *signing_digest) { BSOCK *sd = jcr->store_bsock; - uint64_t fileAddr = 0; /* file address */ + uint64_t fileAddr = 0; /* file address */ char *rbuf, *wbuf; - int rsize = jcr->buf_size; /* read buffer size */ + int rsize = jcr->buf_size; /* read buffer size */ POOLMEM *msgsave; #ifdef FD_NO_SEND_TEST return 1; #endif msgsave = sd->msg; - rbuf = sd->msg; /* read buffer */ - wbuf = sd->msg; /* write buffer */ + rbuf = sd->msg; /* read buffer */ + wbuf = sd->msg; /* write buffer */ Dmsg1(300, "Saving data, type=%d\n", ff_pkt->type); @@ -500,11 +501,11 @@ int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, DIGEST *digest, DIGEST *sign if (ff_pkt->flags & FO_GZIP) { if (ff_pkt->flags & FO_SPARSE) { - cbuf = (Bytef *)jcr->compress_buf + SPARSE_FADDR_SIZE; - max_compress_len = jcr->compress_buf_size - SPARSE_FADDR_SIZE; + cbuf = (Bytef *)jcr->compress_buf + SPARSE_FADDR_SIZE; + max_compress_len = jcr->compress_buf_size - SPARSE_FADDR_SIZE; } else { - cbuf = (Bytef *)jcr->compress_buf; - max_compress_len = jcr->compress_buf_size; /* set max length */ + cbuf = (Bytef *)jcr->compress_buf; + max_compress_len = jcr->compress_buf_size; /* set max length */ } wbuf = jcr->compress_buf; /* compressed output here */ } @@ -512,18 +513,18 @@ int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, DIGEST *digest, DIGEST *sign /* * Send Data header to Storage daemon - * + * */ if (!bnet_fsend(sd, "%ld %d 0", jcr->JobFiles, stream)) { Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"), - bnet_strerror(sd)); + bnet_strerror(sd)); return 0; } Dmsg1(300, ">stored: datahdr %s\n", sd->msg); /* * Make space at beginning of buffer for fileAddr because this - * same buffer will be used for writing if compression if off. + * same buffer will be used for writing if compression if off. */ if (ff_pkt->flags & FO_SPARSE) { rbuf += SPARSE_FADDR_SIZE; @@ -551,73 +552,73 @@ int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, DIGEST *digest, DIGEST *sign /* Check for sparse blocks */ if (ff_pkt->flags & FO_SPARSE) { - ser_declare; - if (sd->msglen == rsize && - fileAddr+sd->msglen < (uint64_t)ff_pkt->statp.st_size || - ((ff_pkt->type == FT_RAW || ff_pkt->type == FT_FIFO) && - (uint64_t)ff_pkt->statp.st_size == 0)) { - sparseBlock = is_buf_zero(rbuf, rsize); - } - - ser_begin(wbuf, SPARSE_FADDR_SIZE); - ser_uint64(fileAddr); /* store fileAddr in begin of buffer */ + ser_declare; + if (sd->msglen == rsize && + fileAddr+sd->msglen < (uint64_t)ff_pkt->statp.st_size || + ((ff_pkt->type == FT_RAW || ff_pkt->type == FT_FIFO) && + (uint64_t)ff_pkt->statp.st_size == 0)) { + sparseBlock = is_buf_zero(rbuf, rsize); + } + + ser_begin(wbuf, SPARSE_FADDR_SIZE); + ser_uint64(fileAddr); /* store fileAddr in begin of buffer */ } - jcr->ReadBytes += sd->msglen; /* count bytes read */ + jcr->ReadBytes += sd->msglen; /* count bytes read */ fileAddr += sd->msglen; /* Update checksum if requested */ if (digest) { - crypto_digest_update(digest, rbuf, sd->msglen); + crypto_digest_update(digest, rbuf, sd->msglen); } /* Update signing digest if requested */ if (signing_digest) { - crypto_digest_update(signing_digest, rbuf, sd->msglen); + crypto_digest_update(signing_digest, rbuf, sd->msglen); } #ifdef HAVE_LIBZ /* Do compression if turned on */ if (!sparseBlock && ff_pkt->flags & FO_GZIP) { - int zstat; - compress_len = max_compress_len; + int zstat; + compress_len = max_compress_len; Dmsg4(400, "cbuf=0x%x len=%u rbuf=0x%x len=%u\n", cbuf, compress_len, - rbuf, sd->msglen); - /* NOTE! This call modifies compress_len !!! */ - if ((zstat=compress2((Bytef *)cbuf, &compress_len, - (const Bytef *)rbuf, (uLong)sd->msglen, - ff_pkt->GZIP_level)) != Z_OK) { + rbuf, sd->msglen); + /* NOTE! This call modifies compress_len !!! */ + if ((zstat=compress2((Bytef *)cbuf, &compress_len, + (const Bytef *)rbuf, (uLong)sd->msglen, + ff_pkt->GZIP_level)) != Z_OK) { Jmsg(jcr, M_FATAL, 0, _("Compression error: %d\n"), zstat); - sd->msg = msgsave; - sd->msglen = 0; - set_jcr_job_status(jcr, JS_ErrorTerminated); - return 0; - } + sd->msg = msgsave; + sd->msglen = 0; + set_jcr_job_status(jcr, JS_ErrorTerminated); + return 0; + } Dmsg2(400, "compressed len=%d uncompressed len=%d\n", - compress_len, sd->msglen); + compress_len, sd->msglen); - sd->msglen = compress_len; /* set compressed length */ + sd->msglen = compress_len; /* set compressed length */ } #endif /* Send the buffer to the Storage daemon */ if (!sparseBlock) { - if (ff_pkt->flags & FO_SPARSE) { - sd->msglen += SPARSE_FADDR_SIZE; /* include fileAddr in size */ - } - sd->msg = wbuf; /* set correct write buffer */ - if (!bnet_send(sd)) { + if (ff_pkt->flags & FO_SPARSE) { + sd->msglen += SPARSE_FADDR_SIZE; /* include fileAddr in size */ + } + sd->msg = wbuf; /* set correct write buffer */ + if (!bnet_send(sd)) { Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"), - bnet_strerror(sd)); - sd->msg = msgsave; /* restore bnet buffer */ - sd->msglen = 0; - return 0; - } + bnet_strerror(sd)); + sd->msg = msgsave; /* restore bnet buffer */ + sd->msglen = 0; + return 0; + } } Dmsg1(130, "Send data to SD len=%d\n", sd->msglen); - /* #endif */ - jcr->JobBytes += sd->msglen; /* count bytes saved possibly compressed */ - sd->msg = msgsave; /* restore read buffer */ + /* #endif */ + jcr->JobBytes += sd->msglen; /* count bytes saved possibly compressed */ + sd->msg = msgsave; /* restore read buffer */ } /* end while read file data */ @@ -625,16 +626,16 @@ int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, DIGEST *digest, DIGEST *sign if (sd->msglen < 0) { berrno be; Jmsg(jcr, M_ERROR, 0, _("Read error on file %s. ERR=%s\n"), - ff_pkt->fname, be.strerror(ff_pkt->bfd.berrno)); - if (jcr->Errors++ > 1000) { /* insanity check */ + ff_pkt->fname, be.strerror(ff_pkt->bfd.berrno)); + if (jcr->Errors++ > 1000) { /* insanity check */ Jmsg(jcr, M_FATAL, 0, _("Too many errors.\n")); } } - if (!bnet_sig(sd, BNET_EOD)) { /* indicate end of file data */ + if (!bnet_sig(sd, BNET_EOD)) { /* indicate end of file data */ Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"), - bnet_strerror(sd)); + bnet_strerror(sd)); return 0; } @@ -660,13 +661,13 @@ static bool read_and_send_acl(JCR *jcr, int acltype, int stream) return true; } if (len == 0) { - return true; /* no ACL */ + return true; /* no ACL */ } /* Send header */ if (!bnet_fsend(sd, "%ld %d 0", jcr->JobFiles, stream)) { Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"), - bnet_strerror(sd)); + bnet_strerror(sd)); return false; } @@ -679,7 +680,7 @@ static bool read_and_send_acl(JCR *jcr, int acltype, int stream) sd->msg = msgsave; sd->msglen = 0; Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"), - bnet_strerror(sd)); + bnet_strerror(sd)); return false; } @@ -687,7 +688,7 @@ static bool read_and_send_acl(JCR *jcr, int acltype, int stream) sd->msg = msgsave; if (!bnet_sig(sd, BNET_EOD)) { Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"), - bnet_strerror(sd)); + bnet_strerror(sd)); return false; } @@ -717,30 +718,30 @@ static bool encode_and_send_attributes(JCR *jcr, FF_PKT *ff_pkt, int &data_strea Dmsg3(300, "File %s\nattribs=%s\nattribsEx=%s\n", ff_pkt->fname, attribs, attribsEx); P(jcr->mutex); - jcr->JobFiles++; /* increment number of files sent */ + jcr->JobFiles++; /* increment number of files sent */ ff_pkt->FileIndex = jcr->JobFiles; /* return FileIndex */ pm_strcpy(jcr->last_fname, ff_pkt->fname); V(jcr->mutex); /* * Send Attributes header to Storage daemon - * + * */ if (!bnet_fsend(sd, "%ld %d 0", jcr->JobFiles, attr_stream)) { Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"), - bnet_strerror(sd)); + bnet_strerror(sd)); return false; } Dmsg1(300, ">stored: attrhdr %s\n", sd->msg); /* * Send file attributes to Storage daemon - * File_index - * File type - * Filename (full path) - * Encoded attributes - * Link name (if type==FT_LNK or FT_LNKSAVED) - * Encoded extended-attributes (for Win32) + * File_index + * File type + * Filename (full path) + * Encoded attributes + * Link name (if type==FT_LNK or FT_LNKSAVED) + * Encoded extended-attributes (for Win32) * * For a directory, link is the same as fname, but with trailing * slash. For a linked file, link is the link. @@ -748,23 +749,23 @@ static bool encode_and_send_attributes(JCR *jcr, FF_PKT *ff_pkt, int &data_strea if (ff_pkt->type == FT_LNK || ff_pkt->type == FT_LNKSAVED) { Dmsg2(300, "Link %s to %s\n", ff_pkt->fname, ff_pkt->link); stat = bnet_fsend(sd, "%ld %d %s%c%s%c%s%c%s%c", jcr->JobFiles, - ff_pkt->type, ff_pkt->fname, 0, attribs, 0, ff_pkt->link, 0, - attribsEx, 0); + ff_pkt->type, ff_pkt->fname, 0, attribs, 0, ff_pkt->link, 0, + attribsEx, 0); } else if (ff_pkt->type == FT_DIREND) { /* Here link is the canonical filename (i.e. with trailing slash) */ stat = bnet_fsend(sd, "%ld %d %s%c%s%c%c%s%c", jcr->JobFiles, - ff_pkt->type, ff_pkt->link, 0, attribs, 0, 0, attribsEx, 0); + ff_pkt->type, ff_pkt->link, 0, attribs, 0, 0, attribsEx, 0); } else { stat = bnet_fsend(sd, "%ld %d %s%c%s%c%c%s%c", jcr->JobFiles, - ff_pkt->type, ff_pkt->fname, 0, attribs, 0, 0, attribsEx, 0); + ff_pkt->type, ff_pkt->fname, 0, attribs, 0, 0, attribsEx, 0); } Dmsg2(300, ">stored: attr len=%d: %s\n", sd->msglen, sd->msg); if (!stat) { Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"), - bnet_strerror(sd)); + bnet_strerror(sd)); return false; } - bnet_sig(sd, BNET_EOD); /* indicate end of attributes data */ + bnet_sig(sd, BNET_EOD); /* indicate end of attributes data */ return true; } diff --git a/bacula/src/lib/bsys.c b/bacula/src/lib/bsys.c index e15dcee1dc..9c1a29d353 100644 --- a/bacula/src/lib/bsys.c +++ b/bacula/src/lib/bsys.c @@ -510,6 +510,7 @@ void read_state_file(char *dir, const char *progname, int port) if (hdr.version != state_hdr.version) { Dmsg2(010, "Bad hdr version. Wanted %d got %d\n", state_hdr.version, hdr.version); + goto bail_out; } hdr.id[13] = 0; if (strcmp(hdr.id, state_hdr.id) != 0) { diff --git a/bacula/src/stored/askdir.c b/bacula/src/stored/askdir.c index 248a2116ab..09e05e98e9 100644 --- a/bacula/src/stored/askdir.c +++ b/bacula/src/stored/askdir.c @@ -477,7 +477,7 @@ bool dir_ask_sysop_to_create_appendable_volume(DCR *dcr) stat = wait_for_sysop(dcr); if (dev->poll) { - Dmsg1(000, "Poll timeout in create append vol on device %s\n", dev->print_name()); + Dmsg1(100, "Poll timeout in create append vol on device %s\n", dev->print_name()); continue; } @@ -486,7 +486,7 @@ bool dir_ask_sysop_to_create_appendable_volume(DCR *dcr) Mmsg(dev->errmsg, _("Max time exceeded waiting to mount Storage Device %s for Job %s\n"), dev->print_name(), jcr->Job); Jmsg(jcr, M_FATAL, 0, "%s", dev->errmsg); - Dmsg1(000, "Gave up waiting on device %s\n", dev->print_name()); + Dmsg1(100, "Gave up waiting on device %s\n", dev->print_name()); return false; /* exceeded maximum waits */ } continue; diff --git a/bacula/src/stored/bscan.c b/bacula/src/stored/bscan.c index de44728abc..759f0edeb7 100644 --- a/bacula/src/stored/bscan.c +++ b/bacula/src/stored/bscan.c @@ -321,6 +321,7 @@ static bool bscan_mount_next_read_volume(DCR *dcr) // mdcr->EndBlock = (uint32_t)dcr->file_addr; // mdcr->EndFile = (uint32_t)(dcr->file_addr >> 32); } + mjcr->read_dcr->VolLastIndex = dcr->VolLastIndex; if (!create_jobmedia_record(db, mjcr)) { Pmsg2(000, _("Could not create JobMedia record for Volume=%s Job=%s\n"), dev->VolCatInfo.VolCatName, mjcr->Job); @@ -571,6 +572,7 @@ static bool record_cb(DCR *dcr, DEV_RECORD *rec) mjcr->JobStatus = JS_Terminated; /* Create JobMedia record */ + mjcr->read_dcr->VolLastIndex = dcr->VolLastIndex; create_jobmedia_record(db, mjcr); dev->attached_dcrs->remove(mjcr->read_dcr); free_jcr(mjcr); @@ -1144,7 +1146,7 @@ static int create_jobmedia_record(B_DB *db, JCR *mjcr) jmr.JobId = mjcr->JobId; jmr.MediaId = mr.MediaId; jmr.FirstIndex = dcr->VolFirstIndex; - jmr.LastIndex = dcr->FileIndex; + jmr.LastIndex = dcr->VolLastIndex; jmr.StartFile = dcr->StartFile; jmr.EndFile = dcr->EndFile; jmr.StartBlock = dcr->StartBlock; diff --git a/bacula/src/stored/butil.c b/bacula/src/stored/butil.c index 7a8da3571c..f6b54c4107 100644 --- a/bacula/src/stored/butil.c +++ b/bacula/src/stored/butil.c @@ -159,6 +159,7 @@ static DCR *setup_to_access_device(JCR *jcr, char *dev_name, } device->dev = dev; dcr = new_dcr(jcr, dev); + jcr->dcr = dcr; if (VolName[0]) { bstrncpy(dcr->VolumeName, VolName, sizeof(dcr->VolumeName)); } diff --git a/bacula/src/stored/fd_cmds.c b/bacula/src/stored/fd_cmds.c index fbb609e085..8c798a436d 100644 --- a/bacula/src/stored/fd_cmds.c +++ b/bacula/src/stored/fd_cmds.c @@ -331,7 +331,7 @@ bool bootstrap_cmd(JCR *jcr) goto bail_out; } while (bnet_recv(fd) >= 0) { - Dmsg1(400, "storedmsg); + Dmsg1(400, "storedmsg); fputs(fd->msg, bs); } fclose(bs); diff --git a/bacula/src/stored/read_record.c b/bacula/src/stored/read_record.c index 3f8f9a386b..42d5741d22 100644 --- a/bacula/src/stored/read_record.c +++ b/bacula/src/stored/read_record.c @@ -157,7 +157,7 @@ bool read_records(DCR *dcr, record = 0; rec->state = 0; Dmsg1(300, "Block empty %d\n", is_block_empty(rec)); - for (rec->state=0; !is_block_empty(rec); ) { + for (rec->state=0; ok && !is_block_empty(rec); ) { if (!read_record_from_block(block, rec)) { Dmsg3(400, "!read-break. state=%s blk=%d rem=%d\n", rec_state_to_str(rec), block->BlockNumber, rec->remainder); @@ -215,6 +215,7 @@ bool read_records(DCR *dcr, continue; /* we don't want record, read next one */ } } + dcr->VolLastIndex = rec->FileIndex; /* let caller know where we are */ if (is_partial_record(rec)) { Dmsg6(300, "Partial, break. recno=%d state=%s blk=%d SI=%d ST=%d FI=%d\n", record, rec_state_to_str(rec), block->BlockNumber, diff --git a/bacula/src/stored/stored.c b/bacula/src/stored/stored.c index 01561aa46c..39eef88629 100644 --- a/bacula/src/stored/stored.c +++ b/bacula/src/stored/stored.c @@ -456,7 +456,7 @@ void *device_initialization(void *arg) continue; } - dcr = new_dcr(jcr, dev); + jcr->dcr = dcr = new_dcr(jcr, dev); if (dev->is_autochanger()) { /* If autochanger set slot in dev sturcture */ get_autochanger_loaded_slot(dcr);