Re: [Bacula-users] PHP exception for restores after retention period
Hello Marcin, Thank you very much for all your help, and for creating a feature request. Kind regards, Yakup Kaya From: Marcin Haba Sent: Wednesday, May 27, 2020 5:58 AM To: Yakup Kaya Cc: bacula-users@lists.sourceforge.net; Markus Flaisch Subject: Re: [Bacula-users] PHP exception for restores after retention period Hello Yakup, Yes, I would really like to add this feature. I opened a feature request for that: https://bugs.bacula.org/view.php?id=2546 To see progress in this task, please observe above ticket. Best regards, Marcin Haba (gani) On Tue, 26 May 2020 at 22:32, Yakup Kaya wrote: > > Hello Marcin, > > Thank you very much for your fast reply. And thank you very much for your > time, > > Then I assume that this is the default behavior for now. Would it be right to > think that this maybe a feature planned, for future releases maybe? > > Kind regards, > > Yakup Kaya > > From: Marcin Haba > Sent: Tuesday, May 26, 2020 7:03 PM > To: Yakup Kaya > Cc: bacula-users@lists.sourceforge.net; Markus Flaisch > Subject: Re: [Bacula-users] PHP exception for restores after retention period > > Hello Yakup, > > This type of restore is not supported yet. To prepare restore Baculum > uses the Bacula Bvfs interface that uses Bvfs cache. If file records > for a job in the catalog are pruned then the Bvfs cache for those > records is removed as well. > > Best regards, > Marcin Haba (gani) > > On Tue, 26 May 2020 at 16:54, Yakup Kaya > wrote: > > > > Hi everybody, > > > > > > We have a problem that we cannot make a restore from the job history > > details, if the retention period has passed for a job (and the file list is > > deleted), or the file list is manually purged. But restore from bconsole > > still works for that job id. > > > > > > When we try to restore with the restore wizard on Baculum, we get the > > following exception from RestoreWizard PHP file. To reproduce the problem > > one can just purge files for a job id as follows using bconsole, and try to > > restore all files from the baculum interface fort that job. Or try to > > restore with a job id, for which the retention time for deleting the file > > list has already passed. > > > > > > *purge files jobid=1996; > > > > > > Here is the exception after running restore wizard from Baculum: > > > > > > - > > > > Prado\Exceptions\TPhpErrorException > > Description > > > > [Notice] Undefined variable: ret (@line 897 in file > > /usr/share/baculum/htdocs/protected/Web/Pages/RestoreWizard.php). > > Source File > > > > /usr/share/baculum/htdocs/protected/Web/Pages/RestoreWizard.php (897) > > > > 0886: > > 0887: $ret = $this->getModule('api')->create(array('jobs', > > 'restore'), $restore_props); > > 0888: $jobid = > > $this->getModule('misc')->findJobIdStartedJob($ret->output); > > 0889: // Remove temporary BVFS table > > 0890: $this->getModule('api')->set(array('bvfs', 'cleanup'), > > array('path' => $path)); > > 0891: } > > 0892: $url_params = array(); > > 0893: if (is_numeric($jobid)) { > > 0894: $url_params['jobid'] = $jobid; > > 0895: $this->goToPage('JobHistoryView', $url_params); > > 0896: } else { > > 0897: $this->RestoreError->Text = implode('', > > $ret->output); > > 0898: $this->show_error = true; > > 0899: } > > 0900: } > > 0901: > > 0902: /** > > 0903: * Load restore jobs on the list. > > 0904: * > > 0905: * @return none > > 0906: */ > > 0907: private function loadRestoreJobs() { > > 0908: $restore_job_tasks = > > $this->getModule('api')->get(array('jobs', 'resnames', '?type=R'))->output; > > 0909: $jobs = array(); > > > > Stack Trace > > > > #0 /usr/share/baculum/htdocs/protected/Web/Pages/RestoreWizard.php(897): > > Prado\PradoBase::phpErrorHandler(8, 'Undefined varia...', > > '/usr/share/bacu...', 897, Array) > > #1 > > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/TComponent.php(1169): > > RestoreWizard->wizardCompleted(Object(Prado\Web\UI\WebControls\TWizard), > > Object(
Re: [Bacula-users] PHP exception for restores after retention period
Hello Yakup, Yes, I would really like to add this feature. I opened a feature request for that: https://bugs.bacula.org/view.php?id=2546 To see progress in this task, please observe above ticket. Best regards, Marcin Haba (gani) On Tue, 26 May 2020 at 22:32, Yakup Kaya wrote: > > Hello Marcin, > > Thank you very much for your fast reply. And thank you very much for your > time, > > Then I assume that this is the default behavior for now. Would it be right to > think that this maybe a feature planned, for future releases maybe? > > Kind regards, > > Yakup Kaya > > From: Marcin Haba > Sent: Tuesday, May 26, 2020 7:03 PM > To: Yakup Kaya > Cc: bacula-users@lists.sourceforge.net; Markus Flaisch > Subject: Re: [Bacula-users] PHP exception for restores after retention period > > Hello Yakup, > > This type of restore is not supported yet. To prepare restore Baculum > uses the Bacula Bvfs interface that uses Bvfs cache. If file records > for a job in the catalog are pruned then the Bvfs cache for those > records is removed as well. > > Best regards, > Marcin Haba (gani) > > On Tue, 26 May 2020 at 16:54, Yakup Kaya > wrote: > > > > Hi everybody, > > > > > > We have a problem that we cannot make a restore from the job history > > details, if the retention period has passed for a job (and the file list is > > deleted), or the file list is manually purged. But restore from bconsole > > still works for that job id. > > > > > > When we try to restore with the restore wizard on Baculum, we get the > > following exception from RestoreWizard PHP file. To reproduce the problem > > one can just purge files for a job id as follows using bconsole, and try to > > restore all files from the baculum interface fort that job. Or try to > > restore with a job id, for which the retention time for deleting the file > > list has already passed. > > > > > > *purge files jobid=1996; > > > > > > Here is the exception after running restore wizard from Baculum: > > > > > > - > > > > Prado\Exceptions\TPhpErrorException > > Description > > > > [Notice] Undefined variable: ret (@line 897 in file > > /usr/share/baculum/htdocs/protected/Web/Pages/RestoreWizard.php). > > Source File > > > > /usr/share/baculum/htdocs/protected/Web/Pages/RestoreWizard.php (897) > > > > 0886: > > 0887: $ret = $this->getModule('api')->create(array('jobs', > > 'restore'), $restore_props); > > 0888: $jobid = > > $this->getModule('misc')->findJobIdStartedJob($ret->output); > > 0889: // Remove temporary BVFS table > > 0890: $this->getModule('api')->set(array('bvfs', 'cleanup'), > > array('path' => $path)); > > 0891: } > > 0892: $url_params = array(); > > 0893: if (is_numeric($jobid)) { > > 0894: $url_params['jobid'] = $jobid; > > 0895: $this->goToPage('JobHistoryView', $url_params); > > 0896: } else { > > 0897: $this->RestoreError->Text = implode('', > > $ret->output); > > 0898: $this->show_error = true; > > 0899: } > > 0900: } > > 0901: > > 0902: /** > > 0903: * Load restore jobs on the list. > > 0904: * > > 0905: * @return none > > 0906: */ > > 0907: private function loadRestoreJobs() { > > 0908: $restore_job_tasks = > > $this->getModule('api')->get(array('jobs', 'resnames', '?type=R'))->output; > > 0909: $jobs = array(); > > > > Stack Trace > > > > #0 /usr/share/baculum/htdocs/protected/Web/Pages/RestoreWizard.php(897): > > Prado\PradoBase::phpErrorHandler(8, 'Undefined varia...', > > '/usr/share/bacu...', 897, Array) > > #1 > > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/TComponent.php(1169): > > RestoreWizard->wizardCompleted(Object(Prado\Web\UI\WebControls\TWizard), > > Object(Prado\Web\UI\WebControls\TWizardNavigationEventParameter), > > 'oncompletebutto...') > > #2 > > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/Web/UI/WebControls/TWizard.php(664): > > Prado\TComponent->raiseEvent('OnCompleteButto...', > > Object(Prado\Web\UI\WebControls\TW
Re: [Bacula-users] PHP exception for restores after retention period
Hello Marcin, Thank you very much for your fast reply. And thank you very much for your time, Then I assume that this is the default behavior for now. Would it be right to think that this maybe a feature planned, for future releases maybe? Kind regards, Yakup Kaya From: Marcin Haba Sent: Tuesday, May 26, 2020 7:03 PM To: Yakup Kaya Cc: bacula-users@lists.sourceforge.net; Markus Flaisch Subject: Re: [Bacula-users] PHP exception for restores after retention period Hello Yakup, This type of restore is not supported yet. To prepare restore Baculum uses the Bacula Bvfs interface that uses Bvfs cache. If file records for a job in the catalog are pruned then the Bvfs cache for those records is removed as well. Best regards, Marcin Haba (gani) On Tue, 26 May 2020 at 16:54, Yakup Kaya wrote: > > Hi everybody, > > > We have a problem that we cannot make a restore from the job history details, > if the retention period has passed for a job (and the file list is deleted), > or the file list is manually purged. But restore from bconsole still works > for that job id. > > > When we try to restore with the restore wizard on Baculum, we get the > following exception from RestoreWizard PHP file. To reproduce the problem one > can just purge files for a job id as follows using bconsole, and try to > restore all files from the baculum interface fort that job. Or try to restore > with a job id, for which the retention time for deleting the file list has > already passed. > > > *purge files jobid=1996; > > > Here is the exception after running restore wizard from Baculum: > > > - > > Prado\Exceptions\TPhpErrorException > Description > > [Notice] Undefined variable: ret (@line 897 in file > /usr/share/baculum/htdocs/protected/Web/Pages/RestoreWizard.php). > Source File > > /usr/share/baculum/htdocs/protected/Web/Pages/RestoreWizard.php (897) > > 0886: > 0887: $ret = $this->getModule('api')->create(array('jobs', > 'restore'), $restore_props); > 0888: $jobid = > $this->getModule('misc')->findJobIdStartedJob($ret->output); > 0889: // Remove temporary BVFS table > 0890: $this->getModule('api')->set(array('bvfs', 'cleanup'), > array('path' => $path)); > 0891: } > 0892: $url_params = array(); > 0893: if (is_numeric($jobid)) { > 0894: $url_params['jobid'] = $jobid; > 0895: $this->goToPage('JobHistoryView', $url_params); > 0896: } else { > 0897: $this->RestoreError->Text = implode('', $ret->output); > 0898: $this->show_error = true; > 0899: } > 0900: } > 0901: > 0902: /** > 0903: * Load restore jobs on the list. > 0904: * > 0905: * @return none > 0906: */ > 0907: private function loadRestoreJobs() { > 0908: $restore_job_tasks = $this->getModule('api')->get(array('jobs', > 'resnames', '?type=R'))->output; > 0909: $jobs = array(); > > Stack Trace > > #0 /usr/share/baculum/htdocs/protected/Web/Pages/RestoreWizard.php(897): > Prado\PradoBase::phpErrorHandler(8, 'Undefined varia...', > '/usr/share/bacu...', 897, Array) > #1 > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/TComponent.php(1169): > RestoreWizard->wizardCompleted(Object(Prado\Web\UI\WebControls\TWizard), > Object(Prado\Web\UI\WebControls\TWizardNavigationEventParameter), > 'oncompletebutto...') > #2 > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/Web/UI/WebControls/TWizard.php(664): > Prado\TComponent->raiseEvent('OnCompleteButto...', > Object(Prado\Web\UI\WebControls\TWizard), > Object(Prado\Web\UI\WebControls\TWizardNavigationEventParameter)) > #3 > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/Web/UI/WebControls/TWizard.php(1365): > > Prado\Web\UI\WebControls\TWizard->onCompleteButtonClick(Object(Prado\Web\UI\WebControls\TWizardNavigationEventParameter)) > #4 > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/Web/UI/TControl.php(1470): > > Prado\Web\UI\WebControls\TWizard->bubbleEvent(Object(Prado\Web\UI\WebControls\TLinkButton), > Object(Prado\Web\UI\TCommandEventParameter)) > #5 > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/Web/UI/WebControls/TLinkButton.php(334): > > Prado\Web\UI\TControl->raiseBubbleEvent(Object(Prado\Web\UI\WebControls\TLinkButton), > Object(Prado\Web\UI\TCommandEventPa
Re: [Bacula-users] PHP exception for restores after retention period
Hello Yakup, This type of restore is not supported yet. To prepare restore Baculum uses the Bacula Bvfs interface that uses Bvfs cache. If file records for a job in the catalog are pruned then the Bvfs cache for those records is removed as well. Best regards, Marcin Haba (gani) On Tue, 26 May 2020 at 16:54, Yakup Kaya wrote: > > Hi everybody, > > > We have a problem that we cannot make a restore from the job history details, > if the retention period has passed for a job (and the file list is deleted), > or the file list is manually purged. But restore from bconsole still works > for that job id. > > > When we try to restore with the restore wizard on Baculum, we get the > following exception from RestoreWizard PHP file. To reproduce the problem one > can just purge files for a job id as follows using bconsole, and try to > restore all files from the baculum interface fort that job. Or try to restore > with a job id, for which the retention time for deleting the file list has > already passed. > > > *purge files jobid=1996; > > > Here is the exception after running restore wizard from Baculum: > > > - > > Prado\Exceptions\TPhpErrorException > Description > > [Notice] Undefined variable: ret (@line 897 in file > /usr/share/baculum/htdocs/protected/Web/Pages/RestoreWizard.php). > Source File > > /usr/share/baculum/htdocs/protected/Web/Pages/RestoreWizard.php (897) > > 0886: > 0887: $ret = $this->getModule('api')->create(array('jobs', > 'restore'), $restore_props); > 0888: $jobid = > $this->getModule('misc')->findJobIdStartedJob($ret->output); > 0889: // Remove temporary BVFS table > 0890: $this->getModule('api')->set(array('bvfs', 'cleanup'), > array('path' => $path)); > 0891: } > 0892: $url_params = array(); > 0893: if (is_numeric($jobid)) { > 0894: $url_params['jobid'] = $jobid; > 0895: $this->goToPage('JobHistoryView', $url_params); > 0896: } else { > 0897: $this->RestoreError->Text = implode('', $ret->output); > 0898: $this->show_error = true; > 0899: } > 0900: } > 0901: > 0902: /** > 0903: * Load restore jobs on the list. > 0904: * > 0905: * @return none > 0906: */ > 0907: private function loadRestoreJobs() { > 0908: $restore_job_tasks = $this->getModule('api')->get(array('jobs', > 'resnames', '?type=R'))->output; > 0909: $jobs = array(); > > Stack Trace > > #0 /usr/share/baculum/htdocs/protected/Web/Pages/RestoreWizard.php(897): > Prado\PradoBase::phpErrorHandler(8, 'Undefined varia...', > '/usr/share/bacu...', 897, Array) > #1 > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/TComponent.php(1169): > RestoreWizard->wizardCompleted(Object(Prado\Web\UI\WebControls\TWizard), > Object(Prado\Web\UI\WebControls\TWizardNavigationEventParameter), > 'oncompletebutto...') > #2 > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/Web/UI/WebControls/TWizard.php(664): > Prado\TComponent->raiseEvent('OnCompleteButto...', > Object(Prado\Web\UI\WebControls\TWizard), > Object(Prado\Web\UI\WebControls\TWizardNavigationEventParameter)) > #3 > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/Web/UI/WebControls/TWizard.php(1365): > > Prado\Web\UI\WebControls\TWizard->onCompleteButtonClick(Object(Prado\Web\UI\WebControls\TWizardNavigationEventParameter)) > #4 > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/Web/UI/TControl.php(1470): > > Prado\Web\UI\WebControls\TWizard->bubbleEvent(Object(Prado\Web\UI\WebControls\TLinkButton), > Object(Prado\Web\UI\TCommandEventParameter)) > #5 > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/Web/UI/WebControls/TLinkButton.php(334): > > Prado\Web\UI\TControl->raiseBubbleEvent(Object(Prado\Web\UI\WebControls\TLinkButton), > Object(Prado\Web\UI\TCommandEventParameter)) > #6 > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/Web/UI/WebControls/TLinkButton.php(309): > > Prado\Web\UI\WebControls\TLinkButton->onCommand(Object(Prado\Web\UI\TCommandEventParameter)) > #7 > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/Web/UI/TPage.php(947): > Prado\Web\UI\WebControls\TLinkButton->raisePostBackEvent('') > #8 > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/Web/UI/TPage.php(273): > Prado\Web\UI\TPage->raisePostBackEvent() > #9 > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/Web/UI/TPage.php(205): > Prado\Web\UI\TPage->processPostBackRequest(Object(Prado\Web\UI\THtmlWriter)) > #10 > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/Web/Services/TPageService.php(528): > Prado\Web\UI\TPage->run(Object(Prado\Web\UI\THtmlWriter)) > #11 > /usr/share/baculum/htdocs/framework/pradosoft/prado/framework/Web/Services/TPageService.php(465): > Prado\Web\Services\TPageService->runPage(Object(RestoreWizard), Array) > #12 > /usr/sh