]> git.sur5r.net Git - bacula/bacula/blob - bacula/ReleaseNotes
c3cb43ee48c40d914fd412ef5f0e303df6f38309
[bacula/bacula] / bacula / ReleaseNotes
1
2           Release Notes for Bacula 1.37.12
3
4   Bacula code: Total files = 419 Total lines = 124,877 (*.h *.c *.in)
5
6 Note! The DB has been upgraded from version 8 to 9 and requres
7 a DB upgrade.
8
9 Major Changes:
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
17   SQLite2.
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
21   lower versions.
22 - Preliminary 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
30 New Directives:
31 - New Run directive in Job resource of DIR. It permits
32   cloning of jobs.  To clone a copy of the current job, use
33      Run = "job-name level=%l since=\"%s\""
34   Note, job-name is normally the same name as the job that
35   is running but there is no restriction on what you put. If you
36   want to start the job by hand and use job overrides such as       
37   storage=xxx, realize that the job will be started with the
38   default storage values not the overrides.  The level=%l guarantees
39   that the chosen level of the job is the same, and the since=... 
40   ensures that the job uses *exactly* the same time/date for incremental
41   and differential jobs. The since=... is ignored when level=Full.
42   A cloned job will not start additional clones, so it is not possible
43   to recurse.
44 - New Options keywords in a FileSet directive:
45   - WildDir xxx
46     Will do a wild card match against directories (files will not
47     be matched).
48   - WildFile xxx
49     Will do a wild card match against files (directories will not
50     be matched).
51   - RegexDir xxx
52     Will do a regular expression match against directories (files
53     will not be matched).
54   - RegexFile xxx
55     Will do a regular expression match against files( directories
56     will not be matched).
57   - IgnoreCase = yes | no
58     Will ignore case in wild card and regular expression matches.
59     This is handy for Windows where filename case is not significant.
60   - FsType = string
61     where string is a filesystem type: ext2, jfs, ntfs, proc,
62     reiserfs, xfs, usbdevfs, sysfs, smbfs, iso9660.  For ext3
63     systems, use ext2.  You may have multiple fstype directives
64     and thus permit multiple filesystem types.  If the type
65     specified on the fstype directive does not match the
66     filesystem for a particular directive, that directory will
67     not be backed up.  This directive can be used to prevent
68     backing up non-local filesystems.
69   - HFS Plus Support = yes | no 
70     If set, Mac OS X resource forks will be saved and restored.
71 - Label Type = ANSI | IBM | Bacula   
72   Implemented in Director Pool resource and in SD Device resource.
73   If it is specified in the SD Device resource, it will take
74   precedence over the value passed from the Director to the SD.
75   IBM is not yet implemented.
76 - Check Labels = yes | no
77   Implemented in the SD Device resource. If you intend to read
78   ANSI or IBM labels, this *must* be set. Even if the volume
79   is not ANSI labeled, you can set this to yes, and Bacula will
80   check the label type.
81 - Scripts Directory = <directory> name.  Defines the directory from 
82   which Bacula scripts will be called for events. In fact, Bacula
83   appends this name to the standard Python list of search directories,
84   so the script could also be in any of the Python system directories.
85 - In FileSet, you can exclude backing up of hardlinks (if you have
86   a lot, it can be very expensive), by using:
87     HardLinks = no
88   in the Options section. Patch supplied by David R Bosso. Thanks.
89 - MaximumPartSize = bytes (SD, Device resource)
90   Defines the maximum part size.
91 - Requires Mount = Yes/No (SD, Device resource)
92   Defines if the device require to be mounted to be read, and if it
93   must be written in a special way. If it set, the following directives 
94   must be defined in the same Device resource:
95   + Mount Point = directory
96     Directory where the device must be mounted. 
97   + Mount Command = name-string
98     Command that must be executed to mount the device. Before the command
99     is executed, %a is replaced with the Archive Device, and %m with the 
100     Mount Point.
101   + Unmount Command = name-string
102     Command that must be executed to unmount the device. Before the 
103     command is executed, %a is replaced with the Archive Device, and 
104     %m with the Mount Point.
105   + Write Part Command = name-string
106     Command that must be executed to write a part to the device. Before
107     the command is executed, %a is replaced with the Archive Device, %m 
108     with the Mount Point, %n with the current part number (0-based), 
109     and %v with the current part filename.
110   + Free Space Command = name-string
111     Command that must be executed to check how much free space is left 
112     on the device. Before the command is executed, %a is replaced with 
113     the Archive Device, %m with the Mount Point, %n with the current part
114     number (0-based), and %v with the current part filename.
115 - Write Part After Job = Yes/No (DIR, Job Resource, and Schedule Resource)
116   If this directive is set to yes (default no), a new part file will be
117   created after the job is finished.
118
119 New Commands:
120 - "python restart" restarts the Python interpreter. Rather brutal, make
121    sure no Python scripts are running. This permits you to change
122    a Python script and get Bacula to use the new script.
123
124 Items to note!!!
125 - You must add --with-python=[DIR] to the configure command line
126   if you want Python support.  Python 2.2 and 2.3 should be automatically
127   detected if in the standard place.
128 - With Python 2.2 version, the link of the Director gets a few linker
129   warnings due to the fact that Python pulls in some old non-secure
130   libraries.
131 - With Python 2.3, there are a few compiler warnings.
132 - You must either create a new catalog database or upgrade your
133   old database (upgrade scripts not yet tested).
134
135 Other Items:
136 - 2 new scripts, dvd-writepart and dvd-freespace, in the scripts directory,
137   which are designed to be used as parameters to Write Part Command and
138   Free Space Command. They need the dvd+rw-tools to be installed
139   (http://fy.chalmers.se/~appro/linux/DVD+RW/).
140 - Part files support: File volumes can now be splitted in multiple
141   files, called "parts".
142 - Python scripting support:
143   A Python script will be called at particular points or conditions
144   in Bacula called Events. The currently defined Events are called:
145
146   StartJob, EndJob, NewVolume
147
148   Where StartJob is called before the RunBeforeJob, EndJob is called 
149   after RunAfterJob, and NewVolume, is called before all other 
150   "methods" of obtaining a new Volume name, when one is needed.
151
152   The Python script of the same name as the Event name (but with a .py) 
153   is called from the Scripts Directory (a directive defined in the
154   Director resource).  Note, both the Filename, and the name of
155   the function in the file must correspond to the Event name.
156
157   Once the Python script gets control, it can have access to Bacula
158   variables by doing:
159
160      import bacula
161
162   The script is called with one argument, typically called jcr. This
163   argument *must* be used to access each bacula function. The
164   format of the call is slightly different for reading Bacula
165   variable and for writing bacula variables. See below.
166
167   Bacula variables can be read with:
168
169      jcr.get("Variable-name")
170
171     where jcr is the argument passed to the function, and Variable-name
172     is on of the following:
173
174      JobId, Client, Pool, Storage, Catalog, MediaType, NumVols, DirName,
175        Level, Type, Job, JobName, JobStatus
176
177    Bacula varibles can be set using Python keyword arguments:
178
179       jcr.set(VolumeName="xyz")
180
181     The two currently implemented writable "variables" are:
182
183     VolumeName and JobReport
184
185    It is possible to submit a Bacula run command with the following:
186
187      jcr.run("run kernsave client=Matou storage=File")
188
189    this function returns the JobId of the job that was started. If
190    there is an error, the return value is zero.
191
192    Example:
193
194 == File EndJob.py ===
195 import bacula
196
197 def EndJob(jcr):
198     jobid = jcr.get("JobId")
199     client = jcr.get("Client") 
200     jcr.set(JobReport="EndJob output: JobId=%d Client=%s.\n" % (jobid, client))
201     if (jobid < 5) :
202        startid = jcr.run("run kernsave")
203        print "Python started jobid=", startid
204
205     return 1
206 ====
207
208 == File NewVolume.py ===
209 import bacula
210
211 def NewVolume(jcr):
212     jobid = jcr.get("JobId")
213     print "JobId=", jobid
214     client = jcr.get("Client") 
215     print "Client=" + client
216     numvol = jcr.get("NumVols");
217     print "NumVols=", numvol
218     jcr.set(JobReport="New Volume set for Job.\n") 
219     jcr.set(VolumeName="TestA-001")
220     return 1
221 ====