Items Completed:
Item: 18 Quick release of FD-SD connection after backup.
Item: 40 Include JobID in spool file name
+Item: 25 Implement huge exclude list support using dlist
Summary:
Item: 1 Accurate restoration of renamed/deleted files
Item: 22 Implement support for stacking arbitrary stream filters, sinks.
Item: 23 Implement from-client and to-client on restore command line.
Item: 24 Add an override in Schedule for Pools based on backup types.
-Item: 25 Implement huge exclude list support using hashing.
+Item: 25* Implement huge exclude list support using hashing.
Item: 26 Implement more Python events in Bacula.
Item: 27 Incorporation of XACML2/SAML2 parsing
Item: 28 Filesystem watch triggered backup.
Item 2: Implement a Bacula GUI/management tool.
Origin: Kern
Date: 28 October 2005
- Status:
+ Status: In progress
What: Implement a Bacula console, and management tools
probably using Qt3 and C++.
backups, then the Full job would use the proper Storage device, which
has more capacity (i.e. a 8TB tape library.
-Item 25: Implement huge exclude list support using hashing.
+Item 25: Implement huge exclude list support using hashing (dlists).
Date: 28 October 2005
Origin: Kern
- Status:
+ Status: Done in 2.1.2 but was done with dlists (doubly linked lists
+ since hashing will not help. The huge list also supports
+ large include lists).
What: Allow users to specify very large exclude list (currently
more than about 1000 files is too many).
free_pool_memory(fn);
while (fgets(buf, sizeof(buf), bpipe->rfd)) {
strip_trailing_junk(buf);
- fileset->incexe->name_list.append(bstrdup(buf));
+ fileset->incexe->name_list.append(new_dlistString(buf));
}
if ((stat=close_bpipe(bpipe)) != 0) {
berrno be;
while (fgets(buf, sizeof(buf), ffd)) {
strip_trailing_junk(buf);
Dmsg1(100, "%s\n", buf);
- fileset->incexe->name_list.append(bstrdup(buf));
+ fileset->incexe->name_list.append(new_dlistString(buf));
}
fclose(ffd);
break;
default:
- fileset->incexe->name_list.append(bstrdup(fname));
+ fileset->incexe->name_list.append(new_dlistString(fname));
break;
}
}
fileset->incexe = (findINCEXE *)malloc(sizeof(findINCEXE));
memset(fileset->incexe, 0, sizeof(findINCEXE));
fileset->incexe->opts_list.init(1, true);
- fileset->incexe->name_list.init(1, true);
+ fileset->incexe->name_list.init(); /* for dlist; was 1,true for alist */
fileset->include_list.append(fileset->incexe);
break;
case 'E':
fileset->incexe = (findINCEXE *)malloc(sizeof(findINCEXE));
memset(fileset->incexe, 0, sizeof(findINCEXE));
fileset->incexe->opts_list.init(1, true);
- fileset->incexe->name_list.init(1, true);
+ fileset->incexe->name_list.init();
fileset->exclude_list.append(fileset->incexe);
break;
case 'N':
Dmsg1(400, "T %s\n", fo->writer);
}
}
- for (j=0; j<incexe->name_list.size(); j++) {
- Dmsg1(400, "F %s\n", (char *)incexe->name_list.get(j));
+ dlistString *node;
+ foreach_dlist(node, &incexe->name_list) {
+ Dmsg1(400, "F %s\n", node->c_str());
}
}
for (i=0; i<fileset->exclude_list.size(); i++) {
Dmsg1(400, "XD %s\n", (char *)fo->drivetype.get(k));
}
}
- for (j=0; j<incexe->name_list.size(); j++) {
- Dmsg1(400, "F %s\n", (char *)incexe->name_list.get(j));
+ dlistString *node;
+ foreach_dlist(node, incexe->name_list) {
+ Dmsg1(400, "F %s\n", node->c_str());
}
}
#endif
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2006 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
findFILESET *fileset = ff->fileset;
if (fileset) {
int i;
- char *fname;
+ dlistString *node;
for (i=0; i<fileset->include_list.size(); i++) {
findINCEXE *incexe = (findINCEXE *)fileset->include_list.get(i);
/* look through all files and check */
- foreach_alist(fname, &incexe->name_list) {
+ foreach_dlist(node, &incexe->name_list) {
+ char *fname = node->c_str();
/* fname should match x:/ */
if (strlen(fname) >= 2 && B_ISALPHA(fname[0])
&& fname[1] == ':') {
ff->drivetypes = fo->drivetype;
bstrncat(ff->VerifyOpts, fo->VerifyOpts, sizeof(ff->VerifyOpts));
}
- char *fname;
- foreach_alist(fname, &incexe->name_list) {
+ dlistString *node;
+ foreach_dlist(node, &incexe->name_list) {
+ char *fname = node->c_str();
Dmsg1(100, "F %s\n", fname);
ff->top_fname = fname;
if (find_one_file(jcr, ff, our_callback, his_pkt, ff->top_fname, (dev_t)-1, true) == 0) {
}
fnm_flags = (incexe->current_opts != NULL && incexe->current_opts->flags & FO_IGNORECASE)
? FNM_CASEFOLD : 0;
- char *fname;
- foreach_alist(fname, &incexe->name_list) {
+ dlistString *node;
+ foreach_dlist(node, &incexe->name_list) {
+ char *fname = node->c_str();
if (fnmatch(fname, ff->fname, fnmode|fnm_flags) == 0) {
Dmsg1(100, "Reject wild2: %s\n", ff->fname);
return false; /* reject file */
struct findINCEXE {
findFOPTS *current_opts; /* points to current options structure */
alist opts_list; /* options list */
- alist name_list; /* filename list -- holds char * */
+ dlist name_list; /* filename list -- holds dlistString */
};
/*
dlistString *new_dlistString(const char *str, int len)
{
dlistString *node;
- node = (dlistString *)malloc(sizeof(dlistString) + len);
- bstrncpy(node->c_str(), str, len);
+ node = (dlistString *)malloc(sizeof(dlink) + len +1);
+ bstrncpy(node->c_str(), str, len + 1);
return node;
}
dlist(void);
~dlist() { destroy(); }
void init(void *item, dlink *link);
+ void init();
void prepend(void *item);
void append(void *item);
void set_prev(void *item, void *prev);
void set_next(void *item, void *next);
+ void *get_prev(void *item);
+ void *get_next(void *item);
+ dlink *get_link(void *item);
void insert_before(void *item, void *where);
void insert_after(void *item, void *where);
void *binary_insert(void *item, int compare(void *item1, void *item2));
num_items = 0;
}
+inline void dlist::init()
+{
+ head = tail = NULL;
+ loffset = 0;
+ num_items = 0;
+}
+
+
/*
* Constructor called with the address of a
* member of the list (not the list head), and
((dlink *)(((char *)item)+loffset))->next = next;
}
+inline void *dlist::get_prev(void *item)
+{
+ return ((dlink *)(((char *)item)+loffset))->prev;
+}
+
+inline void *dlist::get_next(void *item)
+{
+ return ((dlink *)(((char *)item)+loffset))->next;
+}
+
+
+inline dlink *dlist::get_link(void *item)
+{
+ return (dlink *)((dlink *)(((char *)item)+loffset));
+}
+
inline bool dlist::empty() const
* Kern Sibbald, February 2007
*
*/
-class dlistString : public dlink
+class dlistString
{
public:
char *c_str() { return m_str; };
private:
+ dlink m_link;
char m_str[1];
/* !!! Don't put anything after this as this space is used
* to hold the string in inline
fileset->incexe = (findINCEXE *)malloc(sizeof(findINCEXE));
memset(fileset->incexe, 0, sizeof(findINCEXE));
fileset->incexe->opts_list.init(1, true);
- fileset->incexe->name_list.init(1, true);
+ fileset->incexe->name_list.init(0, 0);
fileset->include_list.append(fileset->incexe);
} else {
ie = jcr_fileset->exclude_items[i];
fileset->incexe = (findINCEXE *)malloc(sizeof(findINCEXE));
memset(fileset->incexe, 0, sizeof(findINCEXE));
fileset->incexe->opts_list.init(1, true);
- fileset->incexe->name_list.init(1, true);
+ fileset->incexe->name_list.init(0, 0);
fileset->exclude_list.append(fileset->incexe);
}
Technical notes on version 2.1
-General:
+General: a
+09Feb07
+kes Update projects list.
08Feb07
+kes Implement Include/Exclude file lists in FD as dlists using
+ the new dlistString class. This permits efficiently having
+ large include/exclude lists and completes project Item 25.
kes Fix dird/ua_cmds.c so that a cancel command checks if the
console is authorized to cancel the job. This fixes bug
#767.