Thanks for the hint. That's what i tried in the first place, but without luck - my job just returned "Errors=1". So i tried to simplify. So far i cannot tell whether i'm successful or not, it will take a while to test.

On 10.06.22 15:16, Spadajspadaj wrote:
If you want a dynamic list of files, why don't you use the dynamic list functionality? :-)

https://docs.bareos.org/Configuration/Director.html#id11


On 10.06.2022 12:34, Kai Zimmer wrote:
Hi again,

so my idea was to generate a file list to backup before the job starts to run. Bareos stopped the job because the file list didn't exist yet when the job was started. I probably interpreted "ClientRunBeforeJob" wrong or so.

Best regards,
Kai

On 10.06.22 11:30, Kai Zimmer wrote:
Hi,

i'm stuck trying to get a "run job" executed on a bareos client. I tried "Run Script", "ClientRunBeforeJob" and "Client Run Before Job" with the same result - no execution.
Bareos-dir (server) version 19.2.7-2 on Debian Bullseye
Bareos-fd (client) version 19.2.7.-2 on Ubuntu 20.04.1
The logfile (setdebug level=100 enabled) doesn't even mention "runscript".

The job definition looks like this:
Job {
  Name = "KiraDstarSources"
  JobDefs = "KiraDstarSourcesJob"
  Client = "kira-fd"
  Run Script {
     Command = "bash -c 'touch /tmp/bareos_dstar_sources.tmp'"
     Runs On Client = Yes
     Runs When = Before
  }
}

When i switch "Runs On Client" to "No" (so it runs on the serverside), the job is properly executed:
locutus-dir (50): dird/jobq.cc:907-0 Inc Job=KiraDstarSources rncj=1
locutus-dir (100): cats/sql_query.cc:131-437 called: bool BareosDb::SqlQuery(const char*, int) with query UPDATE Job SET JobStatus='R',Level='F',StartTime='2022-06-10 11:02:01',ClientId=31,JobTDate=1654851721,PoolId=5,FileSetId=71 WHERE JobId=437 locutus-dir (100): lib/runscript.cc:228-437 runscript: running a RunScript object type=124 locutus-dir (100): lib/runscript.cc:236-437 runscript: running 'bash -c 'touch /tmp/bareos_dstar_sources.tmp''... locutus-dir (100): cats/sql_query.cc:131-437 called: bool BareosDb::SqlQuery(const char*, int) with query INSERT INTO Log (JobId, Time, LogText) VALUES (437,'2022-06-10 11:02:01','locutus-dir JobId 437: shell command: run BeforeJob "bash -c ''touch /tmp/bareos_dstar_sources.tmp''"
')
locutus-dir (100): lib/runscript.cc:267-437 runscript OK

Any hints what might be the problem?

Best regards,
Kai




--
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/edebbdfc-c021-9a66-0233-17fb93024f8b%40bbaw.de.

Reply via email to