]> git.sur5r.net Git - bacula/bacula/blob - bacula/kernstodo
Fix Run segfault -- init_msgs()
[bacula/bacula] / bacula / kernstodo
1                  Kern's ToDo List
2                   9 August 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
22 --top level configure options are not passed to the depkgs, particularly
23 prefix=
24
25 Also, it might be better to split the depkgs location from the --with-sqlite
26 location. 
27
28 --should be able to specify e.g. --with-sqlite=/opt/local and have it find
29 lib, bin, sbin for itself
30
31 I tried this and it didn't find sqlite.h
32
33 --the console script is broken as installed and has to be hand-massaged with
34 paths, config files etc.
35
36 --sd.conf password does not match dir.conf storage password
37
38 =======
39 - Convert all %x substitution variables, which are hard to remember
40   and read to %(variable-name)s.  Idea from TMDA.
41 - Report volume write rate.
42 - Fix db_get_job_volume_names() to return array of strings.
43 - Report compression % and other compression statistics if turned on.
44 - Add JobLevel in FD status (but make sure it is defined).
45 - Eliminate MySQL shared libraries from smtp and daemons not
46   using MySQL.
47 - Pass "Catalog Files = no" to storage daemon to eliminate
48   network traffic.
49 - Implement alter_sqlite_tables
50 - Fix scheduler -- see "Hourly cycle". It doesn't do both each
51   hour, rather it alternates between 0:05 and 0:35.
52 - Create Counter DB records.
53 - Make Pool resource handle Counter resources.
54 - Remove NextId for SQLite. Optimize.
55 - Termination status in FD for Verify = C -- incorrect.
56 - Fix strerror() to use strerror_r()
57 - Fix gethostbyname() to use gethostbyname_r()
58 - Cleanup path/filename separation in sql_get.c and sql_create.c
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 may be wrong.
70 - Fix Win32 config file definition name on /install
71 - When we are at EOM, we must ask each job to write JobMedia
72   record (update_volume_info).
73 - No READLINE_SRC if found in alternate directory.
74 - Add Client FS/OS id (Linux, Win95/98, ...).
75 - Put Windows files in Windows stream?
76
77 ====== 31 May 2002 ========
78 Now that Bacula 1.20 is released, virtually all the 
79 basic features are implemented (some are still quite
80 primitive though). Over the next month or two, I'm 
81 planning to focus on the following items:
82
83 Minor details:
84 - Fix any bugs I find or you report.
85 - Finish the implementation of automatic pruning 
86   (add pruning of Restore and Verify jobs). 
87 - Make sure pruning of Volumes won't prune the
88   only backup of a FileSet
89
90 Major Project:
91 - Improve the Restore capabilities of Bacula
92   * Restore to most recent system state (i.e.
93     figure out what tapes need to be mounted and
94     in what order).
95   * Restore to a particular time (perhaps several
96     variations -- e.g. before date, after date).
97   * Interactive Restore where you get to select 
98     what files are to be restored (much like the Unix
99     "restore" program permits). Now that we have a
100     catalog of all files saved, it would be nice to
101     be able to use it. 
102   * Restore options (overwrite, overwrite if older,
103     overwrite if newer, never overwrite, ...)
104   * Improve the standalone programs (bls and bextract)
105     to have pattern matching capabilities (e.g. restore
106     by FileSet, Job, JobType, JobLevel, ...). 
107   * Ideally after each Job, Bacula could write out a 
108     set of commands to a file that if later feed to
109     bextract would restore your system to the current
110     state (at least for the saved FileSet).  This would 
111     provide a simple disaster recovery that could be 
112     initiated from a "floppy" and one simple ASCII control 
113     file. I'm not exactly sure how to do this, but it
114     shouldn't be too hard and I'll 
115     be trying to go in this direction.
116   
117 Smaller Projects:
118 - Implement tape verification to ensure that the data
119   written for a particular Job can really be read.
120 - Compare tape File attributes to Catalog.
121   (File attributes are size, dates, MD5, but not
122    data).
123 - Compare tape to Client files (attributes, or
124   attributes and data) 
125
126 Playing around:
127 - With the current Bacula 1.21 (not yet in the CVS) I
128   expect there is about 95% chance that running multiple
129   simultaneous Jobs will actually work without stepping
130   on each other. I'm planning to try this sometime soon.
131 ===========
132
133 Projects:
134 - Add Base job.
135 - Rework Storage daemon with new rwl_lock routines.
136 - Implement Label templates
137 - Pass JCR to database routines permitting better error printing.
138 - Improve Restore
139 - Verify tape data
140 - Verify against Full.
141
142 Dump:
143   mysqldump -f  --opt bacula >bacula
144
145
146 To be done:
147 - Probably add End of Data tape records (this would make
148   the tape format incompatible with the previous version).
149 - I'll most likely enhance the current tape format
150   in the way that I previously described, which will make
151   some of the labels incompatible, but the change will
152   not affect the current restore code since it does not
153   look at the details of the labels.
154 - I may add a few more waiting conditions in the Storage
155   daemon where it will current immediately aborts a
156   Job if the necessary resources are not available (e.g.
157   tape is being written and a read request arrives).
158 - Write an applet for Linux.
159
160 - Remove PoolId from Job table, it exists in Media.
161 - Allow commands to detach or run in background.
162 - Write better dump of Messages resource.
163 - Fix status delay on storage daemon during rewind.
164 - Add VerNo to each Session label record. 
165 - Add Job to Session records.
166 - Add VOLUME_CAT_INFO to the EOS tape record (as
167   well as to the EOD record).
168 - Add SD message variables to control operator wait time
169   - Maximum Operator Wait
170   - Minimum Message Interval
171   - Maximum Message Interval
172 - Add EOM handling variables
173   - Write EOD records
174   - Require EOD records
175 - Send Operator message when cannot read tape label.
176 - Think about how to handle I/O error on MTEOM.
177 - If Storage daemon aborts a job, ensure that this
178   is printed in the error message.
179 - Verify level=Volume (scan only), level=Data (compare of data to file).
180   Verify level=Catalog, level=InitCatalog
181 - Scan tape contents into database.
182 - Dump of Catalog
183 - Cold start full restore (restore catalog then
184   user selects what to restore).  Write summary file containing only
185   Job, Media, and Catalog information. Store on another machine.
186 - Dump/Restore database
187 - File system type
188 - Events file
189 - Implement first cut of Catalog Retention period (remove old
190   entries from database).
191 - Add SessionTime/Id filters to bextract.
192 - Write bscan
193 - Ensure that Start/End File/Block are correct.
194 - Add keyword search to show command in Console.
195 - If MySQL database is not running, job terminates with
196   wierd type and wierd error code.
197 - Write a regression script
198 - Report bad status from smtp or mail program.
199 - Fix Win2000 error with no messages during startup.
200 - Add estimate to Console
201 - Events : tape has more than xxx bytes.
202 - In Storage daemon, status should include job cancelled.
203 - Write general list maintenance subroutines.
204 - Implement immortal format with EDOs. 
205 - Restrict characters permitted in a Resource name.
206 - Restore file xx or files xx, yy to their most recent values.
207 - Provide definitive identification of  type in backup.
208 - Complete  code in Bacula Resources -- this will permit
209   reading a new config file at any time.
210 - Document new Console
211 - Handle ctl-c in Console
212 - Test restore of Windows backup
213 - Implement LabelTemplate (at least first cut).
214 - Implement script driven addition of File daemon to
215   config files.
216
217 - Bug: anonymous Volumes requires mount in some cases.
218 - see setgroup and user for Bacula p4-5 of stunnel.c
219 - Implement new serialize subroutines
220    send(socket, "string", &Vol, "uint32", &i, NULL)
221 - Add save type to Session label.
222 - Correct date on Session label.
223 - On I/O error, write EOF, then try to write again.
224 - Audit all UA commands to ensure that we always prompt where
225   possible.
226 - If ./btape is called without /dev, assume argument is
227   a Storage resource name.
228 - Put memory utilization in Status output of each daemon
229   if full status requested or if some level of debug on.
230 - Make database type selectable by .conf files i.e. at runtime
231 - gethostbyname failure in bnet_connect() continues
232   generating errors -- should stop.
233 - Don't create a volume that is already written. I.e. create only once.
234 - If error at end of tape, implement some way to kill waiting processes.
235 - Get correct block/file information in Catalog, pay attention
236   to change of media.
237 - Add HOST to Volume label.
238 - Set flag for uname -a.  Add to Volume label.
239 - Implement throttled work queue.
240 - Write bscan program that will syncronize the DB Media record with
241   the contents of the Volume -- for use after a crash.
242 - Check for EOT at ENOSPC or EIO or ENXIO (unix Pc)
243 - Allow multiple Storage specifications (or multiple names on
244   a single Storage specification) in the Job record. Thus a job 
245   can be backed up to a number of storage devices.
246 - Implement full MediaLabel code.
247 - Implement dump label to UA
248 - Copy volume using single drive.
249 - Copy volume with multiple driven (same or different block size).     
250 - Add block size (min, max) to Vol label.
251 - Concept of VolumeSet during restore which is a list
252   of Volume names needed.
253 - Restore files modified after date
254 - Restore file modified before date
255 - Emergency restore info:
256   - Backup Bacula
257   - Backup working directory
258   - Backup Catalog
259 - Restore options (do not overwrite)
260 - Restore -- do nothing but show what would happend
261 - Authentication between SD and FD
262 - SET LD_RUN_PATH=$HOME/mysql/lib/mysql
263 - Send Volumes needed during restore to Console
264 - Put Job statistics in End Session Label (files saved,
265   total bytes, start time, ...).     
266 - Put FileSet name in the SOS label.
267 - Implement Restore FileSet=
268 - Write a scanner for the UA (keyword, scan-routine, result, prompt).
269 - Create a protocol.h and protocol.c where all protocol messages
270   are concentrated.
271 - If SD cannot open a drive, make it periodically retry.
272 - Put Bacula version somewhere in Job stream, probably Start Session
273   Labels.
274 - Remove duplicate fields from jcr (e.g. jcr.level and
275   jcr.jr.Level, ...).
276 - Timout a job or terminate if link goes down, or reopen link and query.
277 - Define how we handle times to avoid problem with Unix dates (2049 ?).
278 - The daemons should know when one is already
279   running and refuse to run a second copy.
280 - Fill all fields in Vol/Job Header -- ensure that everything
281   needed is written to tape. Think about restore to Catalog
282   from tape.  Client record needs improving.
283 - Find general solution for sscanf size problems (as well
284   as sprintf. Do at run time?
285
286 - Concept of precious tapes (cannot be reused).
287 - Allow FD to run from inetd ???
288 - Preprocessing command per file.
289 - Postprocessing command per file (when restoring).
290
291 - Restore should get Device and Pool information from
292   job record rather than from config.
293 - Make SD send attribute stream to DR but first
294   buffering to file, then sending only when the
295   files are written to tape.
296 - Autolabel should be specified by DR instead of SD.
297 - Ability to recreate the catalog from a tape.
298 - Find out how to get the system tape block limits, e.g.:
299   Apr 22 21:22:10 polymatou kernel: st1: Block limits 1 - 245760 bytes.  
300   Apr 22 21:22:10 polymatou kernel: st0: Block limits 2 - 16777214 bytes.
301 - Storage daemon    
302   - Add media capacity
303   - AutoScan (check checksum of tape)
304   - Format command = "format /dev/nst0"
305   - MaxRewindTime
306   - MinRewindTime
307   - MaxBufferSize
308   - Seek resolution (usually corresponds to buffer size)
309   - EODErrorCode=ENOSPC or code
310   - Partial Read error code
311   - Partial write error code
312   - Nonformatted read error
313   - Nonformatted write error
314   - WriteProtected error
315   - IOTimeout
316   - OpenRetries
317   - OpenTimeout
318   - IgnoreCloseErrors=yes
319   - Tape=yes
320   - NoRewind=yes
321 - Pool
322   - Maxwrites
323   - Recycle period
324 - Job
325   - MaxWarnings
326   - MaxErrors (job?)
327 =====
328 - Eliminate duplicate File records to shrink database.
329 - FD sends unsaved file list to Director at end of job. 
330 - Implement InsertUniqueDB. 
331 - Write a Storage daemon that uses pipes and
332   standard Unix programs to write to the tape.
333   See afbackup.
334 - Need something that monitors the JCR queue and
335   times out jobs by asking the deamons where they are.
336 - Add daemon JCR JobId=0 to have a daemon context
337 - Pool resource
338   - Auto label
339   - Auto media verify
340   - Client (list of clients to force client)
341   - Devices (list of devices to force device)
342   - enable/disable
343   - Groups
344   - Levels
345   - Type: Backup, ...
346   - Recycle from other pools: Yes, No
347   - Recycle to other pools: Yes, no
348   - FileSets
349   - MaxBytes?
350   - Optional MediaType to force media?
351   - Maintain Catalog
352   - Label Template
353   - Retention Period
354   ============
355   - Name
356   - NumVols
357   - NaxVols
358   - CurrentVol
359
360 =====
361   if(connect(sockfd, (struct sockaddr * ) (& addr), sizeof(addr)) .lt. 0){
362     close(sockfd);
363     return(-6);
364   }
365
366   linger.l_onoff = 1;
367   linger.l_linger = 60;
368   i = setsockopt(sockfd, SOL_SOCKET, SO_LINGER, (char *) &linger,
369                                                 sizeof (linger));
370
371   fl = fcntl(sockfd, F_GETFL);
372   fcntl(sockfd, F_SETFL, fl & (~ O_NONBLOCK) & (~ O_NDELAY));
373 ====
374 - Add "0nnn" in front of all sscanf %s fields
375   to prevent field overflow.
376 - Restore:
377   What: jobid or file list
378   From: tape, file, ...
379   Where: original location, another path
380   How: Always replace, Replace if newer, Never replace
381   Report: files restored; files not restored; errors; warnings
382           summary.
383 - Enhance Jmsg code to permit buffering and saving to disk.
384 - Probably create a jcr with JobId=0 as a master
385   catchall if jcr not found or if operation involves
386   global operation.
387 - device driver = "xxxx" for drives.
388 - restart: paranoid: read label fsf to
389   eom read append block, and go
390   super-paranoid: read label, read all files
391   in between, read append block, and go
392   verify: backspace, read append block, and go
393   permissive: same as above but frees drive
394   if tape is not valid.
395 - Verify from Volume
396 - Ensure that /dev/null works
397 - File daemon should build list of files skipped, and then
398   at end of save retry and report any errors.
399 - Need report class for messages. Perhaps
400   report resource where report=group of messages
401 - Extract what=(session_id|file_list); where
402 - Verify from Tape
403 - enhance scan_attrib and rename scan_jobtype, and
404   fill in code for "since" option 
405 - dir_config: get rid of all printfs
406 - To buffer messages, we need associated jobid and Director name.
407 - Need to save contents of FileSet to tape?
408 - Director needs a time after which the report status is sent
409   anyway -- or better yet, a retry time for the job.
410   Don't reschedule a job if previous incarnation is still running.
411 - Figure out how to do a "full" restore from catalog
412 - Figure out how to save the catalog (possibly a special FileSet).
413 - Figure out how to restore the catalog.
414 - Figure out how to put a Volume into the catalog (from the tape)
415 - Figure out how to do a restore from a Volume
416 - Some way to automatically backup everything is needed????
417 - Need a structure for pending actions:
418   - buffered messages
419   - termination status (part of buffered msgs?)
420 - Concept of grouping Storage devices and job can use
421   any of a number of devices
422 - Drive management
423   Read, Write, Clean, Delete
424 - Login to Bacula; Bacula users with different permissions:
425    owner, group, user
426 - Tape recycle destination
427 - Job Schedule Status
428   - Automatic
429   - Manual
430   - Running
431 - File daemon should pass Director the operating system info
432   to be stored in the Client Record (or verified that it has
433   not changed).
434 - Store info on each file system type (probably in the job header on tape.
435   This could be the output of df; or perhaps some sort of /etc/mtab record.
436
437 Longer term to do:
438 - Use media 1 time (so that we can do 6 days of incremental
439   backups before switching to another tape) (already)
440   specify # times (jobs)
441   specify bytes (already)
442   specify time (seconds, hours, days)
443 - Implement FSM (File System Modules).
444 - Identify unchanged or "system" files and save them to a
445   special tape thus removing them from the standard 
446   backup FileSet -- BASE backup.
447 - Turn virutally all sprintfs into snprintfs.
448 - Heartbeat between daemons.
449 - Audit M_ error codes to ensure they are correct and
450   consistent.
451 - Add variable break characters to lex analyzer.
452   Either a bit mask or a string of chars so that
453   the caller can change the break characters.
454 - Make a single T_BREAK to replace T_COMMA, etc.
455 - Ensure that File daemon and Storage daemon can
456   continue a save if the Director goes down (this
457   is NOT currently the case). Must detect socket error,
458   buffer messages for later. 
459
460
461 Done: (see kernsdone for more)