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