2 Bacula(R) - The Network Backup Solution
4 Copyright (C) 2000-2016 Kern Sibbald
6 The original author of Bacula is Kern Sibbald, with contributions
7 from many others, a complete list can be found in the file AUTHORS.
9 You may use this file and others of this release according to the
10 license defined in the LICENSE file, which includes the Affero General
11 Public License, v3.0 ("AGPLv3") and some additional permissions and
12 terms pursuant to its AGPLv3 Section 7.
14 This notice must be preserved when any source code is
15 conveyed and/or propagated.
17 Bacula(R) is a registered trademark of Kern Sibbald.
20 * BootStrap record definition -- for restoring files.
22 * Kern Sibbald, June 2002
31 #include "lib/bregex.h"
37 * List of Volume names to be read by Storage daemon.
38 * Formed by Storage daemon from BSR
42 char VolumeName[MAX_NAME_LENGTH];
43 char MediaType[MAX_NAME_LENGTH];
44 char device[MAX_NAME_LENGTH]; /* ***FIXME*** use alist here */
51 * !!!!!!!!!!!!!!!!!! NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
53 * !!! All records must have a pointer to !!!
54 * !!! the next item as the first item defined. !!!
56 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
61 char VolumeName[MAX_NAME_LENGTH];
62 char MediaType[MAX_NAME_LENGTH];
63 char device[MAX_NAME_LENGTH]; /* ***FIXME*** use alist here */
64 int32_t Slot; /* Slot */
69 char ClientName[MAX_NAME_LENGTH];
81 bool done; /* local done */
86 uint32_t sfile; /* start file */
87 uint32_t efile; /* end file */
88 bool done; /* local done */
93 uint32_t sblock; /* start block */
94 uint32_t eblock; /* end block */
95 bool done; /* local done */
100 uint64_t saddr; /* start address */
101 uint64_t eaddr; /* end address */
102 bool done; /* local done */
107 int32_t findex; /* start file index */
108 int32_t findex2; /* end file index */
109 bool done; /* local done */
123 struct BSR_JOBLEVEL {
130 char Job[MAX_NAME_LENGTH];
131 bool done; /* local done */
136 int32_t stream; /* stream desired */
140 /* NOTE!!! next must be the first item */
141 BSR *next; /* pointer to next one */
142 BSR *prev; /* pointer to previous one */
143 BSR *root; /* root bsr */
145 bool reposition; /* set when any bsr is marked done */
146 bool mount_next_volume; /* set when next volume should be mounted */
147 bool done; /* set when everything found for this bsr */
148 bool use_fast_rejection; /* set if fast rejection can be used */
149 bool use_positioning; /* set if we can position the archive */
150 bool skip_file; /* skip all records for current file */
152 uint32_t count; /* count of files to restore this bsr */
153 uint32_t found; /* count of restored files this bsr */
154 int32_t LastFI; /* LastFI seen by this bsr */
155 BSR_VOLFILE *volfile;
156 BSR_VOLBLOCK *volblock;
157 BSR_VOLADDR *voladdr;
158 BSR_SESSTIME *sesstime;
163 BSR_FINDEX *FileIndex;
164 BSR_JOBTYPE *JobType;
165 BSR_JOBLEVEL *JobLevel;
167 char *fileregex; /* set if restore is filtered on filename */
168 regex_t *fileregex_re;
169 ATTR *attr; /* scratch space for unpacking */