Found some strange behaviour with "Client Run Before Job" parameter
Bareos version 21.0.0
Fileset takes files list from script on client's side
FileSet {
Name = "BARMAN"
Include {
Options {
signature = MD5
compression = LZ4
}
File = "\\|/opt/barman/scripts/backup.sh list"
}
}
"/opt/barman/scripts/backup.sh list" produces an output like
/var/lib/barman/test-db/base/20220301T144150/data/global/6002
/var/lib/barman/test-db/base/20220301T144150/data/global/6100
/var/lib/barman/test-db/base/20220301T144150/data/global/6114
/var/lib/barman/test-db/base/20220301T144150/data/global/6115
And Job has before-script, that running on client's side and make barman backup first
Client Run Before Job = "/opt/barman/scripts/backup.sh backup test-db"
Job {
JobDefs = "DefaultJob"
Name = BARMAN-FD-BARMAN
Client = barman-fd
Client Run Before Job = "/opt/barman/scripts/backup.sh backup test-db"
Pool = Monthly
Level = Full
Schedule = WeeklyCycle
Fileset = BARMAN
Enabled = True
}
Logically, before-script "/opt/barman/scripts/backup.sh backup dbname" should be run before, but actually Bareos trying to get "\\|/opt/barman/scripts/backup.sh list", got empty file list (because before-script doesn't start yet) and run before-script "/opt/barman/scripts/backup.sh backup dbname" after, not before (but shows it like before in log). In this case Bareos produces EMPTY backup with OK status and this is wrong, because before-script produces a full barman backup with a lot of files.
Please point me to the right direction.
Regards
Juri