]> git.sur5r.net Git - bacula/bacula/commitdiff
First cut Win32 data stream detection. Fix Win98 restore bug. Pass mtime_only to FD
authorKern Sibbald <kern@sibbald.com>
Sat, 7 Jun 2003 15:30:48 +0000 (15:30 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 7 Jun 2003 15:30:48 +0000 (15:30 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@569 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/.cvsignore
bacula/kernstodo
bacula/scripts/.cvsignore
bacula/src/baconfig.h
bacula/src/cats/sql_create.c
bacula/src/dird/backup.c
bacula/src/dird/catreq.c
bacula/src/dird/dird.c
bacula/src/dird/fd_cmds.c
bacula/src/dird/verify.c
bacula/src/jcr.h

index 368ec6f09df69605e1f5a03358178355e3b5bc9c..e87bcd24e3564d805aab53b9d1f72dd0d222886e 100644 (file)
@@ -36,3 +36,5 @@ stopit
 stopmysql
 console.log
 console.sum
+zapall
+zaptapes
index 224b4136885623ee8148288dd4d9582db091f230..874ca22d7cc18ba64e06ed47a47e2e7f8b0dda80 100644 (file)
@@ -34,6 +34,8 @@ Testing to do: (painful)
 - Figure out how to use ssh or stunnel to protect Bacula communications.
 
 For 1.31 release:
+- lstat() is not going to work on Win32 for testing date.
+- Implement a Recycle command
 - Something is not right in last block of fill command.
 - Check this below from Phil.
   > When the job was done, Bacula reported 11084 files restored:
@@ -57,7 +59,7 @@ For 1.31 release:
   user had re-linked the file between the backup and the restore.
   Do lstat() to see if it is already properly linked.
   Same for symlinked file.
-- Remove the Jmsg() in sql_find.c:102 or only print on hard error.
+  Make sure ifnewer, ifolder, never, ... apply correctly.
 - Implement List Volume Job=xxx  or List scheduled volumes or
   Status Director 
 - Instrument use_count on DEVICE packets and ensure that the device is
@@ -967,3 +969,5 @@ Done: (see kernsdone for more)
   It doesnt show the last 20 jobs , but some older ones.
 - Fix Verify VolumeToCatalog to use BSRs -- it is broken.
 - Implement Release Storage=xxx
+- Fix restore on Win95/98  
+- Remove the Jmsg() in sql_find.c:102 or only print on hard error.
index a0987b45b33e722d3e44bde5a97ca177e2b0e3bc..804abf5efc27675c994a0f2a9ac61cbd7f6acc05 100644 (file)
@@ -5,3 +5,4 @@ bacula.desktop.gnome1
 bacula.desktop.gnome2
 console
 gconsole
+mtx-changer
index d6c3b3cb250db9ec2645deaf5fdab750ab33e96a..ff4eef9e06f8e23426239716f739be6006b25758 100644 (file)
 /* Stream definitions.  Once defined these must NEVER
  *   change as they go on the storage media.
  */
-#define STREAM_UNIX_ATTRIBUTES   1    /* Generic Unix attributes */
-#define STREAM_FILE_DATA         2    /* Standard uncompressed data */
-#define STREAM_MD5_SIGNATURE     3    /* MD5 signature for the file */
-#define STREAM_GZIP_DATA         4    /* GZip compressed file data */
-#define STREAM_WIN32_ATTRIBUTES  5    /* Windows attributes (superset of Unix) */
-#define STREAM_SPARSE_DATA       6    /* Sparse data stream */
-#define STREAM_SPARSE_GZIP_DATA  7
-#define STREAM_PROGRAM_NAMES     8    /* program names for program data */
-#define STREAM_PROGRAM_DATA      9    /* Data needing program */
-#define STREAM_SHA1_SIGNATURE   10    /* SHA1 signature for the file */
-#define STREAM_WIN32_DATA       11    /* Win32 BackupRead data */
-#define STREAM_WIN32_GZIP_DATA  12    /* Gzipped Win32 BackupRead data */
+#define STREAM_UNIX_ATTRIBUTES    1    /* Generic Unix attributes */
+#define STREAM_FILE_DATA          2    /* Standard uncompressed data */
+#define STREAM_MD5_SIGNATURE      3    /* MD5 signature for the file */
+#define STREAM_GZIP_DATA          4    /* GZip compressed file data */
+#define STREAM_UNIX_ATTRIBUTES_EX 5    /* Extended Unix attr. Win32Ex/FreeBSD */
+#define STREAM_SPARSE_DATA        6    /* Sparse data stream */
+#define STREAM_SPARSE_GZIP_DATA   7
+#define STREAM_PROGRAM_NAMES      8    /* program names for program data */
+#define STREAM_PROGRAM_DATA       9    /* Data needing program */
+#define STREAM_SHA1_SIGNATURE    10    /* SHA1 signature for the file */
+#define STREAM_WIN32_DATA        11    /* Win32 BackupRead data */
+#define STREAM_WIN32_GZIP_DATA   12    /* Gzipped Win32 BackupRead data */
 
 /*
  * Internal code for Signature types
index 670570c0098bb70fa96c3a0b769131794c0f6588..0b6c4183be0f37eacdcf5080a85c58b9c6553dec 100644 (file)
@@ -471,7 +471,8 @@ int db_create_file_attributes_record(JCR *jcr, B_DB *mdb, ATTR_DBR *ar)
    /*
     * Make sure we have an acceptable attributes record.
     */
-   if (!(ar->Stream == STREAM_UNIX_ATTRIBUTES || ar->Stream == STREAM_WIN32_ATTRIBUTES)) {
+   if (!(ar->Stream == STREAM_UNIX_ATTRIBUTES || 
+        ar->Stream == STREAM_UNIX_ATTRIBUTES_EX)) {
       Mmsg0(&mdb->errmsg, _("Attempt to put non-attributes into catalog\n"));
       Jmsg(jcr, M_ERROR, 0, "%s", mdb->errmsg);
       return 0;
index 3b722d40bb228c949c71471d99d9e413f5911331..21ec4630c068a0c8720badb59908f005cf6169c0 100644 (file)
@@ -41,7 +41,7 @@
 /* Commands sent to File daemon */
 static char backupcmd[] = "backup\n";
 static char storaddr[]  = "storage address=%s port=%d ssl=%d\n";
-static char levelcmd[]  = "level = %s%s\n";
+static char levelcmd[]  = "level = %s%s mtime_only=%d\n";
 
 /* Responses received from File daemon */
 static char OKbackup[]   = "2000 OK backup\n";
@@ -224,14 +224,14 @@ int do_backup(JCR *jcr)
     */
    switch (jcr->JobLevel) {
       case L_BASE:
-         bnet_fsend(fd, levelcmd, "base", " ");
+         bnet_fsend(fd, levelcmd, "base", " ", 0);
         break;
       case L_FULL:
-         bnet_fsend(fd, levelcmd, "full", " ");
+         bnet_fsend(fd, levelcmd, "full", " ", 0);
         break;
       case L_DIFFERENTIAL:
       case L_INCREMENTAL:
-         bnet_fsend(fd, levelcmd, "since ", jcr->stime);
+         bnet_fsend(fd, levelcmd, "since ", jcr->stime, 0);
         free_pool_memory(jcr->stime);
         jcr->stime = NULL;
         break;
index 5ce9194cb20ea5801e21693247cf5d43a96c8c77..9abe3b509d683fd35a3010ee5058ec363b8dd0b3 100644 (file)
@@ -392,7 +392,7 @@ void catalog_update(JCR *jcr, BSOCK *bs, char *msg)
    Dmsg5(99, "UpdCat VolSessId=%d VolSessT=%d FI=%d Strm=%d data_len=%d\n",
       VolSessionId, VolSessionTime, FileIndex, Stream, data_len);
 
-   if (Stream == STREAM_UNIX_ATTRIBUTES || Stream == STREAM_WIN32_ATTRIBUTES) {
+   if (Stream == STREAM_UNIX_ATTRIBUTES || Stream == STREAM_UNIX_ATTRIBUTES_EX) {
       skip_nonspaces(&p);            /* skip FileIndex */
       skip_spaces(&p);
       skip_nonspaces(&p);            /* skip FileType */
index c5e1f5ef0a345a3a9b93745c2b31aeac9e796980..d1977138551dce3dbb9eef4ea0b757f0c4d4da48 100644 (file)
@@ -370,8 +370,8 @@ Without that I don't know who I am :-(\n"), configfile);
                            catalog->db_password, catalog->db_address,
                            catalog->db_port, catalog->db_socket);
         if (!db_open_database(NULL, db)) {
-            Jmsg(NULL, M_FATAL, 0, _("Could not open database \"%s\".\n"),
-                catalog->db_name);
+            Jmsg(NULL, M_FATAL, 0, _("Could not open %s database \"%s\".\n"),
+                catalog_db, catalog->db_name);
            OK = FALSE;
         } else {
            /* If a pool is defined for this job, create the pool DB       
index 3353180ee3f08c77e0c7e7cc66e5e60adf74251b..0aa9e4ae9bae1b374fbfe7d4f2094ac399c161cb 100644 (file)
@@ -361,7 +361,7 @@ msglen=%d msg=%s\n"), len, fd->msglen, fd->msg);
       *fn = *p++;                    /* term filename and point to attribs */
       attr = p;
 
-      if (stream == STREAM_UNIX_ATTRIBUTES || stream == STREAM_WIN32_ATTRIBUTES) {
+      if (stream == STREAM_UNIX_ATTRIBUTES || stream == STREAM_UNIX_ATTRIBUTES_EX) {
         jcr->JobFiles++;
         jcr->FileIndex = file_index;
         ar.attr = attr;
index 31bc11d25199f64796c211a20c7b144947a0fbdb..605d668d94860d06f34d6ca8816223a5305a50ef 100644 (file)
@@ -502,7 +502,7 @@ int get_attributes_and_compare_to_catalog(JCR *jcr, JobId_t JobId)
       /*
        * Got attributes stream, decode it
        */
-      if (stream == STREAM_UNIX_ATTRIBUTES || stream == STREAM_WIN32_ATTRIBUTES) {
+      if (stream == STREAM_UNIX_ATTRIBUTES || stream == STREAM_UNIX_ATTRIBUTES_EX) {
         uint32_t LinkFIf, LinkFIc;
          Dmsg2(400, "file_index=%d attr=%s\n", file_index, attr);
         jcr->JobFiles++;
index 19968c0a3cbf7da91b75062dde64a6abc54bd10a..f54d15b15d5c09ba1637ddcc4fe95bd7f8a51917 100644 (file)
@@ -162,6 +162,7 @@ struct JCR {
    /*********FIXME********* add missing files and files to be retried */
    int incremental;                   /* set if incremental for SINCE */
    time_t mtime;                      /* begin time for SINCE */
+   int mtime_only;                    /* compare only mtime and not ctime as well */
    int mode;                          /* manual/auto run */
    int status;                        /* job status */
    long Ticket;                       /* Ticket */