POSTGRESQL_INCDIR=/usr/include/pgsql
POSTGRESQL_LIBDIR=/usr/lib/pgsql
POSTGRESQL_BINDIR=/usr/bin
+ elif test -f /usr/include/postgresql/libpq-fe.h; then
+ POSTGRESQL_INCDIR=/usr/include/postgresql
+ POSTGRESQL_LIBDIR=/usr/lib/postgresql
+ POSTGRESQL_BINDIR=/usr/bin
else
AC_MSG_RESULT(no)
AC_MSG_ERROR(Unable to find libpq-fe.h in standard locations)
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
+/* Define to 1 if you have the `nl_langinfo' function. */
+#undef HAVE_NL_LANGINFO
+
/* Define to 1 if you have the `putenv' function. */
#undef HAVE_PUTENV
AC_HEADER_DIRENT
AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
-AC_CHECK_FUNCS(nanosleep)
+AC_CHECK_FUNCS(nanosleep nl_langinfo)
AC_CHECK_HEADERS(varargs.h)
done
-for ac_func in nanosleep
+
+for ac_func in nanosleep nl_langinfo
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
POSTGRESQL_INCDIR=/usr/include/pgsql
POSTGRESQL_LIBDIR=/usr/lib/pgsql
POSTGRESQL_BINDIR=/usr/bin
+ elif test -f /usr/include/postgresql/libpq-fe.h; then
+ POSTGRESQL_INCDIR=/usr/include/postgresql
+ POSTGRESQL_LIBDIR=/usr/lib/postgresql
+ POSTGRESQL_BINDIR=/usr/bin
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
For version 1.35:
+- Add check for tape alerts.
- Add a "base" package to the window installer for pthreadsVCE.dll
which is needed by all packages.
- Add message to user to check for fixed block size when the forward
> woorkstations to be shut down overnight to save power.
>
-- From Terry Manderson <terry@apnic.net>
- jobdefs { # new structure
- name = "monthlyUnixBoxen"
- type = backup
- level = full
- schedule = monthly
- storage = DLT
- messages = Standard
- pool = MonthlyPool
- priority = 10
- }
-
- job {
- name = "wakame"
- jobdefs = "genericUnixSet"
- client = wakame-fd
- }
-
- job {
- name = "durian"
- jobdefs = "genericUnixSet"
- client = durian-fd
- }
-
- job {
- name = "soy"
- jobdefs = "UnixDevelBoxSet"
- client = soy-fd
- }
-
-
- Autolabel should be specified by DIR instead of SD.
- Storage daemon
- Add media capacity
VolSessionId and VolSessionTime.
=========================================================
-
-
=============================================================
- Request For Comments For File Backup Options
- 10 November 2002
+ File Backup Options Project
+ 28 April 2004
+
Subject: File Backup Options
Problem:
- A few days ago, a Bacula user who is backing up to file volumes and
- using compression asked if it was possible to suppress compressing
- all .gz files since it was a waste of CPU time. Although Bacula
- currently permits using different options (compression, ...) on
- a directory by directory basis, it cannot do it on a file by
- file basis, which is clearly what was desired.
+ Bacula users who are using compression would like to suppress
+ compressing all .gz files since it was a waste of CPU time.
+ Although Bacula currently permits using different options
+ (compression, ...) on a directory by directory basis, it cannot
+ do it on a file by file basis, which is clearly what was
+ desired.
Proposed Implementation:
To solve this problem, I propose the following:
- Add a new Director resource type called Options.
- - The Options resource will have records for all
- options that can currently be specified on the Include record
- (in a FileSet). Examples below.
+ - The Options resource will have records for all options that
+ can currently be specified on the Include record (in a
+ FileSet). Examples below.
- The Options resource will permit an exclude option as well
as a number of additional options.
- - The heart of the Options resource is the ability to
- supply any number of Match records which specify POSIX
- regular expressions. These Match regular expressions are
- applied to the fully qualified filename (path and all). If
- one matches, then the Options will be used.
+ - The heart of the Options resource is the ability to supply
+ any number of Regex records which specify POSIX regular
+ expressions. These regular expressions are applied to the
+ fully qualified filename (path and all). If one matches,
+ then the Options will be used.
- - When an Match specification matches an included file, the
- options specified in the Options resource will override
- the default options specified on the Include record.
+ - When a Regex specification matches an included file, the
+ options specified in the Options resource will override the
+ default options specified on the Include record.
- Include records will be modified to permit referencing one or
- more Options resources. The Options will be used
- in the order listed on the Include record and the first
- one that matches will be applied.
+ more Options resources. The Options will be used in the
+ order listed on the Include record and the first one that
+ matches will be applied.
- Options (or specifications) currently supplied on the Include
- record will be deprecated (i.e. removed in a later version a
+ record will be deprecated (i.e. removed in a later version a
year or so from now).
- The Exclude record will be deprecated as the same functionality
- can be obtained by using an Exclude = yes in the Options.
+ can be obtained by using an Exclude = yes in the Options or
+ an Exclude = xxxx directive.
Options records:
The following records can appear in the Options resource. An
- Recurse= (yes/no) - recurse into subdirectories
- Sparse= (yes/no) - do sparse file backup
- *Exclude= (yes/no) - exclude file from being saved
+ - *INclude= (yes/no) - include the file (needed??)
- *Reader= (filename) - external read (backup) program
- *Plugin= (filename) - read/write plugin module
- - Include= (yes/no) - Include the file matched no additional
- patterns are applied.
-
For Verify Jobs:
- verify= (ipnougsamc5) - verify options
Implementation:
- Currently options specifying compression, MD5 signatures, recursion,
- ... of a FileSet are supplied on the Include record. These will now
- all be collected into a Options resource, which will be
- specified in the Include in place of the options. Multiple Options
- may be specified. Since the Options may contain regular expressions
- that are applied to the full filename, this will give the ability
- to specify backup options on a file by file basis to whatever level
- of detail you wish.
+ Currently options specifying compression, MD5 signatures,
+ recursion, ... of a FileSet are supplied on the Include
+ record. These will now all be collected into a Options
+ resource, which will be specified in the Include in place of
+ the options. Multiple Options may be specified. Since the
+ Options may contain regular expressions that are applied to the
+ full filename, this will give the ability to specify backup
+ options on a file by file basis to whatever level of detail you
+ wish.
Example:
FileSet {
Name = "FullSet"
Include {
- Compression = GZIP;
- Signature = MD5
- Wild = /*.?*/ # matches all files.
- File = /
+ Options {
+ Compression = GZIP;
+ Signature = MD5
+ Wild = /*.?*/ # matches all files.
+ }
+ Include = /
}
}
want to compress all files but not any file with extensions .gz or .Z.
In that case, you will need to group two sets of options using
the Options resource. Files may be anywhere except in an
- option set??? All OptionSets apply to all files in the order
- the OptionSets were specified. To have files included with
+ option set ??? All Options apply to all files in the order
+ the Options were specified. To have files included with
different option sets without using wild-cards, use two or more
Includes -- each one is handled in turn using only the files and
optionsets specified in the include.
FileSet {
Name = "FullSet"
Include {
- OptionSet {
+ Options {
Signature = MD5
# Note multiple Matches are ORed
Wild = "*.gz" # matches .gz files
Wild = "*.Z" # matches .Z files
}
- OptionSet {
+ Options {
Compression = GZIP
Signature = MD5
Wild = "*.?*" # matches all files
}
- File = /
+ Include = /
}
}
compression.
Questions:
- - Is it necessary to provide some means of ANDing regular expressions
- and negation? (not currently planned)
-
- e.g. Wild = /*.gz/ && !/big.gz/
-
- - I see that Networker has a "null" module which, if specified, does not
- backup the file, but does make an record of the file in the catalog
- so that the catalog will reflect an exact picture of the filesystem.
- The result is that the file can be "seen" when "browsing" the save
- sets, but it cannot be restored.
-
- Is this really useful? Should it be implemented in Bacula?
Results:
After implementing the above, the user will be able to specify
=============================================
+
==========================================================
Unsaved File design
For each Incremental job that is run, there may be files that
list)
# echo "Requested list"
- ${MTX} -f $ctl status | grep " *Storage Element [0-9]*:.*Full" | awk "{print \$slot \$device}" | sed "s/Full *\(:VolumeTag=\)*//"
+ ${MTX} -f $ctl status | grep " *Storage Element [0-9]*:.*Full" | awk "{print \$3 \$4}" | sed "s/Full *\(:VolumeTag=\)*//"
;;
loaded)
slots)
# echo "Request slots"
- ${MTX} -f $ctl status | grep " *Storage Changer" | awk "{print \$drive}"
+ ${MTX} -f $ctl status | grep " *Storage Changer" | awk "{print \$5}"
;;
esac
#define REPLACE_NEVER 'n'
#define REPLACE_IFOLDER 'o'
+#ifdef HAVE_SETLOCALE
+#include <locale.h>
+#else
+#define setlocale(x, y) ("ANSI_X3.4-1968")
+#endif
+#ifdef HAVE_NL_LANGINFO
+#include <langinfo.h>
+#else
+#define nl_langinfo(x) ("ANSI_X3.4-1968")
+#endif
+
#endif /* _BACONFIG_H */
#include <netinet/in.h>
#include <arpa/inet.h>
#include <pthread.h>
-
+
/* Local Bacula includes. Be sure to put all the system
* includes before these.
*/
}
break;
case R_FILESET:
+ {
+ int i, j, k;
sendit(sock, "FileSet: name=%s\n", res->res_fs.hdr.name);
- for (int i=0; i<res->res_fs.num_includes; i++) {
+ for (i=0; i<res->res_fs.num_includes; i++) {
INCEXE *incexe = res->res_fs.include_items[i];
- for (int j=0; j<incexe->name_list.size(); j++) {
- sendit(sock, " Inc: %s\n", incexe->name_list.get(j));
+ for (j=0; j<incexe->num_opts; j++) {
+ FOPTS *fo = incexe->opts_list[j];
+ sendit(sock, " O %s\n", fo->opts);
+ for (k=0; k<fo->match.size(); k++) {
+ sendit(sock, " W %s\n", fo->match.get(j));
+ }
+ sendit(sock, " N\n");
+ }
+ for (j=0; j<incexe->name_list.size(); j++) {
+ sendit(sock, " I %s\n", incexe->name_list.get(j));
+ }
+ if (incexe->name_list.size()) {
+ sendit(sock, " N\n");
}
}
- for (int i=0; i<res->res_fs.num_excludes; i++) {
+
+ for (i=0; i<res->res_fs.num_excludes; i++) {
INCEXE *incexe = res->res_fs.exclude_items[i];
- for (int j=0; j<incexe->name_list.size(); j++) {
- sendit(sock, " Exc: %s\n", incexe->name_list.get(j));
+ for (j=0; j<incexe->name_list.size(); j++) {
+ sendit(sock, " E %s\n", incexe->name_list.get(j));
+ }
+ if (incexe->name_list.size()) {
+ sendit(sock, " N\n");
}
}
break;
+ }
case R_SCHEDULE:
if (res->res_sch.run) {
int i;
} else {
ie = fileset->exclude_items[i];
}
- fo = ie->opts_list[0];
- for (int j=0; j<fo->match.size(); j++) {
- Dmsg1(100, "Match=%s\n", fo->match.get(j));
+ if (ie->num_opts) {
+ fo = ie->opts_list[0];
+ for (int j=0; j<fo->match.size(); j++) {
+ Dmsg1(100, "Match=%s\n", fo->match.get(j));
+ }
}
for (int j=0; j<ie->name_list.size(); j++) {
p = (char *)ie->name_list.get(j);
p++; /* skip over \ */
/* Note, fall through wanted */
default:
- Dmsg2(100, "numopts=%d opts=%s\n", ie->num_opts, NPRT(ie->opts_list[0]->opts));
if (ie->num_opts) {
+ Dmsg2(100, "numopts=%d opts=%s\n", ie->num_opts, NPRT(ie->opts_list[0]->opts));
pm_strcpy(&fd->msg, ie->opts_list[0]->opts);
pm_strcat(&fd->msg, " ");
} else {
static void store_match(LEX *lc, RES_ITEM *item, int index, int pass);
static void store_opts(LEX *lc, RES_ITEM *item, int index, int pass);
static void store_fname(LEX *lc, RES_ITEM *item, int index, int pass);
+static void options_res(LEX *lc, RES_ITEM *item, int index, int pass);
static void store_base(LEX *lc, RES_ITEM *item, int index, int pass);
static void setup_current_opts(void);
/*
* new Include/Exclude items
- * name handler value code flags default_value
+ * name handler value code flags default_value
*/
static RES_ITEM newinc_items[] = {
+ {"file", store_fname, NULL, 0, 0, 0},
+ {"options", options_res, NULL, 0, 0, 0},
+ {NULL, NULL, NULL, 0, 0, 0}
+};
+
+/*
+ * Items that are valid in an Options resource
+ */
+static RES_ITEM options_items[] = {
{"compression", store_opts, NULL, 0, 0, 0},
{"signature", store_opts, NULL, 0, 0, 0},
{"verify", store_opts, NULL, 0, 0, 0},
{"replace", store_opts, NULL, 0, 0, 0},
{"portable", store_opts, NULL, 0, 0, 0},
{"match", store_match, NULL, 0, 0, 0},
- {"file", store_fname, NULL, 0, 0, 0},
{"base", store_base, NULL, 0, 0, 0},
{NULL, NULL, NULL, 0, 0, 0}
};
+
/* Define FileSet KeyWord values */
#define INC_KW_NONE 0
* Scan for right hand side of Include options (keyword=option) is
* converted into one or two characters. Verifyopts=xxxx is Vxxxx:
* Whatever is found is concatenated to the opts string.
+ * This code is also used inside an Options resource.
*/
static void scan_include_options(LEX *lc, int keyword, char *opts, int optlen)
{
}
}
-/* Store FileSet Include/Exclude info */
+/*
+ *
+ * Store FileSet Include/Exclude info
+ */
void store_inc(LEX *lc, RES_ITEM *item, int index, int pass)
{
int token, i;
{
int token, i;
INCEXE *incexe;
+ bool options;
if (!res_all.res_fs.have_MD5) {
MD5Init(&res_all.res_fs.md5c);
scan_err1(lc, _("Expecting keyword, got: %s\n"), lc->str);
}
for (i=0; newinc_items[i].name; i++) {
+ options = strcasecmp(lc->str, "options") == 0;
if (strcasecmp(newinc_items[i].name, lc->str) == 0) {
- token = lex_get_token(lc, T_ALL);
- if (token != T_EQUALS) {
- scan_err1(lc, "expected an equals, got: %s", lc->str);
+ if (!options) {
+ token = lex_get_token(lc, T_ALL);
+ if (token != T_EQUALS) {
+ scan_err1(lc, "expected an equals, got: %s", lc->str);
+ }
}
/* Call item handler */
newinc_items[i].handler(lc, &newinc_items[i], i, pass);
scan_to_eol(lc);
}
+/*
+ * Come here when Options seen in Include/Exclude
+ */
+static void options_res(LEX *lc, RES_ITEM *item, int index, int pass)
+{
+ int token, i;
+
+ token = lex_get_token(lc, T_ALL);
+ if (token != T_BOB) {
+ scan_err1(lc, "Expecting open brace. Got %s", lc->str);
+ }
+
+ while ((token = lex_get_token(lc, T_ALL)) != T_EOF) {
+ if (token == T_EOL) {
+ continue;
+ }
+ if (token == T_EOB) {
+ break;
+ }
+ if (token != T_IDENTIFIER) {
+ scan_err1(lc, _("Expecting keyword, got: %s\n"), lc->str);
+ }
+ for (i=0; options_items[i].name; i++) {
+ if (strcasecmp(options_items[i].name, lc->str) == 0) {
+ token = lex_get_token(lc, T_ALL);
+ if (token != T_EQUALS) {
+ scan_err1(lc, "expected an equals, got: %s", lc->str);
+ }
+ /* Call item handler */
+ options_items[i].handler(lc, &options_items[i], i, pass);
+ i = -1;
+ break;
+ }
+ }
+ if (i >=0) {
+ scan_err1(lc, "Keyword %s not permitted in this resource", lc->str);
+ }
+ }
+ scan_to_eol(lc);
+}
+
+
/*
* New style options come here
*/
scan_include_options(lc, keyword, inc_opts, sizeof(inc_opts));
if (pass == 1) {
setup_current_opts();
- bstrncpy(res_incexe.current_opts->opts, inc_opts, MAX_FOPTS);
+ bstrncat(res_incexe.current_opts->opts, inc_opts, MAX_FOPTS);
Dmsg2(100, "new pass=%d incexe opts=%s\n", pass, res_incexe.current_opts->opts);
}
scan_to_eol(lc);
#undef VERSION
#define VERSION "1.34.3"
#define VSTRING "1"
-#define BDATE "27 Apr 2004"
-#define LSMDATE "27Apr04"
+#define BDATE "28 Apr 2004"
+#define LSMDATE "28Apr04"
/* Debug flags */
#undef DEBUG
#define HAVE_SETENV 1
/* Define to 1 if you have the `setlocale' function. */
-#define HAVE_SETLOCALE 1
+#undef HAVE_SETLOCALE
+
+#undef HAVE_NL_LANGINFO
/* Define to 1 if you have the `setpgid' function. */
#define HAVE_SETPGID 1