2 Bacula(R) - The Network Backup Solution
4 Copyright (C) 2000-2017 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 extern s_kw dev_types[];
23 * Cloud Truncate Cache options
26 TRUNC_NO = 0, /* default value */
27 TRUNC_AFTER_UPLOAD = 1,
32 * Cloud Upload options
35 UPLOAD_EACHPART = 0, /* default value */
37 UPLOAD_AT_ENDOFJOB = 2
42 * Resource codes -- they must be sequential for indexing
54 R_LAST = R_CLOUD /* keep this updated */
66 /* Definition of the contents of each Resource */
81 uint32_t driver_type; /* Cloud driver type */
84 uint32_t max_concurrent_uploads;
85 uint32_t max_concurrent_downloads;
86 uint64_t upload_limit;
87 uint64_t download_limit;
97 char *password; /* Director password */
98 char *address; /* Director IP address or zero */
99 bool monitor; /* Have only access to status and .status functions */
100 bool tls_authenticate; /* Authenticate with TLS */
101 bool tls_enable; /* Enable TLS */
102 bool tls_require; /* Require TLS */
103 bool tls_verify_peer; /* TLS Verify Client Certificate */
104 char *tls_ca_certfile; /* TLS CA Certificate File */
105 char *tls_ca_certdir; /* TLS CA Certificate Directory */
106 char *tls_certfile; /* TLS Server Certificate File */
107 char *tls_keyfile; /* TLS Server Key File */
108 char *tls_dhfile; /* TLS Diffie-Hellman Parameters */
109 alist *tls_allowed_cns; /* TLS Allowed Clients */
111 TLS_CONTEXT *tls_ctx; /* Shared TLS Context */
115 /* Storage daemon "global" definitions */
122 char *working_directory; /* working directory for checkpoints */
124 char *subsys_directory;
125 char *plugin_directory; /* Plugin directory */
126 char *scripts_directory;
127 uint32_t max_concurrent_jobs; /* maximum concurrent jobs to run */
128 MSGS *messages; /* Daemon message handler */
129 utime_t ClientConnectTimeout; /* Max time to wait to connect client */
130 utime_t heartbeat_interval; /* Interval to send hb to FD */
131 utime_t client_wait; /* Time to wait for FD to connect */
132 bool comm_compression; /* Set to allow comm line compression */
133 bool tls_authenticate; /* Authenticate with TLS */
134 bool tls_enable; /* Enable TLS */
135 bool tls_require; /* Require TLS */
136 bool tls_verify_peer; /* TLS Verify Client Certificate */
137 char *tls_ca_certfile; /* TLS CA Certificate File */
138 char *tls_ca_certdir; /* TLS CA Certificate Directory */
139 char *tls_certfile; /* TLS Server Certificate File */
140 char *tls_keyfile; /* TLS Server Key File */
141 char *tls_dhfile; /* TLS Diffie-Hellman Parameters */
142 alist *tls_allowed_cns; /* TLS Allowed Clients */
143 char *verid; /* Custom Id to print in version command */
144 TLS_CONTEXT *tls_ctx; /* Shared TLS Context */
147 typedef class s_res_store STORES;
152 alist *device; /* List of DEVRES device pointers */
153 char *changer_name; /* Changer device name */
154 char *changer_command; /* Changer command -- external program */
155 char *lock_command; /* Share storage lock command -- external program */
156 brwlock_t changer_lock; /* One changer operation at a time */
159 /* Device specific definitions */
164 char *media_type; /* User assigned media type */
165 char *device_name; /* Archive device name */
166 char *adevice_name; /* Aligned device name */
167 char *changer_name; /* Changer device name */
168 char *control_name; /* SCSI control device name */
169 char *changer_command; /* Changer command -- external program */
170 char *alert_command; /* Alert command -- external program */
171 char *lock_command; /* Share storage lock command -- external program */
172 char *spool_directory; /* Spool file directory */
173 uint32_t dev_type; /* device type */
174 uint32_t label_type; /* label type */
175 bool enabled; /* Set when enabled (default) */
176 bool autoselect; /* Automatically select from AutoChanger */
177 bool read_only; /* Drive is read only */
178 uint32_t drive_index; /* Autochanger drive index */
179 uint32_t cap_bits; /* Capabilities of this device */
180 utime_t max_changer_wait; /* Changer timeout */
181 utime_t max_rewind_wait; /* maximum secs to wait for rewind */
182 utime_t max_open_wait; /* maximum secs to wait for open */
183 uint32_t padding_size; /* adata block padding -- bytes */
184 uint32_t file_alignment; /* adata file alignment -- bytes */
185 uint32_t min_aligned_size; /* minimum adata size */
186 uint32_t min_block_size; /* min block size */
187 uint32_t max_block_size; /* max block size */
188 uint32_t max_volume_jobs; /* max jobs to put on one volume */
189 uint32_t max_network_buffer_size; /* max network buf size */
190 uint32_t max_concurrent_jobs; /* maximum concurrent jobs this drive */
191 utime_t vol_poll_interval; /* interval between polling volume during mount */
192 int64_t max_volume_files; /* max files to put on one volume */
193 int64_t max_volume_size; /* max bytes to put on one volume */
194 int64_t max_file_size; /* max file size in bytes */
195 int64_t volume_capacity; /* advisory capacity */
196 int64_t min_free_space; /* Minimum disk free space */
197 int64_t max_spool_size; /* Max spool size for all jobs */
198 int64_t max_job_spool_size; /* Max spool size for any single job */
200 int64_t max_part_size; /* Max part size */
201 char *mount_point; /* Mount point for require mount devices */
202 char *mount_command; /* Mount command */
203 char *unmount_command; /* Unmount command */
204 char *write_part_command; /* Write part command */
205 char *free_space_command; /* Free space command */
206 CLOUD *cloud; /* pointer to cloud resource */
208 /* The following are set at runtime */
209 DEVICE *dev; /* Pointer to phyical dev -- set at runtime */
210 AUTOCHANGER *changer_res; /* pointer to changer res if any */
218 AUTOCHANGER res_changer;