]> git.sur5r.net Git - bacula/bacula/blob - bacula/kernstodo
Document SHA1 + work on returning child status
[bacula/bacula] / bacula / kernstodo
1                  Kern's ToDo List
2                  25 January 2003 
3
4 Documentation to do: (a little bit at a time)
5 - Document running a test version.
6 - Document query file format.
7 - Document static linking
8 - Document how to automatically backup all local partitions
9 - Document problems with Verify and pruning.
10 - Document how to use multiple databases.
11
12
13 Testing to do: (painful)
14 - that console command line options work
15 - blocksize recognition code.
16
17 For 1.30 release:
18 - Add Signature type to File DB record.
19 - CD into subdirectory when open()ing files for backup to
20   speed up things.  Test with testfind().
21 - Add prefixlinks to where or not where absolute links to FD.
22 - Look at handling <> in smtp doesn't work with exim.
23 - Priority job to go to top of list.
24 - Implement Bar code handling
25 - Why is catreq.c:111 Find vol called twice for a job?
26 - Find out why Full saves run slower and slower (hashing?)
27 - Figure out how to allow multiple simultaneous file Volumes on a single device.
28 - Why are save/restore of device different sizes (sparse?)   Yup! Fix it.
29 - Implement some way for the Console to dynamically create a job.
30 - Restore to a particular time -- e.g. before date, after date. 
31 - Implement disk spooling
32 - Implement finer multiprocessing options.
33 - Solaris -I on tar for include list
34 - Enable avoid backing up archive device (findlib/find_one.c:128)
35 - Implement FileOptions (see end of this document)
36 - Implement Bacula plugins -- design API
37 - Make bcopy read through bad tape records.
38 - Need a verbose mode in restore, perhaps to bsr.
39 - bscan without -v is too quiet -- perhaps show jobs.
40 - Add code to reject whole blocks if not wanted on restore.
41 - Implement multiple simultaneous file Volumes on a single device.
42 - Start working on Base jobs.
43 - Make sure the MaxVolFiles is fully implemented in SD
44 - Flush all the daemon messages at the end of every job.
45 - Check if both CatalogFiles and UseCatalog are set to SD.
46 - Check if we can increase Bacula FD priorty in Win2000
47 - Need return status on read_cb() from read_records(). Need multiple
48   records -- one per Job, maybe a JCR or some other structure with
49   a block and a record.
50 - Figure out how to do a bare metal Windows restore
51 - Fix read_record to handle multiple sessions.
52 - Program files (i.e. execute a program to read/write files).
53   Pass read date of last backup, size of file last time.
54 - Put system type returned by FD into catalog.
55 - Possibly add email to Watchdog if drive is unmounted too
56   long and a job is waiting on the drive.
57 - Strip trailing slashes from Include directory names in the FD.
58 - Use read_record.c in SD code.
59 - Why don't we get an error message from Win32 FD when bootstrap 
60   file cannot be created for restore command?
61 - Need to specify MaximumConcurrentJobs in the Job resource.
62 - When Marking a file in Restore that is a hard link, also
63   mark the link so that the data will be reloaded.
64 - Restore program that errors in SD due to no tape reports
65   OK incorrectly in output.
66 - After unmount, if restore job started, ask to mount.
67 - Make Restore report an error if FD or SD term codes are not OK.
68 - Convert all %x substitution variables, which are hard to remember
69   and read to %(variable-name).  Idea from TMDA.
70 - Add JobLevel in FD status (but make sure it is defined).
71 - Make Pool resource handle Counter resources.
72 - Remove NextId for SQLite. Optimize.
73 - Strip trailing / from Include
74 - Move all SQL statements into a single location.
75 - Cleanup db_update_media and db_update_pool
76 - Add UA rc and history files.
77 - put termcap (used by console) in ./configure and
78   allow -with-termcap-dir.
79 - Enhance time and size scanning routines.
80 - Fix Autoprune for Volumes to respect need for full save.
81 - Fix Win32 config file definition name on /install
82 - No READLINE_SRC if found in alternate directory.
83 - Add Client FS/OS id (Linux, Win95/98, ...).
84 - Test a second language e.g. french.
85 - Compare tape to Client files (attributes, or attributes and data) 
86 - Make all database Ids 64 bit.
87 - Write an applet for Linux.
88 - Add estimate to Console commands
89 - Find solution to blank filename (i.e. path only) problem.
90 - Implement new daemon communications protocol.
91 - Remove PoolId from Job table, it exists in Media.
92 - Allow console commands to detach or run in background.
93 - Fix status delay on storage daemon during rewind.
94 - Add SD message variables to control operator wait time
95   - Maximum Operator Wait
96   - Minimum Message Interval
97   - Maximum Message Interval
98 - Send Operator message when cannot read tape label.
99 - Verify level=Volume (scan only), level=Data (compare of data to file).
100   Verify level=Catalog, level=InitCatalog
101 - Events file
102 - Add keyword search to show command in Console.
103 - Fix Win2000 error with no messages during startup.
104 - Events : tape has more than xxx bytes.
105 - Restrict characters permitted in a Resource name.
106 - Complete code in Bacula Resources -- this will permit
107   reading a new config file at any time.
108 - Handle ctl-c in Console
109 - Implement LabelTemplate (at least first cut).
110 - Implement script driven addition of File daemon to config files.
111 - Think about how to make Bacula work better with File (non-tape) archives.
112 - Write Unix emulator for Windows.
113
114 - Implement new serialize subroutines
115    send(socket, "string", &Vol, "uint32", &i, NULL)
116 - Audit all UA commands to ensure that we always prompt where possible.
117 - If ./btape is called without /dev, assume argument is a Storage resource name.
118 - Put memory utilization in Status output of each daemon
119   if full status requested or if some level of debug on.
120 - Make database type selectable by .conf files i.e. at runtime
121 - gethostbyname failure in bnet_connect() continues
122   generating errors -- should stop.
123 - Set flag for uname -a.  Add to Volume label.
124 - Implement throttled work queue.
125 - Check for EOT at ENOSPC or EIO or ENXIO (unix Pc)
126 - Allow multiple Storage specifications (or multiple names on
127   a single Storage specification) in the Job record. Thus a job 
128   can be backed up to a number of storage devices.
129 - Implement dump label to UA
130 - Concept of VolumeSet during restore which is a list
131   of Volume names needed.
132 - Restore files modified after date
133 - Restore file modified before date
134 - Emergency restore info:
135   - Backup Bacula
136   - Backup working directory
137   - Backup Catalog
138 - Restore -- do nothing but show what would happen
139 - SET LD_RUN_PATH=$HOME/mysql/lib/mysql
140 - Implement Restore FileSet=
141 - Create a protocol.h and protocol.c where all protocol messages
142   are concentrated.
143 - If SD cannot open a drive, make it periodically retry.
144 - Remove duplicate fields from jcr (e.g. jcr.level and jcr.jr.Level, ...).
145 - Timout a job or terminate if link goes down, or reopen link and query.
146 - Find general solution for sscanf size problems (as well
147   as sprintf. Do at run time?
148 - Concept of precious tapes (cannot be reused).
149 - Make bcopy copy with a single tape drive.
150 - Permit changing ownership during restore.
151
152 - Autolabel should be specified by DIR instead of SD.
153 - Find out how to get the system tape block limits, e.g.:
154   Apr 22 21:22:10 polymatou kernel: st1: Block limits 1 - 245760 bytes.  
155   Apr 22 21:22:10 polymatou kernel: st0: Block limits 2 - 16777214 bytes.
156 - Storage daemon    
157   - Add media capacity
158   - AutoScan (check checksum of tape)
159   - Format command = "format /dev/nst0"
160   - MaxRewindTime
161   - MinRewindTime
162   - MaxBufferSize
163   - Seek resolution (usually corresponds to buffer size)
164   - EODErrorCode=ENOSPC or code
165   - Partial Read error code
166   - Partial write error code
167   - Nonformatted read error
168   - Nonformatted write error
169   - WriteProtected error
170   - IOTimeout
171   - OpenRetries
172   - OpenTimeout
173   - IgnoreCloseErrors=yes
174   - Tape=yes
175   - NoRewind=yes
176 - Pool
177   - Maxwrites
178   - Recycle period
179 - Job
180   - MaxWarnings
181   - MaxErrors (job?)
182 =====
183 - FD sends unsaved file list to Director at end of job (see
184   RFC below).
185 - File daemon should build list of files skipped, and then
186   at end of save retry and report any errors.
187 - Write a Storage daemon that uses pipes and
188   standard Unix programs to write to the tape.
189   See afbackup.
190 - Need something that monitors the JCR queue and
191   times out jobs by asking the deamons where they are.
192 - Enhance Jmsg code to permit buffering and saving to disk.
193 - device driver = "xxxx" for drives.
194 - restart: paranoid: read label fsf to
195   eom read append block, and go
196   super-paranoid: read label, read all files
197   in between, read append block, and go
198   verify: backspace, read append block, and go
199   permissive: same as above but frees drive
200   if tape is not valid.
201 - Verify from Volume
202 - Ensure that /dev/null works
203 - Need report class for messages. Perhaps
204   report resource where report=group of messages
205 - enhance scan_attrib and rename scan_jobtype, and
206   fill in code for "since" option 
207 - Director needs a time after which the report status is sent
208   anyway -- or better yet, a retry time for the job.
209   Don't reschedule a job if previous incarnation is still running.
210 - Some way to automatically backup everything is needed????
211 - Need a structure for pending actions:
212   - buffered messages
213   - termination status (part of buffered msgs?)
214 - Concept of grouping Storage devices and job can use
215   any of a number of devices
216 - Drive management
217   Read, Write, Clean, Delete
218 - Login to Bacula; Bacula users with different permissions:
219    owner, group, user, quotas
220 - Store info on each file system type (probably in the job header on tape.
221   This could be the output of df; or perhaps some sort of /etc/mtab record.
222
223 Longer term to do:
224 - Design at hierarchial storage for Bacula.
225 - Implement FSM (File System Modules).
226 - Identify unchanged or "system" files and save them to a
227   special tape thus removing them from the standard 
228   backup FileSet -- BASE backup.
229 - Turn virutally all sprintfs into snprintfs.
230 - Heartbeat between daemons.
231 - Audit M_ error codes to ensure they are correct and consistent.
232 - Add variable break characters to lex analyzer.
233   Either a bit mask or a string of chars so that
234   the caller can change the break characters.
235 - Make a single T_BREAK to replace T_COMMA, etc.
236 - Ensure that File daemon and Storage daemon can
237   continue a save if the Director goes down (this
238   is NOT currently the case). Must detect socket error,
239   buffer messages for later. 
240 - Enhance time/duration input to allow multiple qualifiers e.g. 3d2h
241 - Add ability to backup to two Storage devices (two SD sessions) at
242   the same time -- e.g. onsite, offsite.
243 - Add the ability to consolidate old backup sets (basically do a restore
244   to tape and appropriately update the catalog). Compress Volume sets.
245   Might need to spool via file is only one drive is available.
246 - Compress or consolidate Volumes of old possibly deleted files. Perhaps
247   someway to do so with every volume that has less than x% valid 
248   files.
249
250   
251 Projects:
252             Bacula Projects Roadmap 
253                17 August 2002
254            last update 5 January 2003
255
256 Item 1:   Multiple simultaneous Jobs. (done)
257 Done -- Restore part needs better implementation to work correctly
258
259   What:   Permit multiple simultaneous jobs in Bacula.
260
261   Why:    An enterprise level solution needs to go fast without the
262           need for the system administrator to carefully tweak
263           timing.  Based on the benchmarks, during a full
264           backup, NetWorker typically hit 10 times the bandwidth to
265           the tape compared to Bacula--largely. This is probably due to
266           running parallel jobs and multi-threaded filling of buffers
267           and writing them to tape.  This should also make things work
268           better when you have a mix of fast and slow machines backing
269           up at the same time.
270
271   Notes:  Bacula was designed to run multiple simultaneous jobs. Thus
272           implementing this is a matter of some small cleanups and
273           careful testing.
274
275
276 Item 2:   Make the Storage daemon use intermediate file storage to buffer data.
277 Deferred -- not necessary yet.
278
279   What:   If data is coming into the SD too fast, buffer it to 
280           disk if the user has configured this option.
281
282   Why:    This would be nice, especially if it more or less falls out
283           when implementing (1) above.  If not, it probably should not
284           be given a high priority because fundamentally the backup time
285           is limited by the tape bandwidth.  Even though you may finish a
286           client job quicker by spilling to disk, you still have to
287           eventually get it onto tape.  If intermediate disk buffering
288           allows us to improve write bandwidth to tape, it may make
289           sense.
290
291   Notes:  Whether or not this is implemented will depend upon performance
292           testing after item 1 is implemented.
293
294
295 Item 3:   Write the bscan program -- also write a bcopy program.
296 Done
297
298   What:   Write a program that reads a Bacula tape and puts all the 
299           appropriate data into the catalog. This allows recovery
300           from a tape that is no longer in the database, or it allows
301           re-creation of a database if lost.
302
303   Why:    This is a fundamental robustness and disaster recovery tool
304           which will increase the comfort level of a sysadmin
305           considering adopting Bacula.
306
307   Notes:  A skeleton of this program already exists, but much work
308           needs to be done. Implementing this will also make apparent
309           any deficiencies in the current Bacula tape format.
310
311
312 Item 4:   Implement Base jobs.
313
314   What:   A base job is sort of like a Full save except that you 
315           will want the FileSet to contain only files that are unlikely
316           to change in the future (i.e. a snapshot of most of your
317           system after installing it). After the base job has been run,
318           when you are doing a Full save, you can specify to exclude
319           all files saved by the base job that have not been modified.
320
321   Why:    This is something none of the competition does, as far as we know
322           (except BackupPC, which is a Perl program that saves to disk
323           only).  It is big win for the user, it makes Bacula stand out
324           as offering a unique optimization that immediately saves time
325           and money.
326
327   Notes:  Big savings in tape usage. Will require more resources because
328           the e. DIR must send FD a list of files/attribs, and the FD must
329           search the list and compare it for each file to be saved.
330
331
332 Item 5:   Implement Label templates
333
334   What:   This is a mechanism whereby Bacula can automatically create
335           a tape label for new tapes according to a detailed specification
336           provided by the user.
337
338   Why:    It is a major convenience item for folks who use automated label
339           creation.
340
341   Notes:  Bacula already has a working form of automatic tape label
342           creation, but it is very crude. The design for the complete
343           tape labeling project is already documented in the manual.
344
345
346 Item 6:   Write a regression script.
347 Started
348
349   What:   This is an automatic script that runs and tests as many features
350           of Bacula as possible. The output is compared to previous
351           versions of Bacula and any differences are reported.
352
353   Why:    This is an enormous help in preventing introduction of new
354           errors in parts of the program that already work correctly.
355
356   Notes:  This probably should be ranked higher, it's something the typical
357           user doesn't see.  Depending on how it's implemented, it may
358           make sense to defer it until the archival tape format and
359           user interface mature.
360
361
362 Item 7:   GUI for interactive restore
363 Item 8:   GUI for interactive backup
364
365   What:   The current interactive restore is implemented with a tty
366           interface. It would be much nicer to be able to "see" the
367           list of files backed up in typical GUI tree format.
368           The same mechanism could also be used for creating 
369           ad-hoc backup FileSets (item 8).
370
371   Why:    Ease of use -- especially for the end user.
372
373   Notes:  Rather than implementing in Gtk, we probably should go directly
374           for a Browser implementation, even if doing so meant the
375           capability wouldn't be available until much later.  Not only
376           is there the question of Windows sites, most
377           Solaris/HP/IRIX, etc,  shops can't currently run Gtk programs
378           without installing lots of stuff admins are very wary about.
379           Real sysadmins will always use the command line anyway, and
380           the user who's doing an interactive restore or backup of his
381           own files will in most cases be on a Windows machine running
382           Exploder.
383
384
385 Item 9:   Add SSL to daemon communications.
386
387   What:   This provides for secure communications between the daemons.
388
389   Why:    This would allow doing backup across the Internet without
390           privacy concerns (or with much less concern).
391
392   Notes:  The vast majority of near term potential users will be backing up
393           a single site over a LAN and, correctly or not, they probably
394           won't be concerned with security, at least not enough to go to
395           the trouble to set up keys, etc. to screw things down.  We suspect
396           that many users genuinely interested in multi-site backup
397           already run some form of VPN software in their internetwork
398           connections, and are willing to delegate security to that layer.
399
400
401 Item 10:  Define definitive tape format.
402 Done (version 1.27)
403
404   What:   Define that definitive tape format that will not change 
405           for the next millennium.
406
407   Why:    Stability, security.
408
409   Notes:  See notes for item 11 below.
410
411
412 Item 11:  New daemon communication protocol.
413
414   What:   The current daemon to daemon protocol is basically an ASCII
415           printf() and sending the buffer. On the receiving end, the
416           buffer is sscanf()ed to unpack it. The new scheme would
417           be a binary format that allows quick packing and unpacking
418           of any data type with named fields.
419
420   Why:    Using binary packing would be faster. Named fields will permit
421           error checking to ensure that what is sent is what the 
422           receiver really wants.
423
424   Notes:  These are internal improvements in the interest of the
425           long-term stability and evolution of the program.  On the one
426           hand, the sooner they're done, the less code we have to rip
427           up when the time comes to install them.  On the other hand, they
428           don't bring an immediately perceptible benefit to potential
429           users.  Item 10 and possibly item 11 should be deferred until Bacula
430           is well established with a growing user community more or
431           less happy with the feature set.  At that time, it will make a
432           good "next generation" upgrade in the interest of data
433           immortality.
434
435
436
437
438 ======================================================
439         Base Jobs design
440 It is somewhat like a Full save becomes an incremental since
441 the Base job (or jobs) plus other non-base files.
442 Need:
443 - New BaseFile table that contains:
444     JobId, BaseJobId, FileId (from Base).
445   i.e. for each base file that exists but is not saved because
446   it has not changed, the File daemon sends the JobId, BaseId,
447   and FileId back to the Director who creates the DB entry.
448 - To initiate a Base save, the Director sends the FD 
449   the FileId, and full filename for each file in the Base.
450 - When the FD finds a Base file, he requests the Director to
451   send him the full File entry (stat packet plus MD5), or
452   conversely, the FD sends it to the Director and the Director
453   says yes or no. This can be quite rapid if the FileId is kept
454   by the FD for each Base Filename.          
455 - It is probably better to have the comparison done by the FD
456   despite the fact that the File entry must be sent across the
457   network.
458 - An alternative would be to send the FD the whole File entry
459   from the start. The disadvantage is that it requires a lot of
460   space. The advantage is that it requires less communications
461   during the save.
462 - The Job record must be updated to indicate that one or more
463   Bases were used.
464 - At end of Job, FD returns:   
465    1. Count of base files/bytes not written to tape (i.e. matches)
466    2. Count of base file that were saved i.e. had changed.
467 - No tape record would be written for a Base file that matches, in the
468   same way that no tape record is written for Incremental jobs where
469   the file is not saved because it is unchanged.
470 - On a restore, all the Base file records must explicitly be
471   found from the BaseFile tape. I.e. for each Full save that is marked
472   to have one or more Base Jobs, search the BaseFile for all occurrences
473   of JobId.
474 - An optimization might be to make the BaseFile have:
475      JobId
476      BaseId
477      FileId
478   plus
479      FileIndex
480   This would avoid the need to explicitly fetch each File record for
481   the Base job.  The Base Job record will be fetched to get the
482   VolSessionId and VolSessionTime.
483 =========================================================  
484
485 ========================================================== 
486     Unsaved File design
487 For each Incremental job that is run, there may be files that
488 were found but not saved because they were locked (this applies
489 only to Windows). Such a system could send back to the Director
490 a list of Unsaved files.
491 Need:
492 - New UnSavedFiles table that contains:
493   JobId
494   PathId
495   FilenameId
496 - Then in the next Incremental job, the list of Unsaved Files will be
497   feed to the FD, who will ensure that they are explicitly chosen even
498   if standard date/time check would not have selected them.
499 =============================================================
500
501   
502
503 =============================================================
504
505                 Request For Comments For File Backup Options
506                    10 November 2002
507
508 Subject: File Backup Options
509
510 Problem: 
511   A few days ago, a Bacula user who is backing up to file volumes and
512   using compression asked if it was possible to suppress compressing
513   all .gz files since it was a waste of CPU time. Although Bacula
514   currently permits using different options (compression, ...) on
515   a directory by directory basis, it cannot do it on a file by 
516   file basis, which is clearly what was desired.   
517
518 Proposed Implementation:
519   To solve this problem, I propose the following:
520
521   - Add a new Director resource type called FileOptions.  
522
523   - The FileOptions resource will have records for all
524     options that can currently be specified on the Include record 
525     (in a FileSet).  Examples below.
526
527   - The FileOptions resource will permit an exclude option as well
528     as a number of additional options.
529
530   - The heart of the FileOptions resource is the ability to
531     supply any number of ApplyTo records which specify POSIX
532     regular expressions.  These ApplyTo regular expressions are
533     applied to the fully qualified filename (path and all). If
534     one matches, then the FileOptions will be used.
535
536   - When an ApplyTo specification matches an included file, the
537     options specified in the FileOptions resource will override
538     the default options specified on the Include record.
539
540   - Include records will be modified to permit referencing one or
541     more FileOptions resources.  The FileOptions will be used
542     in the order listed on the Include record and the first
543     one that matches will be applied.
544
545   - Options (or specifications) currently supplied on the Include
546     record will be deprecated (i.e. removed in a later version a
547     year or so from now).
548
549   - The Exclude record will be deprecated as the same functionality
550     can be obtained by using an Exclude = yes in the FileOptions.
551
552 FileOptions records:
553   The following records can appear in the FileOptions resource. An
554   asterisk preceding the name indicates a feature not currently
555   implemented.
556
557   For Backup Jobs:
558     - Compression= (GZIP, ...)
559     - Signature=   (MD5, SHA1, ...)
560     - *Encryption=
561     - OneFs=      (yes/no)    - remain on one filesystem
562     - Recurse=    (yes/no)    - recurse into subdirectories
563     - Sparse=     (yes/no)    - do sparse file backup
564     - *Exclude=   (yes/no)    - exclude file from being saved
565     - *Reader=    (filename)  - external read (backup) program
566     - *Plugin=    (filename)  - read/write plugin module
567
568   For Verify Jobs:
569     - verify=     (ipnougsamc5) - verify options
570
571   For Restore Jobs:
572     - replace= (always/ifnewer/ifolder/never) - replace options currently
573                                                 implemented in 1.27
574     - *Writer= (filename)   - external write (restore) program
575
576
577 Implementation:
578   Currently options specifying compression, MD5 signatures, recursion,
579   ... of a FileSet are supplied on the Include record. These will now
580   all be collected into a FileOptions resource, which will be
581   specified on the Include in place of the options. Multiple FileOptions
582   may be specified.  Since the FileOptions contain regular expressions
583   that are applied to the full filename, this will give the ability
584   to specify backup options on a file by file basis to whatever level
585   of detail you wish.
586
587 Example:
588
589   Today:
590
591     FileSet {
592       Name = "FullSet"
593       Include = compression=GZIP signature=MD5 {
594         /
595       }
596     }
597
598   Proposal:
599
600     FileSet {
601       Name = "FullSet"
602       Include = FileOptions=Opts {
603         /
604       }
605     }
606     FileOptions {
607       Name = Opts
608       Compression = GZIP
609       Signature = MD5
610       ApplyTo = /*.?*/
611     }
612
613   That's a lot more to do the same thing, but it gives the ability to
614   apply options on a file by file basis.  For example, suppose you
615   want to compress all files but not any file with extensions .gz or .Z.
616   You could do so as follows:
617
618     FileSet {
619       Name = "FullSet"
620       Include = FileOptions=NoCompress FileOptions=Opts {
621         /
622       }
623     }
624     FileOptions {
625       Name = Opts
626       Compression = GZIP
627       Signature = MD5
628       ApplyTo = /*.?*/   # matches all files
629     }
630     FileOptions {
631       Name = NoCompress
632       Signature = MD5
633       # Note multiple ApplyTos are ORed
634       ApplyTo = /*.gz/   # matches .gz files */
635       ApplyTo = /*.Z/    # matches .Z files */
636     }
637
638   Now, since the NoCompress FileOptions is specified first on the
639   Include line, any *.gz or *.Z file will have an MD5 signature computed,
640   but will not be compressed. For all other files, the NoCompress will not
641   match, so the Opts options will be used which will include GZIP
642   compression.
643
644 Questions:
645   - Is it necessary to provide some means of ANDing regular expressions
646     and negation?  (not currently planned)
647
648     e.g.  ApplyTo = /*.gz/ && !/big.gz/
649
650   - I see that Networker has a "null" module which, if specified, does not 
651     backup the file, but does make an record of the file in the catalog
652     so that the catalog will reflect an exact picture of the filesystem.
653     The result is that the file can be "seen" when "browsing" the save
654     sets, but it cannot be restored.
655     
656     Is this really useful?  Should it be implemented in Bacula?
657   
658 Results:
659   After implementing the above, the user will be able to specify
660   on a file by file basis (using regular expressions) what options are
661   applied for the backup.
662 ====================================
663
664 =========================================
665 Proposal by Bill Sellers
666
667 Return-Path: <w.a.sellers@larc.nasa.gov>
668 Received: from post.larc.nasa.gov (post.larc.nasa.gov [128.155.4.45]) by matou.sibbald.com (8.11.6/8.11.6) with ESMTP id h0ELUIm07622 for <kern@sibbald.com>; Tue, 14 Jan 2003 22:30:18 +0100
669 Received: from Baron.larc.nasa.gov (baron.larc.nasa.gov [128.155.40.132]) by post.larc.nasa.gov (pohub4.6) with ESMTP id QAA09768 for <kern@sibbald.com>; Tue, 14 Jan 2003 16:30:14 -0500 (EST)
670 Message-Id: <5.1.0.14.2.20030114153452.028dbae8@pop.larc.nasa.gov>
671 X-Sender: w.a.sellers@pop.larc.nasa.gov
672 X-Mailer: QUALCOMM Windows Eudora Version 5.1
673 Date: Tue, 14 Jan 2003 16:30:18 -0500
674 To: Kern Sibbald <kern@sibbald.com>
675 From: Bill Sellers <w.a.sellers@larc.nasa.gov>
676 Subject: Re: [Bacula-users] Bacula remote storage?
677 In-Reply-To: <1042565382.1845.177.camel@rufus>
678 References: <5.1.0.14.2.20030114113004.0293a210@pop.larc.nasa.gov> <5.1.0.14.2.20030113170650.028dad88@pop.larc.nasa.gov> <5.1.0.14.2.20030113170650.028dad88@pop.larc.nasa.gov> <5.1.0.14.2.20030114113004.0293a210@pop.larc.nasa.gov>
679 Mime-Version: 1.0
680 Content-Type: text/plain; charset="us-ascii"; format=flowed
681 X-Annoyance-Filter-Junk-Probability: 0
682 X-Annoyance-Filter-Classification: Mail
683 At 06:29 PM 1/14/2003 +0100, you wrote:
684 >Hello Bill,
685 >
686 >Well, if you cannot put a Bacula client on the machine,
687 >then it is a big problem.  If you know of some software
688 >that can do what you want, let me know, because I
689 >really just don't know how to do it -- at least not
690 >directly.
691
692
693 Hi Kern,
694
695 We have been able to get Amanda to use the HSM as a storage 
696 device.  Someone here wrote a driver for Amanda.  BUT, Amanda doesn't 
697 handle Windows systems very well (or at all without Samba).  So I am 
698 looking for a backup system that has a Windows client.  I really like the 
699 Windows integration of Bacula.
700
701 From the command line, its rather trivial to move the data around.  We use 
702 something like-
703
704 tar cf - ./files | gzip -c | rsh hsm dd of=path/file.tgz
705
706 or if you use GNU tar:
707
708 tar czf hsm:path/file.tgz ./files
709
710 One idea for you to consider; Sendmail offers pipes in the aliases file; 
711 (mailpipe:  "|/usr/bin/vacation root")  and Perl supports pipes in the 
712 "open" statement (open FILE, "|/bin/nroff -man";)  Could you could make a 
713 pipe available, as a storage device? Then we could use any command that 
714 handles stdin as a  storage destination.
715
716 Something like-
717
718 Storage {
719         Name = HSM-RSH
720         Address = hsm
721         #Password is not used in rsh, but might be used in ftp.
722         Device = "| gzip -c | rsh hsm dd of=path/file.tgz"
723         MediaType = Pipe
724 }
725
726 Storage {
727         Name = HSM-FTP
728         Address = hsm
729         Password = "foobar&-"
730         Device = "| ncftpput -c hsm /path/file.bacula"
731         MediaType = Pipe
732 }
733
734 >If you have some local storage available, you could
735 >use Bacula to backup to disk volumes, then use some
736 >other software (ftp, scp) to move them to the HSM
737 >machine. However, this is a bit kludgy.
738
739
740 It is, but maybe worth a try.  Is there some function in Bacula to put 
741 variables in filenames?  i.e. backup.2003-01-15.root
742
743 Thanks!
744 Bill
745
746 ---
747 Bill Sellers
748 w.a.sellers@larc.nasa.gov
749
750 ==============================================
751    The Project for the above
752
753 I finally realized that this is not at all
754 the same as reader/writer programs or plugins,
755 which are alternate ways of accessing the 
756 files to be backed up. Rather, it is an alternate
757 form of storage device, and I have always planned
758 that Bacula should be able to handle all sorts
759 of storage devices.
760
761 So, I propose the following phases:
762
763 1. OK from you to invest some time in testing
764    this as I implement it (requires that you
765    know how to download from the SourceForge
766    cvs -- which I imagine is a piece of cake
767    for you).
768
769 2. Dumb implementation by allowing a device to
770    be a fifo for write only.
771    Reason: easy to implement, proof of concept.
772
773 3. Try reading from fifo but with fixed block
774    sizes.
775    Reason: proof of concept, easy to implement.
776
777 4. Extend reading from fifo (restores) to handle
778    variable blocks.
779    Reason: requires some delicate low level coding
780    which could destabilize all of Bacula.
781
782 5. Implementation of above but to a program. E.g.
783     Device = "|program"  (not full pipeline).
784    Reason: routines already exist, and program can
785    be a shell script which contains anything.
786
787 6. Add full pipeline as a possibility. E.g.
788     Device = "| gzip -c | rsh hsm dd of=path/file.tgz"
789    Reason: needs additional coding to implement full
790    pipeline (must fire off either a shell or all
791    programs and connect their pipes).
792
793 There are a good number of details in each step
794 that I have left out, but I will specify them at
795 every stage, and there may be a few changes as things
796 evolve. I expect that to get to stage 5 will take a
797 few weeks, and at that point, you will have 
798 everything you need (just inside a script).
799 Stage 6 will probably take longer, but if this
800 project pleases you, what we do for 5 should 
801 be adequate for some time.
802
803
804
805 =============================================
806
807 Done: (see kernsdone for more)
808 - Look into Pruning/purging problems or why there seem to
809   be so many files listed each night.
810 - Fix cancel in find_one -- need jcr.
811 - Cancel does not work for restore in FD.
812 - Write SetJobStatus() function so cancel status not lost.
813 - Add include list to end of chain in findlib
814 - Zap sd_auth_key after use
815 - Add Bar code reading capabilities (new mtx-changer)
816 - Figure out some way to automatically backup all local partitions
817 - Make hash table for linked files in findlib/find_one.c:161
818   (not necessary)
819 - Rewrite find_one.c to use only pool_memory instead of 
820   alloca and malloc (probably not necessary).
821 - Make sure btraceback goes into /sbin not sysconf directory.
822 - InitVerify is getting pruned and it shouldn't (document it)
823 - Make 1.28c release ??? NO do 1.29 directly
824 - Set timeout on opening fifo for save or restore (findlib)
825 - Document FIFO storage device.
826 - Document fifo and | and <
827 ====== 1.30 =======
828 - Implement SHA1
829 - Get correct error status from run_program or open_bpipe().    
830