2 Bacula® - The Network Backup Solution
4 Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
6 The main author of Bacula is Kern Sibbald, with contributions from
7 many others, a complete list can be found in the file AUTHORS.
8 This program is Free Software; you can redistribute it and/or
9 modify it under the terms of version two of the GNU General Public
10 License as published by the Free Software Foundation and included
13 This program is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 Bacula® is a registered trademark of Kern Sibbald.
24 The licensor of Bacula is the Free Software Foundation Europe
25 (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
26 Switzerland, email:ftf@fsfeurope.org.
29 * Resource codes -- they must be sequential for indexing
41 R_LAST = R_AUTOCHANGER /* keep this updated */
53 /* Definition of the contents of each Resource */
58 char *password; /* Director password */
59 char *address; /* Director IP address or zero */
60 bool monitor; /* Have only access to status and .status functions */
61 bool tls_authenticate; /* Authenticate with TLS */
62 bool tls_enable; /* Enable TLS */
63 bool tls_require; /* Require TLS */
64 bool tls_verify_peer; /* TLS Verify Client Certificate */
65 char *tls_ca_certfile; /* TLS CA Certificate File */
66 char *tls_ca_certdir; /* TLS CA Certificate Directory */
67 char *tls_certfile; /* TLS Server Certificate File */
68 char *tls_keyfile; /* TLS Server Key File */
69 char *tls_dhfile; /* TLS Diffie-Hellman Parameters */
70 alist *tls_allowed_cns; /* TLS Allowed Clients */
72 TLS_CONTEXT *tls_ctx; /* Shared TLS Context */
76 /* Storage daemon "global" definitions */
83 char *working_directory; /* working directory for checkpoints */
85 char *subsys_directory;
86 char *plugin_directory; /* Plugin directory */
87 char *scripts_directory;
88 uint32_t max_concurrent_jobs; /* maximum concurrent jobs to run */
89 MSGS *messages; /* Daemon message handler */
90 utime_t heartbeat_interval; /* Interval to send hb to FD */
91 utime_t client_wait; /* Time to wait for FD to connect */
92 bool tls_authenticate; /* Authenticate with TLS */
93 bool tls_enable; /* Enable TLS */
94 bool tls_require; /* Require TLS */
95 bool tls_verify_peer; /* TLS Verify Client Certificate */
96 char *tls_ca_certfile; /* TLS CA Certificate File */
97 char *tls_ca_certdir; /* TLS CA Certificate Directory */
98 char *tls_certfile; /* TLS Server Certificate File */
99 char *tls_keyfile; /* TLS Server Key File */
100 char *tls_dhfile; /* TLS Diffie-Hellman Parameters */
101 alist *tls_allowed_cns; /* TLS Allowed Clients */
102 char *verid; /* Custom Id to print in version command */
103 TLS_CONTEXT *tls_ctx; /* Shared TLS Context */
105 typedef class s_res_store STORES;
110 alist *device; /* List of DEVRES device pointers */
111 char *changer_name; /* Changer device name */
112 char *changer_command; /* Changer command -- external program */
113 pthread_mutex_t changer_mutex; /* One changer operation at a time */
116 /* Device specific definitions */
121 char *media_type; /* User assigned media type */
122 char *device_name; /* Archive device name */
123 char *changer_name; /* Changer device name */
124 char *changer_command; /* Changer command -- external program */
125 char *alert_command; /* Alert command -- external program */
126 char *spool_directory; /* Spool file directory */
127 uint32_t dev_type; /* device type */
128 uint32_t label_type; /* label type */
129 bool autoselect; /* Automatically select from AutoChanger */
130 bool truncate_on_purge; /* Truncate this volume when it gets purged? */
131 uint32_t drive_index; /* Autochanger drive index */
132 uint32_t cap_bits; /* Capabilities of this device */
133 utime_t max_changer_wait; /* Changer timeout */
134 utime_t max_rewind_wait; /* maximum secs to wait for rewind */
135 utime_t max_open_wait; /* maximum secs to wait for open */
136 uint32_t max_open_vols; /* maximum simultaneous open volumes */
137 uint32_t min_block_size; /* min block size */
138 uint32_t max_block_size; /* max block size */
139 uint32_t max_volume_jobs; /* max jobs to put on one volume */
140 uint32_t max_network_buffer_size; /* max network buf size */
141 uint32_t max_concurrent_jobs; /* maximum concurrent jobs this drive */
142 utime_t vol_poll_interval; /* interval between polling volume during mount */
143 int64_t max_volume_files; /* max files to put on one volume */
144 int64_t max_volume_size; /* max bytes to put on one volume */
145 int64_t max_file_size; /* max file size in bytes */
146 int64_t volume_capacity; /* advisory capacity */
147 int64_t max_spool_size; /* Max spool size for all jobs */
148 int64_t max_job_spool_size; /* Max spool size for any single job */
150 int64_t max_part_size; /* Max part size */
151 char *mount_point; /* Mount point for require mount devices */
152 char *mount_command; /* Mount command */
153 char *unmount_command; /* Unmount command */
154 char *write_part_command; /* Write part command */
155 char *free_space_command; /* Free space command */
157 /* The following are set at runtime */
158 DEVICE *dev; /* Pointer to phyical dev -- set at runtime */
159 AUTOCHANGER *changer_res; /* pointer to changer res if any */
168 AUTOCHANGER res_changer;