]> git.sur5r.net Git - bacula/bacula/commitdiff
kes Add Landon's refactor of restore Feature request to the
authorKern Sibbald <kern@sibbald.com>
Sat, 25 Nov 2006 13:38:03 +0000 (13:38 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 25 Nov 2006 13:38:03 +0000 (13:38 +0000)
     projects file.
kes  Tweak debug levels and messages for examining the disk
     seek problem.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3697 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/projects
bacula/src/filed/restore.c
bacula/src/stored/fd_cmds.c
bacula/technotes-1.39

index 235b1017ddbd5310dc2569fcdc91312f459710e3..0da65c17df58c13ab8e59dc9d210fcba7914b531 100644 (file)
@@ -41,6 +41,10 @@ Document:
  
 
 Priority:
+- Look at moving the Storage directive from the Job to the
+  Pool in the default conf files.
+- Make sure the new level=Full syntax is used in all 
+  example conf files (especially in the manual).
 - Fix prog copyright (SD) all other files.
 - Migration Volume span bug
 - Rescue release
index 5bc64dfb4f931d9749c65bc8bbb280077f60b97e..070f416723f0bee6f23c80e26270bf376f51a674 100644 (file)
@@ -1154,3 +1154,42 @@ Item n:   Allow inclusion/exclusion of files in a fileset by creation/mod times
           So one could compare against 'ctime' and/or 'mtime', but ONLY 'before'
            or 'since'.
 
+
+Item:   Implement support for stacking arbitrary stream filters, sinks.
+Date:   23 November 2006
+Origin: Landon Fuller <landonf@threerings.net>
+Status: Planning. Assigned to landonf.
+
+What:
+        Implement support for the following:
+        - Stacking arbitrary stream filters (eg, encryption, compression,  
+          sparse data handling))
+        - Attaching file sinks to terminate stream filters (ie, write out  
+          the resultant data to a file)
+        - Refactor the restoration state machine accordingly
+
+Why:
+        The existing stream implementation suffers from the following:
+         - All state (compression, encryption, stream restoration), is  
+           global across the entire restore process, for all streams. There are  
+           multiple entry and exit points in the restoration state machine, and  
+           thus multiple places where state must be allocated, deallocated,  
+           initialized, or reinitialized. This results in exceptional complexity  
+           for the author of a stream filter.
+         - The developer must enumerate all possible combinations of filters  
+           and stream types (ie, win32 data with encryption, without encryption,  
+           with encryption AND compression, etc).
+
+Notes:
+        This feature request only covers implementing the stream filters/ 
+        sinks, and refactoring the file daemon's restoration implementation  
+        accordingly. If I have extra time, I will also rewrite the backup  
+        implementation. My intent in implementing the restoration first is to  
+        solve pressing bugs in the restoration handling, and to ensure that  
+        the new restore implementation handles existing backups correctly.
+
+        I do not plan on changing the network or tape data structures to  
+        support defining arbitrary stream filters, but supporting that  
+        functionality is the ultimate goal.
+
+        Assistance with either code or testing would be fantastic.
index aeb017c635bdb4bb3fda6a14814d501e9300010a..fbf90fc987e7a5e5a1861fc01ec15329128d04d7 100644 (file)
@@ -224,7 +224,8 @@ void do_restore(JCR *jcr)
          Jmsg1(jcr, M_FATAL, 0, _("Record header scan error: %s\n"), sd->msg);
          goto bail_out;
       }
-      Dmsg2(30, "Got hdr: FilInx=%d Stream=%d.\n", file_index, stream);
+      Dmsg4(30, "Got hdr: Files=%d FilInx=%d Stream=%d, %s.\n", 
+            jcr->JobFiles, file_index, stream, stream_to_ascii(stream));
 
       /* * Now we expect the Stream Data */
       if (bget_msg(sd) < 0) {
@@ -235,7 +236,8 @@ void do_restore(JCR *jcr)
          Jmsg2(jcr, M_FATAL, 0, _("Actual data size %d not same as header %d\n"), sd->msglen, size);
          goto bail_out;
       }
-      Dmsg1(30, "Got stream data, len=%d\n", sd->msglen);
+      Dmsg3(30, "Got stream: %s len=%d extract=%d\n", stream_to_ascii(stream), 
+            sd->msglen, extract);
 
       /* If we change streams, close and reset alternate data streams */
       if (prev_stream != stream) {
@@ -250,7 +252,6 @@ void do_restore(JCR *jcr)
       switch (stream) {
       case STREAM_UNIX_ATTRIBUTES:
       case STREAM_UNIX_ATTRIBUTES_EX:
-         Dmsg1(30, "Stream=Unix Attributes. extract=%d\n", extract);
          /*
           * If extracting, it was from previous stream, so
           * close the output file and validate the signature.
@@ -361,8 +362,6 @@ void do_restore(JCR *jcr)
       case STREAM_ENCRYPTED_SESSION_DATA:
          crypto_error_t cryptoerr;
 
-         Dmsg1(30, "Stream=Encrypted Session Data, size: %d\n", sd->msglen);
-
          /* Do we have any keys at all? */
          if (!jcr->pki_recipients) {
             Jmsg(jcr, M_ERROR, 0, _("No private decryption keys have been defined to decrypt encrypted backup data."));
index fea8909d12912f2c02bf9cae24e89ce95aea88ca..bb1cea383133c660578fb462a600ff2c0fe3f749 100644 (file)
@@ -359,7 +359,7 @@ bool get_bootstrap_file(JCR *jcr, BSOCK *sock)
       Jmsg(jcr, M_FATAL, 0, _("Error parsing bootstrap file.\n"));
       goto bail_out;
    }
-   if (debug_level > 20) {
+   if (debug_level >= 10) {
       dump_bsr(jcr->bsr, true);
    }
    ok = true;
index 0e6b0395d1cdc93670e407a1ba4a57f4781a71c1..b9cf96c86cb7b69f5dfdc4479b5979ba846169dd 100644 (file)
@@ -1,6 +1,11 @@
               Technical notes on version 1.39  
 
 General:
+25Nov06
+kes  Add Landon's refactor of restore Feature request to the
+     projects file.
+kes  Tweak debug levels and messages for examining the disk
+     seek problem.
 22Nov06
 kes  Cleanup some of the error termination code in migration.
 kes  Separate read/write source strings to keep track of where