From: Eric Bollengier Date: Sat, 30 Dec 2006 17:18:33 +0000 (+0000) Subject: ebl Works with 1.39.35 X-Git-Tag: Release-2.0.0~47 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9e6952b9db6b944176a83b92c4cad8ea36ad7c44;p=bacula%2Fbacula ebl Works with 1.39.35 git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3870 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/patches/testing/project-include-jobid-in-spool-name.readme b/bacula/patches/testing/project-include-jobid-in-spool-name.readme index d02e701e3a..a2a3fee8be 100644 --- a/bacula/patches/testing/project-include-jobid-in-spool-name.readme +++ b/bacula/patches/testing/project-include-jobid-in-spool-name.readme @@ -1,8 +1,11 @@ From: Eric Bollengier -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 index 0000000000..3a89e3228a --- /dev/null +++ b/bacula/patches/testing/project-restore-attributes-only.patch @@ -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 index 0000000000..ae5368ca85 --- /dev/null +++ b/bacula/patches/testing/project-restore-attributes-only.readme @@ -0,0 +1,10 @@ +From: Eric Bollengier + +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 +