]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/restore.h
Fix bug #1812 cannot run Copy/Migrate jobs from bat
[bacula/bacula] / bacula / src / filed / restore.h
index 76d18dbeadcaf2de026a838cdaf6eedd344e30f3..6a522688e6cfedca47cc121a2a14f438450466c0 100644 (file)
@@ -6,7 +6,7 @@
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
@@ -15,7 +15,7 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 #ifndef __RESTORE_H
 #define __RESTORE_H
 
+struct RESTORE_DATA_STREAM {
+   int32_t stream;                     /* stream less new bits */
+   char *content;                      /* stream data */
+   uint32_t content_length;            /* stream length */
+};
+
 struct RESTORE_CIPHER_CTX {
    CIPHER_CONTEXT *cipher;
    uint32_t block_size;
 
-   POOLMEM *buf;       /* Pointer to descryption buffer */
-   int32_t buf_len;    /* Count of bytes currently in buf */ 
-   int32_t packet_len; /* Total bytes in packet */
+   POOLMEM *buf;                       /* Pointer to descryption buffer */
+   int32_t buf_len;                    /* Count of bytes currently in buf */
+   int32_t packet_len;                 /* Total bytes in packet */
 };
 
 struct r_ctx {
    JCR *jcr;
-   int32_t stream;
-   int32_t prev_stream;
+   int32_t stream;                     /* stream less new bits */
+   int32_t prev_stream;                /* previous stream */
+   int32_t full_stream;                /* full stream including new bits */
+   int32_t comp_stream;                /* last compressed stream found. needed only to restore encrypted compressed backup */
    BFILE bfd;                          /* File content */
    uint64_t fileAddr;                  /* file write address */
    uint32_t size;                      /* Size of file */
    int flags;                          /* Options for extract_data() */
    BFILE forkbfd;                      /* Alternative data stream */
    uint64_t fork_addr;                 /* Write address for alternative stream */
-   intmax_t fork_size;                 /* Size of alternate stream */
+   int64_t fork_size;                  /* Size of alternate stream */
    int fork_flags;                     /* Options for extract_data() */
    int32_t type;                       /* file type FT_ */
    ATTR *attr;                         /* Pointer to attributes */
    bool extract;                       /* set when extracting */
+   alist *delayed_streams;             /* streams that should be restored as last */
 
    SIGNATURE *sig;                     /* Cryptographic signature (if any) for file */
    CRYPTO_SESSION *cs;                 /* Cryptographic session data (if any) for file */