Hi Goncalo, I saw you had an error "RunBeforeNow, got 2905 Failed 
RunScript" from the RunBeforeNow script. Did you manage to solve it out? I 
know it has more than 4 years, but I just faced the same issue with the 
latest Bareos Version.
Thanks in Advance!

----
Oi Goncalo, vi que você teve o erro "RunBeforeNow, got 2905 Failed 
RunScript" no script que roda antes do Job de Backup. Você por acaso 
conseguiu identificar e consertar esse problema? Tive exatamente esse 
problema em um job no Bareos que estou rodando na última versão, porém não 
encontrei muitas referencias a isso na Internet.
Abraços!

Best,
Marcio Feldmann

Em segunda-feira, 9 de março de 2020 às 12:06:01 UTC-3, Goncalo Sousa 
escreveu:

I configured this way on /etc/bareos/bareos-dir.d/job/server.conf

Job {
  Name = "server-job"
  Client = server-fd
  Type = Backup
  Level = Incremental
  FileSet = "server-fs"
  Schedule = "schedule"
  Storage = server-sd
  Messages = Standard
  Pool = pool-server
  Priority = 10
  Write Bootstrap = "/var/lib/bareos/%c.bsr"
  Client Run Before Job = /root/pre_backup.sh
  Client Run After Job = /root/pre_backup.sh
}

The script is located in the client side. It is giving me the following 
errors: 

server-fd JobId 3954: shell command: run ClientBeforeJob 
"/root/pre_backup.sh"
server-fd JobId 3954: ClientBeforeJob: the input device is not a TTY
server-fd JobId 3954: Error: Runscript: ClientBeforeJob returned non-zero 
status=1. ERR=Child exited with code 1
bareos-dir JobId 3954: Start Backup JobId 3954, 
Job=server-job.2020-03-09_14.56.25_04
bareos-dir JobId 3954: Using Device "server-sd" to write.
bareos-dir JobId 3954: Fatal error: Bad response to RunBeforeNow command: 
wanted 2000 OK RunBeforeNow, got 2905 Failed RunScript
bareos-dir JobId 3954: Fatal error: Client "server-fd" RunScript failed

segunda-feira, 9 de Março de 2020 às 12:26:02 UTC, Andrei Brezan escreveu:

Just look at the documentation: 
https://docs.bareos.org/Configuration/Director.html#job-resource
You can have Client Run Before Job and Client Run After Job.

--
Andrei

On Monday, 9 March 2020 13:19:31 UTC+1, Goncalo Sousa wrote:

And how do I set to execute the script on the client? 

For example: The script is located on the client and I want to execute it 
from it?

sexta-feira, 6 de Março de 2020 às 16:32:46 UTC, Andrei Brezan escreveu:

You need to put the script as the value:

RunBeforeJob="/path/to/my/script"

On Friday, 6 March 2020 16:52:26 UTC+1, Goncalo Sousa wrote:

So as far as I know I add the option: RunAfterJob=yes and RunBeforeJob=yes 
in bareos-dir.d/job but how do I call the script?


-- 
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/dd2edbe1-6fd0-4ffb-9c26-a597c23425b9n%40googlegroups.com.

Reply via email to