]> git.sur5r.net Git - bacula/bacula/blob - bacula/kernstodo
Update copyrights
[bacula/bacula] / bacula / kernstodo
1                     Kern's ToDo List
2                     02 May 2008
3
4
5 Document:
6 - package sg3-utils, program sg_map
7 - !!! Cannot restore two jobs a the same time that were
8   written simultaneously unless they were totally spooled.
9 - Document cleaning up the spool files:
10   db, pid, state, bsr, mail, conmsg, spool
11 - Document the multiple-drive-changer.txt script.
12 - Pruning with Admin job.
13 - Does WildFile match against full name?  Doc.
14 - %d and %v only valid on Director, not for ClientRunBefore/After.
15 - During tests with the 260 char fix code, I found one problem:
16   if the system "sees" a long path once, it seems to forget it's
17   working drive (e.g.  c:\), which will lead to a problem during
18   the next job (create bootstrap file will fail).  Here is the
19   workaround: specify absolute working and pid directory in
20   bacula-fd.conf (e.g.  c:\bacula\working instead of
21   \bacula\working).
22 - Document techniques for restoring large numbers of files.
23 - Document setting my.cnf to big file usage.
24 - Add example of proper index output to doc. show index from File;
25 - Correct the Include syntax in the m4.xxx files in examples/conf
26 - Document JobStatus and Termination codes.
27 - Fix the error with the "DVI file can't be opened" while
28   building the French PDF.
29 - Document more DVD stuff
30 - Doc
31    { "JobErrors",  "i"},
32    { "JobFiles",   "i"},
33    { "SDJobFiles", "i"},
34    { "SDErrors",   "i"},
35    { "FDJobStatus","s"},
36    { "SDJobStatus","s"},
37 - Document all the little details of setting up certificates for
38   the Bacula data encryption code.
39 - Document more precisely how to use master keys -- especially
40   for disaster recovery.
41  
42 Professional Needs:
43 - Migration from other vendors
44   - Date change
45   - Path change
46 - Filesystem types
47 - Backup conf/exe (all daemons) 
48 - Backup up system state
49 - Detect state change of system (verify)
50 - Synthetic Full, Diff, Inc (Virtual, Reconstructed)
51 - SD to SD
52 - Modules for Databases, Exchange, ...
53 - Novell NSS backup http://www.novell.com/coolsolutions/tools/18952.html
54 - Compliance norms that compare restored code hash code.
55 - When glibc crash, get address with
56     info symbol 0x809780c
57 - How to sync remote offices.
58 - Exchange backup:
59   http://www.microsoft.com/technet/itshowcase/content/exchbkup.mspx
60 - David's priorities
61    Copypools
62    Extract capability (#25)
63    Continued enhancement of bweb
64    Threshold triggered migration jobs (not currently in list, but will be
65     needed ASAP)
66    Client triggered backups
67    Complete rework of the scheduling system (not in list)
68    Performance and usage instrumentation (not in list)
69    See email of 21Aug2007 for details.
70 - Look at: http://tech.groups.yahoo.com/group/cfg2html
71    and http://www.openeyet.nl/scc/ for managing customer changes
72
73 Priority:
74 ================
75
76 - Why no error message if restore has no permission on the where
77   directory?
78 - Possibly allow manual "purge" to purge a Volume that has not
79   yet been written (even if FirstWritten time is zero) see ua_purge.c
80   is_volume_purged().
81 - Add disk block detection bsr code (make it work).
82 - Remove done bsrs.
83 - Add blast attributes to DIR to SD.
84 - Detect deadlocks in reservations.
85 - Plugins:
86   - Add list during dump
87   - Add in plugin code flag
88   - Add bRC_EndJob -- stops more calls to plugin this job
89   - Add bRC_Term (unload plugin)
90   - remove time_t from Jmsg and use utime_t?
91 - Extended ACLs
92 - Deadlock detection, watchdog sees if counter advances when jobs are
93   running.  With debug on, can do a "status" command.
94 - User options for plugins.
95 - Pool Storage override precidence over command line.
96 - Autolabel only if Volume catalog information indicates tape not
97   written. This will avoid overwriting a tape that gets an I/O
98   error on reading the volume label.
99 - I/O error, SD thinks it is not the right Volume, should check slot
100   then disable volume, but Asks for mount.
101 - Can be posible modify package to create and use configuration files in 
102    the Debian manner? 
103
104    For example:
105
106    /etc/bacula/bacula-dir.conf
107    /etc/bacula/conf.d/pools.conf
108    /etc/bacula/conf.d/clients.conf
109    /etc/bacula/conf.d/storages.conf
110
111    and into bacula-dir.conf file include
112
113    @/etc/bacula/conf.d/pools.conf
114    @/etc/bacula/conf.d/clients.conf
115    @/etc/bacula/conf.d/storages.conf
116 - Possibly add an Inconsistent state when a Volume is in error
117   for non I/O reasons.
118 - Fix #ifdefing so that smartalloc can be disabled. Check manual
119   -- the default is enabled.
120 - Change calling sequence to delete_job_id_range() in ua_cmds.c 
121   the preceding strtok() is done inside the subroutine only once.
122 - Dangling softlinks are not restored properly.  For example, take a
123   soft link such as src/testprogs/install-sh, which points to /usr/share/autoconf...
124   move the directory to another machine where the file /usr/share/autoconf does
125   not exist, back it up, then try a full restore.  It fails.
126 - Softlinks that point to non-existent file are not restored in restore all,
127   but are restored if the file is individually selected.  BUG!
128 - New directive "Delete purged Volumes"
129 - Prune by Job
130 - Prune by Job Level (Full, Differential, Incremental)
131 - Strict automatic pruning 
132 - Implement unmount of USB volumes.
133 - Use "./config no-idea no-mdc2 no-rc5" on building OpenSSL for
134   Win32 to avoid patent problems.
135 - Implement multiple jobid specification for the cancel command,
136   similar to what is permitted on the update slots command.
137 - modify pruning to keep a fixed number of versions of a file, 
138   if requested.
139 - the cd-command should allow complete paths
140   i.e. cd /foo/bar/foo/bar
141   -> if a customer mails me the path to a certain file,
142      its faster to enter the specified directory
143 - Make tree walk routines like cd, ls, ... more user friendly
144   by handling spaces better.
145 - When doing a restore, if the user does an "update slots"
146   after the job started in order to add a restore volume, the
147    values prior to the update slots will be put into the catalog.
148    Must retrieve catalog record merge it then write it back at the
149    end of the restore job, if we want to do this right.
150 === rate design
151   jcr->last_rate
152   jcr->last_runtime
153   MA = (last_MA * 3 + rate) / 4
154   rate = (bytes - last_bytes) / (runtime - last_runtime)
155 - Add a recursive mark command (rmark) to restore.
156 - "Minimum Job Interval = nnn" sets minimum interval between Jobs
157   of the same level and does not permit multiple simultaneous
158   running of that Job (i.e. lets any previous invocation finish
159   before doing Interval testing).
160 - Look at simplifying File exclusions.
161 - Scripts
162 - Auto update of slot:
163    rufus-dir: ua_run.c:456-10 JobId=10 NewJobId=10 using pool Full priority=10
164    02-Nov 12:58 rufus-dir JobId 10: Start Backup JobId 10, Job=kernsave.2007-11-02_12.58.03
165    02-Nov 12:58 rufus-dir JobId 10: Using Device "DDS-4"
166    02-Nov 12:58 rufus-sd JobId 10: Invalid slot=0 defined in catalog for Volume "Vol001" on "DDS-4" (/dev/nst0). Manual load my be required.
167    02-Nov 12:58 rufus-sd JobId 10: 3301 Issuing autochanger "loaded? drive 0" command.
168    02-Nov 12:58 rufus-sd JobId 10: 3302 Autochanger "loaded? drive 0", result is Slot 2.
169    02-Nov 12:58 rufus-sd JobId 10: Wrote label to prelabeled Volume "Vol001" on device "DDS-4" (/dev/nst0)
170    02-Nov 12:58 rufus-sd JobId 10: Alert: TapeAlert[7]:   Media Life: The tape has reached the end of its useful life.
171    02-Nov 12:58 rufus-dir JobId 10: Bacula rufus-dir 2.3.6 (26Oct07): 02-Nov-2007 12:58:51
172 - Separate Files and Directories in catalog
173 - Create FileVersions table
174 - Look at rsysnc for incremental updates and dedupping
175 - Add MD5 or SHA1 check in SD for data validation
176 - finish implementation of fdcalled -- see ua_run.c:105
177 - Fix problem in postgresql.c in my_postgresql_query, where the
178   generation of the error message doesn't differentiate result==NULL
179   and a bad status from that result.  Not only that, the result is
180   cleared on a bail_out without having generated the error message.
181 - KIWI
182 - Implement SDErrors (must return from SD)
183 - Implement USB keyboard support in rescue CD.
184 - Implement continue spooling while despooling.
185 - Remove all install temp files in Win32 PLUGINSDIR.
186 - Audit retention periods to make sure everything is 64 bit.
187 - No where in restore causes kaboom.
188 - Performance: multiple spool files for a single job.
189 - Performance: despool attributes when despooling data (problem
190   multiplexing Dir connection).
191 - Make restore use the in-use volume reservation algorithm.
192 - When Pool specifies Storage command override does not work.
193 - Implement wait_for_sysop() message display in wait_for_device(), which
194   now prints warnings too often.
195 - Ensure that each device in an Autochanger has a different
196   Device Index.
197 - Look at sg_logs -a /dev/sg0 for getting soft errors.
198 - btape "test" command with Offline on Unmount = yes
199
200    This test is essential to Bacula.
201
202    I'm going to write one record  in file 0,
203    two records in file 1,
204    and three records in file 2
205
206    02-Feb 11:00 btape: ABORTING due to ERROR in dev.c:715
207    dev.c:714 Bad call to rewind. Device "LTO" (/dev/nst0) not open
208    02-Feb 11:00 btape: Fatal Error because: Bacula interrupted by signal 11: Segmentation violation
209    Kaboom! btape, btape got signal 11. Attempting traceback.
210
211 - Encryption -- email from Landon
212    > The backup encryption algorithm is currently not configurable, and is  
213    > set to AES_128_CBC in src/filed/backup.c. The encryption code  
214    > supports a number of different ciphers (as well as adding arbitrary  
215    > new ones) -- only a small bit of code would be required to map a  
216    > configuration string value to a CRYPTO_CIPHER_* value, if anyone is  
217    > interested in implementing this functionality.
218
219 - Figure out some way to "automatically" backup conf changes.
220 - Add the OS version back to the Win32 client info.
221 - Restarted jobs have a NULL in the from field.
222 - Modify SD status command to indicate when the SD is writing
223   to a DVD (the device is not open -- see bug #732).
224 - Look at the possibility of adding "SET NAMES UTF8" for MySQL,
225   and possibly changing the blobs into varchar.
226 - Ensure that the SD re-reads the Media record if the JobFiles
227   does not match -- it may have been updated by another job.
228 - Doc items
229 - Test Volume compatibility between machine architectures
230 - Encryption documentation
231 - Wrong jobbytes with query 12 (todo)
232 - Bare-metal recovery Windows (todo)
233    
234
235 Projects:
236 - Pool enhancements
237   - Access Mode = Read-Only, Read-Write, Unavailable, Destroyed, Offsite
238   - Pool Type = Copy
239   - Maximum number of scratch volumes
240   - Maximum File size
241   - Next Pool (already have)
242   - Reclamation threshold
243   - Reclamation Pool
244   - Reuse delay (after all files purged from volume before it can be used)
245   - Copy Pool = xx, yyy (or multiple lines).
246   - Catalog = xxx
247   - Allow pool selection during restore.
248
249 - Average tape size from Eric
250     SELECT COALESCE(media_avg_size.volavg,0) * count(Media.MediaId) AS volmax,                                                              GROUP BY Media.MediaType, Media.PoolId, media_avg_size.volavg
251            count(Media.MediaId)  AS volnum,
252            sum(Media.VolBytes)   AS voltotal,
253            Media.PoolId          AS PoolId,
254            Media.MediaType       AS MediaType
255     FROM Media
256     LEFT JOIN (SELECT avg(Media.VolBytes) AS volavg,
257                       Media.MediaType     AS MediaType
258                FROM Media
259               WHERE Media.VolStatus = 'Full'
260               GROUP BY Media.MediaType
261                ) AS media_avg_size ON (Media.MediaType = media_avg_size.MediaType)
262     GROUP BY Media.MediaType, Media.PoolId, media_avg_size.volavg
263 - GUI
264   - Admin
265   - Management reports
266   - Add doc for bweb -- especially Installation
267   - Look at Webmin
268      http://www.orangecrate.com/modules.php?name=News&file=article&sid=501
269 - Performance
270   - Despool attributes in separate thread
271   - Database speedups
272   - Embedded MySQL
273   - Check why restore repeatedly sends Rechdrs between
274     each data chunk -- according to James Harper 9Jan07.
275 - Features
276   - Better scheduling  
277   - More intelligent re-run
278   - FD plugins
279   - Incremental backup -- rsync, Stow
280
281 For next release:
282 - Try to fix bscan not working with multiple DVD volumes bug #912.
283 - Look at mondo/mindi
284 - Make Bacula by default not backup tmpfs, procfs, sysfs, ...
285 - Fix hardlinked immutable files when linking a second file, the
286   immutable flag must be removed prior to trying to link it.
287 - Change dbcheck to tell users to use native tools for fixing
288   broken databases, and to ensure they have the proper indexes.
289 - add udev rules for Bacula devices.
290 - If a job terminates, the DIR connection can close before the
291   Volume info is updated, leaving the File count wrong.
292 - Look at why SIGPIPE during connection can cause seg fault in
293   writing the daemon message, when Dir dropped to bacula:bacula
294 - Look at zlib 32 => 64 problems.
295 - Possibly turn on St. Bernard code.
296 - Fix bextract to restore ACLs, or better yet, use common routines.
297 - Do we migrate appendable Volumes?
298 - Remove queue.c code.
299 - Print warning message if LANG environment variable does not specify
300   UTF-8.
301 - New dot commands from Arno.
302   .show device=xxx lists information from one storage device, including 
303      devices (I'm not even sure that information exists in the DIR...)
304   .move eject device=xxx mostly the same as 'unmount xxx' but perhaps with 
305      better machine-readable output like "Ok" or "Error busy"
306   .move eject device=xxx toslot=yyy the same as above, but with a new 
307      target slot. The catalog should be updated accordingly.
308   .move transfer device=xxx fromslot=yyy toslot=zzz
309
310 Low priority:
311 - Article: http://www.heise.de/open/news/meldung/83231
312 - Article: http://www.golem.de/0701/49756.html
313 - Article: http://lwn.net/Articles/209809/
314 - Article: http://www.onlamp.com/pub/a/onlamp/2004/01/09/bacula.html
315 - Article: http://www.linuxdevcenter.com/pub/a/linux/2005/04/07/bacula.html
316 - Article: http://www.osreviews.net/reviews/admin/bacula
317 - Article: http://www.debianhelp.co.uk/baculaweb.htm
318 - Article: 
319 - Wikis mentioning Bacula
320   http://wiki.finkproject.org/index.php/Admin:Backups
321   http://wiki.linuxquestions.org/wiki/Bacula
322   http://www.openpkg.org/product/packages/?package=bacula
323   http://www.iterating.com/products/Bacula
324   http://net-snmp.sourceforge.net/wiki/index.php/Net-snmp_extensions
325   http://www.section6.net/wiki/index.php/Using_Bacula_for_Tape_Backups
326   http://bacula.darwinports.com/
327   http://wiki.mandriva.com/en/Releases/Corporate/Server_4/Notes#Bacula
328   http://en.wikipedia.org/wiki/Bacula
329
330 - Bacula Wikis
331   http://www.devco.net/pubwiki/Bacula/
332   http://paramount.ind.wpi.edu/wiki/doku.php
333   http://gentoo-wiki.com/HOWTO_Backup
334   http://www.georglutz.de/wiki/Bacula
335   http://www.clarkconnect.com/wiki/index.php?title=Modules_-_LAN_Backup/Recovery
336   http://linuxwiki.de/Bacula   (in German)
337
338 - Possibly allow SD to spool even if a tape is not mounted.
339 - Figure out how to configure query.sql.  Suggestion to use m4:
340     == changequote.m4 ===
341     changequote(`[',`]')dnl
342     ==== query.sql.in ===
343     :List next 20 volumes to expire
344     SELECT
345         Pool.Name AS PoolName,
346         Media.VolumeName,
347         Media.VolStatus,
348         Media.MediaType,
349     ifdef([MySQL],
350     [ FROM_UNIXTIME(UNIX_TIMESTAMP(Media.LastWritten) Media.VolRetention) AS Expire, ])dnl
351     ifdef([PostgreSQL],
352     [ media.lastwritten + interval '1 second' * media.volretention as expire, ])dnl
353       Media.LastWritten
354       FROM Pool
355       LEFT JOIN Media
356       ON Media.PoolId=Pool.PoolId
357       WHERE Media.LastWritten>0
358       ORDER BY Expire
359       LIMIT 20;
360     ====
361     Command: m4 -DmySQL changequote.m4 query.sql.in >query.sql
362
363   The problem is that it requires m4, which is not present on all machines
364   at ./configure time.
365
366 ==== SQL
367 # get null file
368 select FilenameId from Filename where Name='';
369 # Get list of all directories referenced in a Backup.
370 select Path.Path from Path,File where File.JobId=nnn and
371   File.FilenameId=(FilenameId-from-above) and File.PathId=Path.PathId
372   order by Path.Path ASC;
373
374 - Look into using Dart for testing
375   http://public.kitware.com/Dart/HTML/Index.shtml
376
377 - Look into replacing autotools with cmake
378   http://www.cmake.org/HTML/Index.html
379
380 - Mount on an Autochanger with no tape in the drive causes:
381    Automatically selected Storage: LTO-changer
382    Enter autochanger drive[0]: 0
383    3301 Issuing autochanger "loaded drive 0" command.
384    3302 Autochanger "loaded drive 0", result: nothing loaded.
385    3301 Issuing autochanger "loaded drive 0" command.
386    3302 Autochanger "loaded drive 0", result: nothing loaded.
387    3902 Cannot mount Volume on Storage Device "LTO-Drive1" (/dev/nst0) because:
388    Couldn't rewind device "LTO-Drive1" (/dev/nst0): ERR=dev.c:678 Rewind error on "LTO-Drive1" (/dev/nst0). ERR=No medium found.
389    3905 Device "LTO-Drive1" (/dev/nst0) open but no Bacula volume is mounted.
390    If this is not a blank tape, try unmounting and remounting the Volume.
391 - If Drive 0 is blocked, and drive 1 is set "Autoselect=no", drive 1 will
392   be used.
393 - Autochanger did not change volumes.  
394    select * from Storage;
395    +-----------+-------------+-------------+
396    | StorageId | Name        | AutoChanger |
397    +-----------+-------------+-------------+
398    |         1 | LTO-changer |           0 |
399    +-----------+-------------+-------------+
400    05-May 03:50 roxie-sd: 3302 Autochanger "loaded drive 0", result is Slot 11.
401    05-May 03:50 roxie-sd: Tibs.2006-05-05_03.05.02 Warning: Director wanted Volume "LT
402     Current Volume "LT0-002" not acceptable because:
403     1997 Volume "LT0-002" not in catalog.
404    05-May 03:50 roxie-sd: Tibs.2006-05-05_03.05.02 Error: Autochanger Volume "LT0-002"
405     Setting InChanger to zero in catalog.
406    05-May 03:50 roxie-dir: Tibs.2006-05-05_03.05.02 Error: Unable to get Media record
407
408    05-May 03:50 roxie-sd: Tibs.2006-05-05_03.05.02 Fatal error: Error getting Volume i
409    05-May 03:50 roxie-sd: Tibs.2006-05-05_03.05.02 Fatal error: Job 530 canceled.
410    05-May 03:50 roxie-sd: Tibs.2006-05-05_03.05.02 Fatal error: spool.c:249 Fatal appe
411    05-May 03:49 Tibs: Tibs.2006-05-05_03.05.02 Fatal error: c:\cygwin\home\kern\bacula
412    , got
413      (missing)
414     llist volume=LTO-002
415               MediaId: 6
416            VolumeName: LTO-002
417                  Slot: 0
418                PoolId: 1
419             MediaType: LTO-2
420          FirstWritten: 2006-05-05 03:11:54
421           LastWritten: 2006-05-05 03:50:23
422             LabelDate: 2005-12-26 16:52:40
423               VolJobs: 1
424              VolFiles: 0
425             VolBlocks: 1
426             VolMounts: 0
427              VolBytes: 206
428             VolErrors: 0
429             VolWrites: 0
430      VolCapacityBytes: 0
431             VolStatus: 
432               Recycle: 1
433          VolRetention: 31,536,000
434        VolUseDuration: 0
435            MaxVolJobs: 0
436           MaxVolFiles: 0
437           MaxVolBytes: 0
438             InChanger: 0
439               EndFile: 0
440              EndBlock: 0
441              VolParts: 0
442             LabelType: 0
443             StorageId: 1
444
445    Note VolStatus is blank!!!!!
446    llist volume=LTO-003
447              MediaId: 7
448           VolumeName: LTO-003
449                 Slot: 12
450               PoolId: 1
451            MediaType: LTO-2
452         FirstWritten: 0000-00-00 00:00:00
453          LastWritten: 0000-00-00 00:00:00
454            LabelDate: 2005-12-26 16:52:40
455              VolJobs: 0
456             VolFiles: 0
457            VolBlocks: 0
458            VolMounts: 0
459             VolBytes: 1
460            VolErrors: 0
461            VolWrites: 0
462     VolCapacityBytes: 0
463            VolStatus: Append
464              Recycle: 1
465         VolRetention: 31,536,000
466       VolUseDuration: 0
467           MaxVolJobs: 0
468          MaxVolFiles: 0
469          MaxVolBytes: 0
470            InChanger: 0
471              EndFile: 0
472             EndBlock: 0
473             VolParts: 0
474            LabelType: 0
475            StorageId: 1
476 ===
477    mount
478    Automatically selected Storage: LTO-changer
479    Enter autochanger drive[0]: 0
480    3301 Issuing autochanger "loaded drive 0" command.
481    3302 Autochanger "loaded drive 0", result: nothing loaded.
482    3301 Issuing autochanger "loaded drive 0" command.
483    3302 Autochanger "loaded drive 0", result: nothing loaded.
484    3902 Cannot mount Volume on Storage Device "LTO-Drive1" (/dev/nst0) because:
485    Couldn't rewind device "LTO-Drive1" (/dev/nst0): ERR=dev.c:678 Rewind error on "LTO-Drive1" (/dev/nst0). ERR=No medium found.
486
487    3905 Device "LTO-Drive1" (/dev/nst0) open but no Bacula volume is mounted.
488    If this is not a blank tape, try unmounting and remounting the Volume.
489
490 - http://www.dwheeler.com/essays/commercial-floss.html
491 - Add VolumeLock to prevent all but lock holder (SD) from updating
492   the Volume data (with the exception of VolumeState).
493 - The btape fill command does not seem to use the Autochanger
494 - Make Windows installer default to system disk drive.
495 - Look at using ioctl(FIOBMAP, ...) on Linux, and 
496   DeviceIoControl(...,  FSCTL_QUERY_ALLOCATED_RANGES, ...) on
497   Win32 for sparse files.
498   http://www.flexhex.com/docs/articles/sparse-files.phtml
499   http://www.informatik.uni-frankfurt.de/~loizides/reiserfs/fibmap.html
500 - Directive: at <event> "command"
501 - Command: pycmd "command" generates "command" event.  How to
502   attach to a specific job?
503 - Integrate Christopher's St. Bernard code.
504 - run_cmd() returns int should return JobId_t
505 - get_next_jobid_from_list() returns int should return JobId_t
506 - Document export LDFLAGS=-L/usr/lib64
507 - Don't attempt to restore from "Disabled" Volumes.
508 - Network error on Win32 should set Win32 error code.
509 - What happens when you rename a Disk Volume?
510 - Job retention period in a Pool (and hence Volume).  The job would
511   then be migrated.
512 - Look at -D_FORTIFY_SOURCE=2
513 - Add Win32 FileSet definition somewhere
514 - Look at fixing restore status stats in SD.
515 - Look at using ioctl(FIMAP) and FIGETBSZ for sparse files.
516   http://www.informatik.uni-frankfurt.de/~loizides/reiserfs/fibmap.html
517 - Implement a mode that says when a hard read error is
518   encountered, read many times (as it currently does), and if the
519   block cannot be read, skip to the next block, and try again.  If
520   that fails, skip to the next file and try again, ...
521 - Add level table:
522   create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
523   insert into LevelType (LevelType,LevelTypeLong) values
524   ("F","Full"),
525   ("D","Diff"),
526   ("I","Inc");
527 - Show files/second in client status output.
528 - new pool XXX with ScratchPoolId = MyScratchPool's PoolId and
529   let it fill itself, and RecyclePoolId = XXX's PoolId so I can
530   see if it become stable and I just have to supervise
531   MyScratchPool
532 - If I want to remove this pool, I set RecyclePoolId = MyScratchPool's
533   PoolId, and when it is empty remove it.
534 - Add Volume=SCRTCH
535 - Allow Check Labels to be used with Bacula labels.
536 - "Resuming" a failed backup (lost line for example) by using the
537   failed backup as a sort of "base" job.
538 - Look at NDMP
539 - Email to the user when the tape is about to need changing x
540   days before it needs changing.
541 - Command to show next tape that will be used for a job even
542   if the job is not scheduled.
543 - From: Arunav Mandal <amandal@trolltech.com>
544   1. When jobs are running and bacula for some reason crashes or if I do a 
545   restart it remembers and jobs it was running before it crashed or restarted 
546   as of now I loose all jobs if I restart it.
547
548   2. When spooling and in the midway if client is disconnected for instance a 
549   laptop bacula completely discard the spool. It will be nice if it can write 
550   that spool to tape so there will be some backups for that client if not all.
551
552   3. We have around 150 clients machines it will be nice to have a option to 
553   upgrade all the client machines bacula version automatically.
554
555   4. Atleast one connection should be reserved for the bconsole so at heavy load 
556   I should connect to the director via bconsole which at sometimes I can't
557
558   5. Another most important feature that is missing, say at 10am I manually 
559   started  backup of client abc and it was a full backup since client abc has 
560   no backup history and at 10.30am bacula again automatically started backup of 
561   client abc as that was in the schedule. So now we have 2 multiple Full 
562   backups of the same client and if we again try to start a full backup of 
563   client backup abc bacula won't complain. That should be fixed.
564
565 - For Windows disaster recovery see http://unattended.sf.net/
566 - regardless of the retention period, Bacula will not prune the
567   last Full, Diff, or Inc File data until a month after the
568   retention period for the last Full backup that was done.
569 - update volume=xxx --- add status=Full
570 - Remove old spool files on startup.
571 - Exclude SD spool/working directory.
572 - Refuse to prune last valid Full backup. Same goes for Catalog.
573 - Python:
574   - Make a callback when Rerun failed levels is called.
575   - Give Python program access to Scheduled jobs.
576   - Add setting Volume State via Python.
577   - Python script to save with Python, not save, save with Bacula.
578   - Python script to do backup.
579   - What events?
580   - Change the Priority, Client, Storage, JobStatus (error) 
581     at the start of a job.
582 - Why is SpoolDirectory = /home/bacula/spool;  not reported
583   as an error when writing a DVD?
584 - Make bootstrap file handle multiple MediaTypes (SD)
585 - Remove all old Device resource code in Dir and code to pass it
586   back in SD -- better, rework it to pass back device statistics.
587 - Check locking of resources -- be sure to lock devices where previously
588   resources were locked. 
589 - The last part is left in the spool dir.
590
591
592 - In restore don't compare byte count on a raw device -- directory
593   entry does not contain bytes.
594
595
596 - Max Vols limit in Pool off by one?
597 - Implement Files/Bytes,... stats for restore job.
598 - Implement Total Bytes Written, ... for restore job.
599 - Despool attributes simultaneously with data in a separate
600   thread, rejoined at end of data spooling.
601 - 7. Implement new Console commands to allow offlining/reserving drives,
602      and possibly manipulating the autochanger (much asked for).
603 - Add start/end date editing in messages (%t %T, %e?) ...
604 - Add ClientDefs similar to JobDefs.
605 - Print more info when bextract -p accepts a bad block.
606 - Fix FD JobType to be set before RunBeforeJob in FD.
607 - Look at adding full Volume and Pool information to a Volume 
608   label so that bscan can get *all* the info. 
609 - If the user puts "Purge Oldest Volume = yes" or "Recycle Oldest Volume = yes"
610   and there is only one volume in the pool, refuse to do it -- otherwise
611   he fills the Volume, then immediately starts reusing it.
612 - Implement copies and stripes.
613 - Add history file to console.
614 - Each file on tape creates a JobMedia record. Peter has 4 million
615   files spread over 10000 tape files and four tapes. A restore takes
616   16 hours to build the restore list.
617 - Add and option to check if the file size changed during backup.
618 - Make sure SD deletes spool files on error exit.
619 - Delete old spool files when SD starts.
620 - When labeling tapes, if you enter 000026, Bacula uses
621   the tape index rather than the Volume name 000026.
622 - Add offline tape command to Bacula console.
623 - Bug: 
624   Enter MediaId or Volume name: 32
625   Enter new Volume name: DLT-20Dec04
626   Automatically selected Pool: Default
627   Connecting to Storage daemon DLTDrive at 192.168.68.104:9103 ...
628   Sending relabel command from "DLT-28Jun03" to "DLT-20Dec04" ...
629   block.c:552 Write error at 0:0 on device /dev/nst0. ERR=Bad file descriptor.
630   Error writing final EOF to tape. This tape may not be readable.
631   dev.c:1207 ioctl MTWEOF error on /dev/nst0. ERR=Permission denied.
632   askdir.c:219 NULL Volume name. This shouldn't happen!!!
633   3912 Failed to label Volume: ERR=dev.c:1207 ioctl MTWEOF error on /dev/nst0. ERR=Permission denied.
634   Label command failed for Volume DLT-20Dec04.
635   Do not forget to mount the drive!!!
636 - Bug: if a job is manually scheduled to run later, it does not appear
637   in any status report and cannot be cancelled.
638
639
640 ==== 
641 From David:
642 How about introducing a Type = MgmtPolicy job type? That job type would
643 be responsible for scanning the Bacula environment looking for specific
644 conditions, and submitting the appropriate jobs for implementing said
645 policy, eg: 
646
647 Job {
648    Name = "Migration-Policy"
649    Type = MgmtPolicy
650    Policy Selection Job Type = Migrate
651    Scope = "<keyword> <operator> <regexp>"
652    Threshold = "<keyword> <operator> <regexp>"
653    Job Template = <template-name>
654 }
655
656 Where <keyword> is any legal job keyword, <operator> is a comparison
657 operator (=,<,>,!=, logical operators AND/OR/NOT) and <regexp> is a
658 appropriate regexp. I could see an argument for Scope and Threshold
659 being SQL queries if we want to support full flexibility. The
660 Migration-Policy job would then get scheduled as frequently as a site
661 felt necessary (suggested default: every 15 minutes). 
662
663 Example: 
664
665 Job {
666    Name = "Migration-Policy"
667    Type = MgmtPolicy
668    Policy Selection Job Type = Migration
669    Scope = "Pool=*"
670    Threshold = "Migration Selection Type = LowestUtil"
671    Job Template = "MigrationTemplate"
672 }
673
674 would select all pools for examination and generate a job based on
675 MigrationTemplate to automatically select the volume with the lowest
676 usage and migrate it's contents to the nextpool defined for that pool. 
677
678 This policy abstraction would be really handy for adjusting the behavior
679 of Bacula according to site-selectable criteria (one thing that pops
680 into mind is Amanda's ability to automatically adjust backup levels
681 depending on various criteria).
682
683
684 =====
685
686 Regression tests:
687 - Add Pool/Storage override regression test.
688 - Add delete JobId to regression.
689 - Add a regression test for dbcheck.  
690 - New test to add bscan to four-concurrent-jobs regression,
691   i.e. after the four-concurrent jobs zap the
692   database as is done in the bscan-test, then use bscan to
693   restore the database, do a restore and compare with the
694   original.
695 - Add restore of specific JobId to regression (item 3
696   on the restore prompt)
697 - Add IPv6 to regression
698 - Add database test to regression. Test each function like delete,
699   purge, ...
700
701 - AntiVir can slow down backups on Win32 systems. 
702 - Win32 systems with FAT32 can be much slower than NTFS for
703   more than 1000 files per directory.
704
705
706 1.37 Possibilities:
707 - A HOLD command to stop all jobs from starting.
708 - A PAUSE command to pause all running jobs ==> release the
709   drive.
710 - Media Type = LTO,LTO-2,LTO-3
711   Media Type Read = LTO,LTO2,LTO3
712   Media Type Write = LTO2, LTO3
713
714 === From Carsten Menke <bootsy52@gmx.net>
715
716 Following is a list of what I think in the situations where I'm faced with, 
717 could be a usefull enhancement to bacula, which I'm certain other users will 
718 benefit from as well.
719
720 1. NextJob/NextJobs Directive within a Job Resource in the form of
721     NextJobs = job1,job2.
722
723     Why:
724     I currently solved the problem with running multiple jobs each after each
725     by setting the Max Wait Time for a job to 8 hours, and give
726     the jobs different Priorities. However, there scenarios where
727     1 Job is directly depending on another job, so if the former job fails,
728     the job after it needn't to be run
729     while maybe other jobs should run despite of that
730
731 Example:
732   A Backup Job and a Verify job, if the backup job fails there is no need to run
733   the verify job, as the backup job already failed. However, one may like
734   to backup the Catalog to disk despite of that the main backup job failed.
735
736 Notes:
737   I see that this is related to the Event Handlers which are on the ToDo
738   list, also it is maybe a good idea to check for the return value and
739   execute different actions based on the return value
740
741
742 3. offline capability to bconsole
743
744     Why:
745     Currently I use a script which I execute within the last Job via the
746     RunAfterJob Directive, to release and eject the tape.
747     So I have to call bconsole "release=Storage-Name" and afterwards
748     mt -f /dev/nst0 eject to get the tape out.
749
750     If I have multiple Storage Devices, than these may not be /dev/nst0 and
751     I have to modify the script or call it with parameters etc.
752     This would actually not be needed, as everything is already defined
753     in bacula-sd.conf and if   I can invoke bconsole with the
754     storage name via $1 in the script than I'm done and information is
755     not duplicated.
756
757 4. %s for Storage Name added to the chars being substituted in "RunAfterJob"
758
759     Why:
760
761     For the reason mentioned in 3. to have the ability to call a
762     script with /scripts/foobar %s and in the script use $1
763     to pass the Storage Name to bconsole
764
765 5. Setting Volume State within a Job Resource
766
767     Why:
768     Instead of using "Maximum Volume Jobs" in the Pool Resource,
769     I would have the possibilty to define
770     in a Job Resource that after this certain job is run, the Volume State
771     should be set to "Volume State = Used", this give more flexibility (IMHO).
772
773 6. Localization of Bacula Messages
774
775     Why:
776     Unfortunatley many,many people I work with don't speak english very well.
777     So if at least the Reporting messages would be localized then they
778     would  understand that they have to change the tape,etc. etc.
779
780     I volunteer to do the german translations, and if I can convince my wife also
781     french and Morre (western african language).
782
783 7. OK, this is evil, probably bound to security risks and maybe not possible
784     due to the design of bacula.
785
786     Implementation of Backtics ( `command` ) for shell comand execution to
787     the "Label Format" Directive.
788
789 Why:
790
791     Currently I have defined BACULA_DAY_OF_WEEK="day1|day2..." resulting in
792     Label Format = "HolyBackup-${BACULA_DAY_OF_WEEK[${WeekDay}]}". If I could
793     use backticks than I could use "Label Format = HolyBackup-`date +%A` to have
794     the localized name for the day of the week appended to the
795     format string. Then I have the tape labeled automatically with weekday
796     name in the correct language.
797 ==========
798 - Make output from status use html table tags for nicely 
799   presenting in a browser.
800 - Browse generations of files.
801 - I've seen an error when my catalog's File table fills up.  I
802    then have to recreate the File table with a larger maximum row
803    size.  Relevant information is at
804    http://dev.mysql.com/doc/mysql/en/Full_table.html ; I think the
805    "Installing and Configuring MySQL" chapter should talk a bit
806    about this potential problem, and recommend a solution.
807 - For Solaris must use POSIX awk.
808 - Want speed of writing to tape while despooling.
809 - Supported autochanger:
810 OS: Linux
811 Man.: HP
812 Media: LTO-2
813 Model: SSL1016
814 Slots: 16
815 Cap: 200GB
816 - Supported drive:
817   Wangtek 6525ES (SCSI-1 QIC drive, 525MB), under Linux 2.4.something, 
818   bacula 1.36.0/1 works with blocksize 16k INSIDE bacula-sd.conf.
819 - Add regex from http://www.pcre.org to Bacula for Win32.
820 - Use only shell tools no make in CDROM package.
821 - Include within include does it work?
822 - Implement a Pool of type Cleaning?
823 - Implement VolReadTime and VolWriteTime in SD
824 - Modify Backing up Your Database to include a bootstrap file.
825 - Think about making certain database errors fatal.
826 - Look at correcting the time jump in the scheduler for daylight
827   savings time changes.
828 - Add a "real" timer to network connections.
829 - Promote to Full = Time period 
830 - Check dates entered by user for correctness (month/day/... ranges)
831 - Compress restore Volume listing by date and first file.
832 - Look at patches/bacula_db.b2z postgresql that loops during restore.
833   See Gregory Wright.
834 - Perhaps add read/write programs and/or plugins to FileSets.
835 - How to handle backing up portables ...
836 - Add some sort of guaranteed Interval for upgrading jobs.
837 - Can we write the state file after every job terminates? On Win32
838   the system crashes and the state file is not updated.
839 - Limit bandwidth
840
841 Documentation to do: (any release a little bit at a time)
842 - Doc to do unmount before removing magazine.
843 - Alternative to static linking "ldd prog" save all binaries listed,
844   restore them and point LD_LIBRARY_PATH to them.
845 - Document add "</dev/null >/dev/null 2>&1" to the bacula-fd command line
846 - Document query file format.
847 - Add more documentation for bsr files.
848 - Document problems with Verify and pruning.
849 - Document how to use multiple databases.
850 - VXA drives have a "cleaning required"
851   indicator, but Exabyte recommends preventive cleaning after every 75
852   hours of operation.
853   From Phil:
854     In this context, it should be noted that Exabyte has a command-line
855     vxatool utility available for free download. (The current version is
856     vxatool-3.72.) It can get diagnostic info, read, write and erase tapes,
857     test the drive, unload tapes, change drive settings, flash new firmware,
858     etc.
859     Of particular interest in this context is that vxatool <device> -i will
860     report, among other details, the time since last cleaning in tape motion
861     minutes. This information can be retrieved (and settings changed, for
862     that matter) through the generic-SCSI device even when Bacula has the
863     regular tape device locked. (Needless to say, I don't recommend
864     changing tape settings while a job is running.)
865 - Lookup HP cleaning recommendations.
866 - Lookup HP tape replacement recommendations (see trouble shooting autochanger)
867 - Document doing table repair
868
869
870 ===================================
871 - Add macro expansions in JobDefs.
872   Run Before Job = "SomeFile %{Level} %{Client}"
873   Write Bootstrap="/some/dir/%{JobName}_%{Client}.bsr"
874 - Use non-blocking network I/O but if no data is available, use
875   select().
876 - Use gather write() for network I/O.
877 - Autorestart on crash.
878 - Add bandwidth limiting.
879 - When an error in input occurs and conio beeps, you can back
880   up through the prompt.
881 - Detect fixed tape block mode during positioning by looking at
882   block numbers in btape "test".  Possibly adjust in Bacula.
883 - Fix list volumes to output volume retention in some other
884   units, perhaps via a directive.
885 - Allow Simultaneous Priorities = yes  => run up to Max concurrent jobs even
886   with multiple priorities.
887 - If you use restore replace=never, the directory attributes for
888   non-existent directories will not be restored properly.
889
890 - see lzma401.zip in others directory for new compression
891   algorithm/library.
892 - Allow the user to select JobType for manual pruning/purging.
893 - bscan does not put first of two volumes back with all info in
894   bscan-test.
895 - Figure out how to make named console messages go only to that
896   console and to the non-restricted console (new console class?).
897 - Make restricted console prompt for password if *ask* is set or
898   perhaps if password is undefined.
899 - Implement "from ISO-date/time every x hours/days/weeks/months" in
900   schedules.
901
902 ==== from Marc Schoechlin
903 - the help-command should be more verbose
904   (it should explain the paramters of the different 
905   commands in detail)
906   -> its time-comsuming to consult the manual anytime
907      you need a special parameter
908   -> maybe its more easy to maintain this, if the
909      descriptions of that commands are outsourced to
910      a ceratin-file
911 - if the password is not configured in bconsole.conf
912   you should be asked for it.
913   -> sometimes you like to do restore on a customer-machine
914      which shouldnt know the password for bacula.
915   -> adding the password to the file favours admins
916      to forget to remove the password after usage
917   -> security-aspects
918      the protection of that file is less important
919 - long-listed-output of commands should be scrollable
920   like the unix more/less-command does
921   -> if someone runs 200 and more machines, the lists could
922      be a little long and complex
923 - command-output should be shown column by column
924   to reduce scrolling and to increase clarity
925   -> see last item
926 - lsmark should list the selected files with full
927   paths
928 - wildcards for selecting and file and directories would be nice
929 - any actions should be interuptable with STRG+C
930 - command-expansion would be pretty cool
931 ====
932 - When the replace Never option is set, new directory permissions
933   are not restored. See bug 213. To fix this requires creating a
934   list of newly restored directories so that those directory 
935   permissions *can* be restored.
936 - Add prune all command
937 - Document fact that purge can destroy a part of a restore by purging
938   one volume while others remain valid -- perhaps mark Jobs.
939 - Add multiple-media-types.txt
940 - look at mxt-changer.html
941 - Make ? do a help command (no return needed).
942 - Implement restore directory.
943 - Document streams and how to implement them.
944 - Try not to re-backup a file if a new hard link is added.
945 - Add feature to backup hard links only, but not the data.
946 - Fix stream handling to be simpler.
947 - Add Priority and Bootstrap to Run a Job.
948 - Eliminate Restore "Run Restore Job" prompt by allowing new "run command
949   to be issued"
950 - Remove View FileSet button from Run a Job dialog.
951 - Handle prompt for restore job at end of Restore command.
952 - Add display of total selected files to Restore window.
953 - Add tree pane to left of window.
954 - Add progress meter.
955 - Max wait time or max run time causes seg fault -- see runtime-bug.txt
956 - Add message to user to check for fixed block size when the forward
957   space test fails in btape.
958 - When unmarking a directory check if all files below are unmarked and
959   then remove the + flag -- in the restore tree.
960 - Possibly implement: Action = Unmount Device="TapeDrive1" in Admin jobs.
961 - Setup lrrd graphs: (http://www.linpro.no/projects/lrrd/) Mike Acar.
962 - Revisit the question of multiple Volumes (disk) on a single device.
963 - Add a block copy option to bcopy.
964 - Fix "llist jobid=xx" where no fileset or client exists.
965 - For each job type (Admin, Restore, ...) require only the really necessary
966   fields.- Pass Director resource name as an option to the Console.
967 - Add a "batch" mode to the Console (no unsolicited queries, ...).
968 - Allow browsing the catalog to see all versions of a file (with 
969   stat data on each file).
970 - Restore attributes of directory if replace=never set but directory
971   did not exist.
972 - Use SHA1 on authentication if possible.
973 - See comtest-xxx.zip for Windows code to talk to USB.
974 - Add John's appended files:
975    Appended = {     /files/server/logs/http/*log   }
976    and such files would be treated as follows.On a FULL backup, they would
977    be backed up like any other file.On an INCREMENTAL backup, where a
978    previous INCREMENTAL or FULL was already in thecatalogue and the length
979    of the file wasgreater than the length of the last backup, only thedata
980    added since the last backup will be dumped.On an INCREMENTAL backup, if
981    the length of the file is less than thelength of the file with the same
982    name last backed up, the completefile is dumped.On Windows systems, with
983    creation date of files, we can be evensmarter about this and not count
984    entirely upon the length.On a restore, the full and all incrementals
985    since it will beapplied in sequence to restore the file.  
986 - Check new HAVE_WIN32 open bits.    
987 - Check if the tape has moved before writing.  
988 - Handling removable disks -- see below:
989 - Add FromClient and ToClient keywords on restore command (or
990   BackupClient RestoreClient).
991 - Implement a JobSet, which groups any number of jobs. If the
992   JobSet is started, all the jobs are started together.
993   Allow Pool, Level, and Schedule overrides.
994 - Look at updating Volume Jobs so that Max Volume Jobs = 1 will work
995   correctly for multiple simultaneous jobs.
996 - Implement the Media record flag that indicates that the Volume does disk 
997   addressing.
998 - Implement VolAddr, which is used when Volume is addressed like a disk,
999   and form it from VolFile and VolBlock.
1000 - Fix fast block rejection (stored/read_record.c:118). It passes a null
1001   pointer (rec) to try_repositioning().
1002 - Implement RestoreJobRetention? Maybe better "JobRetention" in a Job,
1003   which would take precidence over the Catalog "JobRetention".
1004 - Implement Label Format in Add and Label console commands.
1005 - Put email tape request delays on one or more variables. User wants
1006   to cancel the job after a certain time interval.  Maximum Mount Wait?
1007 - Job, Client, Device, Pool, or Volume?
1008   Is it possible to make this a directive which is *optional* in multiple
1009   resources, like Level? If so, I think I'd make it an optional directive
1010   in Job, Client, and Pool, with precedence such that Job overrides Client
1011   which in turn overrides Pool.
1012
1013 - New Storage specifications:
1014   - Want to write to multiple storage devices simultaneously
1015   - Want to write to multiple storage devices sequentially (in one job)
1016   - Want to read/write simultaneously
1017   - Key is MediaType -- it must match
1018
1019   Passed to SD as a sort of BSR record called Storage Specification
1020     Record or SSR.
1021     SSR                    
1022       Next -> Next SSR
1023       MediaType -> Next MediaType
1024       Pool -> Next Pool
1025       Device -> Next Device
1026   Job Resource
1027      Allow multiple Storage specifications
1028      New flags
1029         One Archive = yes
1030         One Device = yes
1031         One Storage = yes
1032         One MediaType = yes
1033         One Pool = yes
1034   Storage
1035      Allow Multiple Pool specifications (note, Pool currently
1036        in Job resource).
1037      Allow Multiple MediaType specifications in Dir conf
1038      Allow Multiple Device specifications in Dir conf
1039      Perhaps keep this in a single SSR
1040   Tie a Volume to a specific device by using a MediaType that 
1041     is contained in only one device.
1042   In SD allow Device to have Multiple MediaTypes
1043
1044 - Ideas from Jerry Scharf:
1045   First let's point out some big pluses that bacula has for this
1046         it's open source
1047         more importantly it's active. Thank you so much for that
1048         even more important, it's not flaky
1049         it has an open access catalog, opening many possibilities
1050         it's pushing toward heterogeneous systems capability
1051   big things:
1052    Macintosh file client
1053         macs are an interesting niche, but I fear a server is a rathole
1054    working bare iron recovery for windows
1055    the option for  inc/diff backups not reset on fileset revision
1056         a) use both change and inode update time against base time
1057         b) do the full catalog check (expensive but accurate)
1058    sizing guide (how much system is needed to back up N systems/files)
1059    consultants on using bacula in building a disaster recovery system
1060    an integration guide
1061         or how to get at fancy things that one could do with bacula
1062    logwatch code for bacula logs (or similar)
1063    linux distro inclusion of bacula (brings good and bad, but necessary)
1064    win2k/XP server capability (icky but you asked)
1065    support for Oracle database ??
1066 ===
1067 - Look at adding SQL server and Exchange support for Windows. 
1068 - Create VolAddr for disk files in place of VolFile and VolBlock. This
1069   is needed to properly specify ranges.
1070 - Add progress of files/bytes to SD and FD.
1071 - Print warning message if FileId > 4 billion
1072 - do a "messages" before the first prompt in Console
1073 - Client does not show busy during Estimate command.
1074 - Implement Console mtx commands.
1075 - Implement a Mount Command and an Unmount Command where
1076   the users could specify a system command to be performed
1077   to do the mount, after which Bacula could attempt to
1078   read the device. This is for Removeable media such as a CDROM.
1079   - Most likely, this mount command would be invoked explicitly
1080   by the user using the current Console "mount" and "unmount" 
1081   commands -- the Storage Daemon would do the right thing 
1082   depending on the exact nature of the device.
1083   - As with tape drives, when Bacula wanted a new removable
1084   disk mounted, it would unmount the old one, and send a message
1085   to the user, who would then use "mount" as described above 
1086   once he had actually inserted the disk.
1087 - Implement dump/print label to UA
1088 - Spool to disk only when the tape is full, then when a tape is hung move
1089   it to tape.
1090 - bextract is sending everything to the log file ****FIXME****
1091 - Allow multiple Storage specifications (or multiple names on
1092   a single Storage specification) in the Job record. Thus a job 
1093   can be backed up to a number of storage devices.
1094 - Implement some way for the File daemon to contact the Director 
1095   to start a job or pass its DHCP obtained IP number.
1096 - Implement a query tape prompt/replace feature for a console
1097 - Make sure that Bacula rechecks the tape after the 20 min wait.
1098 - Set IO_NOWAIT on Bacula TCP/IP packets.
1099 - Try doing a raw partition backup and restore by mounting a
1100   Windows partition.
1101 - From Lars Kellers:
1102     Yes, it would allow to highly automatic the request for new tapes. If a 
1103     tape is empty, bacula reads the barcodes (native or simulated), and if 
1104     an unused tape is found, it runs the label command with all the 
1105     necessary parameters.
1106
1107     By the way can bacula automatically "move" an empty/purged volume say 
1108     in the "short" pool to the "long" pool if this pool runs out of volume 
1109     space?
1110 - What to do about "list files job=xxx".
1111 - Look at how fuser works and /proc/PID/fd that is how Nic found the
1112   file descriptor leak in Bacula.
1113 - Can we dynamically change FileSets?
1114 - If pool specified to label command and Label Format is specified,
1115   automatically generate the Volume name.
1116 - Add ExhautiveRestoreSearch
1117 - Look at the possibility of loading only the necessary 
1118   data into the restore tree (i.e. do it one directory at a
1119   time as the user walks through the tree).
1120 - Possibly use the hash code if the user selects all for a restore command.
1121 - Fix "restore all" to bypass building the tree.
1122 - Prohibit backing up archive device (findlib/find_one.c:128)
1123 - Implement Release Device in the Job resource to unmount a drive.
1124 - Implement Acquire Device in the Job resource to mount a drive,
1125   be sure this works with admin jobs so that the user can get
1126   prompted to insert the correct tape.  Possibly some way to say to
1127   run the job but don't save the files.
1128 - Make things like list where a file is saved case independent for
1129   Windows.
1130 - Implement a Recycle command
1131 - Start working on Base jobs.
1132 - From Phil Stracchino:
1133   It would probably be a per-client option, and would be called
1134   something like, say, "Automatically purge obsoleted jobs".  What it
1135   would do is, when you successfully complete a Differential backup of a
1136   client, it would automatically purge all Incremental backups for that
1137   client that are rendered redundant by that Differential.  Likewise,
1138   when a Full backup on a client completed, it would automatically purge
1139   all Differential and Incremental jobs obsoleted by that Full backup.
1140   This would let people minimize the number of tapes they're keeping on
1141   hand without having to master the art of retention times.
1142 - When doing a Backup send all attributes back to the Director, who
1143   would then figure out what files have been deleted.
1144 - Currently in mount.c:236 the SD simply creates a Volume. It should have
1145   explicit permission to do so.  It should also mark the tape in error
1146   if there is an error.
1147 - Cancel waiting for Client connect in SD if FD goes away.
1148
1149 - Implement timeout in response() when it should come quickly.
1150 - Implement a Slot priority (loaded/not loaded).
1151 - Implement "vacation" Incremental only saves.
1152 - Implement create "FileSet"?
1153 - Add prefixlinks to where or not where absolute links to FD.
1154 - Issue message to mount a new tape before the rewind.
1155 - Simplified client job initiation for portables.
1156 - If SD cannot open a drive, make it periodically retry.
1157 - Add more of the config info to the tape label.
1158
1159 - Refine SD waiting output:
1160     Device is being positioned
1161     >     Device is being positioned for append
1162     >     Device is being positioned to file x
1163     > 
1164 - Figure out some way to estimate output size and to avoid splitting
1165   a backup across two Volumes -- this could be useful for writing CDROMs
1166   where you really prefer not to have it split -- not serious.
1167 - Have SD compute MD5 or SHA1 and compare to what FD computes.
1168 - Make VolumeToCatalog calculate an MD5 or SHA1 from the 
1169   actual data on the Volume and compare it.                  
1170 - Make bcopy read through bad tape records.
1171 - Program files (i.e. execute a program to read/write files).
1172   Pass read date of last backup, size of file last time.
1173 - Add Signature type to File DB record.
1174 - CD into subdirectory when open()ing files for backup to
1175   speed up things.  Test with testfind().
1176 - Priority job to go to top of list.
1177 - Why are save/restore of device different sizes (sparse?)   Yup! Fix it.
1178 - Implement some way for the Console to dynamically create a job.
1179 - Solaris -I on tar for include list
1180 - Need a verbose mode in restore, perhaps to bsr.
1181 - bscan without -v is too quiet -- perhaps show jobs.
1182 - Add code to reject whole blocks if not wanted on restore.
1183 - Check if we can increase Bacula FD priorty in Win2000
1184 - Check if both CatalogFiles and UseCatalog are set to SD.
1185 - Possibly add email to Watchdog if drive is unmounted too
1186   long and a job is waiting on the drive.
1187 - After unmount, if restore job started, ask to mount.
1188 - Add UA rc and history files.
1189 - put termcap (used by console) in ./configure and
1190   allow -with-termcap-dir.
1191 - Fix Autoprune for Volumes to respect need for full save.
1192 - Compare tape to Client files (attributes, or attributes and data) 
1193 - Make all database Ids 64 bit.
1194 - Allow console commands to detach or run in background.
1195 - Add SD message variables to control operator wait time
1196   - Maximum Operator Wait
1197   - Minimum Message Interval
1198   - Maximum Message Interval
1199 - Send Operator message when cannot read tape label.
1200 - Verify level=Volume (scan only), level=Data (compare of data to file).
1201   Verify level=Catalog, level=InitCatalog
1202 - Events file
1203 - Add keyword search to show command in Console.
1204 - Events : tape has more than xxx bytes.
1205 - Complete code in Bacula Resources -- this will permit
1206   reading a new config file at any time.
1207 - Handle ctl-c in Console
1208 - Implement script driven addition of File daemon to config files.
1209 - Think about how to make Bacula work better with File (non-tape) archives.
1210 - Write Unix emulator for Windows.
1211 - Make database type selectable by .conf files i.e. at runtime
1212 - Set flag for uname -a.  Add to Volume label.
1213 - Restore files modified after date
1214 - SET LD_RUN_PATH=$HOME/mysql/lib/mysql
1215 - Remove duplicate fields from jcr (e.g. jcr.level and jcr.jr.Level, ...).
1216 - Timout a job or terminate if link goes down, or reopen link and query.
1217 - Concept of precious tapes (cannot be reused).
1218 - Make bcopy copy with a single tape drive.
1219 - Permit changing ownership during restore.
1220
1221 - From Phil:
1222   > My suggestion:  Add a feature on the systray menu-icon menu to request
1223   > an immediate backup now.  This would be useful for laptop users who may
1224   > not be on the network when the regular scheduled backup is run.
1225   > 
1226   > My wife's suggestion: Add a setting to the win32 client to allow it to
1227   > shut down the machine after backup is complete (after, of course,
1228   > displaying a "System will shut down in one minute, click here to cancel"
1229   > warning dialog).  This would be useful for sites that want user
1230   > woorkstations to be shut down overnight to save power.
1231   > 
1232
1233 - Autolabel should be specified by DIR instead of SD.
1234 - Storage daemon    
1235   - Add media capacity
1236   - AutoScan (check checksum of tape)
1237   - Format command = "format /dev/nst0"
1238   - MaxRewindTime
1239   - MinRewindTime
1240   - MaxBufferSize
1241   - Seek resolution (usually corresponds to buffer size)
1242   - EODErrorCode=ENOSPC or code
1243   - Partial Read error code
1244   - Partial write error code
1245   - Nonformatted read error
1246   - Nonformatted write error
1247   - WriteProtected error
1248   - IOTimeout
1249   - OpenRetries
1250   - OpenTimeout
1251   - IgnoreCloseErrors=yes
1252   - Tape=yes
1253   - NoRewind=yes
1254 - Pool
1255   - Maxwrites
1256   - Recycle period
1257 - Job
1258   - MaxWarnings
1259   - MaxErrors (job?)
1260 =====
1261 - Write a Storage daemon that uses pipes and
1262   standard Unix programs to write to the tape.
1263   See afbackup.
1264 - Need something that monitors the JCR queue and
1265   times out jobs by asking the deamons where they are.
1266 - Enhance Jmsg code to permit buffering and saving to disk.
1267 - Verify from Volume
1268 - Need report class for messages. Perhaps
1269   report resource where report=group of messages
1270 - enhance scan_attrib and rename scan_jobtype, and
1271   fill in code for "since" option 
1272 - Director needs a time after which the report status is sent
1273   anyway -- or better yet, a retry time for the job.
1274 - Don't reschedule a job if previous incarnation is still running.
1275 - Some way to automatically backup everything is needed????
1276 - Need a structure for pending actions:
1277   - buffered messages
1278   - termination status (part of buffered msgs?)
1279 - Drive management
1280   Read, Write, Clean, Delete
1281 - Login to Bacula; Bacula users with different permissions:
1282    owner, group, user, quotas
1283 - Store info on each file system type (probably in the job header on tape.
1284   This could be the output of df; or perhaps some sort of /etc/mtab record.
1285
1286 ========= ideas ===============
1287 From: "Jerry K. Schieffer" <jerry@skylinetechnology.com>
1288 To: <kern@sibbald.com>
1289 Subject: RE: [Bacula-users] future large programming jobs
1290 Date: Thu, 26 Feb 2004 11:34:54 -0600
1291
1292 I noticed the subject thread and thought I would offer the following
1293 merely as sources of ideas, i.e. something to think about, not even as
1294 strong as a request.  In my former life (before retiring) I often
1295 dealt with backups and storage management issues/products as a
1296 developer and as a consultant.  I am currently migrating my personal
1297 network from amanda to bacula specifically because of the ability to
1298 cross media boundaries during storing backups.
1299 Are you familiar with the commercial product called ADSM (I think IBM
1300 now sells it under the Tivoli label)?  It has a couple of interesting
1301 ideas that may apply to the following topics.
1302
1303 1. Migration:  Consider that when you need to restore a system, there
1304 may be pressure to hurry.  If all the information for a single client
1305 can eventually end up on the same media (and in chronological order),
1306 the restore is facillitated by not having to search past information
1307 from other clients.  ADSM has the concept of "client affinity" that
1308 may be associated with it's storage pools.  It seems to me that this
1309 concept (as an optional feature) might fit in your architecture for
1310 migration.
1311
1312 ADSM also has the concept of defining one or more storage pools as
1313 "copy pools" (almost mirrors, but only in the sense of contents).
1314 These pools provide the ability to have duplicte data stored both
1315 onsite and offsite.  The copy process can be scheduled to be handled
1316 by their storage manager during periods when there is no backup
1317 activity.  Again, the migration process might be a place to consider
1318 implementing something like this.
1319
1320 >
1321 > It strikes me that it would be very nice to be able to do things
1322 like
1323 > have the Job(s) backing up the machines run, and once they have all
1324 > completed, start a migration job to copy the data from disks Volumes
1325 to
1326 > a tape library and then to offsite storage. Maybe this can already
1327 be
1328 > done with some careful scheduling and Job prioritzation; the events
1329 > mechanism described below would probably make it very easy.
1330
1331 This is the goal. In the first step (before events), you simply
1332 schedule
1333 the Migration to tape later.
1334
1335 2. Base jobs:  In ADSM, each copy of each stored file is tracked in
1336 the database.  Once a file (unique by path and metadata such as dates,
1337 size, ownership, etc.) is in a copy pool, no more copies are made.  In
1338 other words, when you start ADSM, it begins like your concept of a
1339 base job.  After that it is in the "incremental" mode.  You can
1340 configure the number of "generations" of files to be retained, plus a
1341 retention date after which even old generations are purged.  The
1342 database tracks the contents of media and projects the percentage of
1343 each volume that is valid.  When the valid content of a volume drops
1344 below a configured percentage, the valid data are migrated to another
1345 volume and the old volume is marked as empty.  Note, this requires
1346 ADSM to have an idea of the contents of a client, i.e. marking the
1347 database when an existing file was deleted, but this would solve your
1348 issue of restoring a client without restoring deleted files.
1349
1350 This is pretty far from what bacula now does, but if you are going to
1351 rip things up for Base jobs,.....
1352 Also, the benefits of this are huge for very large shops, especially
1353 with media robots, but are a pain for shops with manual media
1354 mounting.
1355
1356 >
1357 > Base jobs sound pretty useful, but I'm not dying for them.
1358
1359 Nobody is dying for them, but when you see what it does, you will die
1360 without it.
1361
1362 Regards,
1363 Jerry Schieffer
1364
1365 ==============================
1366
1367 Longer term to do:
1368 - Implement FSM (File System Modules).
1369 - Audit M_ error codes to ensure they are correct and consistent.
1370 - Add variable break characters to lex analyzer.
1371   Either a bit mask or a string of chars so that
1372   the caller can change the break characters.
1373 - Make a single T_BREAK to replace T_COMMA, etc.
1374 - Ensure that File daemon and Storage daemon can
1375   continue a save if the Director goes down (this
1376   is NOT currently the case). Must detect socket error,
1377   buffer messages for later. 
1378 - Add ability to backup to two Storage devices (two SD sessions) at
1379   the same time -- e.g. onsite, offsite.
1380
1381 ======================================================
1382         Base Jobs design
1383 It is somewhat like a Full save becomes an incremental since
1384 the Base job (or jobs) plus other non-base files.
1385 Need:
1386 - A Base backup is same as Full backup, just different type.
1387 - New BaseFiles table that contains:
1388     BaseId - index
1389     BaseJobId - Base JobId referenced for this FileId (needed ???)
1390     JobId - JobId currently running
1391     FileId - File not backed up, exists in Base Job
1392     FileIndex - FileIndex from Base Job.
1393   i.e. for each base file that exists but is not saved because
1394   it has not changed, the File daemon sends the JobId, BaseId,
1395   FileId, FileIndex back to the Director who creates the DB entry.
1396 - To initiate a Base save, the Director sends the FD 
1397   the FileId, and full filename for each file in the Base.
1398 - When the FD finds a Base file, he requests the Director to
1399   send him the full File entry (stat packet plus MD5), or
1400   conversely, the FD sends it to the Director and the Director
1401   says yes or no. This can be quite rapid if the FileId is kept
1402   by the FD for each Base Filename.          
1403 - It is probably better to have the comparison done by the FD
1404   despite the fact that the File entry must be sent across the
1405   network.
1406 - An alternative would be to send the FD the whole File entry
1407   from the start. The disadvantage is that it requires a lot of
1408   space. The advantage is that it requires less communications
1409   during the save.
1410 - The Job record must be updated to indicate that one or more
1411   Bases were used.
1412 - At end of Job, FD returns:   
1413    1. Count of base files/bytes not written to tape (i.e. matches)
1414    2. Count of base file that were saved i.e. had changed.
1415 - No tape record would be written for a Base file that matches, in the
1416   same way that no tape record is written for Incremental jobs where
1417   the file is not saved because it is unchanged.
1418 - On a restore, all the Base file records must explicitly be
1419   found from the BaseFile tape. I.e. for each Full save that is marked
1420   to have one or more Base Jobs, search the BaseFile for all occurrences
1421   of JobId.
1422 - An optimization might be to make the BaseFile have:
1423      JobId
1424      BaseId
1425      FileId
1426   plus
1427      FileIndex
1428   This would avoid the need to explicitly fetch each File record for
1429   the Base job.  The Base Job record will be fetched to get the
1430   VolSessionId and VolSessionTime.
1431 =========================================================  
1432
1433 ====
1434    Handling removable disks
1435
1436    From: Karl Cunningham <karlc@keckec.com>
1437
1438    My backups are only to hard disk these days, in removable bays. This is my
1439    idea of how a backup to hard disk would work more smoothly. Some of these
1440    things Bacula does already, but I mention them for completeness. If others
1441    have better ways to do this, I'd like to hear about it.
1442
1443    1. Accommodate several disks, rotated similar to how tapes are.  Identified
1444    by partition volume ID or perhaps by the name of a subdirectory.
1445    2. Abort & notify the admin if the wrong disk is in the bay.
1446    3. Write backups to different subdirectories for each machine to be backed
1447    up.
1448    4. Volumes (files) get created as needed in the proper subdirectory, one
1449    for each backup.
1450    5. When a disk is recycled, remove or zero all old backup files. This is
1451    important as the disk being recycled may be close to full. This may be
1452    better done manually since the backup files for many machines may be
1453    scattered in many subdirectories.
1454 ====
1455
1456
1457 === Done
1458
1459 ===
1460 - Fix bpipe.c so that it does not modify results pointer.
1461   ***FIXME*** calling sequence should be changed.