]> git.sur5r.net Git - bacula/bacula/commitdiff
- Implemented Preben 'Peppe' Guldberg <peppe@wielders.org>
authorKern Sibbald <kern@sibbald.com>
Mon, 6 Dec 2004 22:47:07 +0000 (22:47 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 6 Dec 2004 22:47:07 +0000 (22:47 +0000)
  patch to backup directories skipped (due to no file system
  changes or no recursion), and to add a slash to the end
  of the directory name during the match process.

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

bacula/ReleaseNotes
bacula/kernstodo
bacula/src/dird/msgchan.c
bacula/src/filed/backup.c
bacula/src/findlib/find_one.c
regress/scripts/setup

index 96cbe0726fe2c11cc269db9b60937630aee3afb7..bbc4fd4dd80901f9806cf3ff7eb0bc2ff9b6008d 100644 (file)
@@ -12,9 +12,9 @@ Major Changes:
 
   StartJob, EndJob, NewVolume
 
-  Where StartJob is called before the RunBeforeJob, EndJob is called after
-  RunAfterJob, and NewVolume, is called before all other "methods" of
-  obtaining a new Volume name, when one is needed.
+  Where StartJob is called before the RunBeforeJob, EndJob is called 
+  after RunAfterJob, and NewVolume, is called before all other 
+  "methods" of obtaining a new Volume name, when one is needed.
 
   The Python script of the same name as the Event name (but with a .py) 
   is called from the Scripts Directory (a directive defined in the
index 4b831f6ff1326b35351766760f8c12b2143b4989..6214e6acc8a9fab4e5153d4eb005be2a2cdb10bf 100644 (file)
@@ -10,20 +10,40 @@ Communication encryption    Meno Abels
 Version 1.37                Kern (see below)
 ========================================================
 
-For 1.36.1:
-- Fix orphanned buffers:
-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
-- Add dump of VolSessionId/Time and FileIndex with bls.
-
-1.37 Projects:
+1.37 Major Projects:
 #3   Migration (Move, Copy, Archive Jobs)
-#4   Embedded Python Scripting
-#5   Events that call a Python program
+#4   Embedded Python Scripting (implemented in Dir)
+#5   Events that call a Python program (Implemented in Dir)
 #6   Select one from among Multiple Storage Devices for Job
 #7   Single Job Writing to Multiple Storage Devices
 
-Regression tests:
+##   Integrate web-bacula into a new Bacula project with
+     bimagemgr.
+##   Consider moving docs to their own project.
+
+For 1.37:
+- Tell the "restore" user when browsing is no longer possible.
+- Add disk seeking on restore.  
+- Cancel command should include JobId in list of Jobs.
+- Require restore via the restore command or make a restore Job
+  get the bootstrap file.
+- Add dump of VolSessionId/Time and FileIndex with bls.
+- Make bootstrap file handle multiple MediaTypes (SD)
+- Add offline command to Bacula console.
+- Implement WildFile and WildDir to solve problem of 
+  saving only *.doc files.
+- Add performance testing hooks
+- Add Python writable variable for changing the Priority.
+- Document that Bootstrap files can be written with cataloging
+  turned off.
+- Look at adding full Volume and Pool information to a Volume 
+  label so that bscan can get *all* the info. 
+- Scratch Pool where the volumes can be re-assigned to any Pool.
+- Fix orphanned buffers:
+   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
+   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
+
+Regression tests (Jo):
 - Add Pool/Storage override regression test.
 - Add delete JobId to regression.
 - Add a regression test for dbcheck.  
@@ -40,11 +60,9 @@ Regression tests:
 
 
 1.37 Possibilities:
-- Add Python writable variable for changing the Priority.
 - Document security problems with the same password for everyone in
   rpm and Win32 releases.
 - Browse generations of files.
-- Add offline command to Bacula console.
 - I've seen an error when my catalog's File table fills up.  I
    then have to recreate the File table with a larger maximum row
    size.  Relevant information is at
@@ -63,42 +81,22 @@ Cap: 200GB
 - Supported drive:
   Wangtek 6525ES (SCSI-1 QIC drive, 525MB), under Linux 2.4.something, 
   bacula 1.36.0/1 works with blocksize 16k INSIDE bacula-sd.conf.
-- Save mount point for directories not traversed with  
-  onefs=yes.
-- Implement WildFile and WildDir to solve problem of 
-  saving only *.doc files.
 - Add regex from http://www.pcre.org to Bacula for Win32.
-- Cancel command should include JobId in list of Jobs.
-- Require restore via the restore command or make a restore Job
-  get the bootstrap file.
 - Use only shell tools no make in CDROM package.
 - Document PostgreSQL performance problems bug 131.
 - Document testing
-- Add performance testing hooks
-- if 2 concurrent backups are attempted on the same tape
-  drive (autoloader) into different tape pools, one of them will exit
-  fatally instead of halting until the drive is idle
-- Add seconds to start and end times in the Job report output.
-- Add disk seeking on restore.  
 - Document that ChangerDevice is used for Alert command.
 - Include within include does it work?
 - Implement a Pool of type Cleaning?
 - Implement VolReadTime and VolWriteTime in SD
 - Modify Backing up Your Database to include a bootstrap file.
 - Think about making certain database errors fatal.
-- Look at correcting the time jump in the sceduler for daylight
+- Look at correcting the time jump in the scheduler for daylight
   savings time changes.
 - Add a "real" timer to network connections.
-- Tell the "restore" user when browsing is no longer possible.
 - Write non-optimized bsrs from the JobMedia and Media records,
   even after Files are pruned.
-- Document that Bootstrap files can be written with cataloging
-  turned off.
-- Look at adding full Volume and Pool information to a Volume 
-  label so that bscan can get *all* the info. 
 - Promote to Full = Time period 
-- Scratch Pool where the volumes can be re-assigned to any Pool.
-- Update StartTime if job held in Job Queue.
 - Despool attributes simultaneously with data in a separate
   thread, rejoined at end of data spooling.
 - Implement Files/Bytes,... stats for restore job.
@@ -361,8 +359,6 @@ For 1.37 Testing/Documentation:
     is contained in only one device.
   In SD allow Device to have Multiple MediaTypes
 
-- Look at www.nu2.nu/pebuilder as a helper for full windows
-  bare metal restore.
 - Ideas from Jerry Scharf:
   First let's point out some big pluses that bacula has for this
         it's open source
@@ -1036,7 +1032,11 @@ Block Position: 0
 
 
 === Done
-- Add "Rerun failed levels = yes/no" to Job resource.
-- Fix CDROM make script to permit picking up already installed
-  static FD.
-- Add date/time to each Jmsg.
+- Save mount point for directories not traversed with onefs=yes.
+- Add seconds to start and end times in the Job report output.
+- if 2 concurrent backups are attempted on the same tape
+  drive (autoloader) into different tape pools, one of them will exit
+  fatally instead of halting until the drive is idle
+- Update StartTime if job held in Job Queue.
+- Look at www.nu2.nu/pebuilder as a helper for full windows
+  bare metal restore. (done by Scott)
index 9733f0f6ebc411b20c4c5f4c6c5726cde8f7872a..e379811a33b9e09415a9b3376f70854840e49f85 100644 (file)
@@ -94,13 +94,13 @@ bool connect_to_storage_daemon(JCR *jcr, int retry_interval,
  */
 int start_storage_daemon_job(JCR *jcr)
 {
-   int status;
+   int status = 0;
    STORE *storage;
    BSOCK *sd;
    char auth_key[100];
    POOL_MEM device_name, pool_name, pool_type, media_type;
+   int i;
 
-   storage = jcr->store;
    sd = jcr->store_bsock;
    /*
     * Now send JobId and permissions, and get back the authorization key.
@@ -139,23 +139,29 @@ int start_storage_daemon_job(JCR *jcr)
    /*
     * Send use device = xxx media = yyy pool = zzz
     */
-   pm_strcpy(device_name, storage->dev_name);
-   pm_strcpy(media_type, storage->media_type);
-   pm_strcpy(pool_type, jcr->pool->pool_type);
-   pm_strcpy(pool_name, jcr->pool->hdr.name);
-   bash_spaces(device_name);
-   bash_spaces(media_type);
-   bash_spaces(pool_type);
-   bash_spaces(pool_name);
-   bnet_fsend(sd, use_device, device_name.c_str(), 
-             media_type.c_str(), pool_name.c_str(), pool_type.c_str());
-   Dmsg1(110, ">stored: %s", sd->msg);
-   status = response(jcr, sd, OK_device, "Use Device", NO_DISPLAY);
-   if (!status) {
-      pm_strcpy(pool_type, sd->msg); /* save message */
-      Jmsg(jcr, M_FATAL, 0, _("\n"
-         "     Storage daemon didn't accept Device \"%s\" because:\n     %s"),
-        device_name.c_str(), pool_type.c_str()/* sd->msg */);
+
+   for (i=0; i < 1; /* MAX_STORE */ i++) {
+      if (jcr->storage[i]) {
+        storage = (STORE *)jcr->storage[i]->first();
+        pm_strcpy(device_name, storage->dev_name);
+        pm_strcpy(media_type, storage->media_type);
+        pm_strcpy(pool_type, jcr->pool->pool_type);
+        pm_strcpy(pool_name, jcr->pool->hdr.name);
+        bash_spaces(device_name);
+        bash_spaces(media_type);
+        bash_spaces(pool_type);
+        bash_spaces(pool_name);
+        bnet_fsend(sd, use_device, device_name.c_str(), 
+                   media_type.c_str(), pool_name.c_str(), pool_type.c_str());
+         Dmsg1(110, ">stored: %s", sd->msg);
+         status = response(jcr, sd, OK_device, "Use Device", NO_DISPLAY);
+        if (!status) {
+           pm_strcpy(pool_type, sd->msg); /* save message */
+            Jmsg(jcr, M_FATAL, 0, _("\n"
+               "     Storage daemon didn't accept Device \"%s\" because:\n     %s"),
+              device_name.c_str(), pool_type.c_str()/* sd->msg */);
+        }
+      }
    }
    return status;
 }
index 88fed3b615927de6c26ca0949c3f9e4d0313eaf1..81021f694639985711065bcc7009e8519d67c59a 100644 (file)
@@ -161,7 +161,17 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr)
       break;
    case FT_DIRBEGIN:
       return 1;                      /* not used */
+   case FT_NORECURSE:
+   case FT_NOFSCHG:
    case FT_DIREND:
+      if (ff_pkt->type == FT_NORECURSE) {
+         Jmsg(jcr, M_INFO, 1, _("     Recursion turned off. Will not descend into %s\n"), 
+           ff_pkt->fname);
+      } else if (ff_pkt->type == FT_NOFSCHG) {
+         Jmsg(jcr, M_INFO, 1, _("     File system change prohibited. Will not descend into %s\n"), 
+           ff_pkt->fname);
+      }
+      ff_pkt->type = FT_DIREND;       /* value is used below */
       Dmsg1(130, "FT_DIR saving: %s\n", ff_pkt->link);
       break;
    case FT_SPEC:
@@ -204,14 +214,6 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr)
    case FT_ISARCH:
       Jmsg(jcr, M_NOTSAVED, 0, _("     Archive file not saved: %s\n"), ff_pkt->fname);
       return 1;
-   case FT_NORECURSE:
-      Jmsg(jcr, M_SKIPPED, 1, _("     Recursion turned off. Directory skipped: %s\n"), 
-        ff_pkt->fname);
-      return 1;
-   case FT_NOFSCHG:
-      Jmsg(jcr, M_SKIPPED, 1, _("     File system change prohibited. Directory skipped. %s\n"), 
-        ff_pkt->fname);
-      return 1;
    case FT_NOOPEN: {
       berrno be;
       be.set_errno(ff_pkt->ff_errno);
index 784fe6f819d131c1a31959e65b70e8ff706cc8be..d9f6d4d44ff36b67590d44c1194b372abe9a6135 100755 (executable)
@@ -61,7 +61,7 @@ static void free_dir_ff_pkt(FF_PKT *dir_ff_pkt)
  * p is the filename
  * parent_device is the device we are currently on 
  * top_level is 1 when not recursing or 0 when 
- *  decending into a directory.
+ *  descending into a directory.
  */
 int
 find_one_file(JCR *jcr, FF_PKT *ff_pkt, int handle_file(FF_PKT *ff, void *hpkt), 
@@ -212,6 +212,7 @@ find_one_file(JCR *jcr, FF_PKT *ff_pkt, int handle_file(FF_PKT *ff, void *hpkt),
       int len;  
       int status;
       dev_t our_device = ff_pkt->statp.st_dev;
+      bool recurse = true;
 
       /*  
        * If we are using Win32 (non-portable) backup API, don't check
@@ -287,43 +288,36 @@ find_one_file(JCR *jcr, FF_PKT *ff_pkt, int handle_file(FF_PKT *ff, void *hpkt),
       dir_ff_pkt->excluded_files_list = NULL;
       dir_ff_pkt->excluded_paths_list = NULL;
       dir_ff_pkt->linklist = NULL;
-       
-      ff_pkt->link = ff_pkt->fname;     /* reset "link" */
 
       /* 
-       * Do not decend into subdirectories (recurse) if the
+       * Do not descend into subdirectories (recurse) if the
        * user has turned it off for this directory.
+       * Or if we are crossing file systems, 
+       * avoid doing so if the user only wants to dump one file system.
        */
       if (ff_pkt->flags & FO_NO_RECURSION) {
-        /* No recursion into this directory */
         ff_pkt->type = FT_NORECURSE;
-        rtn_stat = handle_file(ff_pkt, pkt);
-        if (ff_pkt->linked) {
-           ff_pkt->linked->FileIndex = ff_pkt->FileIndex;
-        }
-        free(link);
-        free_dir_ff_pkt(dir_ff_pkt);
-        return rtn_stat;
-      }
-
-      /* 
-       * See if we are crossing file systems, and
-       * avoid doing so if the user only wants to dump one file system.
-       */
-      if (!top_level && !(ff_pkt->flags & FO_MULTIFS) &&
+        recurse = false;
+      } else if (!top_level && !(ff_pkt->flags & FO_MULTIFS) &&
           parent_device != ff_pkt->statp.st_dev) {
-        /* returning here means we do not handle this directory */
         ff_pkt->type = FT_NOFSCHG;
+        recurse = false;
+      }
+      if (!recurse) {
         rtn_stat = handle_file(ff_pkt, pkt);
         if (ff_pkt->linked) {
            ff_pkt->linked->FileIndex = ff_pkt->FileIndex;
         }
         free(link);
         free_dir_ff_pkt(dir_ff_pkt);
+        ff_pkt->link = ff_pkt->fname;     /* reset "link" */
         return rtn_stat;
       }
+
+      ff_pkt->link = ff_pkt->fname;     /* reset "link" */
+
       /* 
-       * Decend into or "recurse" into the directory to read
+       * Descend into or "recurse" into the directory to read
        *   all the files in it.
        */
       errno = 0;
index 1f8ba1b5d7a862a2a5f34fcae43ad3a2dbc60f91..83b118af2288f4d3ed00d006db512eaf81dc8a3e 100755 (executable)
@@ -21,6 +21,10 @@ cp -rp $1 build
 cp scripts/regress-config build
 cd build
 rm -f Makefile config.cache
+# Remove files that may be too big
+cd doc/latex
+make clean
+cd ../..
 # Run Bacula configuration, make, install
 ./regress-config ${cwd} $2 $3 $4
 make