Hello,

For me the next step would be to find out why the postgres database is gone.
Perhaps you did a Postgres upgrade or reinstall?  Normally for an upgrade,
Postgres will keep the old database and put the new one under a directory
which is the Postgres version, thus you may have several Postgres versions
loaded at the same time.  It is important to try to find out where the
database
went, because it is very rare that a whole database is lost unless you have
a disk failure.  A dead storage array could explain it.

I recommend searching your whole system for the postgres conf files:

find / -name "pg_hba.conf"

On your system, it is probably in /var/lib/pgsql/data/pg_hba.conf,
and your actual database files are probably in /var/lib/pgsql/data/base.
Note the locations of these files vary depending on your distro.

If you have more than one pg_hba.conf, then you probably have
several Postgresql instances and you need to ensure that the
right one is running.  Though, I think that perhaps RedHat does not
configure for multiple Postgres versions.

If you have only one, then you probably lost your database.  In that
case, you will need to create a new one.  If you have a catalog backup
.bsr, that is the best way to restore your database.  Otherwise, I recommend
trying to find out where the last backup was stored and restore it.
If there is just no way to restore your database, you can start doing
backups, and at the same time bscan volumes that are needed for
restore.  bscan is very slow.

Good luck,
Kern



On 12/31/2013 08:29 AM, Ken Barclay wrote:
> Thanks to both Ryan and Phil for your prompt replies.
>
> Yes, the catalog gets backed up every night at the end of the nightly
> backups.
> Yes, I have the bootstrap file.
> Yes, the media is intact.
> No, the database wasn't on the storage array. It was on the Bacula server
> itself.  db size = 4.13 GB.
>
> This is what tells me that the db has gone:
> [root@SVR03 data]# su - postgres
> -bash-3.1$ 
> -bash-3.1$ psql -l
>         List of databases
>    Name    |  Owner   | Encoding 
> -----------+----------+----------
>  postgres  | postgres | UTF8
>  template0 | postgres | UTF8
>  template1 | postgres | UTF8
> (3 rows)
> -bash-3.1$ exit
>
> Correct me if I'm wrong, but it looks like my next step should be to create
> a new database.  Then bscan the tape back into the database.
> I've used bscan before, but never restored from a bootstrap file.
>
> Ken
>
>
> -----Original Message-----
> From: Phil Stracchino [mailto:ph...@caerllewys.net] 
> Sent: Tuesday, 31 December 2013 2:11 PM
> To: bacula-users@lists.sourceforge.net
> Subject: Re: [Bacula-users] FATAL: database "bacula" does not exist
>
> On 12/31/13 01:40, Ken Barclay wrote:
>> Hi, I've been up half the night dealing with an almost 'dead' Storage 
>> Array.  This morning we found that we needed to manually restart the 
>> Bacula Server as it hung trying to shutdown a non existant mounted 
>> partition.
>>
>> So the Server came back up, but every time I tried to start Bconsole 
>> it would shutdown the bacular-dir.  The cause being, as the subject 
>> says, bacula db does not exist.
>>
>> This is not a new install.  The 'catalog' has been running for 5 years
> now.
>> Where did the db go?
>>
>> How can I retrieve it?
>>
>> I've got several servers to restore, but without the catalog I'm lost. 
>> (Maybe my job will be too).
>>
>> Bacula - 3.0.2 (18Jul09) x86_64-redhat-linux-gnu,redhat
>>
>> Postgres - 8.1
> There isn't enough information to answer your question.  I assume from what
> you've said that your Bacula catalog was in PostgreSQL.  Where was the
> Postgres data?  Was it on the storage array that failed?  Did you have
> recent dumps of the catalog?  Did you have regular scheduled dumps of the
> catalog at all?  Where were the catalog dumps stored?  As a last resort, do
> you still have all of the backup media?
>
> These are the kind of questions you need to be asking (and answering) right
> now.  If you have intact backup media, then in the worst (catalog) case that
> you have no recoverable backups at all of the catalog, you can recreate your
> catalog by creating a new, empty catalog and using bscan to read all of the
> metadata back into it by scanning the backup media.
> If at all possible, you want to do this as a single job.
>
> It should also be noted that the current version of Bacula is 5.2.13.
> You are two full major branches behind.  You might want to consider
> updating, after you get through this recovery.
>
>
> --
>   Phil Stracchino
>   Babylon Communications
>   ph...@caerllewys.net
>   p...@co.ordinate.org
>   Landline: 603.293.8485
>
> ----------------------------------------------------------------------------
> --
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to