2 Release Notes for Bacula 1.37.12
4 Bacula code: Total files = 419 Total lines = 124,877 (*.h *.c *.in)
6 Note! The DB has been upgraded from version 8 to 9 and requres
10 - The Python interface has been updated to be object oriented.
11 - This version has a new DIR <--> SD protocol. Both must be
12 upgraded at the same time.
13 - This version has a new database format that is not compatible
14 with previous databases. The upgrade scripts should work, but
15 they are not yet tested.
16 - SQLite3 support, but it seems to run at 1/2 to 1/4 the speed of
18 - First cut at ANSI labels.
19 - New communications protocol between DIR and SD to reserve
20 drives. The DIR and SD are no longer compatible with 1.36 or
22 - Python Event support has been added. See below for
23 configuration and details.
24 - DVD writing support, using parts, and a lot of new directives in
25 the Device resource of the Storage configuration file.
26 - Seven new options keywords in a FileSet resource:
27 ignorecase, fstype, hfsplussupport, wilddir, wildfile, regexdir,
28 and regexfile. See below for details.
29 - Restore of all files for a Job or set of jobs even if the file
30 records have been removed from the catalog.
31 - Restore of a directory (non-recursive, i.e. only one level).
32 - Support for Unicode filenames on Win32.
33 - Support for TLS (ssl) between all the daemon connections.
36 - New Run directive in Job resource of DIR. It permits
37 cloning of jobs. To clone a copy of the current job, use
38 Run = "job-name level=%l since=\"%s\""
39 Note, job-name is normally the same name as the job that
40 is running but there is no restriction on what you put. If you
41 want to start the job by hand and use job overrides such as
42 storage=xxx, realize that the job will be started with the
43 default storage values not the overrides. The level=%l guarantees
44 that the chosen level of the job is the same, and the since=...
45 ensures that the job uses *exactly* the same time/date for incremental
46 and differential jobs. The since=... is ignored when level=Full.
47 A cloned job will not start additional clones, so it is not possible
49 - New Options keywords in a FileSet directive:
51 Will do a wild card match against directories (files will not
54 Will do a wild card match against files (directories will not
57 Will do a regular expression match against directories (files
60 Will do a regular expression match against files( directories
62 - IgnoreCase = yes | no
63 Will ignore case in wild card and regular expression matches.
64 This is handy for Windows where filename case is not significant.
66 where string is a filesystem type: ext2, jfs, ntfs, proc,
67 reiserfs, xfs, usbdevfs, sysfs, smbfs, iso9660. For ext3
68 systems, use ext2. You may have multiple fstype directives
69 and thus permit multiple filesystem types. If the type
70 specified on the fstype directive does not match the
71 filesystem for a particular directive, that directory will
72 not be backed up. This directive can be used to prevent
73 backing up non-local filesystems.
74 - HFS Plus Support = yes | no
75 If set, Mac OS X resource forks will be saved and restored.
76 - Label Type = ANSI | IBM | Bacula
77 Implemented in Director Pool resource and in SD Device resource.
78 If it is specified in the SD Device resource, it will take
79 precedence over the value passed from the Director to the SD.
80 IBM is not yet implemented.
81 - Check Labels = yes | no
82 Implemented in the SD Device resource. If you intend to read
83 ANSI or IBM labels, this *must* be set. Even if the volume
84 is not ANSI labeled, you can set this to yes, and Bacula will
86 - Scripts Directory = <directory> name. Defines the directory from
87 which Bacula scripts will be called for events. In fact, Bacula
88 appends this name to the standard Python list of search directories,
89 so the script could also be in any of the Python system directories.
90 - In FileSet, you can exclude backing up of hardlinks (if you have
91 a lot, it can be very expensive), by using:
93 in the Options section. Patch supplied by David R Bosso. Thanks.
94 - MaximumPartSize = bytes (SD, Device resource)
95 Defines the maximum part size.
96 - Requires Mount = Yes/No (SD, Device resource)
97 Defines if the device require to be mounted to be read, and if it
98 must be written in a special way. If it set, the following directives
99 must be defined in the same Device resource:
100 + Mount Point = directory
101 Directory where the device must be mounted.
102 + Mount Command = name-string
103 Command that must be executed to mount the device. Before the command
104 is executed, %a is replaced with the Archive Device, and %m with the
106 + Unmount Command = name-string
107 Command that must be executed to unmount the device. Before the
108 command is executed, %a is replaced with the Archive Device, and
109 %m with the Mount Point.
110 + Write Part Command = name-string
111 Command that must be executed to write a part to the device. Before
112 the command is executed, %a is replaced with the Archive Device, %m
113 with the Mount Point, %n with the current part number (0-based),
114 and %v with the current part filename.
115 + Free Space Command = name-string
116 Command that must be executed to check how much free space is left
117 on the device. Before the command is executed, %a is replaced with
118 the Archive Device, %m with the Mount Point, %n with the current part
119 number (0-based), and %v with the current part filename.
120 - Write Part After Job = Yes/No (DIR, Job Resource, and Schedule Resource)
121 If this directive is set to yes (default no), a new part file will be
122 created after the job is finished.
125 - "python restart" restarts the Python interpreter. Rather brutal, make
126 sure no Python scripts are running. This permits you to change
127 a Python script and get Bacula to use the new script.
130 - You must add --with-python=[DIR] to the configure command line
131 if you want Python support. Python 2.2 and 2.3 should be automatically
132 detected if in the standard place.
133 - With Python 2.2 version, the link of the Director gets a few linker
134 warnings due to the fact that Python pulls in some old non-secure
136 - With Python 2.3, there are a few compiler warnings.
137 - You must either create a new catalog database or upgrade your
138 old database (upgrade scripts not yet tested).
141 - 2 new scripts, dvd-writepart and dvd-freespace, in the scripts directory,
142 which are designed to be used as parameters to Write Part Command and
143 Free Space Command. They need the dvd+rw-tools to be installed
144 (http://fy.chalmers.se/~appro/linux/DVD+RW/).
145 - Part files support: File volumes can now be splitted in multiple
146 files, called "parts".
148 NOTE THE FOLLOWING IS NOW OUT OF DATE!!!!
149 - Python scripting support:
150 A Python script will be called at particular points or conditions
151 in Bacula called Events. The currently defined Events are called:
153 StartJob, EndJob, NewVolume
155 Where StartJob is called before the RunBeforeJob, EndJob is called
156 after RunAfterJob, and NewVolume, is called before all other
157 "methods" of obtaining a new Volume name, when one is needed.
159 The Python script of the same name as the Event name (but with a .py)
160 is called from the Scripts Directory (a directive defined in the
161 Director resource). Note, both the Filename, and the name of
162 the function in the file must correspond to the Event name.
164 Once the Python script gets control, it can have access to Bacula
169 The script is called with one argument, typically called jcr. This
170 argument *must* be used to access each bacula function. The
171 format of the call is slightly different for reading Bacula
172 variable and for writing bacula variables. See below.
174 Bacula variables can be read with:
176 jcr.get("Variable-name")
178 where jcr is the argument passed to the function, and Variable-name
179 is on of the following:
181 JobId, Client, Pool, Storage, Catalog, MediaType, NumVols, DirName,
182 Level, Type, Job, JobName, JobStatus
184 Bacula varibles can be set using Python keyword arguments:
186 jcr.set(VolumeName="xyz")
188 The two currently implemented writable "variables" are:
190 VolumeName and JobReport
192 It is possible to submit a Bacula run command with the following:
194 jcr.run("run kernsave client=Matou storage=File")
196 this function returns the JobId of the job that was started. If
197 there is an error, the return value is zero.
201 == File EndJob.py ===
205 jobid = jcr.get("JobId")
206 client = jcr.get("Client")
207 jcr.set(JobReport="EndJob output: JobId=%d Client=%s.\n" % (jobid, client))
209 startid = jcr.run("run kernsave")
210 print "Python started jobid=", startid
215 == File NewVolume.py ===
219 jobid = jcr.get("JobId")
220 print "JobId=", jobid
221 client = jcr.get("Client")
222 print "Client=" + client
223 numvol = jcr.get("NumVols");
224 print "NumVols=", numvol
225 jcr.set(JobReport="New Volume set for Job.\n")
226 jcr.set(VolumeName="TestA-001")