]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/dird/bsr.h
Fix out of order volumes during restore.
[bacula/bacula] / bacula / src / dird / bsr.h
1 /*
2  *
3  *   Bootstrap Record header file
4  *
5  *      BSR (bootstrap record) handling routines split from
6  *        ua_restore.c July MMIII
7  *
8  *     Kern Sibbald, July MMII
9  *
10  *   Version $Id$
11  */
12
13 /*
14    Copyright (C) 2002-2005 Kern Sibbald
15
16    This program is free software; you can redistribute it and/or
17    modify it under the terms of the GNU General Public License
18    version 2 as amended with additional clauses defined in the
19    file LICENSE in the main source directory.
20
21    This program is distributed in the hope that it will be useful,
22    but WITHOUT ANY WARRANTY; without even the implied warranty of
23    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
24    the file LICENSE for additional details.
25
26  */
27
28
29 /* FileIndex entry in restore bootstrap record */
30 struct RBSR_FINDEX {
31    RBSR_FINDEX *next;
32    int32_t findex;
33    int32_t findex2;
34 };
35
36 /*
37  * Restore bootstrap record -- not the real one, but useful here
38  *  The restore bsr is a chain of BSR records (linked by next).
39  *  Each BSR represents a single JobId, and within it, it
40  *    contains a linked list of file indexes for that JobId.
41  *    The complete_bsr() routine, will then add all the volumes
42  *    on which the Job is stored to the BSR.
43  */
44 struct RBSR {
45    RBSR *next;                        /* next JobId */
46    JobId_t JobId;                     /* JobId this bsr */
47    uint32_t VolSessionId;
48    uint32_t VolSessionTime;
49    int      VolCount;                 /* Volume parameter count */
50    VOL_PARAMS *VolParams;             /* Volume, start/end file/blocks */
51    RBSR_FINDEX *fi;                   /* File indexes this JobId */
52 };