]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/dird/bsr.h
Fix bug #2343 where truncate of explicit Volume name truncates non-purged volumes
[bacula/bacula] / bacula / src / dird / bsr.h
1 /*
2    Bacula(R) - The Network Backup Solution
3
4    Copyright (C) 2000-2017 Kern Sibbald
5
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.
8
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.
13
14    This notice must be preserved when any source code is 
15    conveyed and/or propagated.
16
17    Bacula(R) is a registered trademark of Kern Sibbald.
18 */
19 /*
20  *   Bootstrap Record header file
21  *
22  *      BSR (bootstrap record) handling routines split from
23  *        ua_restore.c July MMIII
24  *
25  *     Kern Sibbald, July MMII
26  */
27
28
29
30 /* FileIndex entry in restore bootstrap record */
31 struct RBSR_FINDEX {
32    rblink  link;
33    int32_t findex;
34    int32_t findex2;
35 };
36
37 /*
38  * Restore bootstrap record -- not the real one, but useful here
39  *  The restore bsr is a chain of BSR records (linked by next).
40  *  Each BSR represents a single JobId, and within it, it
41  *    contains a linked list of file indexes for that JobId.
42  *    The complete_bsr() routine, will then add all the volumes
43  *    on which the Job is stored to the BSR.
44  */
45 struct RBSR {
46    rblink link;
47    JobId_t JobId;                     /* JobId this bsr */
48    uint32_t VolSessionId;
49    uint32_t VolSessionTime;
50    int      VolCount;                 /* Volume parameter count */
51    VOL_PARAMS *VolParams;             /* Volume, start/end file/blocks */
52    rblist *fi_list;                   /* File indexes this JobId */
53    char   *fileregex;                 /* Only restore files matching regex */
54
55    /* If we extend an existing fi, keep the memory for the next insert */
56    RBSR_FINDEX *m_fi;
57 };