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