4 Documentation to do: (a little bit at a time)
5 - Document running a test version.
6 - Make sure restore options are documented
7 - Document query file format.
9 Testing to do: (painful)
10 - that restore options work in FD.
11 - that mod of restore options works.
12 - that console command line options work
13 - blocksize recognition code.
16 - Think about how to make Bacula work better with File archives.
17 - Start working on Base jobs.
18 - Implement FileOptions (see end of this document)
19 - Test a second language e.g. french.
20 - Replace popen() and pclose() -- fail safe and timeout, no SIG dep.
21 - Enhance schedule to have 1stSat, ...
22 - Ensure that restore of differential jobs works (check SQL).
23 - Make sure the MaxVolFiles is fully implemented in SD
24 - Make Job err if WriteBootstrap fails.
25 - Flush all the daemon messages at the end of every job.
26 - Check if both CatalogFiles and UseCatalog are set to SD.
27 - Check if we can bump Bacula FD priorty in Win2000
28 - Make bcopy read through bad tape records.
29 - Need return status on read_cb() from read_records(). Need multiple
30 records -- one per Job, maybe a JCR or some other structure with
32 - Continue improving the restore process (handling
33 of tapes, efficiency improvements e.g. use FSF to
34 position the tape, ...)
35 - Work more on how to to a Bacula restore beginning with
36 just a Bacula tape and a boot floppy (bare metal recovery).
37 - Try bare metal Windows restore
38 - Fix read_record to handle multiple sessions.
39 - Program files (i.e. execute a program to read/write files).
40 Pass read date of last backup, size of file last time.
41 - Put system type returned by FD into catalog.
42 - Add code to fast seek to proper place on tape/file
43 when doing Restore. If it doesn't work, try linear
45 - Add code to reject whole blocks if not wanted on restore.
46 - Possibly add email to Watchdog if drive is unmounted too
47 long and a job is waiting on the drive.
48 - Strip trailing slashes from Include directory names in the FD.
49 - Use read_record.c in SD code.
50 - Why don't we get an error message from Win32 FD when bootstrap
51 file cannot be created for restore command?
52 - When Marking a file in Restore that is a hard link, also
53 mark the link so that the data will be reloaded.
54 - Restore program that errors in SD due to no tape reports
55 OK incorrectly in output.
56 - Make BSR accept count (total files to be restored).
57 - Make BSR return next_block when it knows record is not
58 in block, done when count is reached, and possibly other
59 optimizations. I.e. add a state word.
61 - Running multiple simultaneous jobs has a problem when one Job
62 must label the volume -- the others apparently do not wait.
64 > 13-Nov-2002 02:06 dump01-dir: Start Backup JobId 20, Job=save-rho.2002-11-13_02.06.00
65 > 13-Nov-2002 02:06 dump01-dir: Start Backup JobId 21, Job=save-beta.2002-11-13_02.06.01
66 > 13-Nov-2002 02:06 dump01-dir: Start Backup JobId 22, Job=save-dump01.2002-11-13_02.06.02
67 > 13-Nov-2002 02:06 dump01-sd: Created Volume label File0013 on device /dump7/bacula.
68 > 13-Nov-2002 02:06 dump01-sd: Wrote label to prelabeled Volume File0013 on device /dump7/bacula
69 > 13-Nov-2002 02:06 dump01-sd: save-beta.2002-11-13_02.06.01 Fatal error: Device /dump7/bacula is
70 > busy writing with another Volume.
71 > 13-Nov-2002 02:06 dump01-sd: save-dump01.2002-11-13_02.06.02 Fatal error: Device /dump7/bacula is
72 > busy writing with another Volume.
73 > 13-Nov-2002 02:06 beta-fd: save-beta.2002-11-13_02.06.01 Error: bnet.c:292 Write error sending to
74 > Storage daemon:dump01:9103: ERR=Broken pipe
75 > 13-Nov-2002 02:06 dump01-fd: save-dump01.2002-11-13_02.06.02 Error: bnet.c:319 Write error sending
76 > to Storage daemon:dump01:9103: ERR=Broken pipe
77 > 13-Nov-2002 02:08 dump01-dir: 13-Nov-2002 02:08
80 - Figure out how compress everything except .gz,... files.
81 - Make bcopy copy with a single tape drive.
82 - Make sure catalog doesn't keep growing.
83 - Permit changing ownership during restore.
84 - After unmount, if restore job started, ask to mount.
85 - Fix db_get_fileset in cats/sql_get.c for multiple records.
86 - Fix start/end blocks for File devices
87 - Add new code to scheduler.c and run_conf.c
88 schedule options (1-sat, 2-sat, ...).
89 - Fix catalog filename truncation in sql_get and sql_create. Use
90 only a single filename split routine.
91 - Add command to reset VolFiles to a larger value (don't allow
92 a smaller number or print big warning).
93 - Make Restore report an error if FD or SD term codes are not OK.
94 - Convert all %x substitution variables, which are hard to remember
95 and read to %(variable-name). Idea from TMDA.
96 - Add JobLevel in FD status (but make sure it is defined).
97 - Make Pool resource handle Counter resources.
98 - Remove NextId for SQLite. Optimize.
99 - Fix gethostbyname() to use gethostbyname_r()
100 - Implement ./configure --with-client-only
101 - Strip trailing / from Include
102 - Move all SQL statements into a single location.
103 - Cleanup db_update_media and db_update_pool
104 - Add UA rc and history files.
105 - put termcap (used by console) in ./configure and
106 allow -with-termcap-dir.
107 - Enhance time and size scanning routines.
108 - Fix Autoprune for Volumes to respect need for full save.
109 - DateWritten field on tape may be wrong.
110 - Fix Win32 config file definition name on /install
111 - No READLINE_SRC if found in alternate directory.
112 - Add Client FS/OS id (Linux, Win95/98, ...).
116 Bacula Projects Roadmap
118 last update 27 November 2002
120 Item 1: Multiple simultaneous Jobs. (done)
123 What: Permit multiple simultaneous jobs in Bacula.
125 Why: An enterprise level solution needs to go fast without the
126 need for the system administrator to carefully tweak
127 timing. Based on the benchmarks, during a full
128 backup, NetWorker typically hit 10 times the bandwidth to
129 the tape compared to Bacula--largely. This is probably due to
130 running parallel jobs and multi-threaded filling of buffers
131 and writing them to tape. This should also make things work
132 better when you have a mix of fast and slow machines backing
135 Notes: Bacula was designed to run multiple simultaneous jobs. Thus
136 implementing this is a matter of some small cleanups and
140 Item 2: Make the Storage daemon use intermediate file storage to buffer data.
141 Deferred -- not necessary yet.
143 What: If data is coming into the SD too fast, buffer it to
144 disk if the user has configured this option.
146 Why: This would be nice, especially if it more or less falls out
147 when implementing (1) above. If not, it probably should not
148 be given a high priority because fundamentally the backup time
149 is limited by the tape bandwidth. Even though you may finish a
150 client job quicker by spilling to disk, you still have to
151 eventually get it onto tape. If intermediate disk buffering
152 allows us to improve write bandwidth to tape, it may make
155 Notes: Whether or not this is implemented will depend upon performance
156 testing after item 1 is implemented.
159 Item 3: Write the bscan program -- also write a bcopy program.
162 What: Write a program that reads a Bacula tape and puts all the
163 appropriate data into the catalog. This allows recovery
164 from a tape that is no longer in the database, or it allows
165 re-creation of a database if lost.
167 Why: This is a fundamental robustness and disaster recovery tool
168 which will increase the comfort level of a sysadmin
169 considering adopting Bacula.
171 Notes: A skeleton of this program already exists, but much work
172 needs to be done. Implementing this will also make apparent
173 any deficiencies in the current Bacula tape format.
176 Item 4: Implement Base jobs.
178 What: A base job is sort of like a Full save except that you
179 will want the FileSet to contain only files that are unlikely
180 to change in the future (i.e. a snapshot of most of your
181 system after installing it). After the base job has been run,
182 when you are doing a Full save, you can specify to exclude
183 all files saved by the base job that have not been modified.
185 Why: This is something none of the competition does, as far as we know
186 (except BackupPC, which is a Perl program that saves to disk
187 only). It is big win for the user, it makes Bacula stand out
188 as offering a unique optimization that immediately saves time
191 Notes: Big savings in tape usage. Will require more resources because
192 the e. DIR must send FD a list of files/attribs, and the FD must
193 search the list and compare it for each file to be saved.
196 Item 5: Implement Label templates
198 What: This is a mechanism whereby Bacula can automatically create
199 a tape label for new tapes according to a detailed specification
200 provided by the user.
202 Why: It is a major convenience item for folks who use automated label
205 Notes: Bacula already has a working form of automatic tape label
206 creation, but it is very crude. The design for the complete
207 tape labeling project is already documented in the manual.
210 Item 6: Write a regression script.
213 What: This is an automatic script that runs and tests as many features
214 of Bacula as possible. The output is compared to previous
215 versions of Bacula and any differences are reported.
217 Why: This is an enormous help in preventing introduction of new
218 errors in parts of the program that already work correctly.
220 Notes: This probably should be ranked higher, it's something the typical
221 user doesn't see. Depending on how it's implemented, it may
222 make sense to defer it until the archival tape format and
223 user interface mature.
226 Item 7: GUI for interactive restore
227 Item 8: GUI for interactive backup
229 What: The current interactive restore is implemented with a tty
230 interface. It would be much nicer to be able to "see" the
231 list of files backed up in typical GUI tree format.
232 The same mechanism could also be used for creating
233 ad-hoc backup FileSets (item 8).
235 Why: Ease of use -- especially for the end user.
237 Notes: Rather than implementing in Gtk, we probably should go directly
238 for a Browser implementation, even if doing so meant the
239 capability wouldn't be available until much later. Not only
240 is there the question of Windows sites, most
241 Solaris/HP/IRIX, etc, shops can't currently run Gtk programs
242 without installing lots of stuff admins are very wary about.
243 Real sysadmins will always use the command line anyway, and
244 the user who's doing an interactive restore or backup of his
245 own files will in most cases be on a Windows machine running
249 Item 9: Add SSL to daemon communications.
251 What: This provides for secure communications between the daemons.
253 Why: This would allow doing backup across the Internet without
254 privacy concerns (or with much less concern).
256 Notes: The vast majority of near term potential users will be backing up
257 a single site over a LAN and, correctly or not, they probably
258 won't be concerned with security, at least not enough to go to
259 the trouble to set up keys, etc. to screw things down. We suspect
260 that many users genuinely interested in multi-site backup
261 already run some form of VPN software in their internetwork
262 connections, and are willing to delegate security to that layer.
265 Item 10: Define definitive tape format.
268 What: Define that definitive tape format that will not change
269 for the next millennium.
271 Why: Stability, security.
273 Notes: See notes for item 11 below.
276 Item 11: New daemon communication protocol.
278 What: The current daemon to daemon protocol is basically an ASCII
279 printf() and sending the buffer. On the receiving end, the
280 buffer is sscanf()ed to unpack it. The new scheme would
281 be a binary format that allows quick packing and unpacking
282 of any data type with named fields.
284 Why: Using binary packing would be faster. Named fields will permit
285 error checking to ensure that what is sent is what the
286 receiver really wants.
288 Notes: These are internal improvements in the interest of the
289 long-term stability and evolution of the program. On the one
290 hand, the sooner they're done, the less code we have to rip
291 up when the time comes to install them. On the other hand, they
292 don't bring an immediately perceptible benefit to potential
293 users. Item 10 and possibly item 11 should be deferred until Bacula
294 is well established with a growing user community more or
295 less happy with the feature set. At that time, it will make a
296 good "next generation" upgrade in the interest of data
301 I haven't put these in any particular order.
304 - Compare tape to Client files (attributes, or attributes and data)
305 - Restore options (overwrite, overwrite if older,
306 overwrite if newer, never overwrite, ...)
307 - Restore to a particular time -- e.g. before date, after date.
308 - Make all database Ids 64 bit.
309 - Write an applet for Linux.
310 - Add estimate to Console commands
311 - Find solution to blank filename (i.e. path only) problem.
312 - Implement new daemon communications protocol.
315 - Remove PoolId from Job table, it exists in Media.
316 - Allow console commands to detach or run in background.
317 - Fix status delay on storage daemon during rewind.
318 - Add SD message variables to control operator wait time
319 - Maximum Operator Wait
320 - Minimum Message Interval
321 - Maximum Message Interval
322 - Send Operator message when cannot read tape label.
323 - Think about how to handle I/O error on MTEOM.
324 - Verify level=Volume (scan only), level=Data (compare of data to file).
325 Verify level=Catalog, level=InitCatalog
327 - Add keyword search to show command in Console.
328 - Fix Win2000 error with no messages during startup.
329 - Events : tape has more than xxx bytes.
330 - Write general list maintenance subroutines.
331 - Restrict characters permitted in a Resource name.
332 - Complete code in Bacula Resources -- this will permit
333 reading a new config file at any time.
334 - Handle ctl-c in Console
335 - Implement LabelTemplate (at least first cut).
336 - Implement script driven addition of File daemon to config files.
338 - see setgroup and user for Bacula p4-5 of stunnel.c
339 - Implement new serialize subroutines
340 send(socket, "string", &Vol, "uint32", &i, NULL)
341 - On I/O error, write EOF, then try to write again ????
342 - Audit all UA commands to ensure that we always prompt where possible.
343 - If ./btape is called without /dev, assume argument is a Storage resource name.
344 - Put memory utilization in Status output of each daemon
345 if full status requested or if some level of debug on.
346 - Make database type selectable by .conf files i.e. at runtime
347 - gethostbyname failure in bnet_connect() continues
348 generating errors -- should stop.
349 - Add HOST to Volume label.
350 - Set flag for uname -a. Add to Volume label.
351 - Implement throttled work queue.
352 - Check for EOT at ENOSPC or EIO or ENXIO (unix Pc)
353 - Allow multiple Storage specifications (or multiple names on
354 a single Storage specification) in the Job record. Thus a job
355 can be backed up to a number of storage devices.
356 - Implement full MediaLabel code.
357 - Implement dump label to UA
358 - Copy volume using single drive.
359 - Concept of VolumeSet during restore which is a list
360 of Volume names needed.
361 - Restore files modified after date
362 - Restore file modified before date
363 - Emergency restore info:
365 - Backup working directory
367 - Restore -- do nothing but show what would happen
368 - SET LD_RUN_PATH=$HOME/mysql/lib/mysql
369 - Implement Restore FileSet=
370 - Create a protocol.h and protocol.c where all protocol messages
372 - If SD cannot open a drive, make it periodically retry.
373 - Put Bacula version somewhere in Job stream, probably Start Session
375 - Remove duplicate fields from jcr (e.g. jcr.level and jcr.jr.Level, ...).
376 - Timout a job or terminate if link goes down, or reopen link and query.
377 - Fill all fields in Vol/Job Header -- ensure that everything
378 needed is written to tape. Think about restore to Catalog
379 from tape. Client record needs improving.
380 - Find general solution for sscanf size problems (as well
381 as sprintf. Do at run time?
382 - Concept of precious tapes (cannot be reused).
384 - Restore should get Device and Pool information from
385 job record rather than from config.
386 - Autolabel should be specified by DR instead of SD.
387 - Find out how to get the system tape block limits, e.g.:
388 Apr 22 21:22:10 polymatou kernel: st1: Block limits 1 - 245760 bytes.
389 Apr 22 21:22:10 polymatou kernel: st0: Block limits 2 - 16777214 bytes.
392 - AutoScan (check checksum of tape)
393 - Format command = "format /dev/nst0"
397 - Seek resolution (usually corresponds to buffer size)
398 - EODErrorCode=ENOSPC or code
399 - Partial Read error code
400 - Partial write error code
401 - Nonformatted read error
402 - Nonformatted write error
403 - WriteProtected error
407 - IgnoreCloseErrors=yes
417 - FD sends unsaved file list to Director at end of job.
418 - Write a Storage daemon that uses pipes and
419 standard Unix programs to write to the tape.
421 - Need something that monitors the JCR queue and
422 times out jobs by asking the deamons where they are.
424 - Enhance Jmsg code to permit buffering and saving to disk.
425 - device driver = "xxxx" for drives.
426 - restart: paranoid: read label fsf to
427 eom read append block, and go
428 super-paranoid: read label, read all files
429 in between, read append block, and go
430 verify: backspace, read append block, and go
431 permissive: same as above but frees drive
432 if tape is not valid.
434 - Ensure that /dev/null works
435 - File daemon should build list of files skipped, and then
436 at end of save retry and report any errors.
437 - Need report class for messages. Perhaps
438 report resource where report=group of messages
439 - enhance scan_attrib and rename scan_jobtype, and
440 fill in code for "since" option
441 - Need to save contents of FileSet to tape?
442 - Director needs a time after which the report status is sent
443 anyway -- or better yet, a retry time for the job.
444 Don't reschedule a job if previous incarnation is still running.
445 - Figure out how to save the catalog (possibly a special FileSet).
446 - Figure out how to restore the catalog.
447 - Some way to automatically backup everything is needed????
448 - Need a structure for pending actions:
450 - termination status (part of buffered msgs?)
451 - Concept of grouping Storage devices and job can use
452 any of a number of devices
454 Read, Write, Clean, Delete
455 - Login to Bacula; Bacula users with different permissions:
456 owner, group, user, quotas
457 - Store info on each file system type (probably in the job header on tape.
458 This could be the output of df; or perhaps some sort of /etc/mtab record.
461 - Implement FSM (File System Modules).
462 - Identify unchanged or "system" files and save them to a
463 special tape thus removing them from the standard
464 backup FileSet -- BASE backup.
465 - Turn virutally all sprintfs into snprintfs.
466 - Heartbeat between daemons.
467 - Audit M_ error codes to ensure they are correct and consistent.
468 - Add variable break characters to lex analyzer.
469 Either a bit mask or a string of chars so that
470 the caller can change the break characters.
471 - Make a single T_BREAK to replace T_COMMA, etc.
472 - Ensure that File daemon and Storage daemon can
473 continue a save if the Director goes down (this
474 is NOT currently the case). Must detect socket error,
475 buffer messages for later.
476 - Enhance time/duration input to allow multiple qualifiers e.g. 3d2h
479 Done: (see kernsdone for more)
480 - Add EOM records? No, not at this time. The current system works and
482 - Add VolumeUseDuration and MaximumVolumeJobs to Pool db record and
484 - Add VOLUME_CAT_INFO to the EOS tape record (as
485 well as to the EOD record). -- No, not at this time.
486 - Put MaximumVolumeSize in Director (MaximumVolumeJobs, MaximumVolumeFiles,
491 ====================================
496 Subject: File Backup Options
499 A few days ago, a Bacula user who is backing up to file volumes and
500 using compression asked if it was possible to suppress compressing
501 all .gz files since it was a waste of CPU time. Although Bacula
502 currently permits using different options (compression, ...) on
503 a directory by directory basis, it cannot do it on a file by
504 file basis, which is clearly what was desired.
506 Proposed Implementation:
507 To solve this problem, I propose the following:
509 - Add a new Director resource type called FileOptions.
511 - The FileOptions resource will have records for all
512 options that can currently be specified on the Include record
513 (in a FileSet). Examples below.
515 - The FileOptions resource will permit an exclude option as well
516 as a number of additional options.
518 - The heart of the FileOptions resource is the ability to
519 supply any number of ApplyTo records which specify POSIX
520 regular expressions. These ApplyTo regular expressions are
521 applied to the fully qualified filename (path and all). If
522 one matches, then the FileOptions will be used.
524 - When an ApplyTo specification matches an included file, the
525 options specified in the FileOptions resource will override
526 the default options specified on the Include record.
528 - Include records will be modified to permit referencing one or
529 more FileOptions resources. The FileOptions will be used
530 in the order listed on the Include record and the first
531 one that matches will be applied.
533 - Options (or specifications) currently supplied on the Include
534 record will be deprecated (i.e. removed in a later version a
535 year or so from now).
537 - The Exclude record will be deprecated as the same functionality
538 can be obtained by using an Exclude = yes in the FileOptions.
541 The following records can appear in the FileOptions resource. An
542 asterisk preceding the name indicates a feature not currently
546 - Compression= (GZIP, ...)
547 - Signature= (MD5, SHA1, ...)
549 - OneFs= (yes/no) - remain on one filesystem
550 - Recurse= (yes/no) - recurse into subdirectories
551 - Sparse= (yes/no) - do sparse file backup
552 - *Exclude= (yes/no) - exclude file from being saved
553 - *Reader= (filename) - external read (backup) program
556 - verify= (ipnougsamc5) - verify options
559 - replace= (always/ifnewer/ifolder/never) - replace options currently
561 - *Writer= (filename) - external write (restore) program
565 Currently options specifying compression, MD5 signatures, recursion,
566 ... of a FileSet are supplied on the Include record. These will now
567 all be collected into a FileOptions resource, which will be
568 specified on the Include in place of the options. Multiple FileOptions
569 may be specified. Since the FileOptions contain regular expressions
570 that are applied to the full filename, this will give the ability
571 to specify backup options on a file by file basis to whatever level
580 Include = compression=GZIP signature=MD5 {
589 Include = FileOptions=Opts {
600 That's a lot more to do the same thing, but it gives the ability to
601 apply options on a file by file basis. For example, suppose you
602 want to compress all files but not any file with extensions .gz or .Z.
603 You could do so as follows:
607 Include = FileOptions=NoCompress FileOptions=Opts {
615 ApplyTo = /*.?*/ # matches all files
620 # Note multiple ApplyTos are ORed
621 ApplyTo = /*.gz/ # matches .gz files */
622 ApplyTo = /*.Z/ # matches .Z files */
625 Now, since the NoCompress FileOptions is specified first on the
626 Include line, any *.gz or *.Z file will have an MD5 signature computed,
627 but will not be compressed. For all other files, the NoCompress will not
628 match, so the Opts options will be used which will include GZIP
632 - Is it necessary to provide some means of ANDing regular expressions
633 and negation? (not currently planned)
635 e.g. ApplyTo = /*.gz/ && !/big.gz/
637 - I see that Networker has a "null" module which, if specified, does not
638 backup the file, but does make an record of the file in the catalog
639 so that the catalog will reflect an exact picture of the filesystem.
640 The result is that the file can be "seen" when "browsing" the save
641 sets, but it cannot be restored.
643 Is this really useful? Should it be implemented in Bacula?
646 After implementing the above, the user will be able to specify
647 on a file by file basis (using regular expressions) what options are
648 applied for the backup.