]> git.sur5r.net Git - bacula/bacula/blob - bacula/kernstodo
1.32d status dir fix
[bacula/bacula] / bacula / kernstodo
1                  Kern's ToDo List
2                 30 September 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 - For FreeBSD typical /dev/nrsa0 and for mtx /dev/pass1
11 - VXA drives have a "cleaning required"
12   indicator, but Exabyte recommends preventive cleaning after every 75
13   hours of operation.
14 - Lookup HP cleaning recommendations.
15 - Lookup HP tape replacement recommendations (see trouble shooting autochanger)
16 - Create a man page for each binary (Debian package requirement).
17           
18 Testing to do: (painful)
19 - that ALL console command line options work and are always implemented
20 - blocksize recognition code.
21 - Test if rewind at end of tape waits for tape to rewind.
22 - Test cancel at EOM.       
23 - Test not zeroing Autochanger slot when it is wrong.
24 - Figure out how to use ssh or stunnel to protect Bacula communications.
25
26 For 1.33 Testing/Documentation:
27 - bextract is sending everything to the log file ****FIXME****
28 - Document new alias records in Director. SDAddress SDDeviceName, SDPassword.
29   FDPassword, FDAddress, DBAddress, DBPort, DBPassword.
30 - Document new Include/Exclude ...
31 - Add test of exclusion, test multiple Include {} statements.
32 - Add counter variable test.
33 - Document ln -sf /usr/lib/libncurses.so /usr/lib/libtermcap.so
34   and install the esound-dev  package for compiling Console on SuSE.
35 - Add an example of using a FIFO in dirdconf.wml 
36 - Add an item to the FAQ about running jobs in different timezones.
37 - Add some examples of job editing codes.
38 - Add Dan's 31 Oct 2003 email on tcpwrappers to Tips.
39 - Add to supported autochangers 
40   OS              : FreeBSD-4.9
41   Auto-Changer    : QUALSTAR TLS-4210
42     Manufufactur  : Qualstar
43     Tapes         : 12 (AIT1: 36GB, AIT2: 50GB all uncompressed)
44     Drives        : 2xAIT2 (installed in the Qualstar: SONY SDX-500C AIT2)
45
46
47                 
48 For 1.33
49 - Estimate to Tibs never returns.
50 - Fix TimeZone problem!
51 - Recycling volume with a Slot requires an operator intervention:
52     rufus-dir: Start Backup JobId 18, Job=kernsave.2003-11-01_21.23.52
53     rufus-dir: Pruned 1 Job on Volume Vol01 from catalog.
54     rufus-dir: There are no Jobs associated with Volume Vol01. Marking it purged.
55     rufus-dir: Recycled volume "Vol01"
56     rufus-sd: Please mount Volume "Vol01" on Storage Device "DDS-4" for Job kernsave.2003-11-01_21.23.52
57     Use "mount" command to release Job.
58 - Think about how space could be freed up on a tape -- perhaps this
59   is a Merge or Compact feature that is needed.
60 - Modify FileSet, did not upgrade the current Increment job, but
61   waited for the next job to be upgraded.
62 - Take a careful look at SetACL http://setacl.sourceforge.net     
63 - Implement a where command for the tree telling where a file
64   is located.
65 - Take a careful look at Level for the estimate command, maybe make
66   it a command line option.
67 - Optimize fsf not to read.
68 - Implement Dan's bacula script (email of 26 Oct).
69 - Implement autochange testing in btape.
70 - Add Volume name to "I cannot write on this volume because"
71 - Make restore job check if all the files are actually restored.
72 - Make tree walk routines like cd, ls, ... more user friendly
73   by handling spaces better.
74 - Write your PID file and chwon root:wheel before drop.
75 - Make sure there is no symlink in a file before creating a
76   file (attack).
77 - Look at mktemp or mkstemp(3).
78     mktemp and mkstemp create files with predictable names too.  That's
79     not the vulnerability.  The vulnerability is in creating files without
80     using the O_EXCL flag, which means "only create this file if it doesn't
81     exist, including if the file is a dangling symlink."
82
83     It is *NOT* enough to do the equivalent of
84
85       if doesn't exist $filename
86        then create $filename
87
88     because between the test and the create another process could have
89     gotten the CPU and created the file.  You must use atomic functions
90     (those that don't get interrupted by other processes) and O_EXCL is
91     the only way for this particular example.
92 - Keep last 5 or 10 completed jobs and show them in a similar
93   list.
94 - Make a Running Jobs: output similar to current Scheduled Jobs:
95 - Use ioctl() fsf if it exists. Figure out where we are from
96   the mt_status command. Use slow fsf only if other does
97   not work.
98 - Add flag to write only one EOF mark on the tape.
99 - Mount a tape that is not right for the job (wrong # files on tape)
100   Bacula asks for another tape, fix problems with first tape and
101   say "mount". All works OK, but status shows:
102    Device /dev/nst0 open but no Bacula volume is mounted.
103        Total Bytes=1,153,820,213 Blocks=17,888 Bytes/block=64,502
104        Positioned at File=9 Block=3,951
105    Full Backup job Rufus.2003-10-26_16.45.31 using Volume "DLT-24Oct03" on device /dev/nst0
106        Files=21,003 Bytes=253,954,408 Bytes/sec=2,919,016
107        FDReadSeqNo=192,134 in_msg=129830 out_msg=5 fd=7
108 - Automatically create pools, but instead of looking for what
109   in in Job records, walk through the pool resources.
110 - Check and double check tree code, why does it take so long?
111 - Upgrade to cygwin 1.5
112 - Fix time difference problem between Bacula and Client
113   so that everything is in GMT.
114 - Finish implementation of Verify=DiskToCatalog
115 - Change console to bconsole.
116 - Change smtp to bsmtp.
117 - Possibly up network buffers to 65K.
118 - Add device name to "Current Volume not acceptable because ..."
119 - Make sure that Bacula rechecks the tape after the 20 min wait.
120 - Set IO_NOWAIT on Bacula TCP/IP packets.
121 - Try doing a raw partition backup and restore by mounting a
122   Windows partition.
123 - Report CVS problems to SourceForge.
124 - Implement .consolerc for Console
125 - Is it really important to make Job name the same to find the
126   Full backup to avoid promoting an Incremental job?
127 - Start label, then run job when tape labeled, it should broadcast.
128 - Zap illegal characters in job name for mail files (e.g. /).
129 - From Lars Köllers:
130     Yes, it would allow to highly automatic the request for new tapes. If a 
131     tape is empty, bacula reads the barcodes (native or simulated), and if 
132     an unused tape is found, it runs the label command with all the 
133     necessary parameters.
134
135     By the way can bacula automatically "move" an empry/purged volume say 
136     in the "short" pool to the "long" pool if this pool runs out of volume 
137     space?
138 - Either restrict the characters in a name, or fix the problem 
139   emailing with names containing / (smtp command line breaks).
140 - Eliminate orphaned jobs: dbcheck, normal pruning, delete job command.
141   Hm.  Well, there are the remaining orphaned job records:
142
143      |   105 | Llioness Save  | 0000-00-00 00:00:00 | B    | D     |        0 |             0 | f         |
144      |   110 | Llioness Save  | 0000-00-00 00:00:00 | B    | I     |        0 |             0 | f         |
145      |   115 | Llioness Save  | 2003-09-10 02:22:03 | B    | I     |        0 |             0 | A         |
146      |   128 | Catalog Save   | 2003-09-11 03:53:32 | B    | I     |        0 |             0 | C         |
147      |   131 | Catalog Save   | 0000-00-00 00:00:00 | B    | I     |        0 |             0 | f         |
148
149      As you can see, three of the five are failures.  I already deleted the
150      one restore and one other failure using the by-client option.  Deciding
151      what is an orphaned job is a tricky problem though, I agree.  All these
152      records have or had 0 files/ 0 bytes, except for the restore.  With no
153      files, of course, I don't know of the job ever actually becomes
154      associated with a Volume.
155
156      (I'm not sure if this is documented anywhere -- what are the meanings of
157      all the possible JobStatus codes?)
158
159      Looking at my database, it appears to me as though all the "orphaned"
160      jobs fit into one of two categories:
161
162      1)  The Job record has a StartTime but no EndTime, and the job is not
163          currently running;
164      or
165      2)  The Job record has an EndTime, indicating that it completed, but
166          it has no associated JobMedia record.
167
168
169      This does suggest an approach.  If failed jobs (or jobs that, for some
170      other reason, write no files) are associated with a volume via a
171      JobMedia record, then they should be purged when the associated volume
172      is purged.  I see two ways to handle jobs that are NOT associated with a
173      specific volume:
174
175      1)  purge them automatically whenever any volume is manually purged;
176      or
177      2)  add an option to the purge command to manually purge all jobs with
178          no associated volume.
179
180      I think Restore jobs also fall into category 2 above ....  so one might
181      want to make that "The Job record has an EndTime,, but no associated
182      JobMedia record, and is not a Restore job."  
183 - Implement RestoreJobRetention? Maybe better "JobRetention" in a Job,
184   which would take precidence over the Catalog "JobRetention".
185 - Implement Label Format in Add and Label console commands.
186 - make "btape /tmp" work.
187 - Make sure a rescheduled job is properly reported by status.
188 - Walk through the Pool records rather than the Job records
189   in dird.c to create/update pools.
190 - What to do about "list files job=xxx".
191 - Implement scan: for every slot it finds, zero the slot of
192   Volume other volume having that slot.
193 - When job rescheduled, status gives is waiting for Client Rufus 
194   to connect to Storage File. Dir needs to inform SD that job
195   is rescheduled.
196 - Fix get_storage_from_media_type (ua_restore) to use command line     
197   storage=
198 - Enhance "update slots" to include a "scan" feature
199   scan 1; scan 1-5; scan 1,2,4 ...  to update the catalog 
200 - Allow a slot or range of slots on the label barcodes command.
201 - Don't print "Warning: Wrong Volume mounted ..." if mounting second volume.
202 - Make Dmsg look at global before calling subroutine.
203 - Enable trace output at runtime for Win32
204 - Make sure that Volumes are recycled based on "Least recently used"
205   rather than lowest MediaId.
206 - Available volumes for autochangers (see patrick@baanboard.com 3 Sep 03 
207   and 4 Sep) scan slots.
208 - Get MySQL 3.23.58
209 - Get and test MySQL 4.0
210 - Do a complete audit of all pthreads_mutex, cond, ... to ensure that
211   any that are dynamically initialized are destroyed when no longer used.
212 - Write a mini-readline with history and editing.
213 - Look at how fuser works and /proc/PID/fd that is how Nic found the
214   file descriptor leak in Bacula.
215 - Implement WrapCounters in Counters.
216 - Turn on SIGHUP in dird.c and test.
217 - Use system dependent calls to get more precise info on tape errors.
218 - Add heartbeat from FD to SD if hb interval expires.
219 - Suppress read error on blank tape when doing a label.
220 - Can we dynamically change FileSets?
221 - If pool specified to label command and Label Format is specified,
222   automatically generate the Volume name.
223 - Take a careful look a the Basic recycling algorithm.  When Bacula
224   chooses, the order should be:
225    - Look for Append
226    - Look for Recycle or Purged
227    - Prune volumes
228    - Look for purged
229   Instead of using lowest media Id, find the least recently used
230   volume.
231
232   When the tape is mounted and Bacula requests the status
233   - Do everything possible to use it.
234
235   Define a "available" status, which is the currently mounted 
236   Volume and all volumes that are currently in the autochanger.
237
238 - Why can't SQL do the filename sort for restore?
239 - Is a pool specification really needed for a restore?  Yes, and
240   you may want to exclude archive Pools.
241 - Look at libkse (man kse) for FreeBSD threading.
242 - Look into Microsoft Volume Shadowcopy Service VSS for backing
243   up system state components (Active Directory, System Volume, ...)
244 - Add ExhautiveRestoreSearch
245 - Look at the possibility of loading only the necessary 
246   data into the restore tree (i.e. do it one directory at a
247   time as the user walks through the tree).
248 - Possibly use the hash code if the user selects all for a restore command.
249 - Orphaned Dir buffer at parse_conf.c:373 =>  store_dir
250 - Implement some way for the File daemon to contact the Director 
251   to start a job or pass its DHCP obtained IP number.
252 - Implement multiple Consoles.
253 - Add Console usr permissions.
254 - Fix "restore all" to bypass building the tree.
255 - Fix restore to list errors if Invalid block found, and if # files
256   restored does not match # expected.
257 - Prohibit backing up archive device (findlib/find_one.c:128)
258 - Implement Release Device in the Job resource to unmount a drive.
259 - Implement Acquire Device in the Job resource to mount a drive,
260   be sure this works with admin jobs so that the user can get
261   prompted to insert the correct tape.  Possibly some way to say to
262   run the job but don't save the files.
263 - Add JobName= to VerifyToCatalog so that all verifies can be done at the end.
264 - Implement FileOptions (see end of this document)
265 - Make things like list where a file is saved case independent for
266   Windows.
267 - Edit the Client/Storage name into authentication failure messages.
268 - Implement migrate
269 - Implement a PostgreSQL driver.
270 - Bacula needs to propagate SD errors.
271   > > cluster-dir: Start Backup JobId 252, Job=REUTERS.2003-08-11_15.04.12
272   > > prod4-sd: REUTERS.2003-08-11_15.04.12 Error: Write error on device 
273        /dev/nst0. ERR=Input/output error.
274   > > prod4-sd: REUTERS.2003-08-11_15.04.12 Error: Re-read of last block failed. 
275        Last block=5162 Current block=5164.
276   > > prod4-sd: End of medium on Volume "REU007" Bytes=16,303,521,933 
277
278 - Use autochanger to handle multiple devices.
279 - Fix packet too big problem. This is most likely a Windows TCP stack 
280   problem.
281 - Add SuSE install doc to list.
282 - Check and rechedk "Invalid block number"
283 - Make bextract release the drive properly between tapes 
284   so that an autochanger can be made to work.
285 - User wants to NOT backup up certain big files (email files).
286 - Maybe remove multiple simultaneous devices code in SD.
287 - On Windows with very long path names, it may be impossible to create 
288   a file (and thus restore it) because the total length is too long.
289   We must cd into the directory then create the file without the
290   full path name.
291 - lstat() is not going to work on Win32 for testing date.
292 - Something is not right in last block of fill command.
293 - Implement a Recycle command
294 - Add FileSet to command line arguments for restore.
295 - Allow multiple Storage specifications (or multiple names on
296   a single Storage specification) in the Job record. Thus a job 
297   can be backed up to a number of storage devices.
298 - Add client name to cram-md5 challenge so Director can immediately
299   verify if it is the correct client.
300 - Implement ClientRunBeforeJob and ClientRunAfterJob.
301 - Add JobLevel in FD status (but make sure it is defined).
302 - Audit all UA commands to ensure that we always prompt where possible.
303 - Restrict characters permitted in a Resource name, and don't permit
304   duplicate names.
305 - Check Jmsg in bnet, may not work, must dup bsock.
306 - Suppress Job Name in Jmsg for console
307 - Create Pools that are referenced in a Run statement at startup if possible.
308 - Use runbeforejob to unload, then reload a volume previously used,
309   then the next job run gets an error reading the drive.
310 - Make bootstrap filename unique.
311 - Test a second language e.g. french.
312 - Start working on Base jobs.
313 - Make "make binary-release" work from any directory.
314 - Implement UnsavedFiles DB record.
315 - Implement argc/argv for daemon command line scanning using table driven
316   stuff below.
317 - Implement table driven single argc/argv scanner to pickup all arguments.
318   Much like xxx_conf.c scan table.
319   keyword, handler(store_routine), store_address, code, flags, default.
320 - From Phil Stracchino:
321   It would probably be a per-client option, and would be called
322   something like, say, "Automatically purge obsoleted jobs".  What it
323   would do is, when you successfully complete a Differential backup of a
324   client, it would automatically purge all Incremental backups for that
325   client that are rendered redundant by that Differential.  Likewise,
326   when a Full backup on a client completed, it would automatically purge
327   all Differential and Incremental jobs obsoleted by that Full backup.
328   This would let people minimize the number of tapes they're keeping on
329   hand without having to master the art of retention times.
330 - Implement new serialize subroutines
331    send(socket, "string", &Vol, "uint32", &i, NULL)
332 - Scratch Pool where the volumes can be re-assigned to any Pool.
333 - Implement a M_SECURITY message class.
334 - Implement forward spacing block/file: position_device(bsr) --
335   just before read_block_from_device();
336 - When doing a Backup send all attributes back to the Director, who
337   would then figure out what files have been deleted.
338 - Currently in mount.c:236 the SD simply creates a Volume. It should have
339   explicit permission to do so.  It should also mark the tape in error
340   if there is an error.
341 - Make sure all restore counters are working correctly in the FD.
342 - SD Bytes Read is wrong.
343 - Look at ALL higher level routines that call block.c to be sure
344   they don't expect something in errmsg.
345 - Investigate doing RAW backup of Win32 partition.
346 - Add thread specific data to hold the jcr -- send error messages from
347   low level routines by accessing it and using Jmsg().
348 - Cancel waiting for Client connect in SD if FD goes away.
349
350 - Add Progress command that periodically reports the progress of
351   a job or all jobs.
352 - One block was orphaned in the SD probably after cancel.
353
354
355 - Examine Bare Metal restore problem (a FD crash exists somewhere ...).
356 - Implement timeout in response() when it should come quickly.
357 - Implement console @echo command.
358 - Implement a Slot priority (loaded/not loaded).
359 - Implement "vacation" Incremental only saves.
360 - Implement single pane restore (much like the Gftp panes).
361 - Implement Automatic Mount even in operator wait.
362 - Implement create "FileSet"?
363 - Fix watchdog pthread crash on Win32 (this is pthread_kill() Cygwin bug)
364 - Implement "scratch pool" where tapes are defined and can be
365   taken by any pool that needs them.
366 - Implement restore "current system", but take all files without
367   doing selection tree -- so that jobs without File records can
368   be restored.
369 - Implement disk spooling. Two parts: 1. Spool to disk then
370   immediately to tape to speed up tape operations. 2. Spool to
371   disk only when the tape is full, then when a tape is hung move
372   it to tape.
373 - Implement a relocatable bacula.spec 
374 - Implement dump/print label to UA
375 - Add prefixlinks to where or not where absolute links to FD.
376 - Issue message to mount a new tape before the rewind.
377 - Simplified client job initiation for portables.
378 - If SD cannot open a drive, make it periodically retry.
379 - Implement LabelTemplate (at least first cut).
380 - Add more of the config info to the tape label.
381 - Implement a Mount Command and an Unmount Command where
382   the users could specify a system command to be performed
383   to do the mount, after which Bacula could attempt to
384   read the device. This is for Removeable media such as a CDROM.
385   - Most likely, this mount command would be invoked explicitly
386   by the user using the current Console "mount" and "unmount" 
387   commands -- the Storage Daemon would do the right thing 
388   depending on the exact nature of the device.
389   - As with tape drives, when Bacula wanted a new removable
390   disk mounted, it would unmount the old one, and send a message
391   to the user, who would then use "mount" as described above 
392   once he had actually inserted the disk.
393
394 - If tape is marked read-only, then try opening it read-only rather than
395   failing, and remember that it cannot be written.
396 - Refine SD waiting output:
397     Device is being positioned
398     >     Device is being positioned for append
399     >     Device is being positioned to file x
400     > 
401 - Figure out some way to estimate output size and to avoid splitting
402   a backup across two Volumes -- this could be useful for writing CDROMs
403   where you really prefer not to have it split -- not serious.
404 - Have SD compute MD5 or SHA1 and compare to what FD computes.
405 - Make VolumeToCatalog calculate an MD5 or SHA1 from the 
406   actual data on the Volume and compare it.                  
407 - Implement Bacula plugins -- design API
408 - Make bcopy read through bad tape records.
409 - Program files (i.e. execute a program to read/write files).
410   Pass read date of last backup, size of file last time.
411 - Add Signature type to File DB record.
412 - CD into subdirectory when open()ing files for backup to
413   speed up things.  Test with testfind().
414 - Priority job to go to top of list.
415 - Why are save/restore of device different sizes (sparse?)   Yup! Fix it.
416 - Implement some way for the Console to dynamically create a job.
417 - Restore to a particular time -- e.g. before date, after date. 
418 - Solaris -I on tar for include list
419 - Need a verbose mode in restore, perhaps to bsr.
420 - bscan without -v is too quiet -- perhaps show jobs.
421 - Add code to reject whole blocks if not wanted on restore.
422 - Check if we can increase Bacula FD priorty in Win2000
423 - Make sure the MaxVolFiles is fully implemented in SD
424 - Check if both CatalogFiles and UseCatalog are set to SD.
425 - Figure out how to do a bare metal Windows restore
426 - Possibly add email to Watchdog if drive is unmounted too
427   long and a job is waiting on the drive.
428 - Restore program that errs in SD due to no tape, reports
429   OK incorrectly in output.
430 - After unmount, if restore job started, ask to mount.
431 - Convert all %x substitution variables, which are hard to remember
432   and read to %(variable-name).  Idea from TMDA.
433 - Remove NextId for SQLite. Optimize.
434 - Move all SQL statements into a single location.
435 - Add UA rc and history files.
436 - put termcap (used by console) in ./configure and
437   allow -with-termcap-dir.
438 - Enhance time and size scanning routines.
439 - Fix Autoprune for Volumes to respect need for full save.
440 - Fix Win32 config file definition name on /install
441 - Compare tape to Client files (attributes, or attributes and data) 
442 - Make all database Ids 64 bit.
443 - Write an applet for Linux.
444 - Implement new inter-daemon communications protocol.
445 - Allow console commands to detach or run in background.
446 - Fix status delay on storage daemon during rewind.
447 - Add SD message variables to control operator wait time
448   - Maximum Operator Wait
449   - Minimum Message Interval
450   - Maximum Message Interval
451 - Send Operator message when cannot read tape label.
452 - Verify level=Volume (scan only), level=Data (compare of data to file).
453   Verify level=Catalog, level=InitCatalog
454 - Events file
455 - Add keyword search to show command in Console.
456 - Events : tape has more than xxx bytes.
457 - Complete code in Bacula Resources -- this will permit
458   reading a new config file at any time.
459 - Handle ctl-c in Console
460 - Implement script driven addition of File daemon to config files.
461 - Think about how to make Bacula work better with File (non-tape) archives.
462 - Write Unix emulator for Windows.
463 - Put memory utilization in Status output of each daemon
464   if full status requested or if some level of debug on.
465 - Make database type selectable by .conf files i.e. at runtime
466 - Set flag for uname -a.  Add to Volume label.
467 - Implement throttled work queue.
468 - Restore files modified after date
469 - SET LD_RUN_PATH=$HOME/mysql/lib/mysql
470 - Implement Restore FileSet=
471 - Create a protocol.h and protocol.c where all protocol messages
472   are concentrated.
473 - Remove duplicate fields from jcr (e.g. jcr.level and jcr.jr.Level, ...).
474 - Timout a job or terminate if link goes down, or reopen link and query.
475 - Concept of precious tapes (cannot be reused).
476 - Make bcopy copy with a single tape drive.
477 - Permit changing ownership during restore.
478
479 - From Phil:
480   > My suggestion:  Add a feature on the systray menu-icon menu to request
481   > an immediate backup now.  This would be useful for laptop users who may
482   > not be on the network when the regular scheduled backup is run.
483   > 
484   > My wife's suggestion: Add a setting to the win32 client to allow it to
485   > shut down the machine after backup is complete (after, of course,
486   > displaying a "System will shut down in one minute, click here to cancel"
487   > warning dialog).  This would be useful for sites that want user
488   > woorkstations to be shut down overnight to save power.
489   > 
490
491 - From Terry Manderson <terry@apnic.net>
492    jobset { # new structure
493    name = "monthlyUnixBoxen"
494    type = backup
495    level = full
496    jobs = "wakame;durian;soy;wasabi;miso" #new!
497    schedule = monthly
498    storage = DLT
499    messages = Standard
500    pool = MonthlyPool
501    priority = 10
502    }
503
504    job {
505    name = "wakame"
506     fileset = "genericUnixSet"
507    client = wakame-fd
508    }
509
510    job {
511    name = "durian"
512    fileset = "genericUnixSet"
513    client = durian-fd
514    }
515
516    job {
517    name = "soy"
518    fileset = "UnixDevelBoxSet"
519    client = soy-fd
520    }
521
522
523 - Autolabel should be specified by DIR instead of SD.
524 - Storage daemon    
525   - Add media capacity
526   - AutoScan (check checksum of tape)
527   - Format command = "format /dev/nst0"
528   - MaxRewindTime
529   - MinRewindTime
530   - MaxBufferSize
531   - Seek resolution (usually corresponds to buffer size)
532   - EODErrorCode=ENOSPC or code
533   - Partial Read error code
534   - Partial write error code
535   - Nonformatted read error
536   - Nonformatted write error
537   - WriteProtected error
538   - IOTimeout
539   - OpenRetries
540   - OpenTimeout
541   - IgnoreCloseErrors=yes
542   - Tape=yes
543   - NoRewind=yes
544 - Pool
545   - Maxwrites
546   - Recycle period
547 - Job
548   - MaxWarnings
549   - MaxErrors (job?)
550 =====
551 - FD sends unsaved file list to Director at end of job (see
552   RFC below).
553 - File daemon should build list of files skipped, and then
554   at end of save retry and report any errors.
555 - Write a Storage daemon that uses pipes and
556   standard Unix programs to write to the tape.
557   See afbackup.
558 - Need something that monitors the JCR queue and
559   times out jobs by asking the deamons where they are.
560 - Enhance Jmsg code to permit buffering and saving to disk.
561 - device driver = "xxxx" for drives.
562 - Verify from Volume
563 - Ensure that /dev/null works
564 - Need report class for messages. Perhaps
565   report resource where report=group of messages
566 - enhance scan_attrib and rename scan_jobtype, and
567   fill in code for "since" option 
568 - Director needs a time after which the report status is sent
569   anyway -- or better yet, a retry time for the job.
570 - Don't reschedule a job if previous incarnation is still running.
571 - Some way to automatically backup everything is needed????
572 - Need a structure for pending actions:
573   - buffered messages
574   - termination status (part of buffered msgs?)
575 - Drive management
576   Read, Write, Clean, Delete
577 - Login to Bacula; Bacula users with different permissions:
578    owner, group, user, quotas
579 - Store info on each file system type (probably in the job header on tape.
580   This could be the output of df; or perhaps some sort of /etc/mtab record.
581
582 Longer term to do:
583 - Design at hierarchial storage for Bacula. Migration and Clone. 
584 - Implement FSM (File System Modules).
585 - Audit M_ error codes to ensure they are correct and consistent.
586 - Add variable break characters to lex analyzer.
587   Either a bit mask or a string of chars so that
588   the caller can change the break characters.
589 - Make a single T_BREAK to replace T_COMMA, etc.
590 - Ensure that File daemon and Storage daemon can
591   continue a save if the Director goes down (this
592   is NOT currently the case). Must detect socket error,
593   buffer messages for later. 
594 - Enhance time/duration input to allow multiple qualifiers e.g. 3d2h
595 - Add ability to backup to two Storage devices (two SD sessions) at
596   the same time -- e.g. onsite, offsite.
597 - Add the ability to consolidate old backup sets (basically do a restore
598   to tape and appropriately update the catalog). Compress Volume sets.
599   Might need to spool via file is only one drive is available.
600 - Compress or consolidate Volumes of old possibly deleted files. Perhaps
601   someway to do so with every volume that has less than x% valid 
602   files.
603
604
605 Migration: Move a backup from one Volume to another
606 Clone:     Copy a backup -- two Volumes
607
608 Bacula Migration is based on Jobs (apparently Networker is file by file).
609
610 Migration triggered by:
611   Number of Jobs
612   Number of Volumes
613   Age of Jobs
614   Highwater mark (keep total size)
615   Lowwater mark
616   
617 Projects:
618             Bacula Projects Roadmap 
619                17 August 2002
620            last update 8 May 2003
621
622 Item 1:   Multiple simultaneous Jobs. (done)
623 Done
624
625 Item 3:   Write the bscan program -- also write a bcopy program.
626 Done
627
628 Item 5:   Implement Label templates
629 Done 
630
631 Item 6:   Write a regression script.
632 Done --   Continue to expand its testing.
633
634 Item 9:   Add SSL to daemon communications.
635 For now, implement with stunnel
636
637 Item 10:  Define definitive tape format.
638 Done (version 1.27)
639
640 --- Not completed
641 Item 4:   Implement Base jobs.
642
643   What:   A base job is sort of like a Full save except that you 
644           will want the FileSet to contain only files that are unlikely
645           to change in the future (i.e. a snapshot of most of your
646           system after installing it). After the base job has been run,
647           when you are doing a Full save, you can specify to exclude
648           all files saved by the base job that have not been modified.
649
650   Why:    This is something none of the competition does, as far as we know
651           (except BackupPC, which is a Perl program that saves to disk
652           only).  It is big win for the user, it makes Bacula stand out
653           as offering a unique optimization that immediately saves time
654           and money.
655
656   Notes:  Big savings in tape usage. Will require more resources because
657           the e. DIR must send FD a list of files/attribs, and the FD must
658           search the list and compare it for each file to be saved.
659
660 Item 2:   Make the Storage daemon use intermediate file storage to buffer data.
661 Deferred -- not necessary yet -- possibly implement with Migration.
662
663   What:   If data is coming into the SD too fast, buffer it to 
664           disk if the user has configured this option.
665
666   Why:    This would be nice, especially if it more or less falls out
667           when implementing (1) above.  If not, it probably should not
668           be given a high priority because fundamentally the backup time
669           is limited by the tape bandwidth.  Even though you may finish a
670           client job quicker by spilling to disk, you still have to
671           eventually get it onto tape.  If intermediate disk buffering
672           allows us to improve write bandwidth to tape, it may make
673           sense.
674
675   Notes:  Whether or not this is implemented will depend upon performance
676           testing after item 1 is implemented.
677
678 Item 7:   GUI for interactive restore
679 Item 8:   GUI for interactive backup
680
681   What:   The current interactive restore is implemented with a tty
682           interface. It would be much nicer to be able to "see" the
683           list of files backed up in typical GUI tree format.
684           The same mechanism could also be used for creating 
685           ad-hoc backup FileSets (item 8).
686
687   Why:    Ease of use -- especially for the end user.
688
689   Notes:  Rather than implementing in Gtk, we probably should go directly
690           for a Browser implementation, even if doing so meant the
691           capability wouldn't be available until much later.  Not only
692           is there the question of Windows sites, most
693           Solaris/HP/IRIX, etc,  shops can't currently run Gtk programs
694           without installing lots of stuff admins are very wary about.
695           Real sysadmins will always use the command line anyway, and
696           the user who's doing an interactive restore or backup of his
697           own files will in most cases be on a Windows machine running
698           Exploder.
699
700 Item 11:  New daemon communication protocol.
701
702   What:   The current daemon to daemon protocol is basically an ASCII
703           printf() and sending the buffer. On the receiving end, the
704           buffer is sscanf()ed to unpack it. The new scheme would
705           be a binary format that allows quick packing and unpacking
706           of any data type with named fields.
707
708   Why:    Using binary packing would be faster. Named fields will permit
709           error checking to ensure that what is sent is what the 
710           receiver really wants.
711
712   Notes:  These are internal improvements in the interest of the
713           long-term stability and evolution of the program.  On the one
714           hand, the sooner they're done, the less code we have to rip
715           up when the time comes to install them.  On the other hand, they
716           don't bring an immediately perceptible benefit to potential
717           users.  Item 10 and possibly item 11 should be deferred until Bacula
718           is well established with a growing user community more or
719           less happy with the feature set.  At that time, it will make a
720           good "next generation" upgrade in the interest of data
721           immortality.
722
723
724
725
726 ======================================================
727         Base Jobs design
728 It is somewhat like a Full save becomes an incremental since
729 the Base job (or jobs) plus other non-base files.
730 Need:
731 - New BaseFile table that contains:
732     JobId, BaseJobId, FileId (from Base).
733   i.e. for each base file that exists but is not saved because
734   it has not changed, the File daemon sends the JobId, BaseId,
735   and FileId back to the Director who creates the DB entry.
736 - To initiate a Base save, the Director sends the FD 
737   the FileId, and full filename for each file in the Base.
738 - When the FD finds a Base file, he requests the Director to
739   send him the full File entry (stat packet plus MD5), or
740   conversely, the FD sends it to the Director and the Director
741   says yes or no. This can be quite rapid if the FileId is kept
742   by the FD for each Base Filename.          
743 - It is probably better to have the comparison done by the FD
744   despite the fact that the File entry must be sent across the
745   network.
746 - An alternative would be to send the FD the whole File entry
747   from the start. The disadvantage is that it requires a lot of
748   space. The advantage is that it requires less communications
749   during the save.
750 - The Job record must be updated to indicate that one or more
751   Bases were used.
752 - At end of Job, FD returns:   
753    1. Count of base files/bytes not written to tape (i.e. matches)
754    2. Count of base file that were saved i.e. had changed.
755 - No tape record would be written for a Base file that matches, in the
756   same way that no tape record is written for Incremental jobs where
757   the file is not saved because it is unchanged.
758 - On a restore, all the Base file records must explicitly be
759   found from the BaseFile tape. I.e. for each Full save that is marked
760   to have one or more Base Jobs, search the BaseFile for all occurrences
761   of JobId.
762 - An optimization might be to make the BaseFile have:
763      JobId
764      BaseId
765      FileId
766   plus
767      FileIndex
768   This would avoid the need to explicitly fetch each File record for
769   the Base job.  The Base Job record will be fetched to get the
770   VolSessionId and VolSessionTime.
771 =========================================================  
772
773   
774
775 =============================================================
776
777                 Request For Comments For File Backup Options
778                    10 November 2002
779
780 Subject: File Backup Options
781
782 Problem: 
783   A few days ago, a Bacula user who is backing up to file volumes and
784   using compression asked if it was possible to suppress compressing
785   all .gz files since it was a waste of CPU time. Although Bacula
786   currently permits using different options (compression, ...) on
787   a directory by directory basis, it cannot do it on a file by 
788   file basis, which is clearly what was desired.   
789
790 Proposed Implementation:
791   To solve this problem, I propose the following:
792
793   - Add a new Director resource type called Options.  
794
795   - The Options resource will have records for all
796     options that can currently be specified on the Include record 
797     (in a FileSet).  Examples below.
798
799   - The Options resource will permit an exclude option as well
800     as a number of additional options.
801
802   - The heart of the Options resource is the ability to
803     supply any number of Match records which specify POSIX
804     regular expressions.  These Match regular expressions are
805     applied to the fully qualified filename (path and all). If
806     one matches, then the Options will be used.
807
808   - When an Match specification matches an included file, the
809     options specified in the Options resource will override
810     the default options specified on the Include record.
811
812   - Include records will be modified to permit referencing one or
813     more Options resources.  The Options will be used
814     in the order listed on the Include record and the first
815     one that matches will be applied.
816
817   - Options (or specifications) currently supplied on the Include
818     record will be deprecated (i.e. removed in a later version a
819     year or so from now).
820
821   - The Exclude record will be deprecated as the same functionality
822     can be obtained by using an Exclude = yes in the Options.
823
824 Options records:
825   The following records can appear in the Options resource. An
826   asterisk preceding the name indicates a feature not currently
827   implemented.
828
829   For Backup Jobs:
830     - Compression= (GZIP, ...)
831     - Signature=   (MD5, SHA1, ...)
832     - *Encryption=
833     - OneFs=      (yes/no)    - remain on one filesystem
834     - Recurse=    (yes/no)    - recurse into subdirectories
835     - Sparse=     (yes/no)    - do sparse file backup
836     - *Exclude=   (yes/no)    - exclude file from being saved
837     - *Reader=    (filename)  - external read (backup) program
838     - *Plugin=    (filename)  - read/write plugin module
839
840   For Verify Jobs:
841     - verify=     (ipnougsamc5) - verify options
842
843   For Restore Jobs:
844     - replace= (always/ifnewer/ifolder/never) - replace options currently
845                                                 implemented in 1.31
846     - *Writer= (filename)   - external write (restore) program
847
848
849 Implementation:
850   Currently options specifying compression, MD5 signatures, recursion,
851   ... of a FileSet are supplied on the Include record. These will now
852   all be collected into a Options resource, which will be
853   specified in the Include in place of the options. Multiple Options
854   may be specified.  Since the Options may contain regular expressions
855   that are applied to the full filename, this will give the ability
856   to specify backup options on a file by file basis to whatever level
857   of detail you wish.
858
859 Example:
860
861   Today:
862
863     FileSet {
864       Name = "FullSet"
865       Include = compression=GZIP signature=MD5 {
866         /
867       }
868     }
869
870   Proposal:
871
872     FileSet {
873       Name = "FullSet"
874       Include {
875         Compression = GZIP;
876         Signature = MD5
877         Match = /*.?*/                # matches all files.
878         File = /
879       }
880     }
881
882   That's a lot more to do the same thing, but it gives the ability to
883   apply options on a file by file basis.  For example, suppose you
884   want to compress all files but not any file with extensions .gz or .Z.
885   In that case, you will need to group two sets of options using
886   the Options resource as follows:
887
888
889     FileSet {
890       Name = "FullSet"
891       Include {
892         Options {
893           Signature = MD5
894           # Note multiple Matches are ORed
895           Match = /*.gz/   # matches .gz files */
896           Match = /*.Z/    # matches .Z files */
897         }
898         Options {
899           Compression = GZIP
900           Signature = MD5
901           Match = /*.?*/   # matches all files
902         }
903         File = /
904       }
905     }
906
907   Now, since the no Compression option is specified in the
908   first group of Options, *.gz or *.Z file will have an MD5 signature computed,
909   but will not be compressed. For all other files, the *.gz *.Z will not
910   match, so the second group of options will be used which will include GZIP
911   compression.
912
913 Questions:
914   - Is it necessary to provide some means of ANDing regular expressions
915     and negation?  (not currently planned)
916
917     e.g.  Match = /*.gz/ && !/big.gz/
918
919   - I see that Networker has a "null" module which, if specified, does not 
920     backup the file, but does make an record of the file in the catalog
921     so that the catalog will reflect an exact picture of the filesystem.
922     The result is that the file can be "seen" when "browsing" the save
923     sets, but it cannot be restored.
924     
925     Is this really useful?  Should it be implemented in Bacula?
926   
927 Results:
928   After implementing the above, the user will be able to specify
929   on a file by file basis (using regular expressions) what options are
930   applied for the backup.
931
932
933 =============================================
934
935 ========================================================== 
936     Unsaved File design
937 For each Incremental job that is run, there may be files that
938 were found but not saved because they were locked (this applies
939 only to Windows). Such a system could send back to the Director
940 a list of Unsaved files.
941 Need:
942 - New UnSavedFiles table that contains:
943   JobId
944   PathId
945   FilenameId
946 - Then in the next Incremental job, the list of Unsaved Files will be
947   feed to the FD, who will ensure that they are explicitly chosen even
948   if standard date/time check would not have selected them.
949 =============================================================
950
951
952 Done: (see kernsdone for more)
953
954 === after 1.32c
955 - John's Full save failed with 1.32c FD and 1.31 Dir no FD status,
956   and no error message.
957