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 extern s_kw dev_types[];
23 * Resource codes -- they must be sequential for indexing
34 R_LAST = R_AUTOCHANGER /* keep this updated */
46 /* Definition of the contents of each Resource */
51 char *password; /* Director password */
52 char *address; /* Director IP address or zero */
53 bool monitor; /* Have only access to status and .status functions */
54 bool tls_authenticate; /* Authenticate with TLS */
55 bool tls_enable; /* Enable TLS */
56 bool tls_require; /* Require TLS */
57 bool tls_verify_peer; /* TLS Verify Client Certificate */
58 char *tls_ca_certfile; /* TLS CA Certificate File */
59 char *tls_ca_certdir; /* TLS CA Certificate Directory */
60 char *tls_certfile; /* TLS Server Certificate File */
61 char *tls_keyfile; /* TLS Server Key File */
62 char *tls_dhfile; /* TLS Diffie-Hellman Parameters */
63 alist *tls_allowed_cns; /* TLS Allowed Clients */
65 TLS_CONTEXT *tls_ctx; /* Shared TLS Context */
69 /* Storage daemon "global" definitions */
76 char *working_directory; /* working directory for checkpoints */
78 char *subsys_directory;
79 char *plugin_directory; /* Plugin directory */
80 char *scripts_directory;
81 uint32_t max_concurrent_jobs; /* maximum concurrent jobs to run */
82 MSGS *messages; /* Daemon message handler */
83 utime_t ClientConnectTimeout; /* Max time to wait to connect client */
84 utime_t heartbeat_interval; /* Interval to send hb to FD */
85 utime_t client_wait; /* Time to wait for FD to connect */
86 bool tls_authenticate; /* Authenticate with TLS */
87 bool tls_enable; /* Enable TLS */
88 bool tls_require; /* Require TLS */
89 bool tls_verify_peer; /* TLS Verify Client Certificate */
90 char *tls_ca_certfile; /* TLS CA Certificate File */
91 char *tls_ca_certdir; /* TLS CA Certificate Directory */
92 char *tls_certfile; /* TLS Server Certificate File */
93 char *tls_keyfile; /* TLS Server Key File */
94 char *tls_dhfile; /* TLS Diffie-Hellman Parameters */
95 alist *tls_allowed_cns; /* TLS Allowed Clients */
96 char *verid; /* Custom Id to print in version command */
97 TLS_CONTEXT *tls_ctx; /* Shared TLS Context */
100 typedef class s_res_store STORES;
105 alist *device; /* List of DEVRES device pointers */
106 char *changer_name; /* Changer device name */
107 char *changer_command; /* Changer command -- external program */
108 brwlock_t changer_lock; /* One changer operation at a time */
111 /* Device specific definitions */
116 char *media_type; /* User assigned media type */
117 char *device_name; /* Archive device name */
118 char *changer_name; /* Changer device name */
119 char *control_name; /* SCSI control device name */
120 char *changer_command; /* Changer command -- external program */
121 char *alert_command; /* Alert command -- external program */
122 char *spool_directory; /* Spool file directory */
123 uint32_t dev_type; /* device type */
124 uint32_t label_type; /* label type */
125 bool enabled; /* Set when enabled (default) */
126 bool autoselect; /* Automatically select from AutoChanger */
127 bool read_only; /* Drive is read only */
128 uint32_t drive_index; /* Autochanger drive index */
129 uint32_t cap_bits; /* Capabilities of this device */
130 utime_t max_changer_wait; /* Changer timeout */
131 utime_t max_rewind_wait; /* maximum secs to wait for rewind */
132 utime_t max_open_wait; /* maximum secs to wait for open */
133 uint32_t padding_size; /* adata block padding -- bytes */
134 uint32_t file_alignment; /* adata file alignment -- bytes */
135 uint32_t min_block_size; /* min block size */
136 uint32_t max_block_size; /* max block size */
137 uint32_t max_volume_jobs; /* max jobs to put on one volume */
138 uint32_t max_network_buffer_size; /* max network buf size */
139 uint32_t max_concurrent_jobs; /* maximum concurrent jobs this drive */
140 utime_t vol_poll_interval; /* interval between polling volume during mount */
141 int64_t max_volume_files; /* max files to put on one volume */
142 int64_t max_volume_size; /* max bytes to put on one volume */
143 int64_t max_file_size; /* max file size in bytes */
144 int64_t volume_capacity; /* advisory capacity */
145 int64_t min_free_space; /* Minimum disk free space */
146 int64_t max_spool_size; /* Max spool size for all jobs */
147 int64_t max_job_spool_size; /* Max spool size for any single job */
149 int64_t max_part_size; /* Max part size */
150 char *mount_point; /* Mount point for require mount devices */
151 char *mount_command; /* Mount command */
152 char *unmount_command; /* Unmount command */
153 char *write_part_command; /* Write part command */
154 char *free_space_command; /* Free space command */
156 /* The following are set at runtime */
157 DEVICE *dev; /* Pointer to phyical dev -- set at runtime */
158 AUTOCHANGER *changer_res; /* pointer to changer res if any */
167 AUTOCHANGER res_changer;