]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix tree code from bashing restore args + pass prefix links to FD + sort Console...
authorKern Sibbald <kern@sibbald.com>
Sun, 6 Jul 2003 13:08:22 +0000 (13:08 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 6 Jul 2003 13:08:22 +0000 (13:08 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@620 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/ChangeLog
bacula/kernstodo
bacula/src/dird/restore.c
bacula/src/dird/ua_cmds.c
bacula/src/dird/ua_restore.c
bacula/src/dird/ua_server.c
bacula/src/dird/ua_tree.c
bacula/src/filed/filed_conf.c
bacula/src/stored/stored_conf.c
bacula/src/version.h

index 128d6a5237277d18542dbe125ba2fb9922317af2..85a38eab740c4d168e25572ca571de2ffe5c146e 100644 (file)
@@ -1,5 +1,12 @@
 
 2003-07-xx Version 1.31 Beta xxJul03
+- Add a new test -- bsr-opt-test for testing bsr optimization. As usual,
+  it pointed out a bug where the directory tree handling code destroyed
+  the restore arg list.
+- Many updates to the manual.
+- Pass prefix links flag to FD.
+- Sort list of commands for Console
+- Set default FD and SD concurrent jobs to 10.
 - Rework the find next volume code in catreq.c to correct some minor
   but subtle logic errors and to eliminate a goto.
 - Did spell check on manual.
index 4b560ba98ba84e4d54cae22de392fd023bc81a4f..2c627d324e337ad5039004f8c3d45909ac6a8113 100644 (file)
@@ -21,6 +21,7 @@ Documentation to do: (any release a little bit at a time)
 - Document update volume: jobid, current, before, all
 - Document run "yes".
 - Document that bscan does not work with multiple simultaneous jobs.
+- Update Automatic Volume Labeling in disk.wml
 
           
 Testing to do: (painful)
@@ -69,6 +70,7 @@ For 1.31 release:
 
 
 For 1.32:
+- Implement ClientRunBeforeJob and ClientRunAfterJob.
 - Implement new alist in FileSet scanning.
 - Add JobLevel in FD status (but make sure it is defined).
 - Audit all UA commands to ensure that we always prompt where possible.
index d8b1b72088af86e04609b3c54539bd8e4969064c..341ac3aa33c4ca5d09e597b15c1c62c76e6a2a31 100644 (file)
@@ -236,6 +236,7 @@ int do_restore(JCR *jcr)
    } else {
       where = "";                     /* None */
    }
+   jcr->prefix_links = jcr->job->PrefixLinks;
    bash_spaces(where);
    bnet_fsend(fd, restorecmd, replace, jcr->prefix_links, where);
    unbash_spaces(where);
index ccf346e8621bc5b1d4b82b4157f072fd588dbed3..ec2cfc13ed2e5c639c697c6a4caca833590f9d58 100644 (file)
@@ -91,32 +91,32 @@ static struct cmdstruct commands[] = {
  { N_("cancel"),     cancelcmd,     _("cancel job=nnn -- cancel a job")},
  { N_("create"),     createcmd,     _("create DB Pool from resource")},  
  { N_("delete"),     delete_cmd,    _("delete [pool=<pool-name> | media volume=<volume-name>]")},    
+ { N_("estimate"),   estimate_cmd,  _("performs FileSet estimate debug=1 give full listing")},
+ { N_("exit"),       quit_cmd,      _("exit = quit")},
  { N_("help"),       help_cmd,      _("print this command")},
  { N_("label"),      labelcmd,      _("label a tape")},
- { N_("relabel"),    relabelcmd,    _("relabel a tape")},
  { N_("list"),       listcmd,       _("list [pools | jobs | jobtotals | media <pool> | files job=<nn>]; from catalog")},
  { N_("llist"),      llistcmd,      _("full or long list like list command")},
  { N_("messages"),   messagescmd,   _("messages")},
  { N_("mount"),      mount_cmd,     _("mount <storage-name>")},
- { N_("restore"),    restorecmd,    _("restore files")},
  { N_("prune"),      prunecmd,      _("prune expired records from catalog")},
  { N_("purge"),      purgecmd,      _("purge records from catalog")},
+ { N_("query"),      querycmd,      _("query catalog")},
+ { N_("quit"),       quit_cmd,      _("quit")},
+ { N_("relabel"),    relabelcmd,    _("relabel a tape")},
+ { N_("release"),    release_cmd,   _("release <storage-name>")},
+ { N_("restore"),    restorecmd,    _("restore files")},
  { N_("run"),        runcmd,        _("run <job-name>")},
  { N_("setdebug"),   setdebug_cmd,  _("sets debug level")},
- { N_("estimate"),   estimate_cmd,  _("performs FileSet estimate debug=1 give full listing")},
- { N_("var"),        var_cmd,       _("does variable expansion")},
  { N_("show"),       show_cmd,      _("show (resource records) [jobs | pools | ... | all]")},
  { N_("sqlquery"),   sqlquerycmd,   _("use SQL to query catalog")}, 
  { N_("status"),     statuscmd,     _("status [storage | client]=<name>")},
+ { N_("time"),       time_cmd,      _("print current time")},
  { N_("unmount"),    unmount_cmd,   _("unmount <storage-name>")},
  { N_("update"),     update_cmd,    _("update Volume or Pool")},
  { N_("use"),        use_cmd,       _("use catalog xxx")},
+ { N_("var"),        var_cmd,       _("does variable expansion")},
  { N_("version"),    version_cmd,   _("print Director version")},
- { N_("quit"),       quit_cmd,      _("quit")},
- { N_("query"),      querycmd,      _("query catalog")},
- { N_("release"),    release_cmd,   _("release <storage-name>")},
- { N_("time"),       time_cmd,      _("print current time")},
- { N_("exit"),       quit_cmd,      _("exit = quit")},
  { N_("wait"),       wait_cmd,      _("wait until no jobs are running")},
             };
 #define comsize (sizeof(commands)/sizeof(struct cmdstruct))
index 02853da6f07de1970b3342cedfd3e50f7e89ed49..fa13461724bf35f279be4bf7c987031c0f7d0b7d 100644 (file)
@@ -252,8 +252,8 @@ int restorecmd(UAContext *ua, char *cmd)
           job->hdr.name, ji.ClientName, ji.store?ji.store->hdr.name:"",
          working_directory);
    }
