2 * Director specific configuration and defines
9 Copyright (C) 2000-2003 2002 Kern Sibbald and John Walker
11 This program is free software; you can redistribute it and/or
12 modify it under the terms of the GNU General Public License as
13 published by the Free Software Foundation; either version 2 of
14 the License, or (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public
22 License along with this program; if not, write to the Free
23 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
28 /* NOTE: #includes at the end of this file */
31 * Resource codes -- they must be sequential for indexing
47 R_LAST = R_JOBDEFS /* keep this updated */
52 * Some resource attributes
63 /* Used for certain KeyWord tables */
69 /* Job Level keyword structure */
71 char *level_name; /* level keyword */
72 int level; /* level */
73 int job_type; /* JobType permitting this level */
76 /* Job Type keyword structure */
82 /* Definition of the contents of each Resource */
83 /* Needed for forward references */
96 int DIRport; /* where we listen -- UA port server port */
97 char *DIRaddr; /* bind address */
98 char *password; /* Password for UA access */
99 int enable_ssl; /* Use SSL for UA */
100 char *query_file; /* SQL query file */
101 char *working_directory; /* WorkingDirectory */
102 char *pid_directory; /* PidDirectory */
103 char *subsys_directory; /* SubsysDirectory */
104 int require_ssl; /* Require SSL for all connections */
105 MSGS *messages; /* Daemon message handler */
106 uint32_t MaxConcurrentJobs; /* Max concurrent jobs for whole director */
107 utime_t FDConnectTimeout; /* timeout for connect in seconds */
108 utime_t SDConnectTimeout; /* timeout in seconds */
113 * Console ACL positions
125 Num_ACL /* keep last */
133 char *password; /* UA server password */
134 int enable_ssl; /* Use SSL */
135 alist *ACL_lists[Num_ACL]; /* pointers to ACLs */
146 int db_port; /* Port -- not yet implemented */
147 char *db_address; /* host name for remote access */
148 char *db_socket; /* Socket for local access */
162 int FDport; /* Where File daemon listens */
163 int AutoPrune; /* Do automatic pruning? */
164 utime_t FileRetention; /* file retention period in seconds */
165 utime_t JobRetention; /* job retention period in seconds */
168 CAT *catalog; /* Catalog resource */
169 uint32_t MaxConcurrentJobs; /* Maximume concurrent jobs */
170 uint32_t NumConcurrentJobs; /* number of concurrent jobs running */
171 int enable_ssl; /* Use SSL */
181 int SDport; /* port where Directors connect */
182 int SDDport; /* data port for File daemon */
187 int autochanger; /* set if autochanger */
188 uint32_t MaxConcurrentJobs; /* Maximume concurrent jobs */
189 uint32_t NumConcurrentJobs; /* number of concurrent jobs running */
190 int enable_ssl; /* Use SSL */
200 int JobType; /* job type (backup, verify, restore */
201 int level; /* default backup/verify level */
202 int Priority; /* Job priority */
203 int RestoreJobId; /* What -- JobId to restore */
204 char *RestoreWhere; /* Where on disk to restore -- directory */
205 char *RestoreBootstrap; /* Bootstrap file */
206 char *RunBeforeJob; /* Run program before Job */
207 char *RunAfterJob; /* Run program after Job */
208 char *RunAfterFailedJob; /* Run program after Job that errs */
209 char *ClientRunBeforeJob; /* Run client program before Job */
210 char *ClientRunAfterJob; /* Run client program after Job */
211 char *WriteBootstrap; /* Where to write bootstrap Job updates */
212 int replace; /* How (overwrite, ..) */
213 utime_t MaxRunTime; /* max run time in seconds */
214 utime_t MaxWaitTime; /* max blocking time in seconds */
215 utime_t MaxStartDelay; /* max start delay in seconds */
216 int PrefixLinks; /* prefix soft links with Where path */
217 int PruneJobs; /* Force pruning of Jobs */
218 int PruneFiles; /* Force pruning of Files */
219 int PruneVolumes; /* Force pruning of Volumes */
220 int SpoolAttributes; /* Set to spool attributes in SD */
221 int spool_data; /* Set to spool data in SD */
222 uint32_t MaxConcurrentJobs; /* Maximume concurrent jobs */
223 int RescheduleOnError; /* Set to reschedule on error */
224 int RescheduleTimes; /* Number of times to reschedule job */
225 utime_t RescheduleInterval; /* Reschedule interval */
226 utime_t JobRetention; /* job retention period in seconds */
228 MSGS *messages; /* How and where to send messages */
229 SCHED *schedule; /* When -- Automatic schedule */
230 CLIENT *client; /* Who to backup */
231 FILESET *fileset; /* What to backup -- Fileset */
232 STORE *storage; /* Where is device -- Storage daemon */
233 POOL *pool; /* Where is media -- Media Pool */
234 POOL *full_pool; /* Pool for Full backups */
235 POOL *inc_pool; /* Pool for Incremental backups */
236 POOL *dif_pool; /* Pool for Differental backups */
237 JOB *verify_job; /* Job name to verify */
238 JOB *jobdefs; /* Job defaults */
239 uint32_t NumConcurrentJobs; /* number of concurrent jobs running */
244 /* File options structure */
246 char opts[MAX_FOPTS]; /* options string */
247 alist match; /* match string(s) */
248 alist base_list; /* list of base names */
252 /* This is either an include item or an exclude item */
254 FOPTS *current_opts; /* points to current options structure */
255 FOPTS **opts_list; /* options list */
256 int num_opts; /* number of options items */
257 alist name_list; /* filename list -- holds char * */
267 int new_include; /* Set if new include used */
268 INCEXE **include_items; /* array of incexe structures */
269 int num_includes; /* number in array */
270 INCEXE **exclude_items;
272 int have_MD5; /* set if MD5 initialized */
273 struct MD5Context md5c; /* MD5 of include/exclude */
274 char MD5[30]; /* base 64 representation of MD5 */
294 int32_t MinValue; /* Minimum value */
295 int32_t MaxValue; /* Maximum value */
296 int32_t CurrentValue; /* Current value */
297 COUNTER *WrapCounter; /* Wrap counter name */
298 CAT *Catalog; /* Where to store */
299 bool created; /* Created in DB */
309 char *pool_type; /* Pool type */
310 char *label_format; /* Label format string */
311 char *cleaning_prefix; /* Cleaning label prefix */
312 int use_catalog; /* maintain catalog for media */
313 int catalog_files; /* maintain file entries in catalog */
314 int use_volume_once; /* write on volume only once */
315 int accept_any_volume; /* accept any volume */
316 int purge_oldest_volume; /* purge oldest volume */
317 int recycle_oldest_volume; /* attempt to recycle oldest volume */
318 int recycle_current_volume; /* attempt recycle of current volume */
319 uint32_t max_volumes; /* max number of volumes */
320 utime_t VolRetention; /* volume retention period in seconds */
321 utime_t VolUseDuration; /* duration volume can be used */
322 uint32_t MaxVolJobs; /* Maximum jobs on the Volume */
323 uint32_t MaxVolFiles; /* Maximum files on the Volume */
324 uint64_t MaxVolBytes; /* Maximum bytes on the Volume */
325 int AutoPrune; /* default for pool auto prune */
326 int Recycle; /* default for media recycle yes/no */
330 /* Define the Union of all the above
331 * resource structure definitions.
350 /* Run structure contained in Schedule Resource */
352 RUN *next; /* points to next run record */
353 int level; /* level override */
354 int Priority; /* priority override */
356 bool spool_data; /* Data spooling override */
357 bool spool_data_set; /* Data spooling override given */
358 POOL *pool; /* Pool override */
359 POOL *full_pool; /* Pool override */
360 POOL *inc_pool; /* Pool override */
361 POOL *dif_pool; /* Pool override */
362 STORE *storage; /* Storage override */
363 MSGS *msgs; /* Messages override */
366 int minute; /* minute to run job */
367 time_t last_run; /* last time run */
368 time_t next_run; /* next time to run */
369 char hour[nbytes_for_bits(24)]; /* bit set for each hour */
370 char mday[nbytes_for_bits(31)]; /* bit set for each day of month */
371 char month[nbytes_for_bits(12)]; /* bit set for each month */
372 char wday[nbytes_for_bits(7)]; /* bit set for each day of the week */
373 char wom[nbytes_for_bits(5)]; /* week of month */
374 char woy[nbytes_for_bits(54)]; /* week of year */