]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/dird_conf.h
Fix newvol.c
[bacula/bacula] / bacula / src / dird / dird_conf.h
index 862e7c35793712ac027d53af951f1500079a8c71..570a3251af2a52c80bb4b57c6dbbf4298bfebe64 100644 (file)
 #define R_GROUP                      1008
 #define R_POOL                       1009
 #define R_MSGS                       1010
+#define R_COUNTER                    1011
+#define R_FILEOPTIONS                1012
 
-#define R_LAST                       R_MSGS
+#define R_LAST                       R_FILEOPTIONS
 
 /*
  * Some resource attributes
@@ -83,6 +85,7 @@ struct s_jt {
 struct s_res_dir {
    RES  hdr;
    int  DIRport;                     /* where we listen -- UA port server port */
+   char *DIRaddr;                    /* bind address */
    char *password;                   /* Password for UA access */
    char *query_file;                 /* SQL query file */
    char *working_directory;          /* WorkingDirectory */
@@ -90,8 +93,8 @@ struct s_res_dir {
    char *subsys_directory;           /* SubsysDirectory */
    struct s_res_msgs *messages;       /* Daemon message handler */
    int  MaxConcurrentJobs;
-   btime_t FDConnectTimeout;         /* timeout for connect in seconds */
-   btime_t SDConnectTimeout;         /* timeout in seconds */
+   utime_t FDConnectTimeout;         /* timeout for connect in seconds */
+   utime_t SDConnectTimeout;         /* timeout in seconds */
 };
 typedef struct s_res_dir DIRRES;
 
@@ -104,8 +107,8 @@ struct s_res_client {
 
    int  FDport;                      /* Where File daemon listens */
    int  AutoPrune;                   /* Do automatic pruning? */
-   btime_t FileRetention;            /* file retention period in seconds */
-   btime_t JobRetention;             /* job retention period in seconds */
+   utime_t FileRetention;            /* file retention period in seconds */
+   utime_t JobRetention;             /* job retention period in seconds */
    char *address;
    char *password;
    struct s_res_cat    *catalog;       /* Catalog resource */
@@ -125,6 +128,7 @@ struct s_res_store {
    char *password;
    char *media_type;
    char *dev_name;   
+   int autochanger;                  /* set if autochanger */
 };
 typedef struct s_res_store STORE;
 
@@ -155,17 +159,21 @@ struct s_res_job {
    int  RestoreJobId;                /* What -- JobId to restore */
    char *RestoreWhere;               /* Where on disk to restore -- directory */
    char *RestoreBootstrap;           /* Bootstrap file */
-   int  RestoreOptions;              /* How (overwrite, ..) */
-   btime_t MaxRunTime;               /* max run time in seconds */
-   btime_t MaxStartDelay;            /* max start delay in seconds */
+   char *RunBeforeJob;               /* Run program before Job */
+   char *RunAfterJob;                /* Run program after Job */
+   char *WriteBootstrap;             /* Where to write bootstrap Job updates */
+   int  replace;                     /* How (overwrite, ..) */
+   utime_t MaxRunTime;               /* max run time in seconds */
+   utime_t MaxStartDelay;            /* max start delay in seconds */
    int PruneJobs;                    /* Force pruning of Jobs */
    int PruneFiles;                   /* Force pruning of Files */
    int PruneVolumes;                 /* Force pruning of Volumes */
+   int SpoolAttributes;              /* Set to spool attributes in SD */
 
    struct s_res_msgs   *messages;     /* How and where to send messages */
    struct s_res_sch    *schedule;     /* When -- Automatic schedule */
    struct s_res_client *client;       /* Who to backup */
-   struct s_res_fs     *fs;          /* What to backup -- Fileset */
+   struct s_res_fs     *fileset;      /* What to backup -- Fileset */
    struct s_res_store  *storage;      /* Where is device -- Storage daemon */
    struct s_res_pool   *pool;        /* Where is media -- Media Pool */
 };
@@ -186,8 +194,20 @@ struct s_res_fs {
    int exclude_size;
    int have_MD5;                     /* set if MD5 initialized */
    struct MD5Context md5c;           /* MD5 of include/exclude */
+   char MD5[50];                     /* base 64 representation of MD5 */
 };
 typedef struct s_res_fs FILESET;
+
+/*
+ * FileOptions Resource (options for Includes)
+ */
+struct s_res_fo {
+   RES hdr;
+
+   char opts[50];                    /* Options string */
+   struct s_applyto *applyto;        /* applyto strings */
+}; 
+typedef struct s_res_fo FILEOPTIONS;
  
 
 /* 
@@ -210,6 +230,19 @@ struct s_res_group {
 };
 typedef struct s_res_group GROUP;
 
+/*
+ *   Counter Resource
+ */
+struct s_res_counter {
+   RES  hdr;
+
+   int32_t MinValue;                 /* Minimum value */
+   int32_t MaxValue;                 /* Maximum value */
+   int    Global;                    /* global/local */
+   char  *WrapCounter;               /* Wrap counter name */
+};
+typedef struct s_res_counter COUNTER;
+
 /*
  *   Pool Resource   
  *
@@ -217,14 +250,19 @@ typedef struct s_res_group GROUP;
 struct s_res_pool {
    RES  hdr;
 
-   char *pool_type;
+   struct s_res_counter counter;      /* Counter resources */
+   char *pool_type;                  /* Pool type */
    char *label_format;               /* Label format string */
    int  use_catalog;                 /* maintain catalog for media */
    int  catalog_files;               /* maintain file entries in catalog */
    int  use_volume_once;             /* write on volume only once */
    int  accept_any_volume;           /* accept any volume */
-   int  max_volumes;                 /* max number of volumes */
-   btime_t VolRetention;             /* volume retention period in seconds */
+   uint32_t max_volumes;             /* max number of volumes */
+   utime_t VolRetention;             /* volume retention period in seconds */
+   utime_t VolUseDuration;           /* duration volume can be used */
+   uint32_t MaxVolJobs;              /* Maximum jobs on the Volume */
+   uint32_t MaxVolFiles;             /* Maximum files on the Volume */
+   uint64_t MaxVolBytes;             /* Maximum bytes on the Volume */
    int  AutoPrune;                   /* default for pool auto prune */
    int  Recycle;                     /* default for media recycle yes/no */
 };
@@ -245,6 +283,8 @@ union u_res {
    struct s_res_group  res_group;
    struct s_res_pool   res_pool;
    struct s_res_msgs   res_msgs;
+   struct s_res_counter res_counter;
+   struct s_res_fo     res_fo;
    RES hdr;
 };
 
@@ -268,5 +308,6 @@ struct s_run {
    char mday[nbytes_for_bits(31)];    /* bit set for each day of month */
    char month[nbytes_for_bits(12)];   /* bit set for each month */
    char wday[nbytes_for_bits(7)];     /* bit set for each day of the week */
+   char wpos[nbytes_for_bits(5)];     /* week position */
 };
 typedef struct s_run RUN;