-   Dmsg1(400, "Submitting: %s\n", ua->cmd);
    
+   Dmsg1(400, "Submitting: %s\n", ua->cmd);
    parse_ua_args(ua);
    runcmd(ua, ua->cmd);
 
index ef0832930dd07b3a8e633ac41efea983f2026d7a..75c08fc9d6a275383e1e6dce72bcc599c1600696 100644 (file)
@@ -219,7 +219,6 @@ void free_ua_context(UAContext *ua)
    if (ua->UA_sock) {
       bnet_close(ua->UA_sock);
    }
-
    free(ua);
 }
 
index 67663749b59d78d7d48c84e8edda819ef9840ba6..6331200e1ae49b6762c3d1c7aad9608dbfa6538e 100644 (file)
@@ -74,6 +74,9 @@ static struct cmdstruct commands[] = {
 void user_select_files_from_tree(TREE_CTX *tree)
 {
    char cwd[2000];
+   /* Get a new context so we don't destroy restore command args */
+   UAContext *ua = new_ua_context(ua->jcr);
+   ua->UA_sock = tree->ua->UA_sock;   /* patch in UA socket */
 
    bsendmsg(tree->ua, _( 
       "\nYou are now entering file selection mode where you add and\n"
@@ -88,20 +91,20 @@ void user_select_files_from_tree(TREE_CTX *tree)
    bsendmsg(tree->ua, _("cwd is: %s\n"), cwd);
    for ( ;; ) {       
       int found, len, stat, i;
-      if (!get_cmd(tree->ua, "$ ")) {
+      if (!get_cmd(ua, "$ ")) {
         break;
       }
-      parse_ua_args(tree->ua);
-      if (tree->ua->argc == 0) {
+      parse_ua_args(ua);
+      if (ua->argc == 0) {
         return;
       }
 
-      len = strlen(tree->ua->argk[0]);
+      len = strlen(ua->argk[0]);
       found = 0;
       stat = 0;
       for (i=0; i<(int)comsize; i++)      /* search for command */
-        if (strncasecmp(tree->ua->argk[0],  _(commands[i].key), len) == 0) {
-           stat = (*commands[i].func)(tree->ua, tree);   /* go execute command */
+        if (strncasecmp(ua->argk[0],  _(commands[i].key), len) == 0) {
+           stat = (*commands[i].func)(ua, tree);   /* go execute command */
            found = 1;
            break;
         }
@@ -113,6 +116,8 @@ void user_select_files_from_tree(TREE_CTX *tree)
         break;
       }
    }
+   ua->UA_sock = NULL;                /* don't release restore socket */
+   free_ua_context(ua);              /* get rid of temp UA context */
 }
 
 
index 05781eb7cb81fce93054ac60aa9643dd3f9cf787..0872c4f2d45a8df0fa1b6da6843452629c9b9b3e 100644 (file)
@@ -79,7 +79,7 @@ static struct res_items cli_items[] = {
    {"piddirectory",  store_dir,     ITEM(res_client.pid_directory),     0, ITEM_REQUIRED, 0}, 
    {"subsysdirectory",  store_dir,  ITEM(res_client.subsys_directory),  0, 0, 0}, 
    {"requiressl",  store_yesno,     ITEM(res_client.require_ssl),       1, ITEM_DEFAULT, 0},
-   {"maximumconcurrentjobs", store_pint,  ITEM(res_client.MaxConcurrentJobs), 0, ITEM_DEFAULT, 5},
+   {"maximumconcurrentjobs", store_pint,  ITEM(res_client.MaxConcurrentJobs), 0, ITEM_DEFAULT, 10},
    {"messages",      store_res, ITEM(res_client.messages), R_MSGS, 0, 0},
    {"heartbeatinterval", store_time, ITEM(res_client.heartbeat_interval), 0, ITEM_DEFAULT, 20*60},
    {NULL, NULL, NULL, 0, 0, 0} 
index 2c3c0ed48200af0cd420549010fa2d62d97d8e69..94e4bbb839de122c9b92b0aa099792f6b888b841 100644 (file)
@@ -63,7 +63,7 @@ static struct res_items store_items[] = {
    {"piddirectory",          store_dir,  ITEM(res_store.pid_directory), 0, ITEM_REQUIRED, 0},
    {"subsysdirectory",       store_dir,  ITEM(res_store.subsys_directory), 0, 0, 0},
    {"requiressl",            store_yesno,ITEM(res_store.require_ssl), 1, ITEM_DEFAULT, 0},
-   {"maximumconcurrentjobs", store_pint, ITEM(res_store.max_concurrent_jobs), 0, ITEM_DEFAULT, 5},
+   {"maximumconcurrentjobs", store_pint, ITEM(res_store.max_concurrent_jobs), 0, ITEM_DEFAULT, 10},
    {"heartbeatinterval",     store_time, ITEM(res_store.heartbeat_interval), 0, ITEM_DEFAULT, 20*60},
    {NULL, NULL, 0, 0, 0, 0} 
 };
index d0a1f839ff497ed6cdf19cf62afbff73db0227af..8d151b9f008a41d333a784f3232e65c312f5136b 100644 (file)
@@ -1,8 +1,8 @@
 /* */
 #define VERSION "1.31"
 #define VSTRING "1"
-#define BDATE   "02 Jul 2003"
-#define LSMDATE "02Jul03"
+#define BDATE   "06 Jul 2003"
+#define LSMDATE "06Jul03"
 
 /* Debug flags */
 #define DEBUG 1