]> git.sur5r.net Git - bacula/bacula/blob - bacula/kernstodo
Update doc
[bacula/bacula] / bacula / kernstodo
1                  Kern's ToDo List
2                   28 April 2003 
3
4 Documentation to do: (any release a little bit at a time)
5 - Document running a test version.
6 - Document query file format.
7 - Document static linking
8 - Document problems with Verify and pruning.
9 - Document how to use multiple databases.
10 - Add a section to the doc on Manual cycling of Volumes.
11
12           
13 Testing to do: (painful)
14 - that ALL console command line options work and are always implemented
15 - blocksize recognition code.
16 - multiple simultaneous Volumes
17
18 - Figure out how to use ssh or stunnel to protect Bacula communications.
19
20
21 For 1.31 release:
22 - Fix "access not allowed" for backup of files on WinXP.
23 - Check for existence of all new Win32 API's.  See LoadLibrary in 
24   winservice.cpp
25 - Add Progress command that periodically reports the progress of
26   a job or all jobs.
27 - Fix problem reported by Christopher McCurdy <cmccurdy@eecis.udel.edu>
28    xeon-fd:      Could not stat c:/Documents and Settings/All 
29    Users/Application Data/Humc:\Documents and Settings\All User98_AIX.kbf: 
30    ERR=No such file or directory
31 - Examine Bare Metal restore problem.
32 - Test multiple simultaneous Volumes
33 - Document FInclude ...
34 - Test and implement get_pint and get_yesno.
35 - Implement timeout in response() when it should come quickly.
36 - Check if Job/File retentions apply to multivolume jobs.
37 - Remove subsysdir from conf files (used only in autostart scripts).
38 - Implement console @echo command.
39 - Implement global with DB name and add to btraceback.gdb
40 - Bug: fix access problems on files restored on WinXP.
41 - Implement a Slot priority (loaded/not loaded).
42 - Implement "vacation" Incremental only saves.
43 - Implement single pane restore (much like the Gftp panes).
44 - Implement Automatic Mount even in operator wait.
45 - Implement create "FileSet"?
46 - Implement Release Device in the Job resource to unmount a drive.
47 - Implement Acquire Device in the Job resource to mount a drive,
48   be sure this works with admin jobs so that the user can get
49   prompted to insert the correct tape.  Possibly some way to say to
50   run the job but don't save the files.
51 - Implement all command line args on run.
52 - Implement command line "restore" args.
53 - Implement "restore current select=no"
54 - Fix watchdog pthread crash on Win32 (this is pthread_kill() Cygwin bug)
55 - Implement "scratch pool" where tapes are defined and can be
56   taken by any pool that needs them.
57 - Implement restore "current system", but take all files without
58   doing selection tree -- so that jobs without File records can
59   be restored.
60 - Make | and < work on FD side.
61 - Pass prefix_links to FD.
62 - Implement a M_SECURITY message class.
63 - Implement disk spooling. Two parts: 1. Spool to disk then
64   immediately to tape to speed up tape operations. 2. Spool to
65   disk only when the tape is full, then when a tape is hung move
66   it to tape.
67 - From Phil Stracchino:
68   It would probably be a per-client option, and would be called
69   something like, say, "Automatically purge obsoleted jobs".  What it
70   would do is, when you successfully complete a Differential backup of a
71   client, it would automatically purge all Incremental backups for that
72   client that are rendered redundant by that Differential.  Likewise,
73   when a Full backup on a client completed, it would automatically purge
74   all Differential and Incremental jobs obsoleted by that Full backup.
75   This would let people minimize the number of tapes they're keeping on
76   hand without having to master the art of retention times.
77
78 - Allow multiple Storage specifications (or multiple names on
79   a single Storage specification) in the Job record. Thus a job 
80   can be backed up to a number of storage devices.
81 - Implement dump/print label to UA
82 - Add prefixlinks to where or not where absolute links to FD.
83 - Look at Python for a Bacula scripting language -- www.python.org
84 - Issue message to mount a new tape before the rewind.
85 - Simplified client job initiation for portables.
86 - If SD cannot open a drive, make it periodically retry.
87 - Implement LabelTemplate (at least first cut).
88 - Add more of the config info to the tape label.
89 - Implement a Mount Command and an Unmount Command where
90   the users could specify a system command to be performed
91   to do the mount, after which Bacula could attempt to
92   read the device. This is for Removeable media such as a CDROM.
93   - Most likely, this mount command would be invoked explicitly
94   by the user using the current Console "mount" and "unmount" 
95   commands -- the Storage Daemon would do the right thing 
96   depending on the exact nature of the device.
97   - As with tape drives, when Bacula wanted a new removable
98   disk mounted, it would unmount the old one, and send a message
99   to the user, who would then use "mount" as described above 
100   once he had actually inserted the disk.
101
102 - Make some way so that if a machine is skipped because it is not up 
103   that Bacula will continue retrying for a specified period of time --
104   periodically.
105 - If tape is marked read-only, then try opening it read-only rather than
106   failing, and remember that it cannot be written.
107 - Refine SD waiting output:
108     Device is being positioned
109     >     Device is being positioned for append
110     >     Device is being positioned to file x
111     > 
112 - Figure out some way to estimate output size and to avoid splitting
113   a backup across two Volumes -- this could be useful for writing CDROMs
114   where you really prefer not to have it split -- not serious.
115 - Add RunBeforeJob and RunAfterJob to the Client program.
116 - Have SD compute MD5 or SHA1 and compare to what FD computes.
117 - Make VolumeToCatalog calculate an MD5 or SHA1 from the 
118   actual data on the Volume and compare it.                  
119 - Implement FileOptions (see end of this document)
120 - Implement Bacula plugins -- design API
121 - Make bcopy read through bad tape records.
122 - Fix read_record to handle multiple sessions.
123 - Program files (i.e. execute a program to read/write files).
124   Pass read date of last backup, size of file last time.
125 - Add Signature type to File DB record.
126 - Make Restore report an error if FD or SD term codes are not OK.
127 - CD into subdirectory when open()ing files for backup to
128   speed up things.  Test with testfind().
129 - Priority job to go to top of list.
130 - Find out why Full saves run slower and slower (hashing?)
131 - Why are save/restore of device different sizes (sparse?)   Yup! Fix it.
132 - Implement some way for the Console to dynamically create a job.
133 - Restore to a particular time -- e.g. before date, after date. 
134 - Solaris -I on tar for include list
135 - Prohibit backing up archive device (findlib/find_one.c:128)
136 - Need a verbose mode in restore, perhaps to bsr.
137 - bscan without -v is too quiet -- perhaps show jobs.
138 - Add code to reject whole blocks if not wanted on restore.
139 - Start working on Base jobs.
140 - Check if we can increase Bacula FD priorty in Win2000
141 - Make sure the MaxVolFiles is fully implemented in SD
142 - Check if both CatalogFiles and UseCatalog are set to SD.
143 - Need return status on read_cb() from read_records(). Need multiple
144   records -- one per Job, maybe a JCR or some other structure with
145   a block and a record.
146 - Figure out how to do a bare metal Windows restore
147 - Put system type returned by FD into catalog.
148 - Possibly add email to Watchdog if drive is unmounted too
149   long and a job is waiting on the drive.
150 - Use read_record.c in SD code.
151 - Why don't we get an error message from Win32 FD when bootstrap 
152   file cannot be created for restore command?
153 - When Marking a file in Restore that is a hard link, also
154   mark the link so that the data will be reloaded.
155 - Restore program that errors in SD due to no tape reports
156   OK incorrectly in output.
157 - After unmount, if restore job started, ask to mount.
158 - Convert all %x substitution variables, which are hard to remember
159   and read to %(variable-name).  Idea from TMDA.
160 - Add JobLevel in FD status (but make sure it is defined).
161 - Make Pool resource handle Counter resources.
162 - Remove NextId for SQLite. Optimize.
163 - Move all SQL statements into a single location.
164 - Add UA rc and history files.
165 - put termcap (used by console) in ./configure and
166   allow -with-termcap-dir.
167 - Enhance time and size scanning routines.
168 - Fix Autoprune for Volumes to respect need for full save.
169 - Fix Win32 config file definition name on /install
170 - No READLINE_SRC if found in alternate directory.
171 - Test a second language e.g. french.
172 - Compare tape to Client files (attributes, or attributes and data) 
173 - Make all database Ids 64 bit.
174 - Write an applet for Linux.
175 - Add estimate to Console commands
176 - Find solution to blank filename (i.e. path only) problem.
177 - Implement new daemon communications protocol.
178 - Remove PoolId from Job table, it exists in Media.
179 - Allow console commands to detach or run in background.
180 - Fix status delay on storage daemon during rewind.
181 - Add SD message variables to control operator wait time
182   - Maximum Operator Wait
183   - Minimum Message Interval
184   - Maximum Message Interval
185 - Send Operator message when cannot read tape label.
186 - Verify level=Volume (scan only), level=Data (compare of data to file).
187   Verify level=Catalog, level=InitCatalog
188 - Events file
189 - Add keyword search to show command in Console.
190 - Fix Win2000 error with no messages during startup.
191 - Events : tape has more than xxx bytes.
192 - Restrict characters permitted in a Resource name.
193 - Complete code in Bacula Resources -- this will permit
194   reading a new config file at any time.
195 - Handle ctl-c in Console
196 - Implement script driven addition of File daemon to config files.
197 - Think about how to make Bacula work better with File (non-tape) archives.
198 - Write Unix emulator for Windows.
199 - Implement new serialize subroutines
200    send(socket, "string", &Vol, "uint32", &i, NULL)
201 - Audit all UA commands to ensure that we always prompt where possible.
202 - If ./btape is called without /dev, assume argument is a Storage resource name.
203 - Put memory utilization in Status output of each daemon
204   if full status requested or if some level of debug on.
205 - Make database type selectable by .conf files i.e. at runtime
206 - Set flag for uname -a.  Add to Volume label.
207 - Implement throttled work queue.
208 - Check for EOT at ENOSPC or EIO or ENXIO (unix Pc)
209 - Restore files modified after date
210 - Restore file modified before date
211 - Emergency restore info:
212   - Backup Bacula
213   - Backup working directory
214   - Backup Catalog
215 - Restore -- do nothing but show what would happen
216 - SET LD_RUN_PATH=$HOME/mysql/lib/mysql
217 - Implement Restore FileSet=
218 - Create a protocol.h and protocol.c where all protocol messages
219   are concentrated.
220 - Remove duplicate fields from jcr (e.g. jcr.level and jcr.jr.Level, ...).
221 - Timout a job or terminate if link goes down, or reopen link and query.
222 - Find general solution for sscanf size problems (as well
223   as sprintf. Do at run time?
224 - Concept of precious tapes (cannot be reused).
225 - Make bcopy copy with a single tape drive.
226 - Permit changing ownership during restore.
227
228 - Autolabel should be specified by DIR instead of SD.
229 - Find out how to get the system tape block limits, e.g.:
230   Apr 22 21:22:10 polymatou kernel: st1: Block limits 1 - 245760 bytes.  
231   Apr 22 21:22:10 polymatou kernel: st0: Block limits 2 - 16777214 bytes.
232 - Storage daemon    
233   - Add media capacity
234   - AutoScan (check checksum of tape)
235   - Format command = "format /dev/nst0"
236   - MaxRewindTime
237   - MinRewindTime
238   - MaxBufferSize
239   - Seek resolution (usually corresponds to buffer size)
240   - EODErrorCode=ENOSPC or code
241   - Partial Read error code
242   - Partial write error code
243   - Nonformatted read error
244   - Nonformatted write error
245   - WriteProtected error
246   - IOTimeout
247   - OpenRetries
248   - OpenTimeout
249   - IgnoreCloseErrors=yes
250   - Tape=yes
251   - NoRewind=yes
252 - Pool
253   - Maxwrites
254   - Recycle period
255 - Job
256   - MaxWarnings
257   - MaxErrors (job?)
258 =====
259 - FD sends unsaved file list to Director at end of job (see
260   RFC below).
261 - File daemon should build list of files skipped, and then
262   at end of save retry and report any errors.
263 - Write a Storage daemon that uses pipes and
264   standard Unix programs to write to the tape.
265   See afbackup.
266 - Need something that monitors the JCR queue and
267   times out jobs by asking the deamons where they are.
268 - Enhance Jmsg code to permit buffering and saving to disk.
269 - device driver = "xxxx" for drives.
270 - restart: paranoid: read label fsf to
271   eom read append block, and go
272   super-paranoid: read label, read all files
273   in between, read append block, and go
274   verify: backspace, read append block, and go
275   permissive: same as above but frees drive
276   if tape is not valid.
277 - Verify from Volume
278 - Ensure that /dev/null works
279 - Need report class for messages. Perhaps
280   report resource where report=group of messages
281 - enhance scan_attrib and rename scan_jobtype, and
282   fill in code for "since" option 
283 - Director needs a time after which the report status is sent
284   anyway -- or better yet, a retry time for the job.
285   Don't reschedule a job if previous incarnation is still running.
286 - Some way to automatically backup everything is needed????
287 - Need a structure for pending actions:
288   - buffered messages
289   - termination status (part of buffered msgs?)
290 - Drive management
291   Read, Write, Clean, Delete
292 - Login to Bacula; Bacula users with different permissions:
293    owner, group, user, quotas
294 - Store info on each file system type (probably in the job header on tape.
295   This could be the output of df; or perhaps some sort of /etc/mtab record.
296
297 Longer term to do:
298 - Design at hierarchial storage for Bacula. Migration and Clone. 
299 - Implement FSM (File System Modules).
300 - Identify unchanged or "system" files and save them to a
301   special tape thus removing them from the standard 
302   backup FileSet -- BASE backup.
303 - Audit M_ error codes to ensure they are correct and consistent.
304 - Add variable break characters to lex analyzer.
305   Either a bit mask or a string of chars so that
306   the caller can change the break characters.
307 - Make a single T_BREAK to replace T_COMMA, etc.
308 - Ensure that File daemon and Storage daemon can
309   continue a save if the Director goes down (this
310   is NOT currently the case). Must detect socket error,
311   buffer messages for later. 
312 - Enhance time/duration input to allow multiple qualifiers e.g. 3d2h
313 - Add ability to backup to two Storage devices (two SD sessions) at
314   the same time -- e.g. onsite, offsite.
315 - Add the ability to consolidate old backup sets (basically do a restore
316   to tape and appropriately update the catalog). Compress Volume sets.
317   Might need to spool via file is only one drive is available.
318 - Compress or consolidate Volumes of old possibly deleted files. Perhaps
319   someway to do so with every volume that has less than x% valid 
320   files.
321
322   
323 Projects:
324             Bacula Projects Roadmap 
325                17 August 2002
326            last update 8 May 2003
327
328 Item 1:   Multiple simultaneous Jobs. (done)
329 Done -- Restore part needs better implementation to work correctly
330         Also, it needs considerable testing
331
332   What:   Permit multiple simultaneous jobs in Bacula.
333
334   Why:    An enterprise level solution needs to go fast without the
335           need for the system administrator to carefully tweak
336           timing.  Based on the benchmarks, during a full
337           backup, NetWorker typically hit 10 times the bandwidth to
338           the tape compared to Bacula--largely. This is probably due to
339           running parallel jobs and multi-threaded filling of buffers
340           and writing them to tape.  This should also make things work
341           better when you have a mix of fast and slow machines backing
342           up at the same time.
343
344   Notes:  Bacula was designed to run multiple simultaneous jobs. Thus
345           implementing this is a matter of some small cleanups and
346           careful testing.
347
348
349 Item 2:   Make the Storage daemon use intermediate file storage to buffer data.
350 Deferred -- not necessary yet.
351
352   What:   If data is coming into the SD too fast, buffer it to 
353           disk if the user has configured this option.
354
355   Why:    This would be nice, especially if it more or less falls out
356           when implementing (1) above.  If not, it probably should not
357           be given a high priority because fundamentally the backup time
358           is limited by the tape bandwidth.  Even though you may finish a
359           client job quicker by spilling to disk, you still have to
360           eventually get it onto tape.  If intermediate disk buffering
361           allows us to improve write bandwidth to tape, it may make
362           sense.
363
364   Notes:  Whether or not this is implemented will depend upon performance
365           testing after item 1 is implemented.
366
367
368 Item 3:   Write the bscan program -- also write a bcopy program.
369 Done
370
371   What:   Write a program that reads a Bacula tape and puts all the 
372           appropriate data into the catalog. This allows recovery
373           from a tape that is no longer in the database, or it allows
374           re-creation of a database if lost.
375
376   Why:    This is a fundamental robustness and disaster recovery tool
377           which will increase the comfort level of a sysadmin
378           considering adopting Bacula.
379
380   Notes:  A skeleton of this program already exists, but much work
381           needs to be done. Implementing this will also make apparent
382           any deficiencies in the current Bacula tape format.
383
384
385 Item 4:   Implement Base jobs.
386
387   What:   A base job is sort of like a Full save except that you 
388           will want the FileSet to contain only files that are unlikely
389           to change in the future (i.e. a snapshot of most of your
390           system after installing it). After the base job has been run,
391           when you are doing a Full save, you can specify to exclude
392           all files saved by the base job that have not been modified.
393
394   Why:    This is something none of the competition does, as far as we know
395           (except BackupPC, which is a Perl program that saves to disk
396           only).  It is big win for the user, it makes Bacula stand out
397           as offering a unique optimization that immediately saves time
398           and money.
399
400   Notes:  Big savings in tape usage. Will require more resources because
401           the e. DIR must send FD a list of files/attribs, and the FD must
402           search the list and compare it for each file to be saved.
403
404
405 Item 5:   Implement Label templates
406
407   What:   This is a mechanism whereby Bacula can automatically create
408           a tape label for new tapes according to a detailed specification
409           provided by the user.
410
411   Why:    It is a major convenience item for folks who use automated label
412           creation.
413
414   Notes:  Bacula already has a working form of automatic tape label
415           creation, but it is very crude. The design for the complete
416           tape labeling project is already documented in the manual.
417
418
419 Item 6:   Write a regression script.
420 Done --   Continue to expand its testing.
421
422   What:   This is an automatic script that runs and tests as many features
423           of Bacula as possible. The output is compared to previous
424           versions of Bacula and any differences are reported.
425
426   Why:    This is an enormous help in preventing introduction of new
427           errors in parts of the program that already work correctly.
428
429   Notes:  This probably should be ranked higher, it's something the typical
430           user doesn't see.  Depending on how it's implemented, it may
431           make sense to defer it until the archival tape format and
432           user interface mature.
433
434
435 Item 7:   GUI for interactive restore
436 Item 8:   GUI for interactive backup
437
438   What:   The current interactive restore is implemented with a tty
439           interface. It would be much nicer to be able to "see" the
440           list of files backed up in typical GUI tree format.
441           The same mechanism could also be used for creating 
442           ad-hoc backup FileSets (item 8).
443
444   Why:    Ease of use -- especially for the end user.
445
446   Notes:  Rather than implementing in Gtk, we probably should go directly
447           for a Browser implementation, even if doing so meant the
448           capability wouldn't be available until much later.  Not only
449           is there the question of Windows sites, most
450           Solaris/HP/IRIX, etc,  shops can't currently run Gtk programs
451           without installing lots of stuff admins are very wary about.
452           Real sysadmins will always use the command line anyway, and
453           the user who's doing an interactive restore or backup of his
454           own files will in most cases be on a Windows machine running
455           Exploder.
456
457
458 Item 9:   Add SSL to daemon communications.
459 Inprogress as of version 1.31.
460
461   What:   This provides for secure communications between the daemons.
462
463   Why:    This would allow doing backup across the Internet without
464           privacy concerns (or with much less concern).
465
466   Notes:  The vast majority of near term potential users will be backing up
467           a single site over a LAN and, correctly or not, they probably
468           won't be concerned with security, at least not enough to go to
469           the trouble to set up keys, etc. to screw things down.  We suspect
470           that many users genuinely interested in multi-site backup
471           already run some form of VPN software in their internetwork
472           connections, and are willing to delegate security to that layer.
473
474
475 Item 10:  Define definitive tape format.
476 Done (version 1.27)
477
478   What:   Define that definitive tape format that will not change 
479           for the next millennium.
480
481   Why:    Stability, security.
482
483   Notes:  See notes for item 11 below.
484
485
486 Item 11:  New daemon communication protocol.
487
488   What:   The current daemon to daemon protocol is basically an ASCII
489           printf() and sending the buffer. On the receiving end, the
490           buffer is sscanf()ed to unpack it. The new scheme would
491           be a binary format that allows quick packing and unpacking
492           of any data type with named fields.
493
494   Why:    Using binary packing would be faster. Named fields will permit
495           error checking to ensure that what is sent is what the 
496           receiver really wants.
497
498   Notes:  These are internal improvements in the interest of the
499           long-term stability and evolution of the program.  On the one
500           hand, the sooner they're done, the less code we have to rip
501           up when the time comes to install them.  On the other hand, they
502           don't bring an immediately perceptible benefit to potential
503           users.  Item 10 and possibly item 11 should be deferred until Bacula
504           is well established with a growing user community more or
505           less happy with the feature set.  At that time, it will make a
506           good "next generation" upgrade in the interest of data
507           immortality.
508
509
510
511
512 ======================================================
513         Base Jobs design
514 It is somewhat like a Full save becomes an incremental since
515 the Base job (or jobs) plus other non-base files.
516 Need:
517 - New BaseFile table that contains:
518     JobId, BaseJobId, FileId (from Base).
519   i.e. for each base file that exists but is not saved because
520   it has not changed, the File daemon sends the JobId, BaseId,
521   and FileId back to the Director who creates the DB entry.
522 - To initiate a Base save, the Director sends the FD 
523   the FileId, and full filename for each file in the Base.
524 - When the FD finds a Base file, he requests the Director to
525   send him the full File entry (stat packet plus MD5), or
526   conversely, the FD sends it to the Director and the Director
527   says yes or no. This can be quite rapid if the FileId is kept
528   by the FD for each Base Filename.          
529 - It is probably better to have the comparison done by the FD
530   despite the fact that the File entry must be sent across the
531   network.
532 - An alternative would be to send the FD the whole File entry
533   from the start. The disadvantage is that it requires a lot of
534   space. The advantage is that it requires less communications
535   during the save.
536 - The Job record must be updated to indicate that one or more
537   Bases were used.
538 - At end of Job, FD returns:   
539    1. Count of base files/bytes not written to tape (i.e. matches)
540    2. Count of base file that were saved i.e. had changed.
541 - No tape record would be written for a Base file that matches, in the
542   same way that no tape record is written for Incremental jobs where
543   the file is not saved because it is unchanged.
544 - On a restore, all the Base file records must explicitly be
545   found from the BaseFile tape. I.e. for each Full save that is marked
546   to have one or more Base Jobs, search the BaseFile for all occurrences
547   of JobId.
548 - An optimization might be to make the BaseFile have:
549      JobId
550      BaseId
551      FileId
552   plus
553      FileIndex
554   This would avoid the need to explicitly fetch each File record for
555   the Base job.  The Base Job record will be fetched to get the
556   VolSessionId and VolSessionTime.
557 =========================================================  
558
559   
560
561 =============================================================
562
563                 Request For Comments For File Backup Options
564                    10 November 2002
565
566 Subject: File Backup Options
567
568 Problem: 
569   A few days ago, a Bacula user who is backing up to file volumes and
570   using compression asked if it was possible to suppress compressing
571   all .gz files since it was a waste of CPU time. Although Bacula
572   currently permits using different options (compression, ...) on
573   a directory by directory basis, it cannot do it on a file by 
574   file basis, which is clearly what was desired.   
575
576 Proposed Implementation:
577   To solve this problem, I propose the following:
578
579   - Add a new Director resource type called FileOptions.  
580
581   - The FileOptions resource will have records for all
582     options that can currently be specified on the Include record 
583     (in a FileSet).  Examples below.
584
585   - The FileOptions resource will permit an exclude option as well
586     as a number of additional options.
587
588   - The heart of the FileOptions resource is the ability to
589     supply any number of ApplyTo records which specify POSIX
590     regular expressions.  These ApplyTo regular expressions are
591     applied to the fully qualified filename (path and all). If
592     one matches, then the FileOptions will be used.
593
594   - When an ApplyTo specification matches an included file, the
595     options specified in the FileOptions resource will override
596     the default options specified on the Include record.
597
598   - Include records will be modified to permit referencing one or
599     more FileOptions resources.  The FileOptions will be used
600     in the order listed on the Include record and the first
601     one that matches will be applied.
602
603   - Options (or specifications) currently supplied on the Include
604     record will be deprecated (i.e. removed in a later version a
605     year or so from now).
606
607   - The Exclude record will be deprecated as the same functionality
608     can be obtained by using an Exclude = yes in the FileOptions.
609
610 FileOptions records:
611   The following records can appear in the FileOptions resource. An
612   asterisk preceding the name indicates a feature not currently
613   implemented.
614
615   For Backup Jobs:
616     - Compression= (GZIP, ...)
617     - Signature=   (MD5, SHA1, ...)
618     - *Encryption=
619     - OneFs=      (yes/no)    - remain on one filesystem
620     - Recurse=    (yes/no)    - recurse into subdirectories
621     - Sparse=     (yes/no)    - do sparse file backup
622     - *Exclude=   (yes/no)    - exclude file from being saved
623     - *Reader=    (filename)  - external read (backup) program
624     - *Plugin=    (filename)  - read/write plugin module
625
626   For Verify Jobs:
627     - verify=     (ipnougsamc5) - verify options
628
629   For Restore Jobs:
630     - replace= (always/ifnewer/ifolder/never) - replace options currently
631                                                 implemented in 1.27
632     - *Writer= (filename)   - external write (restore) program
633
634
635 Implementation:
636   Currently options specifying compression, MD5 signatures, recursion,
637   ... of a FileSet are supplied on the Include record. These will now
638   all be collected into a FileOptions resource, which will be
639   specified on the Include in place of the options. Multiple FileOptions
640   may be specified.  Since the FileOptions contain regular expressions
641   that are applied to the full filename, this will give the ability
642   to specify backup options on a file by file basis to whatever level
643   of detail you wish.
644
645 Example:
646
647   Today:
648
649     FileSet {
650       Name = "FullSet"
651       Include = compression=GZIP signature=MD5 {
652         /
653       }
654     }
655
656   Proposal:
657
658     FileSet {
659       Name = "FullSet"
660       Include = FileOptions=Opts {
661         /
662       }
663     }
664     FileOptions {
665       Name = Opts
666       Compression = GZIP
667       Signature = MD5
668       ApplyTo = /*.?*/
669     }
670
671   That's a lot more to do the same thing, but it gives the ability to
672   apply options on a file by file basis.  For example, suppose you
673   want to compress all files but not any file with extensions .gz or .Z.
674   You could do so as follows:
675
676     FileSet {
677       Name = "FullSet"
678       Include = FileOptions=NoCompress FileOptions=Opts {
679         /
680       }
681     }
682     FileOptions {
683       Name = Opts
684       Compression = GZIP
685       Signature = MD5
686       ApplyTo = /*.?*/   # matches all files
687     }
688     FileOptions {
689       Name = NoCompress
690       Signature = MD5
691       # Note multiple ApplyTos are ORed
692       ApplyTo = /*.gz/   # matches .gz files */
693       ApplyTo = /*.Z/    # matches .Z files */
694     }
695
696   Now, since the NoCompress FileOptions is specified first on the
697   Include line, any *.gz or *.Z file will have an MD5 signature computed,
698   but will not be compressed. For all other files, the NoCompress will not
699   match, so the Opts options will be used which will include GZIP
700   compression.
701
702 Questions:
703   - Is it necessary to provide some means of ANDing regular expressions
704     and negation?  (not currently planned)
705
706     e.g.  ApplyTo = /*.gz/ && !/big.gz/
707
708   - I see that Networker has a "null" module which, if specified, does not 
709     backup the file, but does make an record of the file in the catalog
710     so that the catalog will reflect an exact picture of the filesystem.
711     The result is that the file can be "seen" when "browsing" the save
712     sets, but it cannot be restored.
713     
714     Is this really useful?  Should it be implemented in Bacula?
715   
716 Results:
717   After implementing the above, the user will be able to specify
718   on a file by file basis (using regular expressions) what options are
719   applied for the backup.
720
721
722 =============================================
723
724 ========================================================== 
725     Unsaved File design
726 For each Incremental job that is run, there may be files that
727 were found but not saved because they were locked (this applies
728 only to Windows). Such a system could send back to the Director
729 a list of Unsaved files.
730 Need:
731 - New UnSavedFiles table that contains:
732   JobId
733   PathId
734   FilenameId
735 - Then in the next Incremental job, the list of Unsaved Files will be
736   feed to the FD, who will ensure that they are explicitly chosen even
737   if standard date/time check would not have selected them.
738 =============================================================
739
740
741 Done: (see kernsdone for more)
742 - Heartbeat between daemons.
743 - Fix Dir heartbeat in restore and verify vol.  Be sure to make
744   bnet_recv() ignore BNET_HEARTBEAT.
745 - Implement HEART_BEAT while SD waiting for tapes.
746 - Include RunBeforeJob and RunAfterJob output in the message
747   stream.
748 - Change M_INFO to M_RESTORED for all restored files.
749 - Fix command prompt in gnome-console by checking on Ready.
750