Attila Fülöp
Bernd Frick
Bill Moran
+Bastian Friedrich
Carlos A. Molina G
Carsten Paeth
Chris Lee
Kern's ToDo List
- 16 July 2007
+ 14 December 2007
Document:
and http://www.openeyet.nl/scc/ for managing customer changes
Priority:
-- Plugins
+- Complete Catalog in Pool
+- Implement Bacula plugins -- design API
- Scripts
+- Prune by Job
+- Prune by Job Level
+- True automatic pruning
- Duplicate Jobs
Run, Fail, Skip, Higher, Promote, CancelLowerLevel
Proximity
02-Nov 12:58 rufus-sd JobId 10: Wrote label to prelabeled Volume "Vol001" on device "DDS-4" (/dev/nst0)
02-Nov 12:58 rufus-sd JobId 10: Alert: TapeAlert[7]: Media Life: The tape has reached the end of its useful life.
02-Nov 12:58 rufus-dir JobId 10: Bacula rufus-dir 2.3.6 (26Oct07): 02-Nov-2007 12:58:51
-- Encrypt sd_auth_key = s with director's key = d
- k[i] = s[i] + (d[i] & 0xF)) & 0xFF + 'A' skip -
- Decrypt key = k with director's key
- x = k[i] - (d[i] & 0xF))
- if (x < 0) {
- x = k[i] - (d[i] & 0xF) + 16
- }
- s[i] = x + 'A';
- Eliminate: /var is a different filesystem. Will not descend from / into /var
- Separate Files and Directories in catalog
- Create FileVersions table
generation of the error message doesn't differentiate result==NULL
and a bad status from that result. Not only that, the result is
cleared on a bail_out without having generated the error message.
-- Erabt if min_block_size > max_block_size
- KIWI
-- Implement wait on multiple objects
- - Multiple max times
- - pthread signal
- - socket input ready
- Implement SDErrors (must return from SD)
- Implement USB keyboard support in rescue CD.
- Implement continue spooling while despooling.
- Have SD compute MD5 or SHA1 and compare to what FD computes.
- Make VolumeToCatalog calculate an MD5 or SHA1 from the
actual data on the Volume and compare it.
-- Implement Bacula plugins -- design API
- Make bcopy read through bad tape records.
- Program files (i.e. execute a program to read/write files).
Pass read date of last backup, size of file last time.
==============================
Longer term to do:
+- Implement wait on multiple objects
+ - Multiple max times
+ - pthread signal
+ - socket input ready
- Design at hierarchial storage for Bacula. Migration and Clone.
- Implement FSM (File System Modules).
- Audit M_ error codes to ensure they are correct and consistent.
- Enhance time/duration input to allow multiple qualifiers e.g. 3d2h
- Add ability to backup to two Storage devices (two SD sessions) at
the same time -- e.g. onsite, offsite.
-- Add the ability to consolidate old backup sets (basically do a restore
- to tape and appropriately update the catalog). Compress Volume sets.
- Might need to spool via file is only one drive is available.
- Compress or consolidate Volumes of old possibly deleted files. Perhaps
someway to do so with every volume that has less than x% valid
files.
does the right thing.
- FD-SD quick disconnect
- Building the in memory restore tree is slow.
+- Erabt if min_block_size > max_block_size
+- Add the ability to consolidate old backup sets (basically do a restore
+ to tape and appropriately update the catalog). Compress Volume sets.
+ Might need to spool via file is only one drive is available.
res->res_pool.NextPool = res_all.res_pool.NextPool;
res->res_pool.RecyclePool = res_all.res_pool.RecyclePool;
res->res_pool.storage = res_all.res_pool.storage;
+ res->res_pool.Catalog = res_all.res_pool.Catalog;
break;
case R_CONSOLE:
if ((res = (URES *)GetResWithName(R_CONSOLE, res_all.res_con.hdr.name)) == NULL) {
if (pass == 2) {
RUNSCRIPT *script = new_runscript();
+ script->set_job_code_callback(job_code_callback_filesetname);
script->set_command(lc->str);
RUNSCRIPT *script = new_runscript();
memcpy(script, &res_runscript, sizeof(RUNSCRIPT));
+ script->set_job_code_callback(job_code_callback_filesetname);
if (*runscripts == NULL) {
*runscripts = New(alist(10, not_owned_by_alist));
scan_to_eol(lc);
set_bit(index, res_all.hdr.item_present);
}
+
+/* callback function for edit_job_codes */
+char *job_code_callback_filesetname(JCR *jcr, const char* param) {
+ if (param[0] == 'f') {
+ return jcr->fileset->name();
+ } else {
+ return NULL;
+ }
+}
+
/* dird_conf.c */
extern const char *level_to_str(int level);
+extern char *job_code_callback_filesetname(JCR *jcr, const char*);
/* expand.c */
int variable_expansion(JCR *jcr, char *inp, POOLMEM **exp);
/* util.c */
+
+typedef char *(*job_code_callback_t)(JCR *, const char *);
+
bool is_buf_zero (char *buf, int len);
void lcase (char *str);
void bash_spaces (char *str);
void make_session_key (char *key, char *seed, int mode);
void encode_session_key (char *encode, char *session, char *key, int maxlen);
void decode_session_key (char *decode, char *session, char *key, int maxlen);
-POOLMEM * edit_job_codes (JCR *jcr, char *omsg, char *imsg, const char *to);
+POOLMEM * edit_job_codes (JCR *jcr, char *omsg, char *imsg, const char *to, job_code_callback_t job_code_callback = NULL);
void set_working_directory (char *wd);
const char * last_path_separator (const char *str);
fail_on_error = true;
when = SCRIPT_Never;
old_proto = false; /* TODO: drop this with bacula 1.42 */
+ job_code_callback = NULL;
}
RUNSCRIPT *copy_runscript(RUNSCRIPT *src)
BPIPE *bpipe;
char line[MAXSTRING];
- ecmd = edit_job_codes(jcr, ecmd, this->command, "");
+ ecmd = edit_job_codes(jcr, ecmd, this->command, "", this->job_code_callback);
Dmsg1(100, "runscript: running '%s'...\n", ecmd);
Jmsg(jcr, M_INFO, 0, _("%s: run command \"%s\"\n"), name, ecmd);
Dmsg1(200, _(" --> FailJobOnError=%u\n"), fail_on_error);
Dmsg1(200, _(" --> RunWhen=%u\n"), when);
}
+
+void RUNSCRIPT::set_job_code_callback(job_code_callback_t arg_job_code_callback)
+
+{
+ this->job_code_callback = arg_job_code_callback;
+}
bool fail_on_error; /* abort job on error (Before) */
/* TODO : drop this with bacula 1.42 */
bool old_proto; /* used by old 1.3X protocol */
+ job_code_callback_t job_code_callback;
+ /* Optional callback function passed to edit_job_code */
bool run(JCR *job, const char *name=""); /* name must contain "Before" or "After" keyword */
bool can_run_at_level(int JobLevel) { return true;}; /* TODO */
void reset_default(bool free_string = false);
bool is_local(); /* true if running on local host */
void debug();
+
+ void set_job_code_callback(job_code_callback_t job_code_callback);
};
/* create new RUNSCRIPT (set all value to 0) */
* to = recepients list
*
*/
-POOLMEM *edit_job_codes(JCR *jcr, char *omsg, char *imsg, const char *to)
+POOLMEM *edit_job_codes(JCR *jcr, char *omsg, char *imsg, const char *to, job_code_callback_t callback)
{
char *p, *q;
const char *str;
}
break;
default:
- add[0] = '%';
- add[1] = *p;
- add[2] = 0;
- str = add;
+ str = NULL;
+ if (callback != NULL) {
+ str = callback(jcr, p);
+ }
+
+ if (!str) {
+ add[0] = '%';
+ add[1] = *p;
+ add[2] = 0;
+ str = add;
+ }
break;
}
} else {
General:
14Dec07
+kes Apply patch from Bastian Friedrich <bastian.friedrich@collax.com>
+ that implement %f in RunScripts to pass the FileSet name.
kes Skip leading | when lex input comes from a pipe as suggested
by Michael Stapelberg <michael@stapelberg.de>.
13Dec07