Bacula-users

Re: [Bacula-users] Cannot stat bacula.sql

2008-07-22 02:14:48
Subject: Re: [Bacula-users] Cannot stat bacula.sql
From: Arno Lehmann <al AT its-lehmann DOT de>
To: Bacula Users <bacula-users AT lists.sourceforge DOT net>
Date: Tue, 22 Jul 2008 08:14:30 +0200
Hi,

20.07.2008 05:49, Kendall Shaw wrote:
> On Tue, 2008-07-08 at 09:59 +0200, Arno Lehmann wrote:
>> Hi,
>>
>> 08.07.2008 06:13, Kendall Shaw wrote:
>>> My job for backing up the catalog fails with:
>>>
>>> Could not stat /var/bacula/bacula.sql: ERR=No such file or directory
>>>
>>> If I run the RunBeforeJob command with the arguments it's given in the
>>> job definition, it creates /var/bacula/bacula.sql.
>> Does the job report mention the run before job?
>>
>>> Do you have any idea what the problem could be?
>> Well, it would be worth checking what happens when you, as the bacula 
>> user, execute '/usr/local/libexec/bacula/make_catalog_backup bacula
>> bacula'. Two likely reasons for that not to create the needed SQL dump 
>> of the catalog are 1) wrong credetials to the database, i.e. you need 
>> to specify the correct user and password, or 2) the dump goes to some 
>> other place.
>>
>> If the make_catalog_backup script runs without error messages, you 
>> should have a look into that script and see where it puts the dump.
>>
>> Arno
> 
> Bacula was being run as a user with nologin as it's shell. I tried
> changing the bacula user's shell to ksh, but I still get the error about
> not being able to stat bacula.sql. If I run the same command and same
> arguments, as the bacula user, it creates bacula.sql, e.g.:
> 
> su _bacula
> /usr/local/libexec/bacula/make_catalog_backup bacula bacula
> 
> Looking at the script, it runs psql and directs the output
> to /var/bacula/bacula.sql. Is bacula checking for the file after it
> deletes it?

I don't think so.

> What can the problem be?

Have a look at your fileset definition for this job.

Arno

> Kendall
> 
>>> Job {
>>>   Name = asdf-catalog
>>>   Type = Backup
>>>   Level = Full
>>>   FileSet = asdf-catalog
>>>   Messages = Standard
>>>   Pool = asdf-pool
>>>   Client = asdf-fd 
>>>   Schedule = daily-after-backup
>>>   # This creates an ASCII copy of the catalog
>>>   RunBeforeJob = "/usr/local/libexec/bacula/make_catalog_backup bacula
>>> bacula"
>>>   # This deletes the copy of the catalog
>>>   RunAfterJob  = "/usr/local/libexec/bacula/delete_catalog_backup"
>>>   Write Bootstrap = "/var/bacula/BackupCatalog.bsr"
>>>   Priority = 11                   # run after main backup
>>> }
>>>
>>> Kendall
>>>
>>>
>>>
>>> -------------------------------------------------------------------------
>>> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
>>> Studies have shown that voting for your favorite open source project,
>>> along with a healthy diet, reduces your potential for chronic lameness
>>> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
>>> _______________________________________________
>>> Bacula-users mailing list
>>> Bacula-users AT lists.sourceforge DOT net
>>> https://lists.sourceforge.net/lists/listinfo/bacula-users
>>>
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 

-- 
Arno Lehmann
IT-Service Lehmann
www.its-lehmann.de

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users