]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/restore.c
Correct pool source setting
[bacula/bacula] / bacula / src / dird / restore.c
index 3e5cc366fa198f9bae9c852aa63cbc46d2a6a5c1..90fdb42a63756ad764dc9118199a03da85d77aab 100644 (file)
@@ -18,7 +18,7 @@
  *   Version $Id$
  */
 /*
-   Copyright (C) 2000-2005 Kern Sibbald
+   Copyright (C) 2000-2006 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
@@ -43,6 +43,7 @@ static char storaddr[]     = "storage address=%s port=%d ssl=0\n";
 /* Responses received from File daemon */
 static char OKrestore[]   = "2000 OK restore\n";
 static char OKstore[]     = "2000 OK storage\n";
+static char OKbootstrap[] = "2000 OK bootstrap\n";
 
 /*
  * Do a restore of the specified files
@@ -98,6 +99,9 @@ bool do_restore(JCR *jcr)
       restore_cleanup(jcr, JS_ErrorTerminated);
       return false;
    }
+   if (!bnet_fsend(jcr->store_bsock, "run")) {
+      return false;
+   }
    /*
     * Now start a Storage daemon message thread
     */
@@ -107,6 +111,7 @@ bool do_restore(JCR *jcr)
    }
    Dmsg0(50, "Storage daemon connection OK\n");
 
+
    /*
     * Start conversation with File daemon
     */
@@ -137,13 +142,14 @@ bool do_restore(JCR *jcr)
    /*
     * Send the bootstrap file -- what Volumes/files to restore
     */
-   if (!send_bootstrap_file(jcr)) {
+   if (!send_bootstrap_file(jcr, fd) ||
+       !response(jcr, fd, OKbootstrap, "Bootstrap", DISPLAY_ERROR)) {
       restore_cleanup(jcr, JS_ErrorTerminated);
       return false;
    }
 
 
-   if (!send_run_before_and_after_commands(jcr)) {
+   if (!send_runscripts_commands(jcr)) {
       restore_cleanup(jcr, JS_ErrorTerminated);
       return false;
    }