Enhancement to:
Item 3: Scheduling syntax that permits more flexibility and options
Date: 15 December 2006
Origin: Gregory Brauer (greg at wildbrain dot com) and
Florian Schnabel <florian.schnabel at docufy dot de>
Status:
(see: 
http://bacula.git.sourceforge.net/git/gitweb.cgi?p=bacula/bacula;a=blob;f=bacula/projects;hb=HEAD
 
)

Was:
Item: implement Vacation/Holiday scheduling *within* Bacula(director)
Date: 10 May 2010
Origin: Olaf Zevenboom (o...@artefact.nl)
Status: rejected (see below)

Suggested was to propose an enhancement to current item #3 instead, so:

Enhancement proposal:

Holidays/vacation is a troublesome subject and always will be. There are 
national holidays, regional holidays, religious holidays and days-off as 
defined by a business. A good example of the later is the "Day of the 
Ascension of Jesus" which is always celebrated on a Thursday (in 
countries with a Christian background). For that reason a lot of 
companies are closed the next Friday, but not all of them. It certainly 
is not an official holiday; at least not in the country I live in.

For this reason some flexibility in scheduling/configuring holidays is a 
must. Bacula itself is not very good at that because when the 
configuration is changed director must reload or restart. Therefor I 
suggest to move the definition of vacation/holidays to a separate 
configuration whether this be in a file (ics or proprietary format) , 
database or even an Icalendar-server to separate the configuration from 
the director and let the director read the calendar settings when needed 
and not just when it is started.

As there are various types of jobs which might not access a tapedrive 
such as admin-type jobs so it can very well be that these jobs should 
run on days marked as holiday/vacation whilst others accessing the 
tapedrive should not. Also some jobs are less critical than others. I 
therefor propose to add the following configuration options to job 
definitions:

    *

      calendar source : link to file,database or server (depending if
      one or more of these possible implementations are implemented).

    *

      calendar offset : default=0, can be -1 if job is scheduled after 24.00

    *

      calendar level : warn/hold/wait/ignore : in case of erroneous
      calender definition (for instance wrong file format which can
      happen if live edit of file is permitted)

          o

            warn : a warning is issued and reported through the normal
            reporting system if configured

          o

            hold : manual intervention is required : force job to
            continue, cancel job, edit calender settings (see below)

          o

            wait: same as warning however to job will be stalled.
            “calender retry” is mandatory in this case

          o

            ignore: regardless of calender status continue job (being
            the same as current (5.0.x) setup, just being added to allow
            for a clearer/more distinguished definition of jobs)

    *

      calendar retry (minutes): 0 (off), x (poll calendar source in x
      minutes to check if job is permitted to run now or not) : this
      would enable to edit the calender settings for this job while the
      job is running and will allow it to continue or not at will of the
      backup administrator.

For bconsole I would propose the following new commands to handle the 
new calendar feature:

    *

      calender list [year|month] : list holiday/vacation definition for
      that year/month

    *

      calender test : check if calendar source is available and consistent

    *

      calender add [date] [-offset num] : add date to calendar
      vacation/holiday configuration

    *

      calender remove [date] [-offset num] : remove date to calendar
      vacation/holiday configuration

    *

      calendar skip [date] [-offset num]: for example: although it is
      easter and this should remain in the calendar run job as if it was
      a regular day (ignore calendar)

      calender job [jobid] [warn|stop:continue] : for manual
      intervention when a job is waiting. Maybe not such a good idea as
      it would allow for maintaining an erroneous calendar

Editing of calendar should be done through bconsole to keep the calendar 
definition consistent. Easier editing can be accommodated for through 
scripting over bconsole or using regular tools in case of an icalendar 
setup. Textfile configuration of calendar settings is the most flexible 
but obviously also the most likely to cause inconsistencies.

As the calendar source is defined at joblevel in theory multiple 
calendars can be defined (if this is desirable is something else). If 
this is allowed the calendar commands as described above should have an 
other parameter specifying the calendar which should be used when 
executing the command.

Batch addition of dates might be facilitated by using a script to parse 
information taken from 
http://www.mozilla.org/projects/calendar/holidays.html or other sources, 
but likely as stated before, this will not tackle 100% the right 
vacation/holiday setup for your needs.

With the introduction of the concept “calendar” especially when using an 
icalendar the use of real weeknumbers or finding out what the weeknumber 
of the xth week of month y is becomes in more intuitive for both Bacula 
as well as the Bacula administrator. When not using an icalendar (which 
imposes a major dependency) the OS might be a fall-back as most *nix 
systems have the “cal” command and Windows also has a build-in calendar.

In this respect “Item 3: Scheduling syntax that permits more flexibility 
and options” is also gathered for besides the “repeat” configuration 
option as described in that item. Optionally the value(date/timestamp) 
of the "start" option as described in the item can also be moved/put 
into the calendar which is more flexible as it can be manipulated 
without editing director.conf

Even the status of previously executed jobs can be stored in a calendar 
to maintain a historic view although this information is already 
available in the catalog.



Kern Sibbald wrote:
> Hello,
>
> Although it would be useful to have vacation schedules directly in Bacula, 
> your Feature Request doesn't explain in a way that can be implemented what 
> you really want as there is no common definition of what a holiday/vacation 
> and you do not specify how this should be handled.
>
> In addition, we already have a Feature Request #2 in the projects file that 
> would add significant additional functionality to schedules.  
>
> For the moment, I am not accepting your Feature Request for inclusion in the 
> project files for the above two reasons.  What I suggest is that you take a 
> look at the current project item #2 and see if you can make some specific 
> changes (possibly with examples) that would permit doing what you want in a 
> simple and easy way, then submit a "modification" or "enhancement" to item 
> #2.
>
> Best regards,
>
> Kern
>
> On Monday 10 May 2010 17:23:25 Olaf Zevenboom wrote:
>   
>> Feature Request
>>
>> Item: implement Vacation/Holiday scheduling *within* Bacula(director)
>> Date: 10 May 2010
>> Origin: Olaf Zevenboom (o...@artefact.nl)
>> Status:
>>
>> What:
>> A pre-job option to check to see if the current date (or the day before
>> when jobs are run after 24.00) is a holiday/vacation. Currently this can
>> be done by calling an external script, however this has some drawbacks
>> as described below.
>>
>> Why:
>> It's easy to use an external script to check for holidays/vacation
>> however implementing it with a configurable config file directly into
>> the director is probably not that hard either. For script implementation
>> with configurable file see also:
>> http://wiki.bacula.org/doku.php?id=hints_tips:scheduling_vacation_holidays
>>
>> Advantages of direct implementation within Bacula:
>> - current implementation using an external script leads to Bacula
>> messages reporting errors on holidays as the job is canceled while
>> behavior is expected as it is. Implementation in Director will eliminate
>> the need to falsely call these jobs erroneous. If errors are reported by
>> email or even a pager/SMS this can be annoying.
>> - this feature is a must for all of those with a single-slot tapedrive
>> so having this feature eliminates the need for administrators with such
>> an hardware environment to implement an external solution
>> - external "solutions" are OS specific
>>
>> Notes:
>> Maybe it is also an option to support ics files or even icalendar-servers.
>> See: http://www.mozilla.org/projects/calendar/holidays.html
>>
>>
>> ---------------------------------------------------------------------------
>> ---
>>
>> _______________________________________________
>> Bacula-devel mailing list
>> bacula-de...@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/bacula-devel
>>     
>
>
>   


------------------------------------------------------------------------------

_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to