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