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