+++ /dev/null
-
- 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 <bacula-1.38.1-source>
- ./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 <al at its-lehmann dot de>
-+ 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 <peter at ifm.liu dot se>
-+ 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 <joshua dot kugler at uaf dot edu>
-+ Marek Bajon <mbajon at bimsplus dot com dot pl>
-+ 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 <bacula-1.38.1-source>
-+ ./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 <al at its-lehmann dot de>
-++ 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 <peter at ifm.liu dot se>
-++ 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 <joshua dot kugler at uaf dot edu>
-++ Marek Bajon <mbajon at bimsplus dot com dot pl>
-++ 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 <bacula-1.38.1-source>
-++ ./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 <al at its-lehmann dot de>
-+++ 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 <peter at ifm.liu dot se>
-+++ 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 <joshua dot kugler at uaf dot edu>
-+++ Marek Bajon <mbajon at bimsplus dot com dot pl>
-+++ 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 <bacula-1.38.1-source>
-+++ ./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 <al at its-lehmann dot de>
-++++ 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 <peter at ifm.liu dot se>
-++++ 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 <joshua dot kugler at uaf dot edu>
-++++ Marek Bajon <mbajon at bimsplus dot com dot pl>
-++++ 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 <bacula-1.38.1-source>
-++++ ./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 <al at its-lehmann dot de>
-+++++ 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 <peter at ifm.liu dot se>
-+++++ 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 <joshua dot kugler at uaf dot edu>
-+++++ Marek Bajon <mbajon at bimsplus dot com dot pl>
-+++++ 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 <bacula-1.38.1-source>
-+++++ ./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 <al at its-lehmann dot de>
-++++++ 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 <peter at ifm.liu dot se>
-++++++ 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 <joshua dot kugler at uaf dot edu>
-++++++ Marek Bajon <mbajon at bimsplus dot com dot pl>
-++++++ 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 <bacula-1.38.1-source>
-++++++ ./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 <al at its-lehmann dot de>
-+++++++ 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 <peter at ifm.liu dot se>
-+++++++ 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 <joshua dot kugler at uaf dot edu>
-+++++++ Marek Bajon <mbajon at bimsplus dot com dot pl>
-+++++++ 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 <bacula-1.38.1-source>
-+++++++ ./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
-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: 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
--#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: catreq.c,v 1.77.2.1 2005/10/26 14:02:04 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
-@@ -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: ua_restore.c,v 1.101.2.1 2005/10/26 14:02:04 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
-@@ -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: 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"));
- }
- 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: ua_select.c,v 1.65.2.1 2005/11/12 17:30:52 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
-@@ -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: 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;
- 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: acl.c,v 1.10.2.1 2005/11/14 20:20:38 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
-@@ -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: 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)
- {
- 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: 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) {
- 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: autochanger.c,v 1.47.2.3 2005/11/12 17:30:53 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
-@@ -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: 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
-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: tray-monitor.c,v 1.25.2.1 2005/10/01 10:20:18 kerns Exp $
-+ * Version $Id: tray-monitor.c,v 1.25.2.2 2005/11/22 10:50:55 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
+++ /dev/null
-Index: src/stored/block.c
-===================================================================
-RCS file: /cvsroot/bacula/bacula/src/stored/block.c,v
-retrieving revision 1.116.2.3
-diff -u -u -b -r1.116.2.3 block.c
---- src/stored/block.c 24 Mar 2006 16:35:23 -0000 1.116.2.3
-+++ src/stored/block.c 12 Jun 2006 16:19:27 -0000
-@@ -9,7 +9,7 @@
- *
- */
- /*
-- Copyright (C) 2001-2005 Kern Sibbald
-+ Copyright (C) 2001-2006 Kern Sibbald
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
-@@ -910,13 +910,12 @@
- Dmsg3(100, "Tests : %d %d %d\n", (dev->VolCatInfo.VolCatParts > 0),
- ((dev->file_addr-dev->part_start) == dev->part_size),
- (dev->part <= dev->VolCatInfo.VolCatParts));*/
-- /* Check for part file end */
-- if ((dev->num_parts > 0) &&
-- ((dev->file_addr-dev->part_start) == dev->part_size) &&
-- (dev->part < dev->num_parts)) {
-+ /* Check for DVD part file end */
-+ if (dev->at_eof() && dev->is_dvd() && dev->num_parts > 0 &&
-+ dev->part < dev->num_parts) {
- if (dvd_open_next_part(dcr) < 0) {
-- Jmsg2(dcr->jcr, M_FATAL, 0, _("Unable to open device next part %s: ERR=%s\n"),
-- dev->print_name(), strerror_dev(dev));
-+ Jmsg3(dcr->jcr, M_FATAL, 0, _("Unable to open device part=%d %s: ERR=%s\n"),
-+ dev->part, dev->print_name(), strerror_dev(dev));
- dev->dev_errno = EIO;
- return false;
- }
+++ /dev/null
-
- This patch should correct the FreeBSD mutex crash that happens in
- the Director after a sudden clock shift or after the "reload" command.
- Apply it to 1.38.10 (will not work with prior version) with:
-
- cd <bacula-source>
- patch -p0 <1.38.10-scheduler.patch
- make
- make install
- ...
-
-
-
-Index: src/dird/scheduler.c
-===================================================================
-RCS file: /cvsroot/bacula/bacula/src/dird/scheduler.c,v
-retrieving revision 1.33.2.2
-diff -u -r1.33.2.2 scheduler.c
---- src/dird/scheduler.c 4 Jun 2006 12:24:39 -0000 1.33.2.2
-+++ src/dird/scheduler.c 24 Jun 2006 17:25:58 -0000
-@@ -151,6 +151,7 @@
- free(next_job);
- }
- schedules_invalidated = false;
-+ unlock_jobs();
- goto again;
- }
- unlock_jobs();
+++ /dev/null
-
- This patch fixes a bug in the bacula start/stop script where
- the binary directory is used rather than the scripts directory.
- Apply the patch to version 1.38.6 with:
-
- cd <bacula-source>
- patch -p0 <1.38.6-script.patch
- make Makefiles
- make install
- ...
-
-Index: scripts/bacula.in
-===================================================================
-RCS file: /cvsroot/bacula/bacula/scripts/bacula.in,v
-retrieving revision 1.13.2.3
-diff -u -r1.13.2.3 bacula.in
---- scripts/bacula.in 28 Mar 2006 16:42:19 -0000 1.13.2.3
-+++ scripts/bacula.in 29 Mar 2006 16:24:51 -0000
-@@ -13,25 +13,22 @@
- # easier to "steal" this code for the development
- # environment where they are different.
- #
--BACFDBIN=@sbindir@
- BACFDCFG=@sysconfdir@
--BACSDBIN=@sbindir@
- BACSDCFG=@sysconfdir@
--BACDIRBIN=@sbindir@
- BACDIRCFG=@sysconfdir@
-
- case "$1" in
- start)
-- [ -x ${BACSDBIN}/bacula-ctl-sd ] && ${BACSDBIN}/bacula-ctl-sd $1 $2
-- [ -x ${BACFDBIN}/bacula-ctl-fd ] && ${BACFDBIN}/bacula-ctl-fd $1 $2
-- [ -x ${BACDIRBIN}/bacula-ctl-dir ] && ${BACDIRBIN}/bacula-ctl-dir $1 $2
-+ [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd $1 $2
-+ [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd $1 $2
-+ [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir $1 $2
- ;;
-
- stop)
- # Stop the FD first so that SD will fail jobs and update catalog
-- [ -x ${BACFDBIN}/bacula-ctl-fd ] && ${BACFDBIN}/bacula-ctl-fd $1 $2
-- [ -x ${BACSDBIN}/bacula-ctl-sd ] && ${BACSDBIN}/bacula-ctl-sd $1 $2
-- [ -x ${BACDIRBIN}/bacula-ctl-dir ] && ${BACDIRBIN}/bacula-ctl-dir $1 $2
-+ [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd $1 $2
-+ [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd $1 $2
-+ [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir $1 $2
- echo
- sleep 6
- ;;
-@@ -42,9 +39,9 @@
- ;;
-
- status)
-- [ -x ${BACSDBIN}/bacula-ctl-sd ] && ${BACSDBIN}/bacula-ctl-sd status
-- [ -x ${BACFDBIN}/bacula-ctl-fd ] && ${BACFDBIN}/bacula-ctl-fd status
-- [ -x ${BACDIRBIN}/bacula-ctl-dir ] && ${BACDIRBIN}/bacula-ctl-dir status
-+ [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd status
-+ [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd status
-+ [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir status
- ;;
-
- *)
+++ /dev/null
-
-This patch (thanks to Frank Sweetser) should fix the timeout problem
-users are experiencing with MySQL versions greater than 5.0.13.
-It can be applied to Bacula version 1.38.7 (and possibly 1.38.5 and 1.38.6)
-with:
-
- cd <bacula-source>
- patch -p0 <1.38.7-mysql.patch
- make
- make install
-
-Index: src/cats/mysql.c
-===================================================================
-RCS file: /cvsroot/bacula/bacula/src/cats/mysql.c,v
-retrieving revision 1.37.2.2
-diff -u -r1.37.2.2 mysql.c
---- src/cats/mysql.c 4 Mar 2006 11:10:17 -0000 1.37.2.2
-+++ src/cats/mysql.c 7 Apr 2006 14:10:23 -0000
-@@ -132,7 +132,6 @@
- mysql_server_init(0, NULL, NULL);
- #endif
- mysql_init(&(mdb->mysql));
-- mdb->mysql.reconnect = 1; /* so connection does not timeout */
- Dmsg0(50, "mysql_init done\n");
- /* If connection fails, try at 5 sec intervals for 30 seconds. */
- for (int retry=0; retry < 6; retry++) {
-@@ -153,6 +152,7 @@
- bmicrosleep(5,0);
- }
-
-+ mdb->mysql.reconnect = 1; /* so connection does not timeout */
- Dmsg0(50, "mysql_real_connect done\n");
- Dmsg3(50, "db_user=%s db_name=%s db_password=%s\n", mdb->db_user, mdb->db_name,
- mdb->db_password==NULL?"(NULL)":mdb->db_password);
--- /dev/null
+
+ 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 <bacula-1.38.1-source>
+ ./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 <al at its-lehmann dot de>
++ 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 <peter at ifm.liu dot se>
++ 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 <joshua dot kugler at uaf dot edu>
++ Marek Bajon <mbajon at bimsplus dot com dot pl>
++ 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 <bacula-1.38.1-source>
++ ./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 <al at its-lehmann dot de>
+++ 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 <peter at ifm.liu dot se>
+++ 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 <joshua dot kugler at uaf dot edu>
+++ Marek Bajon <mbajon at bimsplus dot com dot pl>
+++ 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 <bacula-1.38.1-source>
+++ ./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 <al at its-lehmann dot de>
++++ 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 <peter at ifm.liu dot se>
++++ 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 <joshua dot kugler at uaf dot edu>
++++ Marek Bajon <mbajon at bimsplus dot com dot pl>
++++ 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 <bacula-1.38.1-source>
++++ ./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 <al at its-lehmann dot de>
+++++ 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 <peter at ifm.liu dot se>
+++++ 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 <joshua dot kugler at uaf dot edu>
+++++ Marek Bajon <mbajon at bimsplus dot com dot pl>
+++++ 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 <bacula-1.38.1-source>
+++++ ./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 <al at its-lehmann dot de>
++++++ 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 <peter at ifm.liu dot se>
++++++ 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 <joshua dot kugler at uaf dot edu>
++++++ Marek Bajon <mbajon at bimsplus dot com dot pl>
++++++ 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 <bacula-1.38.1-source>
++++++ ./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 <al at its-lehmann dot de>
+++++++ 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 <peter at ifm.liu dot se>
+++++++ 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 <joshua dot kugler at uaf dot edu>
+++++++ Marek Bajon <mbajon at bimsplus dot com dot pl>
+++++++ 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 <bacula-1.38.1-source>
+++++++ ./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 <al at its-lehmann dot de>
++++++++ 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 <peter at ifm.liu dot se>
++++++++ 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 <joshua dot kugler at uaf dot edu>
++++++++ Marek Bajon <mbajon at bimsplus dot com dot pl>
++++++++ 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 <bacula-1.38.1-source>
++++++++ ./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$
+++++++++ * Version $Id$
++++++++ */
++++++++ /*
++++++++ 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$
+++++++++ * Version $Id$
++++++++ */
++++++++ /*
++++++++ 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$
+++++++++ * Version $Id$
++++++++ */
++++++++ /*
++++++++ 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$
+++++++++ * Version $Id$
++++++++ */
++++++++ /*
++++++++ 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$
+++++++++ * Version $Id$
++++++++ */
++++++++ /*
++++++++ 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$
+++++++++ * Version $Id$
++++++++ */
++++++++
++++++++ /*
++++++++@@ -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$
++++++++ * Version $Id$
+++++++ */
+++++++ /*
+++++++ 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$
++++++++ * Version $Id$
+++++++ */
+++++++ /*
+++++++ 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$
++++++++ * Version $Id$
+++++++ */
+++++++ /*
+++++++ 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$
++++++++ * Version $Id$
+++++++ */
+++++++ /*
+++++++ 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$
++++++++ * Version $Id$
+++++++ */
+++++++ /*
+++++++ 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$
++++++++ * Version $Id$
+++++++ */
+++++++
+++++++ /*
+++++++@@ -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$
+++++++ * Version $Id$
++++++ */
++++++ /*
++++++ 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$
+++++++ * Version $Id$
++++++ */
++++++ /*
++++++ 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$
+++++++ * Version $Id$
++++++ */
++++++ /*
++++++ 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$
+++++++ * Version $Id$
++++++ */
++++++ /*
++++++ 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$
+++++++ * Version $Id$
++++++ */
++++++ /*
++++++ 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$
+++++++ * Version $Id$
++++++ */
++++++
++++++ /*
++++++@@ -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$
++++++ * Version $Id$
+++++ */
+++++ /*
+++++ 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$
++++++ * Version $Id$
+++++ */
+++++ /*
+++++ 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$
++++++ * Version $Id$
+++++ */
+++++ /*
+++++ 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$
++++++ * Version $Id$
+++++ */
+++++ /*
+++++ 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$
++++++ * Version $Id$
+++++ */
+++++ /*
+++++ 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$
++++++ * Version $Id$
+++++ */
+++++
+++++ /*
+++++@@ -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$
+++++ * Version $Id$
++++ */
++++ /*
++++ 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$
+++++ * Version $Id$
++++ */
++++ /*
++++ 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$
+++++ * Version $Id$
++++ */
++++ /*
++++ 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$
+++++ * Version $Id$
++++ */
++++ /*
++++ 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$
+++++ * Version $Id$
++++ */
++++ /*
++++ 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$
+++++ * Version $Id$
++++ */
++++
++++ /*
++++@@ -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$
++++ * Version $Id$
+++ */
+++ /*
+++ 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$
++++ * Version $Id$
+++ */
+++ /*
+++ 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$
++++ * Version $Id$
+++ */
+++ /*
+++ 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$
++++ * Version $Id$
+++ */
+++ /*
+++ 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$
++++ * Version $Id$
+++ */
+++ /*
+++ 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$
++++ * Version $Id$
+++ */
+++
+++ /*
+++@@ -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$
+++ * Version $Id$
++ */
++
++ #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$
+++ * Version $Id$
++ */
++ /*
++ 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$
+++ * Version $Id$
++ */
++ /*
++ 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$
+++ * Version $Id$
++ */
++ /*
++ 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$
+++ * Version $Id$
++ */
++ /*
++ 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$
+++ * Version $Id$
++ */
++ /*
++ 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$
+++ * Version $Id$
++ */
++ /*
++ 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$
+++ * Version $Id$
++ *
++ */
++ /*
++@@ -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$
+++ * Version $Id$
++ */
++
++ #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$
+++ * Version $Id$
++ */
++ /*
++ 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$
+++ * Version $Id$
++ *
++ */
++ /*
++@@ -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$
+++ * Version $Id$
++ */
++ /*
++ 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$
+++ * Version $Id$
++ */
++
++ /*
++@@ -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$
++ * Version $Id$
+ */
+
+ #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$
++ * Version $Id$
+ */
+ /*
+ 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$
++ * Version $Id$
+ */
+ /*
+ 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$
++ * Version $Id$
+ */
+ /*
+ 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$
++ * Version $Id$
+ */
+ /*
+ 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$
++ * Version $Id$
+ */
+ /*
+ 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$
++ * Version $Id$
+ */
+ /*
+ 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$
++ * Version $Id$
+ *
+ */
+ /*
+@@ -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$
++ * Version $Id$
+ */
+
+ #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$
++ * Version $Id$
+ */
+ /*
+ 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$
++ * Version $Id$
+ *
+ */
+ /*
+@@ -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$
++ * Version $Id$
+ */
+ /*
+ 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$
++ * Version $Id$
+ */
+
+ /*
+@@ -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
--- /dev/null
+Index: src/stored/block.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/stored/block.c,v
+retrieving revision 1.116.2.3
+diff -u -u -b -r1.116.2.3 block.c
+--- src/stored/block.c 24 Mar 2006 16:35:23 -0000 1.116.2.3
++++ src/stored/block.c 12 Jun 2006 16:19:27 -0000
+@@ -9,7 +9,7 @@
+ *
+ */
+ /*
+- Copyright (C) 2001-2005 Kern Sibbald
++ Copyright (C) 2001-2006 Kern Sibbald
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+@@ -910,13 +910,12 @@
+ Dmsg3(100, "Tests : %d %d %d\n", (dev->VolCatInfo.VolCatParts > 0),
+ ((dev->file_addr-dev->part_start) == dev->part_size),
+ (dev->part <= dev->VolCatInfo.VolCatParts));*/
+- /* Check for part file end */
+- if ((dev->num_parts > 0) &&
+- ((dev->file_addr-dev->part_start) == dev->part_size) &&
+- (dev->part < dev->num_parts)) {
++ /* Check for DVD part file end */
++ if (dev->at_eof() && dev->is_dvd() && dev->num_parts > 0 &&
++ dev->part < dev->num_parts) {
+ if (dvd_open_next_part(dcr) < 0) {
+- Jmsg2(dcr->jcr, M_FATAL, 0, _("Unable to open device next part %s: ERR=%s\n"),
+- dev->print_name(), strerror_dev(dev));
++ Jmsg3(dcr->jcr, M_FATAL, 0, _("Unable to open device part=%d %s: ERR=%s\n"),
++ dev->part, dev->print_name(), strerror_dev(dev));
+ dev->dev_errno = EIO;
+ return false;
+ }
--- /dev/null
+
+ This patch should correct the FreeBSD mutex crash that happens in
+ the Director after a sudden clock shift or after the "reload" command.
+ Apply it to 1.38.10 (will not work with prior version) with:
+
+ cd <bacula-source>
+ patch -p0 <1.38.10-scheduler.patch
+ make
+ make install
+ ...
+
+
+
+Index: src/dird/scheduler.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/dird/scheduler.c,v
+retrieving revision 1.33.2.2
+diff -u -r1.33.2.2 scheduler.c
+--- src/dird/scheduler.c 4 Jun 2006 12:24:39 -0000 1.33.2.2
++++ src/dird/scheduler.c 24 Jun 2006 17:25:58 -0000
+@@ -151,6 +151,7 @@
+ free(next_job);
+ }
+ schedules_invalidated = false;
++ unlock_jobs();
+ goto again;
+ }
+ unlock_jobs();
--- /dev/null
+
+ This patch fixes a bug in the bacula start/stop script where
+ the binary directory is used rather than the scripts directory.
+ Apply the patch to version 1.38.6 with:
+
+ cd <bacula-source>
+ patch -p0 <1.38.6-script.patch
+ make Makefiles
+ make install
+ ...
+
+Index: scripts/bacula.in
+===================================================================
+RCS file: /cvsroot/bacula/bacula/scripts/bacula.in,v
+retrieving revision 1.13.2.3
+diff -u -r1.13.2.3 bacula.in
+--- scripts/bacula.in 28 Mar 2006 16:42:19 -0000 1.13.2.3
++++ scripts/bacula.in 29 Mar 2006 16:24:51 -0000
+@@ -13,25 +13,22 @@
+ # easier to "steal" this code for the development
+ # environment where they are different.
+ #
+-BACFDBIN=@sbindir@
+ BACFDCFG=@sysconfdir@
+-BACSDBIN=@sbindir@
+ BACSDCFG=@sysconfdir@
+-BACDIRBIN=@sbindir@
+ BACDIRCFG=@sysconfdir@
+
+ case "$1" in
+ start)
+- [ -x ${BACSDBIN}/bacula-ctl-sd ] && ${BACSDBIN}/bacula-ctl-sd $1 $2
+- [ -x ${BACFDBIN}/bacula-ctl-fd ] && ${BACFDBIN}/bacula-ctl-fd $1 $2
+- [ -x ${BACDIRBIN}/bacula-ctl-dir ] && ${BACDIRBIN}/bacula-ctl-dir $1 $2
++ [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd $1 $2
++ [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd $1 $2
++ [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir $1 $2
+ ;;
+
+ stop)
+ # Stop the FD first so that SD will fail jobs and update catalog
+- [ -x ${BACFDBIN}/bacula-ctl-fd ] && ${BACFDBIN}/bacula-ctl-fd $1 $2
+- [ -x ${BACSDBIN}/bacula-ctl-sd ] && ${BACSDBIN}/bacula-ctl-sd $1 $2
+- [ -x ${BACDIRBIN}/bacula-ctl-dir ] && ${BACDIRBIN}/bacula-ctl-dir $1 $2
++ [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd $1 $2
++ [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd $1 $2
++ [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir $1 $2
+ echo
+ sleep 6
+ ;;
+@@ -42,9 +39,9 @@
+ ;;
+
+ status)
+- [ -x ${BACSDBIN}/bacula-ctl-sd ] && ${BACSDBIN}/bacula-ctl-sd status
+- [ -x ${BACFDBIN}/bacula-ctl-fd ] && ${BACFDBIN}/bacula-ctl-fd status
+- [ -x ${BACDIRBIN}/bacula-ctl-dir ] && ${BACDIRBIN}/bacula-ctl-dir status
++ [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd status
++ [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd status
++ [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir status
+ ;;
+
+ *)
--- /dev/null
+
+This patch (thanks to Frank Sweetser) should fix the timeout problem
+users are experiencing with MySQL versions greater than 5.0.13.
+It can be applied to Bacula version 1.38.7 (and possibly 1.38.5 and 1.38.6)
+with:
+
+ cd <bacula-source>
+ patch -p0 <1.38.7-mysql.patch
+ make
+ make install
+
+Index: src/cats/mysql.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/cats/mysql.c,v
+retrieving revision 1.37.2.2
+diff -u -r1.37.2.2 mysql.c
+--- src/cats/mysql.c 4 Mar 2006 11:10:17 -0000 1.37.2.2
++++ src/cats/mysql.c 7 Apr 2006 14:10:23 -0000
+@@ -132,7 +132,6 @@
+ mysql_server_init(0, NULL, NULL);
+ #endif
+ mysql_init(&(mdb->mysql));
+- mdb->mysql.reconnect = 1; /* so connection does not timeout */
+ Dmsg0(50, "mysql_init done\n");
+ /* If connection fails, try at 5 sec intervals for 30 seconds. */
+ for (int retry=0; retry < 6; retry++) {
+@@ -153,6 +152,7 @@
+ bmicrosleep(5,0);
+ }
+
++ mdb->mysql.reconnect = 1; /* so connection does not timeout */
+ Dmsg0(50, "mysql_real_connect done\n");
+ Dmsg3(50, "db_user=%s db_name=%s db_password=%s\n", mdb->db_user, mdb->db_name,
+ mdb->db_password==NULL?"(NULL)":mdb->db_password);