X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2FReleaseNotes;h=c3cb43ee48c40d914fd412ef5f0e303df6f38309;hb=9639770adf80b0b5f7b269b91bee7e5d86577f90;hp=792b4d73d70670757c0875dc29830353082ff7f8;hpb=2c8e0154a2ba6b3fb35e84a11d5e437cc75e0529;p=bacula%2Fbacula diff --git a/bacula/ReleaseNotes b/bacula/ReleaseNotes index 792b4d73d7..c3cb43ee48 100644 --- a/bacula/ReleaseNotes +++ b/bacula/ReleaseNotes @@ -1,262 +1,221 @@ - Release Notes for Bacula 1.35.1 + Release Notes for Bacula 1.37.12 - Bacula code: Total files = 384 Total lines = 110,682 (*.h *.c *.in) + Bacula code: Total files = 419 Total lines = 124,877 (*.h *.c *.in) + +Note! The DB has been upgraded from version 8 to 9 and requres +a DB upgrade. -Changes for 1.35.1 Major Changes: -- Added Tape Alert feature (see Alert Command). -- New IPv6 code (untested) -- New way of specifying Addresses and Ports -- permits having - server listen on multiple ports. -- Regular expressions in Options directive. -- Reader/writer programs in Options (not yet fully implemented, - please do not use). -- Fixed specification of bind address on Win32 (thanks to - Martin Simmons). -- Update all Volumes from Pool record. -- Update License to terminate rights of anyone suing a GPL licensor. -- Improved error messages for Win32 and when running external - programs (e.g. RunBeforeJob). -- Implement reload of conf file in Directory on SIGHUP. -- Building restore tree is much faster on large filesets - due to binary insert. +- The Python interface has been updated to be object oriented. +- This version has a new DIR <--> SD protocol. Both must be + upgraded at the same time. +- This version has a new database format that is not compatible + with previous databases. The upgrade scripts should work, but + they are not yet tested. +- SQLite3 support, but it seems to run at 1/2 to 1/4 the speed of + SQLite2. +- First cut at ANSI labels. +- New communications protocol between DIR and SD to reserve + drives. The DIR and SD are no longer compatible with 1.36 or + lower versions. +- Preliminary Python Event support has been added. See below for + configuration and details. +- DVD writing support, using parts, and a lot of new directives in + the Device resource of the Storage configuration file. +- Seven new options keywords in a FileSet resource: + ignorecase, fstype, hfsplussupport, wilddir, wildfile, regexdir, + and regexfile. See below for details. New Directives: -- Alert Command in Device resource of Storage Daemon. -- New IP address and port directives. -- reader = xxx, writer = yyy in Options within FileSet of - Director's conf file. -- regex = xxx in Options within FileSet of Director's - conf file. -- New command options: update AllFromPool updates all - Volumes with Pool defaults. -- .backups client=xxx (for GUI programs). +- New Run directive in Job resource of DIR. It permits + cloning of jobs. To clone a copy of the current job, use + Run = "job-name level=%l since=\"%s\"" + Note, job-name is normally the same name as the job that + is running but there is no restriction on what you put. If you + want to start the job by hand and use job overrides such as + storage=xxx, realize that the job will be started with the + default storage values not the overrides. The level=%l guarantees + that the chosen level of the job is the same, and the since=... + ensures that the job uses *exactly* the same time/date for incremental + and differential jobs. The since=... is ignored when level=Full. + A cloned job will not start additional clones, so it is not possible + to recurse. +- New Options keywords in a FileSet directive: + - WildDir xxx + Will do a wild card match against directories (files will not + be matched). + - WildFile xxx + Will do a wild card match against files (directories will not + be matched). + - RegexDir xxx + Will do a regular expression match against directories (files + will not be matched). + - RegexFile xxx + Will do a regular expression match against files( directories + will not be matched). + - IgnoreCase = yes | no + Will ignore case in wild card and regular expression matches. + This is handy for Windows where filename case is not significant. + - FsType = string + where string is a filesystem type: ext2, jfs, ntfs, proc, + reiserfs, xfs, usbdevfs, sysfs, smbfs, iso9660. For ext3 + systems, use ext2. You may have multiple fstype directives + and thus permit multiple filesystem types. If the type + specified on the fstype directive does not match the + filesystem for a particular directive, that directory will + not be backed up. This directive can be used to prevent + backing up non-local filesystems. + - HFS Plus Support = yes | no + If set, Mac OS X resource forks will be saved and restored. +- Label Type = ANSI | IBM | Bacula + Implemented in Director Pool resource and in SD Device resource. + If it is specified in the SD Device resource, it will take + precedence over the value passed from the Director to the SD. + IBM is not yet implemented. +- Check Labels = yes | no + Implemented in the SD Device resource. If you intend to read + ANSI or IBM labels, this *must* be set. Even if the volume + is not ANSI labeled, you can set this to yes, and Bacula will + check the label type. +- Scripts Directory = name. Defines the directory from + which Bacula scripts will be called for events. In fact, Bacula + appends this name to the standard Python list of search directories, + so the script could also be in any of the Python system directories. +- In FileSet, you can exclude backing up of hardlinks (if you have + a lot, it can be very expensive), by using: + HardLinks = no + in the Options section. Patch supplied by David R Bosso. Thanks. +- MaximumPartSize = bytes (SD, Device resource) + Defines the maximum part size. +- Requires Mount = Yes/No (SD, Device resource) + Defines if the device require to be mounted to be read, and if it + must be written in a special way. If it set, the following directives + must be defined in the same Device resource: + + Mount Point = directory + Directory where the device must be mounted. + + Mount Command = name-string + Command that must be executed to mount the device. Before the command + is executed, %a is replaced with the Archive Device, and %m with the + Mount Point. + + Unmount Command = name-string + Command that must be executed to unmount the device. Before the + command is executed, %a is replaced with the Archive Device, and + %m with the Mount Point. + + Write Part Command = name-string + Command that must be executed to write a part to the device. Before + the command is executed, %a is replaced with the Archive Device, %m + with the Mount Point, %n with the current part number (0-based), + and %v with the current part filename. + + Free Space Command = name-string + Command that must be executed to check how much free space is left + on the device. Before the command is executed, %a is replaced with + the Archive Device, %m with the Mount Point, %n with the current part + number (0-based), and %v with the current part filename. +- Write Part After Job = Yes/No (DIR, Job Resource, and Schedule Resource) + If this directive is set to yes (default no), a new part file will be + created after the job is finished. + +New Commands: +- "python restart" restarts the Python interpreter. Rather brutal, make + sure no Python scripts are running. This permits you to change + a Python script and get Bacula to use the new script. Items to note!!! -- All daemons should be compatible with 1.34 with the exception - of the new FileSet features such as regular expressions. -- Regular expressions are not implemented in the Win32 FD. +- You must add --with-python=[DIR] to the configure command line + if you want Python support. Python 2.2 and 2.3 should be automatically + detected if in the standard place. +- With Python 2.2 version, the link of the Director gets a few linker + warnings due to the fact that Python pulls in some old non-secure + libraries. +- With Python 2.3, there are a few compiler warnings. +- You must either create a new catalog database or upgrade your + old database (upgrade scripts not yet tested). Other Items: -- Print error message if Alert Command fails in bpipe_open(). -- Doc Alert command. -- Eliminate unnecessary class in findlib/attribs.c -- Add necessary empty files to new tray-monitor directory. -- Implement Class with template in findlib/attribs.c to do casting - of uint64_t into stat packet types to avoid compiler warnings. - Thanks to Meno for this idea. -- Make some modifications to satisfy VC++. -- Apply Martin Simmons' second patch to compat.cpp to fix the line - I previously missed. -- Apply Meno's fix to bnet that corrects use of ipaddr after free_addresses, - back out my kludges, and it works. -- Modified configure.in to by default add -Wall. -- Found some problems with printing IP addresses -- will notify Meno. -- Added printing Pool to Job report. -- Fixed several places where dlists were not being released - (term_job_server, ...) -- Started implementing New() for dlists. Spent a lot of time, - but could not get it to work. -- Fixed a mutex deadlock between the job queue scheduler and the - watchdog. -- Made add_address() static. -- Added bsnprintf to address_conf.c -- Apply Marin Simmons patch to inet_aton() in compat. -- Build on Win32 -- required a few changes because of new IP code. -- Implement program reader code in Dir and FD -- not tested, and - a few corrections for writer code are needed in FD. -- Rework SQL for pruning. Add Admin pruning. Prune failed - jobs in Verify and Restore. -- Don't put commas in listing produced in restore so that users - can cut and past JobIds without having commas in the way. -- Change size_t to socklen_t in filed.c -- reindent a bit. -- Remove addr_list->size from buf size definition in bnet.c -- Create a Developer's document. -- Add prompt for Update volume from pool and update all - Volumes from pool. -- Implement user friendly time duration input editing. -- Add buf len argument to edit_utime(). -- Added eliminate orphaned Client records to dbcheck. -- Implement Alert Command in SD Device conf. -- Fix updating a Volume from the pool record -- it never changed - anything. -- Implement updating all Volumes from pool record. -- Add patch by Denis Shaposhnikov that fixes excludes of directories - in new style FileSets. -- Merge Meno's IPv6-1 code. -- Update License to terminate rights of anyone suing a GPL licensor. -- Add Pruning doc sent by Bryce Denney -- Correct inconsistencies in restore command doc pointed out by user. -- Don't edit commas in SQL intergers if they are not stricly integer. -- Update all pools in all DBs when starting the Director. -- Implement final cut of berrno and update Win32 code. -- Update copyright to include a termination clause. Add copyright to - binaries. -- Implement .backups client=xxx for Nicolas. -- Make first cut at implementing berrno class to handle Unix, Win32 - and bpipe errors. Bpipe still needs to be implemented. - This fixes (not yet tested) the Win32 errno problems in the compat lib. -- Fix btape compile problem reported by Martin Simmons -- thanks. -- Add ./configure detection of sys/tape.h -- Apply two fixes to recent changes to dev.c submitted by - Martin Simmons. -- Add checks in btape for correct size of off_t, and correct editing - of 32 and 64 bit values. -- Move supported OS/hardware into a chapter by itself. -- Fix bscan, which did not handle walking dcr list. -- Remove old attach_jcr_to_device() code. -- Fix config from Andy Wettstein's patch to use bitypes.h and detect - uint32_t, ... definitions. -- Fix a few compiler warnings because of casting pointers to int and - vise versa. -- Do some minor cosmetics to query.sql. nothing changed. -- Don't call stop_thread_timer() in backup.c if timer not started. -- Fix bug with out of order JobIds on restore. -- Make watchdog examine queues once every 10 seconds instead of once - a second. -- Add more bools to dev.c -- Fix walking attached DCRs in bscan.c -- Doc updates -- Start work on rescue files. Integrated RAID changes. -- Print a message when query.sql moved to query.sql.old during install. -- Move setting of FreeBSD chflags() to after utime() to avoid error - messages is immutable bit is set. -- Turn off heartbeat in FD when -s is given so that we can - debug without a flood of signals. -- Close and reopen the device during an append test in - btape. This better tests appending as if Bacula stops/restarts. -- Remove old attach/detach_jcr_to_device() code -- Add new attached_dcrs code. -- Remove unnecessary subroutine for bsnprintf. -- Replace sprintf() by home-grown code in edit_uint64 ... -- Begin implementation of dev->attached_dcrs. -- Remove scripts/fd.in from configure.in -- Add printing of JobId when a Job is started from the console. -- Remove fd/fd.in from scripts directory. -- Fix a number of bugs in dbcheck concerning the -c option - (i.e. with a config file). -- Made RH start scripts use -u and -g options. -- Many more DCR changes. -- Add job message indicating that the job has been rescheduled - and when. -- Fix job end time so that it is always updated. Previously it - was not updated when a job was rescheduled. -- Correct SQL for restoring job by path/name. It could sometimes - pickup the wrong JobId -- submitted by a user. -- Add a number of "%s" in editing database errors -- security issue. -- Ensure that the NumVols is incremented and decremented in the - pool record when Volumes are created or deleted. -- Cleanup error handling when labeling a tape. If vol was read-only, - the device would still be marked as having found a label. -- Put ftCreationTime into st_ctime of stat packet. Hopefully - this will fix the problem of noticing files have been moved - into the save path after a Full save. -- Fix bug in "status dir" where not all entries are listed. -- Cleanup some improper result printing in configure. -- Optimize a couple of insertions in binary_insert of dlists. +- 2 new scripts, dvd-writepart and dvd-freespace, in the scripts directory, + which are designed to be used as parameters to Write Part Command and + Free Space Command. They need the dvd+rw-tools to be installed + (http://fy.chalmers.se/~appro/linux/DVD+RW/). +- Part files support: File volumes can now be splitted in multiple + files, called "parts". +- Python scripting support: + A Python script will be called at particular points or conditions + in Bacula called Events. The currently defined Events are called: + + StartJob, EndJob, NewVolume + + Where StartJob is called before the RunBeforeJob, EndJob is called + after RunAfterJob, and NewVolume, is called before all other + "methods" of obtaining a new Volume name, when one is needed. + + The Python script of the same name as the Event name (but with a .py) + is called from the Scripts Directory (a directive defined in the + Director resource). Note, both the Filename, and the name of + the function in the file must correspond to the Event name. + + Once the Python script gets control, it can have access to Bacula + variables by doing: + + import bacula + + The script is called with one argument, typically called jcr. This + argument *must* be used to access each bacula function. The + format of the call is slightly different for reading Bacula + variable and for writing bacula variables. See below. + + Bacula variables can be read with: + + jcr.get("Variable-name") + + where jcr is the argument passed to the function, and Variable-name + is on of the following: + + JobId, Client, Pool, Storage, Catalog, MediaType, NumVols, DirName, + Level, Type, Job, JobName, JobStatus + + Bacula varibles can be set using Python keyword arguments: + + jcr.set(VolumeName="xyz") + + The two currently implemented writable "variables" are: + + VolumeName and JobReport + + It is possible to submit a Bacula run command with the following: + + jcr.run("run kernsave client=Matou storage=File") + + this function returns the JobId of the job that was started. If + there is an error, the return value is zero. + + Example: + +== File EndJob.py === +import bacula + +def EndJob(jcr): + jobid = jcr.get("JobId") + client = jcr.get("Client") + jcr.set(JobReport="EndJob output: JobId=%d Client=%s.\n" % (jobid, client)) + if (jobid < 5) : + startid = jcr.run("run kernsave") + print "Python started jobid=", startid + + return 1 +==== + +== File NewVolume.py === +import bacula -Release 1.35.0 08 July 2004: -- Apply Christopher Hull's const patch for PostgreSQL -- Add code to block.c to detect if block header is destroyed. -- Add debug code for memset checking for zeroing 1900-3000 bytes - which is what happened to the block headers. -- If block header is destroyed, read the next block. Probably - should return with new status similar to the SHORT block - return. -- Add more debug info to bls for bad blocks. -- More implementation of DCRs. -- Eliminate argument passing in SD by using dcr. -- More int->bool conversions. -- Add file:block to a number of read/write error messages. -- More int -> bool conversions. -- Modify the SD piece by piece to use DCRs everywhere. -- Cleanup some printout for query command. -- Fix typo in cats/mysql.c -- Work on cleaning up tape driver a bit (use bools, better calling - sequences). -- Attempt to fix multi-Volume disk backup. Needs to be tested. -- Add Regular expressions to FileSet options. -- Correct configure.in to use ${MAKE} for doing the dependencies. -- Make MySQL and PostgreSQL try for 30 seconds to connect before - giving up. -- Correct Gnome 1.4 Makefile to build without cats library. -- Correct a crash reported (with patch) by Jonathan Soong - when attempting to backup an ACL on a symlinked file. -- Fixed an off by one bug in the new resources pointer code. - res_head array was one too small. -- Added Errors to last_job list. This allows detecting jobs - that terminated in a warning. -- Implement setting the Win32 icon to yellow instead of red - when the job terminated OK but with warnings. -- Fix the Win32 makefile and VC project file. The links were - not including the Win32 dlls. -- Delete some old Win32 code that was turned off. -- Eliminate a few more Win32 compiler warnings. -- Reduce the output produced by NIS (Win32 install builder). -- Simplify some of the #ifdefing in compat.h -- Rewrite spooling error handling when I/O error occurs. It is - a bit tricky, requiring to truncate the file so that a despooling - will work correctly. Needs to be tested. -- Make better subroutines for setting up for a new job. -- Start putting all DB ids on #defines (going to 64 bits). -- Fix gnome-console Makefile.in to work again. -- All "level=Incremental/Decremental" to the estimate command. This - required some re-arrangement of subroutines at a fairly low level. -- Apply Piotr Jaworski's patch (patch-r-status.diff) to update the - catalog status when a backup job starts running. -- Add (char*) cast to readline call in console.c for old readlines. -- Copy Makefile.in from gnome2-console to gnome-console (to eliminate - need for cats library). -- Modify spooling code to handle write error (e.g. spooling disk full) - more gracefully. Previously despooling would fail. -- Reduce casting in smartall.c a bit and add counters for - bytes, max_bytes, buffers and max_buffers. -- Fixed reload algorithm to stack both job end callback and the - table id. -- Fixed the orphaned buffer after reload (job_end_push had to be - destroyed. -- Destroy cond var (jcr->term_wait) only if initialized. -- Sort the Scheduled Jobs list by start-time, priority. -- Implement resources on a pointer. -- Fix Gnome console crash on up/down arrow with no history. -- Finish first cut of SIGHUP code. To make really work need res - on a single pointer rather than in fixed memory. -- Fix a number of places in query.sql where multiple JobIds are - printed (due to JobMedia records). -- Add new query: List jobs on Volume given Volume name. -- Correct socket close on Win32 in bnet.c (in addition to compat.cpp). - Caused fd leak in Win32 for each connection. -- Remove vol labeled test in askdir update_volume_info so that non-labeled - Volume in catalog can be marked in error. -- Close socket in SD when connection rejected. Caused fd leaks. -- Initialize job_start_wait cond variable after every new_jcr() otherwise - NetBSD gets error in library when trying to delete it without being inited. -- Fix typo (9 instead of 0) return status in write_new_volume_label. -- Fix mount.c to call routine that correctly marks a volume in error. -- Move code to rewrite volume label to subroutine -- a bit cleaner. -- Finish implementation and testing of new restore tree code. -- Implement feedback while tree is loading. -- Eliminate printing INFO message in UpdateDB (cats) -- it generates - "false" error messages. -- Eliminate some GTK error messages when running the Gnome2 console. -- Begin restructuring tree.c for inclusion of the binary_insert() - routine. -- Apply Peter Eriksson's lib file order changes in linking for IRIX. -- Abort configure if Internal is selected as the database. -- Add testimonials to the Web page -- Add the bugs list to the Web page "lists". -- Clarify the English in SuSE and Slackware when SD not running. -- Applied another extern "C" patch from Peter Eriksson. -- Fixed a bunch of VC warning messages. -- Applied the patches sent by Andreas Jellinghaus: build Gnome and - wx-console in client-only build if configured; add ./configure option - to permit setting of sbin modes -- default is 0745 as before; remove - cats library from Gnome console build; remove old version from Gnome - About box. Thanks Andreas. -- Applied Peter Eriksson's const changes to the source code. Thanks Peter. -- Implemented a binary_insert() method for dlists -- intended to be used - in the restore tree routines. -- Turned on my bsscanf() code, which replaces sscanf() by my routines, which - are a subset of sscanf() used by Bacula, but which have known 32/64 bit - behavior rather than vendor dependent !@#$%*. +def NewVolume(jcr): + jobid = jcr.get("JobId") + print "JobId=", jobid + client = jcr.get("Client") + print "Client=" + client + numvol = jcr.get("NumVols"); + print "NumVols=", numvol + jcr.set(JobReport="New Volume set for Job.\n") + jcr.set(VolumeName="TestA-001") + return 1 +====