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