]> git.sur5r.net Git - bacula/bacula/commitdiff
Minor updates + doc -- see kes21Nov02
authorKern Sibbald <kern@sibbald.com>
Sat, 23 Nov 2002 16:48:04 +0000 (16:48 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 23 Nov 2002 16:48:04 +0000 (16:48 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@207 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/scripts/gconsole.in
bacula/src/cats/make_sqlite_tables.in
bacula/src/console/.cvsignore
bacula/src/console/console.c
bacula/src/dird/query.sql
bacula/src/stored/askdir.c
bacula/src/stored/label.c
bacula/src/stored/record.h
bacula/src/version.h

index 15cc6460a7b85c19ccef681609b39dc78c29b04d..83be05e9b9e64c559ba9f9dc00e27b9ef5e99365 100644 (file)
@@ -20,6 +20,8 @@ For 1.27 release:
 - Fix intmax_t on FreeBSD.
 
 After 1.27
+- Enhance schedule to have 1stSat, ...
+- Make sure the MaxVolFiles is fully implemented in SD
 - Make Job err if WriteBootstrap fails.
 - Flush all the daemon messages at the end of every job.
 - Check if both CatalogFiles and UseCatalog are set to SD.
index 0197d8da3bb455294260a1858cdc8530d9fea450..44fe4c8d6bc3b6817d9017673468ad45f8b34c48 100755 (executable)
@@ -1,8 +1,11 @@
 #!/bin/sh
+#
+# Run gnome-console with test config file
+#
 cd @BUILD_DIR@/src/gnome-console
 if [ $# = 1 ] ; then
    echo "doing gnome-console $1.conf"
    ./gnome-console -c $1.conf
 else
-   ./gnome-console
+   ./gnome-console -c test-gnome-console.conf
 fi
index 2695230b8d1a13c6f30701dba4894d1e4dd31622..46c4a540588a531a070614a1a66e9c99913f04e7 100644 (file)
@@ -129,7 +129,8 @@ CREATE TABLE Pool (
    VolRetention BIGINT UNSIGNED DEFAULT 0,
    VolUseDuration BIGINT UNSIGNED DEFAULT 0,
    MaxVolJobs INTEGER UNSIGNED DEFAULT 0,
-   MaxVolfiles INTEGER UNSIGNED DEFAULT 0,
+   MaxVolFiles INTEGER UNSIGNED DEFAULT 0,
+   MaxVolBytes BIGINT UNSIGNED DEFAULT 0,
    AutoPrune TINYINT DEFAULT 0,
    Recycle TINYINT DEFAULT 0,
    PoolType VARCHAR(20) NOT NULL,
index 3e7332fd02834c5593692436c8dc873a17ee3ec8..a149a3fd4ef9a4600180ecd24bf0d6d0463e8a78 100644 (file)
@@ -1,3 +1,4 @@
+test-console.conf
 Makefile
 btraceback
 btraceback.gdb
index c88f21145e33a37bb1106268ffb47b9a738dbad3..6ae97e66fc28fe78f5c41e8762e0fcfa0017395a 100644 (file)
@@ -278,7 +278,7 @@ try_again:
       
 
    Dmsg2(-1, "Connecting to Director %s:%d\n", dir->address,dir->DIRport);
-   UA_sock = bnet_connect(&jcr, 5, 15, "Director daemon", dir->address, 
+   UA_sock = bnet_connect(NULL, 5, 15, "Director daemon", dir->address, 
                          NULL, dir->DIRport, 0);
    if (UA_sock == NULL) {
       terminate_console(0);
index 5f86b0d9ae1e813525481df408f626e6b70f475a..1e9db805fa9988e9ef62b1da2a1c6f067884c72d 100644 (file)
@@ -112,6 +112,12 @@ SELECT * from temp2;
 !DROP TABLE temp;
 !DROP TABLE temp2;
 #
+:List Pool Attributes for a selected Pool:
+*Enter Pool name:
+SELECT Recycle,VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,MaxVolBytes
+ FROM Pool
+ WHERE Name='%1';
+#
 :List where a File is saved:
 *Enter Filename (no path):
 SELECT Job.JobId as JobId, Client.Name as Client,
@@ -134,4 +140,3 @@ SELECT count(*) AS Jobs, sum(JobFiles) AS Files,
  WHERE JobMedia.JobId=Job.JobId
  AND JobMedia.MediaId=Media.MediaId
  GROUP by VolumeName;  
-
index c8a9e511c0ec7eb3a3b1c801d67926fee82e4c49..bbb5a1c3e375d0bec8df10845f2c43ab46ab5fad 100644 (file)
@@ -167,6 +167,8 @@ int dir_update_volume_info(JCR *jcr, VOLUME_CAT_INFO *vol, int relabel)
    Dmsg1(120, "update_volume_data(): %s", dir->msg);
    if (bnet_recv(dir) <= 0) {
       Dmsg0(190, "updateVolCatInfo error bnet_recv\n");
+      Jmsg(jcr, M_ERROR, 0, _("Error updating Volume Info: %s\n"), 
+          bnet_strerror(dir));
       return 0;
    }
    Dmsg1(120, "Updatevol: %s", dir->msg);
@@ -192,6 +194,8 @@ int dir_create_jobmedia_record(JCR *jcr)
    Dmsg1(100, "create_jobmedia(): %s", dir->msg);
    if (bnet_recv(dir) <= 0) {
       Dmsg0(190, "create_jobmedia error bnet_recv\n");
+      Jmsg(jcr, M_ERROR, 0, _("Error creating JobMedia record: %s\n"), 
+          bnet_strerror(dir));
       return 0;
    }
    Dmsg1(120, "Create_jobmedia: %s", dir->msg);
index f22425fe0bed4126c0be890fa14f811714055bc8..df37be4018422765c426f908d185e67a731ead73 100644 (file)
@@ -355,7 +355,7 @@ static int create_volume_label(DEVICE *dev, char *VolName)
       dev->VolHdr.label_time = dt.julian_day_fraction;
    }
 
-   strcpy(dev->VolHdr.LabelProg, my_name);
+   bstrncpy(dev->VolHdr.LabelProg, my_name, sizeof(dev->VolHdr.LabelProg));
    sprintf(dev->VolHdr.ProgVersion, "Ver. %s %s", VERSION, DATE);
    sprintf(dev->VolHdr.ProgDate, "Build %s %s", __DATE__, __TIME__);
    dev->state |= ST_LABEL;           /* set has Bacula label */
@@ -389,8 +389,8 @@ int write_volume_label_to_dev(JCR *jcr, DEVRES *device, char *VolName, char *Poo
       return 0;
    }
    strcpy(dev->VolHdr.MediaType, device->media_type);
-   strcpy(dev->VolHdr.VolName, VolName);
-   strcpy(dev->VolHdr.PoolName, PoolName);
+   bstrncpy(dev->VolHdr.VolName, VolName, sizeof(dev->VolHdr.VolName));
+   bstrncpy(dev->VolHdr.PoolName, PoolName, sizeof(dev->VolHdr.PoolName));
 
    if (!rewind_dev(dev)) {
       Dmsg2(30, "Bad status on %s from rewind. ERR=%s\n", dev_name(dev), strerror_dev(dev));
index 4c52729f3a10b9f5eae34de4df26b32ec5afd1f1..3000a037ea5c3c4787288895eec294dc7c971361 100644 (file)
 #define __RECORD_H 1
 
 /* Return codes from read_device_volume_label() */
-#define VOL_NOT_READ     0               /* Volume label not read */
-#define VOL_OK           1               /* volume name OK */
-#define VOL_NO_LABEL     2               /* volume not labeled */
-#define VOL_IO_ERROR     3               /* volume I/O error */
-#define VOL_NAME_ERROR   4               /* Volume name mismatch */
-#define VOL_CREATE_ERROR  5              /* Error creating label */
-#define VOL_VERSION_ERROR 6              /* Bacula version error */
-#define VOL_LABEL_ERROR   7              /* Bad label type */
+#define VOL_NOT_READ      0               /* Volume label not read */
+#define VOL_OK            1               /* volume name OK */
+#define VOL_NO_LABEL      2               /* volume not labeled */
+#define VOL_IO_ERROR      3               /* volume I/O error */
+#define VOL_NAME_ERROR    4               /* Volume name mismatch */
+#define VOL_CREATE_ERROR  5               /* Error creating label */
+#define VOL_VERSION_ERROR 6               /* Bacula version error */
+#define VOL_LABEL_ERROR   7               /* Bad label type */
 
 
 /*  See block.h for RECHDR_LENGTH */
  */
 
 /* Record state bit definitions */
-#define REC_NO_HEADER       0x01     /* No header read */
+#define REC_NO_HEADER        0x01     /* No header read */
 #define REC_PARTIAL_RECORD   0x02     /* returning partial record */
 #define REC_BLOCK_EMPTY      0x04     /* not enough data in block */
-#define REC_NO_MATCH        0x08     /* No match on continuation data */
+#define REC_NO_MATCH         0x08     /* No match on continuation data */
 #define REC_CONTINUATION     0x10     /* Continuation record found */
 
 #define is_partial_record(r) ((r)->state & REC_PARTIAL_RECORD)
  *  This is the memory structure for the record header.
  */
 typedef struct s_dev_rec {
-   int     sync;                     /* synchronous */
+   int      sync;                     /* synchronous */
    /* File and Block are always returned on reading records, but
     *  only returned on writing if sync is set (obviously).
     */
-   uint32_t File;                    /* File number */
-   uint32_t Block;                   /* Block number */
-   uint32_t VolSessionId;            /* sequential id within this session */
-   uint32_t VolSessionTime;          /* session start time */
-   int32_t  FileIndex;               /* sequential file number */
-   int32_t  Stream;                  /* stream number */
-   uint32_t data_len;                /* current record length */
-   uint32_t remainder;               /* remaining bytes to read/write */
-   uint32_t state;                   /* state bits */
+   uint32_t File;                     /* File number */
+   uint32_t Block;                    /* Block number */
+   uint32_t VolSessionId;             /* sequential id within this session */
+   uint32_t VolSessionTime;           /* session start time */
+   int32_t  FileIndex;                /* sequential file number */
+   int32_t  Stream;                   /* stream number */
+   uint32_t data_len;                 /* current record length */
+   uint32_t remainder;                /* remaining bytes to read/write */
+   uint32_t state;                    /* state bits */
    uint8_t  ser_buf[WRITE_RECHDR_LENGTH];   /* serialized record header goes here */
-   POOLMEM *data;                    /* Record data. This MUST be a memory pool item */
+   POOLMEM *data;                     /* Record data. This MUST be a memory pool item */
 } DEV_RECORD;
 
 
@@ -99,12 +99,12 @@ typedef struct s_dev_rec {
  * Note, these values are negative to distinguish them
  * from user records where the FileIndex is forced positive.
  */
-#define PRE_LABEL   -1               /* Vol label on unwritten tape */
-#define VOL_LABEL   -2               /* Volume label first file */
-#define EOM_LABEL   -3               /* Writen at end of tape */        
-#define SOS_LABEL   -4               /* Start of Session */
-#define EOS_LABEL   -5               /* End of Session */
-#define EOT_LABEL   -6               /* End of physical tape (2 eofs) */
+#define PRE_LABEL   -1                /* Vol label on unwritten tape */
+#define VOL_LABEL   -2                /* Volume label first file */
+#define EOM_LABEL   -3                /* Writen at end of tape */        
+#define SOS_LABEL   -4                /* Start of Session */
+#define EOS_LABEL   -5                /* End of Session */
+#define EOT_LABEL   -6                /* End of physical tape (2 eofs) */
 
 /* 
  *   Volume Label Record.  This is the in-memory definition. The
@@ -119,27 +119,27 @@ struct Volume_Label {
    * in the DEVICE buffer, but are not actually written
    * to the tape.
    */
-  int32_t LabelType;                 /* This is written in header only */
-  uint32_t LabelSize;                /* length of serialized label */
+  int32_t LabelType;                  /* This is written in header only */
+  uint32_t LabelSize;                 /* length of serialized label */
   /*
    * The items below this line are stored on 
    * the tape
    */
-  char Id[32];                       /* Bacula Immortal ... */
+  char Id[32];                        /* Bacula Immortal ... */
 
-  uint32_t VerNum;                   /* Label version number */
+  uint32_t VerNum;                    /* Label version number */
 
   /* VerNum <= 10 */
-  float64_t label_date;              /* Date tape labeled */
-  float64_t label_time;              /* Time tape labeled */
+  float64_t label_date;               /* Date tape labeled */
+  float64_t label_time;               /* Time tape labeled */
 
   /* VerNum >= 11 */
-  btime_t   label_btime;             /* tdate tape labeled */
-  btime_t   write_btime;             /* tdate tape written */
+  btime_t   label_btime;              /* tdate tape labeled */
+  btime_t   write_btime;              /* tdate tape written */
 
   /* Unused with VerNum >= 11 */
-  float64_t write_date;              /* Date this label written */
-  float64_t write_time;              /* Time this label written */
+  float64_t write_date;               /* Date this label written */
+  float64_t write_time;               /* Time this label written */
 
   char VolName[MAX_NAME_LENGTH];      /* Volume name */
   char PrevVolName[MAX_NAME_LENGTH];  /* Previous Volume Name */
@@ -148,9 +148,9 @@ struct Volume_Label {
   char MediaType[MAX_NAME_LENGTH];    /* Type of this media */
 
   char HostName[MAX_NAME_LENGTH];     /* Host name of writing computer */
-  char LabelProg[32];                /* Label program name */
-  char ProgVersion[32];              /* Program version */
-  char ProgDate[32];                 /* Program build date/time */
+  char LabelProg[50];                 /* Label program name */
+  char ProgVersion[50];               /* Program version */
+  char ProgDate[50];                  /* Program build date/time */
 };
 
 #define SER_LENGTH_Volume_Label 1024   /* max serialised length of volume label */
@@ -163,27 +163,27 @@ typedef struct Volume_Label VOLUME_LABEL;
  *  This record is at the beginning and end of each session
  */
 struct Session_Label {
-  char Id[32];                       /* Bacula Immortal ... */
+  char Id[32];                        /* Bacula Immortal ... */
 
-  uint32_t VerNum;                   /* Label version number */
+  uint32_t VerNum;                    /* Label version number */
 
-  uint32_t JobId;                    /* Job id */
-  uint32_t VolumeIndex;              /* Sequence no of volume for this job */
+  uint32_t JobId;                     /* Job id */
+  uint32_t VolumeIndex;               /* Sequence no of volume for this job */
 
   /* VerNum >= 11 */
-  btime_t   write_btime;             /* Tdate this label written */
+  btime_t   write_btime;              /* Tdate this label written */
 
   /* VerNum < 11 */
-  float64_t write_date;              /* Date this label written */
+  float64_t write_date;               /* Date this label written */
 
   /* Unused VerNum >= 11 */
-  float64_t write_time;              /* Time this label written */
+  float64_t write_time;               /* Time this label written */
 
   char PoolName[MAX_NAME_LENGTH];     /* Pool name */
   char PoolType[MAX_NAME_LENGTH];     /* Pool type */
   char JobName[MAX_NAME_LENGTH];      /* base Job name */
   char ClientName[MAX_NAME_LENGTH];
-  char Job[MAX_NAME_LENGTH];         /* Unique name of this Job */
+  char Job[MAX_NAME_LENGTH];          /* Unique name of this Job */
   char FileSetName[MAX_NAME_LENGTH];
   char FileSetMD5[MAX_NAME_LENGTH];
   uint32_t JobType;
@@ -196,11 +196,11 @@ struct Session_Label {
   uint32_t StartFile;
   uint32_t EndFile;
   uint32_t JobErrors;
-  uint32_t JobStatus;                /* Job status */
+  uint32_t JobStatus;                 /* Job status */
 
 };
 typedef struct Session_Label SESSION_LABEL;
 
-#define SERIAL_BUFSIZE 1024          /* volume serialisation buffer size */
+#define SERIAL_BUFSIZE  1024          /* volume serialisation buffer size */
 
 #endif
index 3b76368cdbe30c770376ef7dfb07a07d140e1bab..209a333ac9060fdc5ffe33e4a641f11e1a7ebcd0 100644 (file)
@@ -1,8 +1,8 @@
 /* */
 #define VERSION "1.27"
 #define VSTRING "1"
-#define DATE    "22 November 2002"
-#define LSMDATE "22Nov02"
+#define DATE    "23 November 2002"
+#define LSMDATE "23Nov02"
 
 /* Debug flags */
 #define DEBUG 1