]> git.sur5r.net Git - bacula/bacula/blob - bacula/ReleaseNotes
Add more info in dev error msg + codes
[bacula/bacula] / bacula / ReleaseNotes
1
2           Release Notes for Bacula 1.37.3
3
4   Bacula code: Total files = 411 Total lines = 121,855 (*.h *.c *.in)
5
6
7 Major Changes:
8 - This version has a new database format that is not compatible
9   with previous databases. There are NO upgrade scripts yet.
10 - Due to the massive changes made during the last two weeks, 
11   version 1.37.3 should be considered unstable.  It does, however,
12   pass the regression tests.
13 - SQLite3 support.
14 - First cut at ANSI labels.
15 - New communications protocol between DIR and SD to reserve 
16   drives.
17
18
19 - Preliminary Python Event support has been added. See below for
20   configuration.
21   A Python script will be called at particular points or conditions
22   in Bacula called Events. The currently defined Events are called:
23
24   StartJob, EndJob, NewVolume
25
26   Where StartJob is called before the RunBeforeJob, EndJob is called 
27   after RunAfterJob, and NewVolume, is called before all other 
28   "methods" of obtaining a new Volume name, when one is needed.
29
30   The Python script of the same name as the Event name (but with a .py) 
31   is called from the Scripts Directory (a directive defined in the
32   Director resource).  Note, both the Filename, and the name of
33   the function in the file must correspond to the Event name.
34
35   Once the Python script gets control, it can have access to Bacula
36   variables by doing:
37
38      import bacula
39
40   The script is called with one argument, typically called j. This
41   argument *must* be passed unchanged to each bacula function. The
42   format of the call is slightly different for reading Bacula
43   variable and for writing bacula variables. See below.
44
45   Bacula variables can be read with:
46
47      bacula.get(j, "Variable-name")
48
49     where j is the argument passed to the function, and Variable-name
50     is on of the following:
51
52      JobId, Client, Pool, Storage, Catalog, MediaType, NumVols, DirName,
53        Level, Type, Job, JobName, JobStatus
54
55    Bacula varibles can be set using Python keyword arguments:
56
57       bacula.set(jcr=j, VolumeName="xyz")
58
59     The two currently implemented writable "variables" are:
60
61     VolumeName and JobReport
62
63    It is possible to submit a Bacula run command with the following:
64
65      bacula.run(j, "run kernsave client=Matou storage=File")
66
67    this function returns the JobId of the job that was started. If
68    there is an error, the return value is zero.
69
70    Example:
71
72 == File EndJob.py ===
73 import bacula
74
75 def EndJob(j):
76     jobid = bacula.get(j, "JobId")
77     client = bacula.get(j, "Client") 
78     bacula.set(jcr=j, JobReport="EndJob output: JobId=%d Client=%s.\n" % (jobid, client))
79     if (jobid < 5) :
80        startid = bacula.run(j, "run kernsave")
81        print "Python started jobid=", startid
82
83     return 1
84 ====
85
86 == File NewVolume.py ===
87 import bacula
88
89 def NewVolume(j):
90     jobid = bacula.get(j, "JobId")
91     print "JobId=", jobid
92     client = bacula.get(j, "Client") 
93     print "Client=" + client
94     numvol = bacula.get(j, "NumVols");
95     print "NumVols=", numvol
96     bacula.set(jcr=j, JobReport="New Volume set for Job.\n") 
97     bacula.set(jcr=j, VolumeName="TestA-001")
98     return 1
99 ====
100 - Part files support: File volumes can now be splitted in multiple
101   files, called "parts".
102 - DVD writing support, using parts, and a lot of new directives in
103   the Device resource of the Storage configuration file.
104
105 New Directives:
106 - Scripts Directory = <directory> name.  Defines the directory from 
107   which Bacula scripts will be called for events. In fact, Bacula
108   appends this name to the standard Python list of search directories,
109   so the script could also be in any of the Python system directories.
110 - In FileSet, you can exclude backing up of hardlinks (if you have
111   a lot, it can be very expensive), by using:
112     HardLinks = no
113   in the Options section. Patch supplied by David R Bosso. Thanks.
114 - MaximumPartSize = bytes (SD, Device resource)
115   Defines the maximum part size.
116 - Requires Mount = Yes/No (SD, Device resource)
117   Defines if the device require to be mounted to be read, and if it
118   must be written in a special way. If it set, the following directives 
119   must be defined in the same Device resource:
120   + Mount Point = directory
121     Directory where the device must be mounted. 
122   + Mount Command = name-string
123     Command that must be executed to mount the device. Before the command
124     is executed, %a is replaced with the Archive Device, and %m with the 
125     Mount Point.
126   + Unmount Command = name-string
127     Command that must be executed to unmount the device. Before the 
128     command is executed, %a is replaced with the Archive Device, and 
129     %m with the Mount Point.
130   + Write Part Command = name-string
131     Command that must be executed to write a part to the device. Before
132     the command is executed, %a is replaced with the Archive Device, %m 
133     with the Mount Point, %n with the current part number (0-based), 
134     and %v with the current part filename.
135   + Free Space Command = name-string
136     Command that must be executed to check how much free space is left 
137     on the device. Before the command is executed, %a is replaced with 
138     the Archive Device, %m with the Mount Point, %n with the current part
139     number (0-based), and %v with the current part filename.
140 - Write Part After Job = Yes/No (DIR, Job Resource, and Schedule Resource)
141   If this directive is set to yes (default no), a new part file will be
142   created after the job is finished.
143
144 New Commands:
145 - "python restart" restarts the Python interpreter. Rather brutal, make
146    sure no Python scripts are running. This permits you to change
147    a Python script and get Bacula to use the new script.
148
149 Items to note!!!
150 - You must add --with-python=[DIR] to the configure command line
151   if you want Python support.  Python 2.2 and 2.3 should be automatically
152   detected if in the standard place.
153 - With Python 2.2 version, the link of the Director gets a few linker
154   warnings due to the fact that Python pulls in some old non-secure
155   libraries.
156 - With Python 2.3, there are a few compiler warnings.
157
158 Other Items:
159 - 2 new scripts, dvd-writepart and dvd-freespace, in the scripts directory,
160   which are designed to be used as parameters to Write Part Command and
161   Free Space Command. They need the dvd+rw-tools to be installed
162   (http://fy.chalmers.se/~appro/linux/DVD+RW/).