Hello,

On Friday 05 June 2009 23:38:00 Blake Dunlap wrote:
> I have a question regarding the maxfull/maxdiff interval options, and how
> they are implemented.
>
> Normally I'd ask the users list, but I am again running into a design
> question rather than an implementation question.
>
> I had assumed they were meant so that one could set backups as incremental
> in the schedules, and let Bacula handle things in an automated fashion.
> What I am finding is that this is not completely the case.

They were designed to suplement a normal schedule to ensure that if there were 
failures that Diff or Full backups were not "skipped".

>
> Is this indeed the point of these options? If not then the below can be
> disregarded.
>
>
>
> If it is the case, then I think the implementation of MaxDiffInterval could
> use 2 tweaks: 

> 1) Have Full backups count as well as Diff backups for 
> satisfying MaxDiff 

Yes, that is an excellent idea.

> 2) Do not require a previous diff backup for this option 
> to do anything (looking at the code, it appears it is an errant case due to
> the code used being copied from maxfull which handles missing fulls in a
> different manner already)

I hadn't designed it that way, but I think that would be a nice addition.

>
> One suggested patch (plus a minor comment fix) if the above assumption is
> correct (Note: I am not a C coder so there may be issues, figured I'd still
> try. It does compile and I am testing this internally now):

Thanks for the patch.  I like the changes you propose so will include the 
patch in one way or another.

In the future, it would be much better to send the patch as an attachement so 
that email wrapping doesn't occur.  Don't bother for this time since the 
patch is small enough I can even enter it manually if required.

Would you do one additional thing and that is go to:  
www.bacula.org -> FSFE License  and fill out two copies and send them to me at 
the address indicated by regular post office mail. 

I'll let you know when the code is in.

Best regards,

Kern

>
> --- fd_cmds.c.old       2009-06-05 16:03:06.000000000 -0500
> +++ fd_cmds.c   2009-06-05 16:33:28.000000000 -0500
> @@ -194,8 +194,13 @@
>        have_full = db_find_job_start_time(jcr, jcr->db, &jcr->jr,
> &jcr->stime); /* If there was a successful job, make sure it is recent
> enough */ if (jcr->get_JobLevel() == L_INCREMENTAL && have_full &&
> jcr->job->MaxDiffInterval > 0) { +         /* Lookup last full job */
> +         if (db_find_last_job_start_time(jcr, jcr->db, &jcr->jr, &stime,
> L_FULL)) { +            last_full_time = str_to_utime(stime);
> +            do_diff = ((now - last_full_time) >=
> jcr->job->MaxDiffInterval); +         }
>           /* Lookup last diff job */
> -         if (db_find_last_job_start_time(jcr, jcr->db, &jcr->jr, &stime,
> L_DIFFERENTIAL)) { +         if (do_diff &&
> db_find_last_job_start_time(jcr, jcr->db, &jcr->jr, &stime,
> L_DIFFERENTIAL)) { last_diff_time = str_to_utime(stime);
>              do_diff = ((now - last_diff_time) >=
> jcr->job->MaxDiffInterval); }
> @@ -215,7 +220,7 @@
>              level_to_str(jcr->get_JobLevel()));
>           jcr->set_JobLevel(jcr->jr.JobLevel = L_FULL);
>         } else if (do_diff) {
> -         /* No recent diff job found, so upgrade this one to Full */
> +         /* No recent diff job found, so upgrade this one to Diff */
>           Jmsg(jcr, M_INFO, 0, _("No prior or suitable Differential backup
> found in catalog. Doing Differential backup.\n")); bsnprintf(since,
> since_len, _(" (upgraded from %s)"),
>              level_to_str(jcr->get_JobLevel()));
>
>
> Blake Dunlap
> The Nexus Group, Inc.

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to