Bacula-users

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

2008-07-20 23:48:51
Subject: Re: [Bacula-users] Cannot stat bacula.sql
From: Troy Daniels <troy.daniels AT itouch.com DOT au>
To: Kendall Shaw <kshaw AT kendallshaw DOT com>
Date: Mon, 21 Jul 2008 11:49:25 +0800
Hi,

On Sat, 2008-07-19 at 20:49 -0700, 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? What can the problem be?
> 

Near the top of the job log there should be some lines saying it's
running the before job, as well as possibly the outcome from that. Does
it give any indication that there has been a problem running the script
there?

Also, is the database on the same server as the director or a different
one?

"RunBeforeJob" scripts are executed by the Director so if they different
servers you'll need to update it to 'ClientRunBeforeJob' (from memory)

If you can provide the job log from one of these failed jobs to the
list, maybe someone can spot the problem.

Cheers,


Troy Daniels
Systems Admin.
iTouch Australia, a Buongiorno Company.


> 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


-------------------------------------------------------------------------
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