Re: [bareos-users] Client Run Job Before Script

2020-03-20 Thread Spadajspadaj
The bareos-fd runs with root user by default so it should have access 
but there canbe many different issues with the script itself.


One thing is SELinux - is it on? It might mess things up.

Second one is PATH variable. It might not be what you think when you're 
executing the script so some of your scripted commands might not be found.


That's two obvious things to check but there are many more. I'd run the 
bareos-fd with high debug level and see what gets reported because for 
now we don't even know whether there is a problem with launching the 
script at all or is it just some problem within the script itself.



Best regards,

MK

On 20.03.2020 18:37, aeronex...@gmail.com wrote:


Just noticed the file is in /root. Does Bareos have access to both the 
directory and file.


On 3/20/20 1:14 PM, Goncalo Sousa wrote:

In the documentation thats 2 tdifferent things but will try

sexta-feira, 20 de Março de 2020 às 16:58:25 UTC, aeron...@gmail.com 
escreveu:


suggest "Client Run Before Job = /root/pre_backup.sh" should be "
Run Before Job = /root/pre_backup.sh" i.e. remove the word client

On 3/20/20 11:22 AM, Goncalo Sousa wrote:

Hello,

I am having a issue with having a script run before the job.

In the bareos server I,
/etc/bareos/bareos-dir.d/job/tslxprdapp0001.conf has the
following configuration:

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

_*The script is located in the client tslxprdapp0001*_


Screenshot_2020-03-19 Job details localhost-dir.png



Why is it giving me this error?


-- 
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 bareos...@googlegroups.com .
To view this discussion on the web visit

https://groups.google.com/d/msgid/bareos-users/87c0a46e-5765-4e4f-989d-0ece3acb8e0e%40googlegroups.com

.


--
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 bareos-users+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/6031d15f-25b6-40d5-8fd8-cc4f4edd6090%40googlegroups.com 
.

--
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 bareos-users+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/f9c1aaa0-d382-f701-b04e-e4ee1cf1e886%40gmail.com 
.


--
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 bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/5fdee6e3-9805-2914-8ec5-1a466f913de1%40gmail.com.


Re: [bareos-users] Client Run Job Before Script

2020-03-20 Thread aeronex...@gmail.com
Just noticed the file is in /root. Does Bareos have access to both the 
directory and file.


On 3/20/20 1:14 PM, Goncalo Sousa wrote:

In the documentation thats 2 tdifferent things but will try

sexta-feira, 20 de Março de 2020 às 16:58:25 UTC, aeron...@gmail.com 
escreveu:


suggest "Client Run Before Job = /root/pre_backup.sh" should be "
Run Before Job = /root/pre_backup.sh" i.e. remove the word client

On 3/20/20 11:22 AM, Goncalo Sousa wrote:

Hello,

I am having a issue with having a script run before the job.

In the bareos server I,
/etc/bareos/bareos-dir.d/job/tslxprdapp0001.conf has the
following configuration:

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

_*The script is located in the client tslxprdapp0001*_


Screenshot_2020-03-19 Job details localhost-dir.png



Why is it giving me this error?


-- 
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 bareos...@googlegroups.com .
To view this discussion on the web visit

https://groups.google.com/d/msgid/bareos-users/87c0a46e-5765-4e4f-989d-0ece3acb8e0e%40googlegroups.com

.


--
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 bareos-users+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/6031d15f-25b6-40d5-8fd8-cc4f4edd6090%40googlegroups.com 
.


--
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 bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/f9c1aaa0-d382-f701-b04e-e4ee1cf1e886%40gmail.com.


Re: [bareos-users] Client Run Job Before Script

2020-03-20 Thread Goncalo Sousa
In the documentation thats 2 tdifferent things but will try

sexta-feira, 20 de Março de 2020 às 16:58:25 UTC, aeron...@gmail.com 
escreveu:
>
> suggest "Client Run Before Job = /root/pre_backup.sh" should be "
> Run Before Job = /root/pre_backup.sh" i.e. remove the word client
> On 3/20/20 11:22 AM, Goncalo Sousa wrote:
>
> Hello,
>
> I am having a issue with having a script run before the job.
>
> In the bareos server I, /etc/bareos/bareos-dir.d/job/tslxprdapp0001.conf 
> has the following configuration:
>
> Job {
>Name = "tslxprdapp0001-job"
>Client = tslxprdapp0001-fd
>Type = Backup
>Level = Incremental
>FileSet = "tslxprdapp0001-fs"
>Schedule = "schedule"
>Storage = tslxprdapp0001-sd
>Messages = Standard
>Pool = pool-tslxprdapp0001
>Priority = 10
>Write Bootstrap = "/var/lib/bareos/%c.bsr"
>Client Run Before Job = /root/pre_backup.sh
> }
>
> *The script is located in the client tslxprdapp0001*
>
>
> [image: Screenshot_2020-03-19 Job details localhost-dir.png]
>
>
>
> Why is it giving me this error?
>
> -- 
> 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 bareos...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bareos-users/87c0a46e-5765-4e4f-989d-0ece3acb8e0e%40googlegroups.com
>  
> 
> .
>
>

-- 
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 bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/6031d15f-25b6-40d5-8fd8-cc4f4edd6090%40googlegroups.com.


Re: [bareos-users] Client Run Job Before Script

2020-03-20 Thread aeronex...@gmail.com

suggest "Client Run Before Job = /root/pre_backup.sh" should be "
Run Before Job = /root/pre_backup.sh" i.e. remove the word client

On 3/20/20 11:22 AM, Goncalo Sousa wrote:

Hello,

I am having a issue with having a script run before the job.

In the bareos server I, 
/etc/bareos/bareos-dir.d/job/tslxprdapp0001.conf has the following 
configuration:


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

_*The script is located in the client tslxprdapp0001*_


Screenshot_2020-03-19 Job details localhost-dir.png



Why is it giving me this error?


--
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 bareos-users+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/87c0a46e-5765-4e4f-989d-0ece3acb8e0e%40googlegroups.com 
.


--
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 bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/b51bcfc0-0c25-d5de-bf1c-b41fb5f6d3ad%40gmail.com.


[bareos-users] Client Run Job Before Script

2020-03-20 Thread Goncalo Sousa
Hello,

I am having a issue with having a script run before the job.

In the bareos server I, /etc/bareos/bareos-dir.d/job/tslxprdapp0001.conf 
has the following configuration:

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

*The script is located in the client tslxprdapp0001*


[image: Screenshot_2020-03-19 Job details localhost-dir.png]



Why is it giving me this error?

-- 
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 bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/87c0a46e-5765-4e4f-989d-0ece3acb8e0e%40googlegroups.com.