Hello All, 

Please just use bpipe: 

Plugin = "bpipe:/opt/bacula/working/bacula.sql:sudo -i -u postgres pg_dump 
--format=c bacula:sudo -i -u postgres pg_restore -d template1 -C" 

#or 

Plugin = "bpipe:/opt/bacula/working/bacula.sql:sudo -u postgres pg_dump 
bacula:dd of=/tmp/bacula.sql" 

Rgds. 

> From: "Sebastian Neumeier" <sebastian.neume...@mail.de>
> To: "bacula-users" <bacula-users@lists.sourceforge.net>
> Sent: Wednesday, October 19, 2022 6:58:55 AM
> Subject: Re: [Bacula-users] Backup Catalog

> Hi Gina :)
> I didn't test it wether it might be the problem. But can it be that you 
> mistaken
> the paths?
> The error says: "cannot create /opt/ bacula/working /bacula.sql".
> You wrote that you gave all users privilleges to "/opt/ bacula/scripts/". That
> is a different directory.
> I'm no cyber security expert but as far what I read, giving all users 
> privileges
> to a really important file is a bad idea.
> If I remember correctly giving that directory to the bacula user and giving
> privleges to the bacula user should be sufficient.
> If you can trust all users in the "www-data" group I would at least remove the
> write privilege of "others". It should look like this:
> rwxrwxr-x.
> Like I said, I'm not a trained system adminstrator. Giving read and execute
> permissions to "others" and the "www-data" group also might be a bad idea in
> that case, so please take the advice with a huge grain of salt.
> (I'm a mechanical engineering/computational science and engineering studend
> running bacula for my home system and documents).
> Best regards
> Sebastian

> Am 19-Oct-2022 12:17:57 +0200 schrieb gina.co...@uc.pt:

>> Hi.
>> I’m using bacula 11, that has a default job “Backup Catalog” to make backup 
>> of
>> Bacula Catalog (database).
>> When I run the job I get the following message:
>> shell command: run BeforeJob "/opt/bacula/scripts/make_catalog_backup.pl
>> MyCatalog"
>> BeforeJob: sh: 1: cannot create /opt/bacula/working/bacula.sql: Permission
>> denied
>> The directory /opt/bacula/scripts/ is configured with this privileges:
>> drwxrwxrwx  3 bacula www-data 4096 Oct 19 11:02 working
>> Anyone can help me
>> Thanks
>> Gina Costa

>> Universidade de Coimbra • Administração
>> SGSIIC-Serviço de Gestão de Sistemas e Infraestruturas de Informação e
>> Comunicação
>> Divisão de Infraestruturas de TIC
>> Rua do Arco da Traição | 3000-056 COIMBRA • PORTUGAL
>> Tel.: +351 239 242 870
>> [ mailto:gina.co...@uc.pt | E-mail: gina.co...@uc.pt ]
>> [ http://www.uc.pt/administracao | www.uc.pt/administracao ]

>> Este e-mail pretende ser amigo do ambiente. Pondere antes de o imprimir!
>> This e-mail is environment friendly. Please think twice before printing it!

> FreeMail powered by [ https://mail.de/ | mail.de ] - mehr Sicherheit, 
> Seriosität
> und Komfort

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

-- 

MSc Heitor Faria (Miami/USA) 
Bacula LATAM CIO 

mobile1: + 1 909 655-8971 
mobile2: + 55 61 98268-4220 
[ https://www.linkedin.com/in/msc-heitor-faria-5ba51b3 ]        [ 
http://www.bacula.com.br/ ] 
[ http://bacula.lat/ | bacula.lat ] | [ http://www.bacula.com.br/ | 
bacula.com.br ] 
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to