]> git.sur5r.net Git - bacula/bacula/commitdiff
kes Enhance error message when restoring without bootstrap file.
authorKern Sibbald <kern@sibbald.com>
Tue, 26 Sep 2006 19:13:21 +0000 (19:13 +0000)
committerKern Sibbald <kern@sibbald.com>
Tue, 26 Sep 2006 19:13:21 +0000 (19:13 +0000)
kes  Check restored size only for regular files.
kes  Store Python job level in job record in Dir.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3506 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/src/dird/pythondir.c
bacula/src/dird/restore.c
bacula/src/findlib/attribs.c
bacula/technotes-1.39

index 3ffb0aed3dca1515a92c04f503834071c0b319ae..a1b5931462af87d29f48117a87ee09e72df9d3c9 100644 (file)
@@ -39,8 +39,6 @@ Document:
 Priority:
 
 For 1.39:
-- Make sure that the restore options don't permit "seeing" other
-  Client's job data. -- mostly fixed.
 - Implement Python event for backing up/restoring a file.
 - Change dbcheck to tell users to use native tools for fixing
   broken databases, and to ensure they have the proper indexes.
@@ -1691,4 +1689,7 @@ Block Position: 0
   is not permitted.
 - When reading through parts on the DVD, the DVD is mounted and
   unmounted for each part.
+- Make sure that the restore options don't permit "seeing" other
+  Client's job data.
+- Restore of a raw drive should not try to check the volume size.
 
index a4138f2b4a031905898ef1ade02346d9eb7d3efb..55e092e347350bc832a4ffc7b3c1ea150bf9648b 100644 (file)
@@ -285,6 +285,7 @@ int job_setattr(PyObject *self, char *attrname, PyObject *value)
          if (strcmp(strval, joblevels[i].level_name) == 0) {
             if (joblevels[i].job_type == jcr->JobType) {
                jcr->JobLevel = joblevels[i].level;
+               jcr->jr.JobLevel = jcr->JobLevel;
                return 0;
             }
          }
index 49b412c5aa08a9fa431b13373982b49603865924..a5e310888e70cb07b5f309a50c1e4416d83cb4e5 100644 (file)
@@ -70,7 +70,9 @@ bool do_restore(JCR *jcr)
    Dmsg1(20, "RestoreJobId=%d\n", jcr->job->RestoreJobId);
 
    if (!jcr->RestoreBootstrap) {
-      Jmsg0(jcr, M_FATAL, 0, _("Cannot restore without bootstrap file.\n"));
+      Jmsg0(jcr, M_FATAL, 0, _("Cannot restore without a bootstrap file.\n"
+          "You probably ran a restore job directly. All restore jobs must\n"
+          "be run using the restore command.\n"));
       restore_cleanup(jcr, JS_ErrorTerminated);
       return false;
    }
index 4c71cc679ec719486621ae43186d6acde1e2c4e9..ce8fc960fcdf8be80475b03f74eb78efe948bdcb 100755 (executable)
@@ -390,7 +390,7 @@ bool set_attributes(JCR *jcr, ATTR *attr, BFILE *ofd)
       char ec1[50], ec2[50];
       fsize = blseek(ofd, 0, SEEK_END);
       bclose(ofd);                    /* first close file */
-      if (fsize > 0 && fsize != (off_t)attr->statp.st_size) {
+      if (attr->type == FT_REG && fsize > 0 && fsize != (off_t)attr->statp.st_size) {
          Jmsg3(jcr, M_ERROR, 0, _("File size of restored file %s not correct. Original %s, restored %s.\n"),
             attr->ofname, edit_uint64(attr->statp.st_size, ec1),
             edit_uint64(fsize, ec2));
index 5e98be19f347ebe642d236ee8ff320e077645500..a9d910f15021498c903d2938ee04d4e3d91bd059 100644 (file)
@@ -2,6 +2,9 @@
 
 General:
 26Sep06
+kes  Enhance error message when restoring without bootstrap file.
+kes  Check restored size only for regular files.
+kes  Store Python job level in job record in Dir.
 kes  Add back code to open tape device nonblocking, but if rewind fails
      release file descriptor.
 kes  Modify acquire.c to first try autoloading the device. Also, ask operator