]> git.sur5r.net Git - bacula/bacula/commitdiff
Add line no. to replace file error msg + fix editing jobids
authorKern Sibbald <kern@sibbald.com>
Fri, 5 Sep 2003 12:37:40 +0000 (12:37 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 5 Sep 2003 12:37:40 +0000 (12:37 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@687 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/src/dird/ua_restore.c

index c6fd139f3126779bc634789d6dd2eff9406a9c24..afdbafed186cf083c53c68d90fed37352110cca1 100644 (file)
@@ -28,7 +28,6 @@ Testing to do: (painful)
 - Figure out how to use ssh or stunnel to protect Bacula communications.
 
 For 1.32:
-- Specify list of files to restore
 - Enhance "update slots" to include a "scan" feature
   scan 1; scan 1-5; scan 1,2,4 ...  to update the catalog 
 - Allow a slot or range of slots on the label barcodes command.
@@ -39,6 +38,21 @@ For 1.32:
   volume.
 - Implement List Volume Job=xxx  or List scheduled volumes or Status Director 
 - Make | and < work on FD side.
+- Take a careful look a the Basic recycling algorithm.  When Bacula
+  chooses, the order should be:
+   - Look for Append
+   - Look for Recycle or Purged
+   - Prune volumes
+   - Look for purged
+  Instead of using lowest media Id, find the least recently used
+  volume.
+
+  When the tape is mounted and Bacula requests the status
+  - Do everything possible to use it.
+
+  Define a "available" status, which is the currently mounted 
+  Volume and all volumes that are currently in the autochanger.
+   
 
 For 1.33
 - Why can't SQL do the filename sort for restore?
@@ -873,3 +887,4 @@ Done: (see kernsdone for more)
   Look at src/host.h
 - Use repositioning at the beginning of the tape.                   
 - Do full check the command line args in update (e.g. VolStatus ...).
+- Specify list of files to restore
index 1d8b98070747142a53082d335266d9d753fb354b..3deff19677b30918fca04df35152e09ab941712c 100644 (file)
@@ -475,11 +475,13 @@ static int user_select_jobids_or_files(UAContext *ua, RESTORE_CTX *rx)
 
 static void insert_one_file(UAContext *ua, RESTORE_CTX *rx)
 {
+   FILE *ffd;
+   char file[5000];
    char *p = ua->cmd;
+   int line = 0;
+  
    switch (*p) {
    case '<':
-      FILE *ffd;
-      char file[5000];
       p++;
       if ((ffd = fopen(p, "r")) == NULL) {
          bsendmsg(ua, _("Cannot open file %s: ERR=%s\n"),
@@ -487,7 +489,10 @@ static void insert_one_file(UAContext *ua, RESTORE_CTX *rx)
         break;
       }
       while (fgets(file, sizeof(file), ffd)) {
-        insert_file_into_findex_list(ua, rx, file);
+        line++;
+        if (!insert_file_into_findex_list(ua, rx, file)) {
+            bsendmsg(ua, _("Error occurred on line %d of %s\n"), line, p);
+        }
       }
       fclose(ffd);
       break;
@@ -800,7 +805,9 @@ static int jobid_handler(void *ctx, int num_fields, char **row)
       return 0;                      /* duplicate id */
    }
    bstrncpy(rx->last_jobid, row[0], sizeof(rx->last_jobid));
-   pm_strcat(&rx->JobIds, ",");
+   if (rx->JobIds[0] != 0) {
+      pm_strcat(&rx->JobIds, ",");
+   }
    pm_strcat(&rx->JobIds, row[0]);
    return 0;
 }