Hello Elias, I am sorry. I forgot that I modified schedule files in Branch-11.0 to add support to the File Daemon scheduler.
In attachment I am sending a valid patch adapted to 9.6.6.3. I also excluded PO files from it, because you use version installed from packages where PO files are not present. Good luck. Best regards, Marcin Haba (gani) On Wed, 16 Dec 2020 at 23:24, Elias Pereira <empbi...@gmail.com> wrote: > > Hi Marcin, > > I had to change some paths of the patch because they do not match what I have > installed. > > In the patch: gui/baculum/protected/API/Class/BaculaSetting.php > My installation: > /usr/share/baculum/htdocs/protected/API/Class/BaculaSetting.php > > After change, I run with command: patch -p1 --dry-run < /root/bacula.patch > > Here the output, > > root@bacula:/usr/share# patch -p1 --dry-run < /root/bacula.patch > checking file baculum/htdocs/protected/API/Class/BaculaSetting.php > Hunk #1 FAILED at 327. > 1 out of 1 hunk FAILED > checking file baculum/htdocs/protected/Web/Lang/en/messages.po > checking file baculum/htdocs/protected/Web/Lang/ja/messages.po > checking file baculum/htdocs/protected/Web/Lang/pl/messages.po > checking file baculum/htdocs/protected/Web/Lang/pt/messages.po > checking file baculum/htdocs/protected/Web/Lang/ru/messages.po > checking file baculum/htdocs/protected/Web/Portlets/DirectiveSchedule.php > Hunk #1 FAILED at 516. > 1 out of 1 hunk FAILED > checking file baculum/htdocs/protected/Web/Portlets/DirectiveSchedule.tpl > Hunk #1 FAILED at 427. > 1 out of 1 hunk FAILED > root@bacula:/usr/share# > > Any idea? > > > > On Wed, Dec 16, 2020 at 9:56 AM Elias Pereira <empbi...@gmail.com> wrote: >> >> Hello Marcin, >> >> Thanks!!! >> >> I tried to apply the patch with the command below, but without success. >> >> patch -ruN < bacula.patch >> >> On Wed, Dec 16, 2020 at 12:19 AM Marcin Haba <ganius...@gmail.com> wrote: >>> >>> Hello Elias, >>> >>> Yes, of course. Here you can find the patch: >>> >>> https://www.bacula.org/git/cgit.cgi/bacula/patch/?id=cae80886c1871522d9dce4771a71c47ddd40d268 >>> >>> It should be compatible with 9.6.6.3. >>> >>> Best regards, >>> Marcin Haba (gani) >>> >>> On Tue, 15 Dec 2020 at 15:08, Elias Pereira <empbi...@gmail.com> wrote: >>> > >>> > Hello Marcin, thanks for the answer!!! >>> > >>> > I'm using 9.6.6.3 version. >>> > >>> > Would you have a patch to apply in this version? >>> > >>> > On Tue, Dec 15, 2020 at 1:50 AM Marcin Haba <ganius...@gmail.com> wrote: >>> >> >>> >> Hello Elias, >>> >> >>> >> Thanks for reporting this problem. >>> >> >>> >> For the schedule error it is a bug that will be fixed in next version >>> >> 11.0. >>> >> >>> >> For the screenshot, setting sun-sat range does the same as option 'Run >>> >> every day of week' does in Baculum. From this reason the interface >>> >> switches the 'Day of week' setting from sun-sat range to 'Run every >>> >> day of week' as on the screenshot. >>> >> >>> >> Best regards, >>> >> Marcin Haba (gani) >>> >> >>> >> On Tue, 15 Dec 2020 at 02:09, Elias Pereira <empbi...@gmail.com> wrote: >>> >> > >>> >> > hello, >>> >> > >>> >> > I set up a schedule to run every hour from Sun to Sat, but it seems >>> >> > that the settings are not saved correctly. In bacula-dir.conf is as >>> >> > below: >>> >> > >>> >> > Schedule { >>> >> > Name = "SC_dockerhost1-diaria" >>> >> > Run = Pool="Diaria-NAS" Level="Full" Storage="FreeNAS1" >>> >> > Messages="Standard" sun-sat >>> >> > } >>> >> > >>> >> > Via baculum appears as in the image below. If I set the day of week >>> >> > again it saves, but if I view the schedule again, it appears again as >>> >> > in the image. >>> >> > >>> >> > img: >>> >> > https://ibb.co/F8hgSsv >>> >> > >>> >> > If I set up a job with this schedule, the error below occurs: >>> >> > >>> >> > Error 94 - Config validation error.Array ( [output] => JSON tool >>> >> > returned wrong exitcode. Output:bacula-dir: ERROR TERMINATION at >>> >> > lex.c:876 Config error: expected a name, got T_EOL: Standard : line >>> >> > 463, col 78 of file /tmp/config_oBsVjy Run = Pool="Diaria-NAS" >>> >> > Level="Full" Storage="FreeNAS1" Messages="Standard" 14-Dec 22:04 >>> >> > bacula-dir: ERROR TERMINATION at lex.c:876 Config error: expected a >>> >> > name, got T_EOL: Standard : line 463, col 78 of file >>> >> > /tmp/config_oBsVjy Run = Pool="Diaria-NAS" Level="Full" >>> >> > Storage="FreeNAS1" Messages="Standard" [exitcode] => 82 ) >>> >> > >>> >> > >>> >> > -- >>> >> > Elias Pereira >>> >> > _______________________________________________ >>> >> > Bacula-users mailing list >>> >> > Bacula-users@lists.sourceforge.net >>> >> > https://lists.sourceforge.net/lists/listinfo/bacula-users >>> >> >>> >> >>> >> >>> >> -- >>> >> "Greater love hath no man than this, that a man lay down his life for >>> >> his friends." Jesus Christ >>> >> >>> >> "Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie >>> >> za przyjaciół swoich." Jezus Chrystus >>> > >>> > >>> > >>> > -- >>> > Elias Pereira >>> >>> >>> >>> -- >>> "Greater love hath no man than this, that a man lay down his life for >>> his friends." Jesus Christ >>> >>> "Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie >>> za przyjaciół swoich." Jezus Chrystus >> >> >> >> -- >> Elias Pereira > > > > -- > Elias Pereira -- "Greater love hath no man than this, that a man lay down his life for his friends." Jesus Christ "Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie za przyjaciół swoich." Jezus Chrystus
diff --git a/gui/baculum/protected/API/Class/BaculaSetting.php b/gui/baculum/protected/API/Class/BaculaSetting.php index 22eb9bc7e2..0c7296927d 100644 --- a/gui/baculum/protected/API/Class/BaculaSetting.php +++ b/gui/baculum/protected/API/Class/BaculaSetting.php @@ -327,7 +327,7 @@ class BaculaSetting extends APIModule { } $value = array($overwrite_directive, $month, $week, $day, $wday); $hour_len = count($directive_value[$i]['Hour']); - if ($hour_len == 24 && $min != 0) { + if ($hour_len == 24) { $value[] = 'hourly'; } if ($hour_len == 1 || ($hour_len == 24 && $min != 0)) { diff --git a/gui/baculum/protected/Web/Portlets/DirectiveSchedule.php b/gui/baculum/protected/Web/Portlets/DirectiveSchedule.php index 60eed26af6..0d0f953690 100644 --- a/gui/baculum/protected/Web/Portlets/DirectiveSchedule.php +++ b/gui/baculum/protected/Web/Portlets/DirectiveSchedule.php @@ -471,6 +471,8 @@ class DirectiveSchedule extends DirectiveListTemplate { $directive_values[] = "hourly at {$hour}:{$minute}"; $obj->Hour = range(0, 23); $obj->Minute = $value->TimeMinHourly->getDirectiveValue(); + } else { + $directive_values[] = 'hourly'; } $values['Run'][] = implode(' ', $directive_values); $objs[] = $obj; diff --git a/gui/baculum/protected/Web/Portlets/DirectiveSchedule.tpl b/gui/baculum/protected/Web/Portlets/DirectiveSchedule.tpl index c61701980d..ee63af37ed 100644 --- a/gui/baculum/protected/Web/Portlets/DirectiveSchedule.tpl +++ b/gui/baculum/protected/Web/Portlets/DirectiveSchedule.tpl @@ -424,24 +424,6 @@ </div> </div> </div> - <com:TCustomValidator - ValidationGroup="Directive" - ControlToValidate="TimeDisable" - Display="None" - ClientValidationFunction="schedule_required_fields_validator" - ErrorMessage="<%=Prado::localize('Please choose at least month or week or day of week or hour in Run block')%> #<%=($this->ItemIndex+1)%>."> - <prop:ClientSide.OnValidate> - var m = ($('#<%=$this->MonthSingle->ClientID%>').prop('checked') && $('#<%=$this->Month->ClientID%>_Directive').val()); - var m_r = ($('#<%=$this->MonthRange->ClientID%>').prop('checked') && $('#<%=$this->MonthRangeFrom->ClientID%>_Directive').val() && $('#<%=$this->MonthRangeTo->ClientID%>_Directive').val()); - var w = ($('#<%=$this->WeekSingle->ClientID%>').prop('checked') && $('#<%=$this->Week->ClientID%>_Directive').val()); - var w_r = ($('#<%=$this->WeekRange->ClientID%>').prop('checked') && $('#<%=$this->WeekRangeFrom->ClientID%>_Directive').val() && $('#<%=$this->WeekRangeTo->ClientID%>_Directive').val()); - var wd = ($('#<%=$this->WdaySingle->ClientID%>').prop('checked') && $('#<%=$this->Wday->ClientID%>_Directive').val()); - var wd_r = ($('#<%=$this->WdayRange->ClientID%>').prop('checked') && $('#<%=$this->WdayRangeFrom->ClientID%>_Directive').val() && $('#<%=$this->WdayRangeTo->ClientID%>_Directive').val()); - var t = ($('#<%=$this->TimeAt->ClientID%>').prop('checked') && $('#<%=$this->TimeHourAt->ClientID%>_Directive').val() && $('#<%=$this->TimeMinAt->ClientID%>_Directive').val()); - var t_h = ($('#<%=$this->TimeHourly->ClientID%>').prop('checked') && $('#<%=$this->TimeMinHourly->ClientID%>_Directive').val()); - sender.enabled = (!t && !t_h && !m && !m_r && !w && !w_r && !wd && !wd_r); - </prop:ClientSide.OnValidate> - </com:TCustomValidator> </prop:ItemTemplate> </com:TActiveRepeater> <com:TValidationSummary -- 2.26.2
_______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users