2 Bacula(R) - The Network Backup Solution
4 Copyright (C) 2000-2015 Kern Sibbald
5 Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
7 The original author of Bacula is Kern Sibbald, with contributions
8 from many others, a complete list can be found in the file AUTHORS.
10 You may use this file and others of this release according to the
11 license defined in the LICENSE file, which includes the Affero General
12 Public License, v3.0 ("AGPLv3") and some additional permissions and
13 terms pursuant to its AGPLv3 Section 7.
15 This notice must be preserved when any source code is
16 conveyed and/or propagated.
18 Bacula(R) is a registered trademark of Kern Sibbald.
21 extern s_kw dev_types[];
24 * Resource codes -- they must be sequential for indexing
35 R_LAST = R_AUTOCHANGER /* keep this updated */
47 /* Definition of the contents of each Resource */
52 char *password; /* Director password */
53 char *address; /* Director IP address or zero */
54 bool monitor; /* Have only access to status and .status functions */
55 bool tls_authenticate; /* Authenticate with TLS */
56 bool tls_enable; /* Enable TLS */
57 bool tls_require; /* Require TLS */
58 bool tls_verify_peer; /* TLS Verify Client Certificate */
59 char *tls_ca_certfile; /* TLS CA Certificate File */
60 char *tls_ca_certdir; /* TLS CA Certificate Directory */
61 char *tls_certfile; /* TLS Server Certificate File */
62 char *tls_keyfile; /* TLS Server Key File */
63 char *tls_dhfile; /* TLS Diffie-Hellman Parameters */
64 alist *tls_allowed_cns; /* TLS Allowed Clients */
66 TLS_CONTEXT *tls_ctx; /* Shared TLS Context */
70 /* Storage daemon "global" definitions */
77 char *working_directory; /* working directory for checkpoints */
79 char *subsys_directory;
80 char *plugin_directory; /* Plugin directory */
81 char *scripts_directory;
82 uint32_t max_concurrent_jobs; /* maximum concurrent jobs to run */
83 MSGS *messages; /* Daemon message handler */
84 utime_t ClientConnectTimeout; /* Max time to wait to connect client */
85 utime_t heartbeat_interval; /* Interval to send hb to FD */
86 utime_t client_wait; /* Time to wait for FD to connect */
87 bool tls_authenticate; /* Authenticate with TLS */
88 bool tls_enable; /* Enable TLS */
89 bool tls_require; /* Require TLS */
90 bool tls_verify_peer; /* TLS Verify Client Certificate */
91 char *tls_ca_certfile; /* TLS CA Certificate File */
92 char *tls_ca_certdir; /* TLS CA Certificate Directory */
93 char *tls_certfile; /* TLS Server Certificate File */
94 char *tls_keyfile; /* TLS Server Key File */
95 char *tls_dhfile; /* TLS Diffie-Hellman Parameters */
96 alist *tls_allowed_cns; /* TLS Allowed Clients */
97 char *verid; /* Custom Id to print in version command */
98 TLS_CONTEXT *tls_ctx; /* Shared TLS Context */
101 typedef class s_res_store STORES;
106 alist *device; /* List of DEVRES device pointers */
107 char *changer_name; /* Changer device name */
108 char *changer_command; /* Changer command -- external program */
109 brwlock_t changer_lock; /* One changer operation at a time */
112 /* Device specific definitions */
117 char *media_type; /* User assigned media type */
118 char *device_name; /* Archive device name */
119 char *changer_name; /* Changer device name */
120 char *control_name; /* SCSI control device name */
121 char *changer_command; /* Changer command -- external program */
122 char *alert_command; /* Alert command -- external program */
123 char *spool_directory; /* Spool file directory */
124 uint32_t dev_type; /* device type */
125 uint32_t label_type; /* label type */
126 bool enabled; /* Set when enabled (default) */
127 bool autoselect; /* Automatically select from AutoChanger */
128 bool read_only; /* Drive is read only */
129 uint32_t drive_index; /* Autochanger drive index */
130 uint32_t cap_bits; /* Capabilities of this device */
131 utime_t max_changer_wait; /* Changer timeout */
132 utime_t max_rewind_wait; /* maximum secs to wait for rewind */
133 utime_t max_open_wait; /* maximum secs to wait for open */
134 uint32_t padding_size; /* adata block padding -- bytes */
135 uint32_t file_alignment; /* adata file alignment -- bytes */
136 uint32_t min_block_size; /* min block size */
137 uint32_t max_block_size; /* max block size */
138 uint32_t max_volume_jobs; /* max jobs to put on one volume */
139 uint32_t max_network_buffer_size; /* max network buf size */
140 uint32_t max_concurrent_jobs; /* maximum concurrent jobs this drive */
141 utime_t vol_poll_interval; /* interval between polling volume during mount */
142 int64_t max_volume_files; /* max files to put on one volume */
143 int64_t max_volume_size; /* max bytes to put on one volume */
144 int64_t max_file_size; /* max file size in bytes */
145 int64_t volume_capacity; /* advisory capacity */
146 int64_t min_free_space; /* Minimum disk free space */
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;