which causes the FD to detect whether or not the OS has the
honor no dump bit (*BSD systems), and if so, to skip backing up
any file with this bit set. The feature is enabled by setting
'honor no dump flag = yes' in the Options section of a FileSet
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6525
91ce42f0-d328-0410-95d8-
f526ca767f89
Erich Prinz
Felix Schwarz
Francisco Reyes
Erich Prinz
Felix Schwarz
Francisco Reyes
Frank Sweetser
Howard Thomson
Jaime Ventura
Frank Sweetser
Howard Thomson
Jaime Ventura
inline char *JOB::name() const { return hdr.name; }
#undef MAX_FOPTS
inline char *JOB::name() const { return hdr.name; }
#undef MAX_FOPTS
/* File options structure */
struct FOPTS {
/* File options structure */
struct FOPTS {
{"drivetype", store_drivetype, {0}, 0, 0, 0},
{"checkfilechanges",store_opts, {0}, 0, 0, 0},
{"strippath", store_opts, {0}, 0, 0, 0},
{"drivetype", store_drivetype, {0}, 0, 0, 0},
{"checkfilechanges",store_opts, {0}, 0, 0, 0},
{"strippath", store_opts, {0}, 0, 0, 0},
+ {"honornodumpflag", store_opts, {0}, 0, 0, 0},
{NULL, NULL, {0}, 0, 0, 0}
};
{NULL, NULL, {0}, 0, 0, 0}
};
INC_KW_NOATIME,
INC_KW_ENHANCEDWILD,
INC_KW_CHKCHANGES,
INC_KW_NOATIME,
INC_KW_ENHANCEDWILD,
INC_KW_CHKCHANGES,
+ INC_KW_STRIPPATH,
+ INC_KW_HONOR_NODUMP
{"enhancedwild", INC_KW_ENHANCEDWILD},
{"checkfilechanges", INC_KW_CHKCHANGES},
{"strippath", INC_KW_STRIPPATH},
{"enhancedwild", INC_KW_ENHANCEDWILD},
{"checkfilechanges", INC_KW_CHKCHANGES},
{"strippath", INC_KW_STRIPPATH},
+ {"honornodumpflag", INC_KW_HONOR_NODUMP},
{"no", INC_KW_ENHANCEDWILD, "0"},
{"yes", INC_KW_CHKCHANGES, "c"},
{"no", INC_KW_CHKCHANGES, "0"},
{"no", INC_KW_ENHANCEDWILD, "0"},
{"yes", INC_KW_CHKCHANGES, "c"},
{"no", INC_KW_CHKCHANGES, "0"},
+ {"yes", INC_KW_HONOR_NODUMP, "N"},
+ {"no", INC_KW_HONOR_NODUMP, "0"},
* Wait until no job is running
*/
if (ua->argc == 1) {
* Wait until no job is running
*/
if (ua->argc == 1) {
- * We wait the end of job
+ * We wait the end of a specific job
*/
bmicrosleep(0, 200000); /* let job actually start */
*/
bmicrosleep(0, 200000); /* let job actually start */
+/*
+ * check for BSD nodump flag
+ */
+static bool no_dump(JCR *jcr, FF_PKT *ff_pkt)
+{
+#if defined(HAVE_CHFLAGS) && defined(UF_NODUMP)
+ if ( (ff_pkt->flags & FO_HONOR_NODUMP) &&
+ (ff_pkt->statp.st_flags & UF_NODUMP) ) {
+ Jmsg(jcr, M_INFO, 1, _(" NODUMP flag set - will not process %s\n"),
+ ff_pkt->fname);
+ return true; /* do not backup this file */
+ }
+#endif
+ return false; /* do backup */
+}
+
/*
* Find all the requested files and send them
* to the Storage daemon.
/*
* Find all the requested files and send them
* to the Storage daemon.
break;
case FT_REGE:
Dmsg1(130, "FT_REGE saving: %s\n", ff_pkt->fname);
break;
case FT_REGE:
Dmsg1(130, "FT_REGE saving: %s\n", ff_pkt->fname);
+ if (no_dump(jcr, ff_pkt))
+ return 1;
has_file_data = true;
break;
case FT_REG:
Dmsg1(130, "FT_REG saving: %s\n", ff_pkt->fname);
has_file_data = true;
break;
case FT_REG:
Dmsg1(130, "FT_REG saving: %s\n", ff_pkt->fname);
+ if (no_dump(jcr, ff_pkt))
+ return 1;
has_file_data = true;
break;
case FT_LNK:
has_file_data = true;
break;
case FT_LNK:
break;
case FT_DIRBEGIN:
jcr->num_files_examined--; /* correct file count */
break;
case FT_DIRBEGIN:
jcr->num_files_examined--; /* correct file count */
+ if (no_dump(jcr, ff_pkt)) /* disable recursion on nodump directories */
+ ff_pkt->flags |= FO_NO_RECURSION;
return 1; /* not used */
case FT_NORECURSE:
Jmsg(jcr, M_INFO, 1, _(" Recursion turned off. Will not descend from %s into %s\n"),
return 1; /* not used */
case FT_NORECURSE:
Jmsg(jcr, M_INFO, 1, _(" Recursion turned off. Will not descend from %s into %s\n"),
case 'c':
fo->flags |= FO_CHKCHANGES;
break;
case 'c':
fo->flags |= FO_CHKCHANGES;
break;
+ case 'N':
+ fo->flags |= FO_HONOR_NODUMP;
+ break;
default:
Emsg1(M_ERROR, 0, _("Unknown include/exclude option: %c\n"), *p);
break;
default:
Emsg1(M_ERROR, 0, _("Unknown include/exclude option: %c\n"), *p);
break;
#define FO_ENHANCEDWILD (1<<23) /* Enhanced wild card processing */
#define FO_CHKCHANGES (1<<24) /* Check if file have been modified during backup */
#define FO_STRIPPATH (1<<25) /* Check for stripping path */
#define FO_ENHANCEDWILD (1<<23) /* Enhanced wild card processing */
#define FO_CHKCHANGES (1<<24) /* Check if file have been modified during backup */
#define FO_STRIPPATH (1<<25) /* Check for stripping path */
+#define FO_HONOR_NODUMP (1<<26) /* honor NODUMP flag */
struct s_included_file {
struct s_included_file *next;
struct s_included_file {
struct s_included_file *next;
-#define VERSION "2.3.10"
-#define BDATE "26 February 2008"
-#define LSMDATE "26Feb08"
+#define VERSION "2.3.11"
+#define BDATE "03 March 2008"
+#define LSMDATE "03Mar08"
#define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
#define BYEAR "2008" /* year for copyright messages in progs */
#define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
#define BYEAR "2008" /* year for copyright messages in progs */
Technical notes on version 2.3
General:
Technical notes on version 2.3
General:
+03Mar08
+kes Apply patch from Frank Kardel that implements 'honor no dump flag',
+ which causes the FD to detect whether or not the OS has the
+ honor no dump bit (*BSD systems), and if so, to skip backing up
+ any file with this bit set. The feature is enabled by setting
+ 'honor no dump flag = yes' in the Options section of a FileSet.
28Feb08
kes Correct po warning message with datarootdir
kes Implement more code in dird.c to put configuration parsing in
28Feb08
kes Correct po warning message with datarootdir
kes Implement more code in dird.c to put configuration parsing in