]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/bextract.c
Add address and socket for MySQL
[bacula/bacula] / bacula / src / stored / bextract.c
index be9b1fa5ad8c959abab2f4f49f89bd1bd3145270..69df799ba7415522ac3f977ea944d175cd3c45d7 100644 (file)
@@ -63,6 +63,7 @@ static POOLMEM *compress_buf;
 static int type;
 static int stream;
 static int prog_name_msg = 0;
+static char *VolumeName = NULL;
 
 static char *wbuf;                   /* write buffer address */
 static uint32_t wsize;               /* write size */
@@ -75,13 +76,14 @@ char *configfile;
 static void usage()
 {
    fprintf(stderr,
-"\nVersion: " VERSION " (" DATE ")\n\n"
+"\nVersion: " VERSION " (" BDATE ")\n\n"
 "Usage: bextract [-d debug_level] <bacula-archive> <directory-to-store-files>\n"
 "       -b <file>       specify a bootstrap file\n"
 "       -c <file>       specify a configuration file\n"
 "       -dnn            set debug level to nn\n"
 "       -e <file>       exclude list\n"
 "       -i <file>       include list\n"
+"       -V              specify Volume names (separated by |)\n"
 "       -?              print this message\n\n");
    exit(1);
 }
@@ -150,6 +152,10 @@ int main (int argc, char *argv[])
            got_inc = TRUE;
            break;
 
+         case 'V':                    /* Volume name */
+           VolumeName = optarg;
+           break;
+
          case '?':
         default:
            usage();
@@ -186,7 +192,7 @@ int main (int argc, char *argv[])
 static void do_extract(char *devname)
 {
 
-   jcr = setup_jcr("bextract", devname, bsr);
+   jcr = setup_jcr("bextract", devname, bsr, VolumeName);
    dev = setup_to_access_device(jcr, 1);    /* acquire for read */
    if (!dev) {
       exit(1);
@@ -321,8 +327,9 @@ static void record_cb(JCR *jcr, DEVICE *dev, DEV_BLOCK *block, DEV_RECORD *rec)
 
         
       if (file_is_included(ff, fname) && !file_is_excluded(ff, fname)) {
+        uint32_t LinkFI;
 
-        decode_stat(ap, &statp);
+        decode_stat(ap, &statp, &LinkFI);
         /*
          * Prepend the where directory so that the
          * files are put where the user wants.