On Thu, 9 May 2024 at 20:45, Phil Stracchino <ph...@caerllewys.net> wrote:
> On 5/9/24 13:08, Marcin Haba wrote: > > OK. I was thinking about step after, where files are selected and > > restore is starting. For 263 files this slowness can not be too visible. > > For restoring a larger set of files, it is. > > > > For the building file list, there is used .bvfs_update command that > > builds Bvfs cache in the following way: > > > > .bvfs_update jobid=XXX,YYY,ZZZ > > > > where XXX, YYY and ZZZ are jobids that are needed for list files for > > restore. This building Bvfs cache can be done independently on BAT. One > > from practice is to run it after a backup job in Runscript. This way the > > Bvfs cache is already built before the restore process is started. > > > Hmmmmmmm. That sounds as though it has potential. Where does that end > up stored? The difficulty that seems to present itself in running that > .bvfs_update as a RunAfterJob is knowing what the jbods should be. > Hello Phil, Bvfs cache is stored in two SQL tables: pathvisibility and pathhierarchy. For .bvfs_update, it is an incremental process. I mean that there is possible to add all jobids at once or all jobids separately. Both ways are valid. For example if you have: Full jobid: 1 Incremental jobid: 2 Incremental jobid: 3 There is possible to run: .bvfs_update jobid=1,2,3 that is the same as running: .bvfs_update jobid=1 .bvfs_update jobid=2 .bvfs_update jobid=3 and the last way can be used in the Runscript. In the Runscript can be used the following characters substitution: https://www.bacula.org/15.0.x-manuals/en/main/Configuring_Director.html#blb:character_substitution so %i is ideal for that because it is replaced into JobId. Normally this Runscript could look like this: Runscript { Runs When = After Runs On Client = no Console = ".bvfs_update jobid = %i" } BUT there was a bug in Bacula that caused it didn't work. It is here: https://gitlab.bacula.org/bacula-community-edition/bacula-community/-/issues/2419 I don't know if it has already been fixed. Also worth to mention is that some Bconsole commands are not supported to run in Runscript Console directive, however .bvfs_update is marked in code as supported. For the Runscript and .bvfs_update if this bug still exists, you can put executing .bvfs_update in a script and use Runscript Command directive like this: Runscript { Runs When = After Runs On Client = no Command = "your_script.sh %i" } Best regards, Marcin Haba (gani) -- "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
_______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel