At first: thanks  lot for the quick and detailed reply!

Great support ...

Am 29.08.24 um 18:25 schrieb Marcin Haba:

Bvfs cache is a great function in Bacula that has many advantages. Unfortunately it also has some disadvantages. Before this cache is created it takes some time and resources to create it. Once it is created, then things in the restore process go quicker and better, but if it isn't created, then it can happen that for many records and not tuned database it can finish with a timeout.

There are two good news for this creating cache issue:

1) This is an incremental process. It means that the cache is not re-created for jobs and paths that already exist there. Added are only new ones. Because of that for newly configured backup jobs this cache can take longer than for others.

2) This process can be triggered asynchronously to the restore process. There is possible to update this cache not in a moment when the files from restore are urgently needed, but in a moment when the backup job finishes work. This way when you go to the restore wizard, the cache is ready. It can be done in the Job Runscript directives like these:

Runscript {
     Runs When = After
     Runs On Client = no
     Console = ".bvfs_update jobid=%i"
}

In older Director versions there was a bug in running the .bvfs_update command in the Runscript Console directive:

https://gitlab.bacula.org/bacula-community-edition/bacula-community/-/issues/2419 
<https://gitlab.bacula.org/bacula-community-edition/bacula-community/-/issues/2419>

but I think in newer Bacula versions it should be fixed already. For older Director versions it can be done by using script and putting the .bvfs_update command inside it, like this:

Runscript {
     Runs When = After
     Runs On Client = no
     Command = "/path/to/script/script.sh %i"
}

Sounds great. May I ask why this isn't enabled by default?

2nd: I add this to my JobDefs, OK? Did right now.

I tried to run ".bvfs_update jobid=5252" in bconsole and assumed this would trigger a cache build for that job. No special activity to see now ... no postgresql load ... Do I misunderstand here?

I will run a job now with the enhanced JobDef, and check



For your question about increasing the web server timeout it can help that the timeout will not occur but it is a bit more like a treating effect, not treating the cause.

Correct, I agree. It would just wait longer ...

In my opinion the runscript way can give more profits here.

yes, sure

For database tuning, sure, it is always a good move. I know this tool for that:

https://pgtune.leopard.in.ua/ <https://pgtune.leopard.in.ua/>

For the working restore in Bconsole, the Bvfs restore and Bconsole restore are two different topics. They share some code, but they are not comparable in this aspect. The Bconsole restore does not create the Bvfs cache.

Good luck with your tries with Bvfs. Please note that in the Bvfs restore process there is one more key moment in the last wizard step but for 2 files to restore and with PostgreSQL database I am sure that you will not experience it :-)

looking forward to use this enhancement

I will also read the rest of the thread with the related discussion

thanks again, Stefan


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

Reply via email to