From 385b9f9abdf912d5895a2184dbf37cac5335a760 Mon Sep 17 00:00:00 2001 From: Frank Bergkemper Date: Fri, 16 Aug 2019 18:22:31 +0200 Subject: [PATCH] docs: Configure updating the Bvfs cache frequently --- .../InstallingBareosWebui.rst | 87 +++++++++++++++++-- 1 file changed, 82 insertions(+), 5 deletions(-) diff --git a/docs/manuals/source/IntroductionAndTutorial/InstallingBareosWebui.rst b/docs/manuals/source/IntroductionAndTutorial/InstallingBareosWebui.rst index 2fcdfffd86c..d8a63f0058e 100644 --- a/docs/manuals/source/IntroductionAndTutorial/InstallingBareosWebui.rst +++ b/docs/manuals/source/IntroductionAndTutorial/InstallingBareosWebui.rst @@ -234,7 +234,7 @@ For details, please read :ref:`DirectorResourceProfile`. SELinux ^^^^^^^ -:index:`\ `\ +:index:`\ `\ To use |dir| on a system with SELinux enabled, permission must be given to HTTPD to make network connections: @@ -244,7 +244,7 @@ To use |dir| on a system with SELinux enabled, permission must be given to HTTPD .. _section-webui-apache: - + Configure your Apache Webserver ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -402,6 +402,84 @@ Since :sinceVersion:`16.2.2: /etc/bareos-webui/configuration.ini` you are able t ; Default: none labelpooltype=scratch + [restore] + ; Restore filetree refresh timeout after n milliseconds + ; Default: 120000 milliseconds + filetree_refresh_timeout=120000 + +.. _section-updating-bvfs-cache-frequently: + +Configure updating the Bvfs cache frequently +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The restore module in the |webui| makes use of the Bvfs API and for example the :bcommand:`.bvfs_update` command to +generate or update the Bvfs cache for jobs that are not already in the cache. + +In case of larger backup jobs with lots of files that are not already in the cache, this could lead to timeouts +while trying to load the filetree in the |webui|. That is why we highly recommend to update the Bvfs cache frequently. + +This can be accomplished by the Run Script directive of a Job Resource. + +The following code snippet is an example how to run the cache update process in a RunScript after the catalog backup. + +.. code-block:: bareosconfig + Job { + Name = "BackupCatalog" + Level = Full + Fileset = "Catalog" + Schedule = "WeeklyCycleAfterBackup" + JobDefs = "DefaultJob" + WriteBootstrap = "|/usr/sbin/bsmtp -h localhost -f "(Bareos) " -s "Bootstrap for Job %j" root@localhost" + Priority = 100 + run before job = "/usr/lib/bareos/scripts/make_catalog_backup.pl MyCatalog" + run after job = "/usr/lib/bareos/scripts/delete_catalog_backup" + Run Script { + Console = ".bvfs_update" + RunsWhen = After + RunsOnClient = No + } + +.. note:: + We do not provide a list of Jobs specified in the *JobId* command argument so the cache is computed + for all jobs not already in the cache. + +As an alternative to the method above the Bvfs cache can be updated after each job run by using the Run Script directive as well. + +.. code-block:: bareosconfig + Job { + Name = "backup-client-01" + Client = "client-01.example.com" + JobDefs = "DefaultJob" + Run Script { + Console = ".bvfs_update jobid=%i" + RunsWhen = After + RunsOnClient = No + } + } + +.. note:: + We do provide a specific JobId in the *JobId* command argument in this example. Only the *JobId* given by the placeholder %i will be computed into the cache. + +Upgrade from 18.2.6 to 18.2.7 +----------------------------- + +Configuration changes +~~~~~~~~~~~~~~~~~~~~~ + +The configuration file :file:`configuration.ini` of the |webui| shipped with Bareos 18.2.7 introduced a new configuration +parameter called :config:option:`filetree_refresh_timeout`. The default value is 120 seconds if not set explicitly. + +The |webui| triggers a Bvfs cache update automatically if required to be able to display the requested filetree. +The configuration parameter has been introduced because in case of larger backup jobs with lots of files +which are not already present in the Bvfs cache you could run into timeouts while trying to load the filetree +in the restore module of the |webui|. + +If you have trouble with running into timeouts while loading the tree you can adjust the parameter :config:option:`filetree_refresh_timeout` +to your needs. Keep in mind to set the timeout in your Apache or Nginx configuration accordingly to the setting +in your :file:`configuration.ini`. + +In general we highly recommend updating the Bvfs cache frequently. Please see :ref:`section-updating-bvfs-cache-frequently` for further details on how to accomplish this. + Upgrade from 15.2 to 16.2 ------------------------- @@ -450,7 +528,7 @@ Additional information NGINX ~~~~~ -:index:`\ `\ +:index:`\ `\ If you prefer to use |webui| on Nginx with php5-fpm instead of Apache, a basic working configuration could look like this: @@ -489,6 +567,5 @@ If you prefer to use |webui| on Nginx with php5-fpm instead of Apache, a basic w } -This will make the |webui| accessible at http://bareos:9100/ (assuming your DNS resolve the hostname :strong:`bareos` to the NGINX server). - +This will make the |webui| accessible at http://bareos:9100/ (assuming your DNS resolve the hostname :strong:`bareos` to the NGINX server).