]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Works with 1.39.35
authorEric Bollengier <eric@eb.homelinux.org>
Sat, 30 Dec 2006 17:18:33 +0000 (17:18 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Sat, 30 Dec 2006 17:18:33 +0000 (17:18 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3870 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/patches/testing/project-include-jobid-in-spool-name.readme
bacula/patches/testing/project-restore-attributes-only.patch [new file with mode: 0644]
bacula/patches/testing/project-restore-attributes-only.readme [new file with mode: 0644]

index d02e701e3a0dfde8e7fbb64d613f9143cba8500e..a2a3fee8bed524391b47fa66f0ead5dceff67c34 100644 (file)
@@ -1,8 +1,11 @@
 From: Eric Bollengier <eric at eb dot homelinux dot org >
 
-This patch implement the include JobID in spool file name project
+This patch implements the include JobID in spool file name project
 
 $Log$
+Revision 1.2  2006/12/30 17:18:33  ricozz
+ebl  Works with 1.39.35
+
 Revision 1.1  2006/12/30 09:30:03  ricozz
 ebl  works against 1.39.34
 
diff --git a/bacula/patches/testing/project-restore-attributes-only.patch b/bacula/patches/testing/project-restore-attributes-only.patch
new file mode 100644 (file)
index 0000000..3a89e32
--- /dev/null
@@ -0,0 +1,69 @@
+diff -Naur cvs/src/baconfig.h my/src/baconfig.h
+--- cvs/src/baconfig.h 2006-12-30 17:01:49.000000000 +0100
++++ my/src/baconfig.h  2006-12-30 17:01:34.000000000 +0100
+@@ -571,10 +571,12 @@
+  * Replace codes needed in both file routines and non-file routines
+  * Job replace codes -- in "replace"
+  */
+-#define REPLACE_ALWAYS   'a'
+-#define REPLACE_IFNEWER  'w'
+-#define REPLACE_NEVER    'n'
+-#define REPLACE_IFOLDER  'o'
++#define REPLACE_ALWAYS        'a'
++#define REPLACE_IFNEWER       'w'
++#define REPLACE_NEVER         'n'
++#define REPLACE_IFOLDER       'o'
++#define REPLACE_ATTR_ALWAYS   'r'
++#define REPLACE_ATTR_IFEXISTS 's'
+ /* This probably should be done on a machine by machine basis, but it works */
+ /* This is critical for the smartalloc routines to properly align memory */
+diff -Naur cvs/src/dird/dird_conf.c my/src/dird/dird_conf.c
+--- cvs/src/dird/dird_conf.c   2006-12-22 20:47:00.000000000 +0100
++++ my/src/dird/dird_conf.c    2006-12-30 17:30:42.000000000 +0100
+@@ -467,6 +467,8 @@
+    {"ifnewer",        REPLACE_IFNEWER},
+    {"ifolder",        REPLACE_IFOLDER},
+    {"never",          REPLACE_NEVER},
++   {"attributes",     REPLACE_ATTR_ALWAYS},
++   {"attributesifexists", REPLACE_ATTR_IFEXISTS},
+    {NULL,               0}
+ };
+diff -Naur cvs/src/filed/restore.c my/src/filed/restore.c
+--- cvs/src/filed/restore.c    2006-12-21 13:53:48.000000000 +0100
++++ my/src/filed/restore.c     2006-12-30 17:22:29.000000000 +0100
+@@ -383,6 +383,12 @@
+                extract = true;
+             }
+ #endif
++            if (jcr->replace == REPLACE_ATTR_ALWAYS   ||
++                jcr->replace == REPLACE_ATTR_IFEXISTS)
++            {
++               extract = false;       /* we just want attributes */
++            }
++
+             if (!extract) {
+                /* set attributes now because file will not be extracted */
+                set_attributes(jcr, attr, &bfd);
+diff -Naur cvs/src/findlib/create_file.c my/src/findlib/create_file.c
+--- cvs/src/findlib/create_file.c      2006-12-20 20:48:59.000000000 +0100
++++ my/src/findlib/create_file.c       2006-12-30 17:29:17.000000000 +0100
+@@ -135,9 +135,17 @@
+          Qmsg(jcr, M_SKIPPED, 0, _("File skipped. Already exists: %s\n"), attr->ofname);
+          return CF_SKIP;
++      case REPLACE_ATTR_ALWAYS:
++         return CF_CREATED;
++
+       case REPLACE_ALWAYS:
+          break;
+       }
++   } else { /* File doesn't exists anymore */
++      if (replace == REPLACE_ATTR_IFEXISTS) {
++         Qmsg(jcr, M_SKIPPED, 0, _("File skipped. Doesn't exists anymore: %s\n"), attr->ofname);         
++         return CF_SKIP;
++      }
+    }
+    switch (attr->type) {
+    case FT_RAW:                       /* raw device to be written */
diff --git a/bacula/patches/testing/project-restore-attributes-only.readme b/bacula/patches/testing/project-restore-attributes-only.readme
new file mode 100644 (file)
index 0000000..ae5368c
--- /dev/null
@@ -0,0 +1,10 @@
+From: Eric Bollengier <eric at homelinux dot org>
+
+This patch implements the restore attributes only project.
+To use it, you can select replace = attributes|attributesifexists
+when you run your restore job.
+
+$Log$
+Revision 1.1  2006/12/30 17:18:33  ricozz
+ebl  Works with 1.39.35
+