]> git.sur5r.net Git - bacula/bacula/blob - bacula/kernstodo
Important protocol change -- see kes29Oct02
[bacula/bacula] / bacula / kernstodo
1                  Kern's ToDo List
2                  25 October 2002
3
4 To do:    
5 - Document that two Verifys at same time on same client do not work.
6 - Document how to recycle a tape in 7 days even if the backup takes a long time.
7
8 - Figure out why my Catalog size keeps growing (Filename and Path
9   tables keep growing) -- fix it.
10
11 - Add Doc on saving MySQL databases, where to find code for shutting 
12   down and saving other databases.
13
14 For 1.27 release:
15 - Continue improving the restore process (handling
16   of tapes, efficiency improvements e.g. use FSF to
17   position the tape, ...)
18 - Allow restore with options (e.g. overwrite, overwrite
19   if newer, no overwrite, permit changing ownership, ...).
20 - Test recovery of a damaged tape.
21 - Work more on how to to a Bacula restore beginning with
22   just a Bacula tape and a boot floppy (bare metal recovery).
23 - Possibly add a File System Module permitting an external
24   program do the file reading and writing during save and
25   restore (i.e. with this you could backup/restore
26   ANYTHING to and from a Bacula Volume, including horrible
27   stuff like Windows ACLs).
28
29 - Preprocessing command per file.
30 - Postprocessing command per file (when restoring).
31 - File system type from File daemon
32 - Decide what to do with JobTDate in catalog (make real btime_t?)
33 - File daemon should pass Director the operating system info
34   to be stored in the Client Record (or verified that it has
35   not changed).
36 - Add VOLUME_CAT_INFO to the EOS tape record (as
37   well as to the EOD record).
38 - Send Volumes needed during restore to Console (just after
39   create_volume_list) -- also in restore command?
40 - Document buffer size considerations with Sparse files --
41 - Document all daemon tools MUST have a config file.
42 - Move block size code from block.c to init_dev().
43 - Add code to fast seek to proper place on tape/file
44   when doing Restore. If it doesn't work, try linear
45   search as before.
46 - Add code to reject whole blocks if not wanted on restore.
47 - Why does btape error when pointed to a file?
48 - Possibly add email to Watchdog if drive is unmounted too
49   long and a job is waiting on the drive.
50 - Disallow compile if long long not 64 bits.
51 - What to do with btime and JobTDate?
52 - Add FileSet MD5 to bscan.
53 - Finish implementation of restore "replace" options, and document.
54 - Strip trailing slashes from Include directory names in the FD.
55 - Use read_record.c in SD code.
56 - Allow changing ownership/group of files on restore.
57 - Restore options (overwrite, ...)
58 - Program files (i.e. execute a program to read/write files).
59   Pass read date of last backup, size of file last time.
60 - Try bare metal Windows restore
61 - Recovery of a bad tape (bcopy)
62 - EOM records?????????????????
63 - Why don't we get an error message from Win32 FD when bootstrap 
64   file cannot be created for restore command?
65 - Put MaximumVolumeSize in Director.
66 - Document to have patience when SD first starts.
67 - Document running a test version.
68 - When Marking a file in Restore that is a hard link, also
69   mark the link so that the data will be reloaded.
70 - Restore program that errors in SD due to no tape reports
71   OK incorrectly in output.
72 - Make BSR accept count (total files to be restored).
73 - Make BSR return next_block when it knows record is not
74   in block, done when count is reached, and possibly other
75   optimizations. I.e. add a state word.
76
77 After 1.27
78 - After unmount, if restore job started, ask to mount.
79 - Fix db_get_fileset in cats/sql_get.c for multiple records.
80 - Fix start/end blocks for File devices
81 - Add new code to scheduler.c and run_conf.c
82 - Fix catalog filename truncation in sql_get and sql_create. Use
83   only a single filename split routine.
84 - Add command to reset VolFiles to a larger value (don't allow
85   a smaller number or print big warning).
86 - Make Restore report an error if FD or SD term codes are not OK.
87 - Convert all %x substitution variables, which are hard to remember
88   and read to %(variable-name).  Idea from TMDA.
89 - Add JobLevel in FD status (but make sure it is defined).
90 - Make Pool resource handle Counter resources.
91 - Remove NextId for SQLite. Optimize.
92 - Fix gethostbyname() to use gethostbyname_r()
93 - Implement ./configure --with-client-only
94 - Strip trailing / from Include
95 - Move all SQL statements into a single location.
96 - Cleanup db_update_media and db_update_pool
97 - Add UA rc and history files.
98 - put termcap (used by console) in ./configure and
99   allow -with-termcap-dir.
100 - Remove JobMediaId it is not used.
101 - Enhance time and size scanning routines.
102 - Fix Autoprune for Volumes to respect need for full save.
103 - DateWritten field on tape may be wrong.
104 - Fix Win32 config file definition name on /install
105 - No READLINE_SRC if found in alternate directory.
106 - Add Client FS/OS id (Linux, Win95/98, ...).
107
108   
109 Projects:
110             Bacula Projects Roadmap 
111                17 August 2002
112            last update 7 October 2002
113
114 Item 1:   Multiple simultaneous Jobs. (done)
115 Done
116
117   What:   Permit multiple simultaneous jobs in Bacula.
118
119   Why:    An enterprise level solution needs to go fast without the
120           need for the system administrator to carefully tweak
121           timing.  Based on the benchmarks, during a full
122           backup, NetWorker typically hit 10 times the bandwidth to
123           the tape compared to Bacula--largely. This is probably due to
124           running parallel jobs and multi-threaded filling of buffers
125           and writing them to tape.  This should also make things work
126           better when you have a mix of fast and slow machines backing
127           up at the same time.
128
129   Notes:  Bacula was designed to run multiple simultaneous jobs. Thus
130           implementing this is a matter of some small cleanups and
131           careful testing.
132
133
134 Item 2:   Make the Storage daemon use intermediate file storage to buffer data.
135 Deferred -- not necessary yet.
136
137   What:   If data is coming into the SD too fast, buffer it to 
138           disk if the user has configured this option.
139
140   Why:    This would be nice, especially if it more or less falls out
141           when implementing (1) above.  If not, it probably should not
142           be given a high priority because fundamentally the backup time
143           is limited by the tape bandwidth.  Even though you may finish a
144           client job quicker by spilling to disk, you still have to
145           eventually get it onto tape.  If intermediate disk buffering
146           allows us to improve write bandwidth to tape, it may make
147           sense.
148
149   Notes:  Whether or not this is implemented will depend upon performance
150           testing after item 1 is implemented.
151
152
153 Item 3:   Write the bscan program.
154 Done
155
156   What:   Write a program that reads a Bacula tape and puts all the 
157           appropriate data into the catalog. This allows recovery
158           from a tape that is no longer in the database, or it allows
159           re-creation of a database if lost.
160
161   Why:    This is a fundamental robustness and disaster recovery tool
162           which will increase the comfort level of a sysadmin
163           considering adopting Bacula.
164
165   Notes:  A skeleton of this program already exists, but much work
166           needs to be done. Implementing this will also make apparent
167           any deficiencies in the current Bacula tape format.
168
169
170 Item 4:   Implement Base jobs.
171
172   What:   A base job is sort of like a Full save except that you 
173           will want the FileSet to contain only files that are unlikely
174           to change in the future (i.e. a snapshot of most of your
175           system after installing it). After the base job has been run,
176           when you are doing a Full save, you can specify to exclude
177           all files saved by the base job that have not been modified.
178
179   Why:    This is something none of the competition does, as far as we know
180           (except BackupPC, which is a Perl program that saves to disk
181           only).  It is big win for the user, it makes Bacula stand out
182           as offering a unique optimization that immediately saves time
183           and money.
184
185   Notes:  Big savings in tape usage. Will require more resources because
186           the e. DIR must send FD a list of files/attribs, and the FD must
187           search the list and compare it for each file to be saved.
188
189
190 Item 5:   Implement Label templates
191
192   What:   This is a mechanism whereby Bacula can automatically create
193           a tape label for new tapes according to a detailed specification
194           provided by the user.
195
196   Why:    It is a major convenience item for folks who use automated label
197           creation.
198
199   Notes:  Bacula already has a working form of automatic tape label
200           creation, but it is very crude. The design for the complete
201           tape labeling project is already documented in the manual.
202
203
204 Item 6:   Write a regression script.
205 Started
206
207   What:   This is an automatic script that runs and tests as many features
208           of Bacula as possible. The output is compared to previous
209           versions of Bacula and any differences are reported.
210
211   Why:    This is an enormous help in preventing introduction of new
212           errors in parts of the program that already work correctly.
213
214   Notes:  This probably should be ranked higher, it's something the typical
215           user doesn't see.  Depending on how it's implemented, it may
216           make sense to defer it until the archival tape format and
217           user interface mature.
218
219
220 Item 7:   GUI for interactive restore
221 Item 8:   GUI for interactive backup
222
223   What:   The current interactive restore is implemented with a tty
224           interface. It would be much nicer to be able to "see" the
225           list of files backed up in typical GUI tree format.
226           The same mechanism could also be used for creating 
227           ad-hoc backup FileSets (item 8).
228
229   Why:    Ease of use -- especially for the end user.
230
231   Notes:  Rather than implementing in Gtk, we probably should go directly
232           for a Browser implementation, even if doing so meant the
233           capability wouldn't be available until much later.  Not only
234           is there the question of Windows sites, most
235           Solaris/HP/IRIX, etc,  shops can't currently run Gtk programs
236           without installing lots of stuff admins are very wary about.
237           Real sysadmins will always use the command line anyway, and
238           the user who's doing an interactive restore or backup of his
239           own files will in most cases be on a Windows machine running
240           Exploder.
241
242
243 Item 9:   Add SSL to daemon communications.
244
245   What:   This provides for secure communications between the daemons.
246
247   Why:    This would allow doing backup across the Internet without
248           privacy concerns (or with much less concern).
249
250   Notes:  The vast majority of near term potential users will be backing up
251           a single site over a LAN and, correctly or not, they probably
252           won't be concerned with security, at least not enough to go to
253           the trouble to set up keys, etc. to screw things down.  We suspect
254           that many users genuinely interested in multi-site backup
255           already run some form of VPN software in their internetwork
256           connections, and are willing to delegate security to that layer.
257
258
259 Item 10:  Define definitive tape format.
260 Mostly done (version 1.27)
261
262   What:   Define that definitive tape format that will not change 
263           for the next millennium.
264
265   Why:    Stability, security.
266
267   Notes:  See notes for item 11 below.
268
269
270 Item 11:  New daemon communication protocol.
271
272   What:   The current daemon to daemon protocol is basically an ASCII
273           printf() and sending the buffer. On the receiving end, the
274           buffer is sscanf()ed to unpack it. The new scheme would
275           be a binary format that allows quick packing and unpacking
276           of any data type with named fields.
277
278   Why:    Using binary packing would be faster. Named fields will permit
279           error checking to ensure that what is sent is what the 
280           receiver really wants.
281
282   Notes:  These are internal improvements in the interest of the
283           long-term stability and evolution of the program.  On the one
284           hand, the sooner they're done, the less code we have to rip
285           up when the time comes to install them.  On the other hand, they
286           don't bring an immediately perceptible benefit to potential
287           users.  Item 10 and possibly item 11 should be deferred until Bacula
288           is well established with a growing user community more or
289           less happy with the feature set.  At that time, it will make a
290           good "next generation" upgrade in the interest of data
291           immortality.
292
293
294
295 I haven't put these in any particular order.
296
297 Small projects:
298 - Rework Storage daemon with new rwl_lock routines.
299 - Compare tape to Client files (attributes, or attributes and data) 
300 - Restore options (overwrite, overwrite if older,
301    overwrite if newer, never overwrite, ...)
302 - Restore to a particular time -- e.g. before date, after date. 
303 - Make all database Ids 64 bit.
304 - Write an applet for Linux.
305 - Add estimate to Console commands
306 - Find solution to blank filename (i.e. path only) problem.
307 - Implement new daemon communications protocol.
308
309 Dump:
310   mysqldump -f  --opt bacula >bacula
311
312
313 To be done:
314 - Remove PoolId from Job table, it exists in Media.
315 - Allow console commands to detach or run in background.
316 - Fix status delay on storage daemon during rewind.
317 - Add SD message variables to control operator wait time
318   - Maximum Operator Wait
319   - Minimum Message Interval
320   - Maximum Message Interval
321 - Add EOM handling variables
322   - Write EOD records
323   - Require EOD records
324 - Send Operator message when cannot read tape label.
325 - Think about how to handle I/O error on MTEOM.
326 - Verify level=Volume (scan only), level=Data (compare of data to file).
327   Verify level=Catalog, level=InitCatalog
328 - Events file
329 - Add keyword search to show command in Console.
330 - Fix Win2000 error with no messages during startup.
331 - Events : tape has more than xxx bytes.
332 - Write general list maintenance subroutines.
333 - Restrict characters permitted in a Resource name.
334 - Complete  code in Bacula Resources -- this will permit
335   reading a new config file at any time.
336 - Handle ctl-c in Console
337 - Implement LabelTemplate (at least first cut).
338 - Implement script driven addition of File daemon to config files.
339
340 - see setgroup and user for Bacula p4-5 of stunnel.c
341 - Implement new serialize subroutines
342    send(socket, "string", &Vol, "uint32", &i, NULL)
343 - On I/O error, write EOF, then try to write again ????
344 - Audit all UA commands to ensure that we always prompt where possible.
345 - If ./btape is called without /dev, assume argument is a Storage resource name.
346 - Put memory utilization in Status output of each daemon
347   if full status requested or if some level of debug on.
348 - Make database type selectable by .conf files i.e. at runtime
349 - gethostbyname failure in bnet_connect() continues
350   generating errors -- should stop.
351 - Add HOST to Volume label.
352 - Set flag for uname -a.  Add to Volume label.
353 - Implement throttled work queue.
354 - Check for EOT at ENOSPC or EIO or ENXIO (unix Pc)
355 - Allow multiple Storage specifications (or multiple names on
356   a single Storage specification) in the Job record. Thus a job 
357   can be backed up to a number of storage devices.
358 - Implement full MediaLabel code.
359 - Implement dump label to UA
360 - Copy volume using single drive.
361 - Copy volume with multiple driven (same or different block size).     
362 - Add block size (min, max) to Vol label.
363 - Concept of VolumeSet during restore which is a list
364   of Volume names needed.
365 - Restore files modified after date
366 - Restore file modified before date
367 - Emergency restore info:
368   - Backup Bacula
369   - Backup working directory
370   - Backup Catalog
371 - Restore options (do not overwrite)
372 - Restore -- do nothing but show what would happen
373 - SET LD_RUN_PATH=$HOME/mysql/lib/mysql
374 - Implement Restore FileSet=
375 - Write a scanner for the UA (keyword, scan-routine, result, prompt).
376 - Create a protocol.h and protocol.c where all protocol messages
377   are concentrated.
378 - If SD cannot open a drive, make it periodically retry.
379 - Put Bacula version somewhere in Job stream, probably Start Session
380   Labels.
381 - Remove duplicate fields from jcr (e.g. jcr.level and jcr.jr.Level, ...).
382 - Timout a job or terminate if link goes down, or reopen link and query.
383 - Fill all fields in Vol/Job Header -- ensure that everything
384   needed is written to tape. Think about restore to Catalog
385   from tape.  Client record needs improving.
386 - Find general solution for sscanf size problems (as well
387   as sprintf. Do at run time?
388 - Concept of precious tapes (cannot be reused).
389 - Allow FD to run from inetd ???
390
391 - Restore should get Device and Pool information from
392   job record rather than from config.
393 - Autolabel should be specified by DR instead of SD.
394 - Find out how to get the system tape block limits, e.g.:
395   Apr 22 21:22:10 polymatou kernel: st1: Block limits 1 - 245760 bytes.  
396   Apr 22 21:22:10 polymatou kernel: st0: Block limits 2 - 16777214 bytes.
397 - Storage daemon    
398   - Add media capacity
399   - AutoScan (check checksum of tape)
400   - Format command = "format /dev/nst0"
401   - MaxRewindTime
402   - MinRewindTime
403   - MaxBufferSize
404   - Seek resolution (usually corresponds to buffer size)
405   - EODErrorCode=ENOSPC or code
406   - Partial Read error code
407   - Partial write error code
408   - Nonformatted read error
409   - Nonformatted write error
410   - WriteProtected error
411   - IOTimeout
412   - OpenRetries
413   - OpenTimeout
414   - IgnoreCloseErrors=yes
415   - Tape=yes
416   - NoRewind=yes
417 - Pool
418   - Maxwrites
419   - Recycle period
420 - Job
421   - MaxWarnings
422   - MaxErrors (job?)
423 =====
424 - FD sends unsaved file list to Director at end of job. 
425 - Write a Storage daemon that uses pipes and
426   standard Unix programs to write to the tape.
427   See afbackup.
428 - Need something that monitors the JCR queue and
429   times out jobs by asking the deamons where they are.
430
431 - Enhance Jmsg code to permit buffering and saving to disk.
432 - device driver = "xxxx" for drives.
433 - restart: paranoid: read label fsf to
434   eom read append block, and go
435   super-paranoid: read label, read all files
436   in between, read append block, and go
437   verify: backspace, read append block, and go
438   permissive: same as above but frees drive
439   if tape is not valid.
440 - Verify from Volume
441 - Ensure that /dev/null works
442 - File daemon should build list of files skipped, and then
443   at end of save retry and report any errors.
444 - Need report class for messages. Perhaps
445   report resource where report=group of messages
446 - enhance scan_attrib and rename scan_jobtype, and
447   fill in code for "since" option 
448 - To buffer messages, we need associated jobid and Director name.
449 - Need to save contents of FileSet to tape?
450 - Director needs a time after which the report status is sent
451   anyway -- or better yet, a retry time for the job.
452   Don't reschedule a job if previous incarnation is still running.
453 - Figure out how to save the catalog (possibly a special FileSet).
454 - Figure out how to restore the catalog.
455 - Some way to automatically backup everything is needed????
456 - Need a structure for pending actions:
457   - buffered messages
458   - termination status (part of buffered msgs?)
459 - Concept of grouping Storage devices and job can use
460   any of a number of devices
461 - Drive management
462   Read, Write, Clean, Delete
463 - Login to Bacula; Bacula users with different permissions:
464    owner, group, user, quotas
465 - Tape recycle destination
466 - Job Schedule Status
467   - Automatic
468   - Manual
469   - Running
470 - Store info on each file system type (probably in the job header on tape.
471   This could be the output of df; or perhaps some sort of /etc/mtab record.
472
473 Longer term to do:
474 - Use media 1 time (so that we can do 6 days of incremental
475   backups before switching to another tape) (already)
476   specify # times (jobs)
477   specify bytes (already)
478   specify time (seconds, hours, days)
479 - Implement FSM (File System Modules).
480 - Identify unchanged or "system" files and save them to a
481   special tape thus removing them from the standard 
482   backup FileSet -- BASE backup.
483 - Turn virutally all sprintfs into snprintfs.
484 - Heartbeat between daemons.
485 - Audit M_ error codes to ensure they are correct and consistent.
486 - Add variable break characters to lex analyzer.
487   Either a bit mask or a string of chars so that
488   the caller can change the break characters.
489 - Make a single T_BREAK to replace T_COMMA, etc.
490 - Ensure that File daemon and Storage daemon can
491   continue a save if the Director goes down (this
492   is NOT currently the case). Must detect socket error,
493   buffer messages for later. 
494
495
496 Done: (see kernsdone for more)
497 - Document bscan.
498 - Document Restore.
499 - Check if GZIP1 is working -- check speed.
500 - Document forcing a new tape to be used.
501 - Ensure that AcceptAnyVolume works.
502 - Document running multiple Jobs
503 - Preserve block number when EOT and writing on next tape.
504 - Document how to cancel a job that is waiting on a Volume. 
505   Must "cancel" then "mount".
506 - Document Volume Bytes shows bytes on last volume written in Job summary.
507 - Restore all Windows attributes. Leave hooks for ACLs and security.
508   (Handle x = (HANDLE)get_osfhandle(fd);
509 - Test Windows restore.
510 - Look into MinGW
511 - Implement sparse files.
512 - Document sparse files.
513 - Document better Include  (does it cross file systems ?).
514 - Document default config file locations.
515 - Document specifically how to add new File daemon to config files.
516 - Add VerNo to each Session label record. 
517 - Add Job to Session records.
518 - Cold start full restore (restore catalog then
519   user selects what to restore).  Write summary file containing only
520   Job, Media, and Catalog information. Store on another machine.
521 - Dump/Restore database
522 - Write bscan program that will syncronize the DB Media record with
523   the contents of the Volume -- for use after a crash.
524 - Figure out how to put a Volume into the catalog (from the tape)
525 - Figure out how to do a restore from a Volume
526 - Report compression % and other compression statistics if turned on.
527 - Put Windows files in Windows stream?
528 - Ensure that everyone uses btime routines (mostly done).
529 - Put Job statistics in End Session Label (files saved,
530   total bytes, start time, ...).     
531 - Put FileSet name in the SOS label.
532 - Eliminate duplicate File records to shrink database.
533 - If Storage daemon aborts a job, ensure that this
534   is printed in the error message.
535 - Add save type to Session label.
536 - Correct date on Session label.
537 - Test restore of Windows backup
538 - Ability to recreate the catalog from a tape.
539 - Bug: anonymous Volumes requires mount in some cases.
540 - Define how we handle times to avoid problem with Unix dates (2049 ?).
541 - Add daemon JCR JobId=0 to have a daemon context
542 - Implement full restoration of all Windows attributes
543   (such as Hidden, System, creation dates, ...)
544 - Handle sparse files (i.e. files with holes in them)
545 - Enhance testing for Bacula compatibility with   
546   tape drives.
547 - Turn on new BB02 tape format implemented in 1.26 but
548   not yet turned on.
549 - More testing of restoring on Unix systems.
550 - Implement additional tape format enhancements to better 
551   support Windows and other non-Unix systems e.g. 
552   extended attributes.
553 - Upgrade to latest version of cygwin. (not possible)
554 - Add configure for gettimeofday.
555 - At line 51 of ua_input.c, why is = 0 necessary. Previously without
556   it, if cancel gnome-console during sql command, DIR crashed.  However,
557   with it, blank line input for Where: is not possible.
558 - Make SD disallow writing on Volume with fewer files than in
559   the catalog.
560 - Label (asks for slot, return and it stops).
561 - Make SD reject writing on tape where Catalog and tape # files
562   don't agree (possibly OK if tape > catalog).