Bacula-users

Re: [Bacula-users] PGSQL: make_catalog_backup.pl dumps everything?

2013-01-11 16:54:56
Subject: Re: [Bacula-users] PGSQL: make_catalog_backup.pl dumps everything?
From: Wolfgang Denk <wd AT denx DOT de>
To: Martin Simmons <martin AT lispworks DOT com>
Date: Fri, 11 Jan 2013 22:52:50 +0100
Dear Martin,

In message <201301101314.r0ADEixR002440 AT higson.cam.lispworks DOT com> you 
wrote:
>
> > I noticed that running "make_catalog_backup.pl" with a PostgreSQL
> > database runs "pg_dump -c" (i. e. without specifying a database),
> > which results in a full dump of the whole DB server, including far
> > more than the Bacula catalog.
> 
> Are you sure that it dumps the whole server?  The postgresql.org doc for the
> dbname argument to pg_dump says that it only ever dumps one database:
> 
> "Specifies the name of the database to be dumped. If this is not specified,
> the environment variable PGDATABASE is used. If that is not set, the user name
> specified for the connection is used."
> 
> The make_catalog_backup.pl script sets PGDATABASE.

Ah, indeed.  I missed the second part of the explanation - I was
looking for a command line argument, and saw none.

But you are right, indeed it sets the PGDATABASE environment variable.

Thanks a lot!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd AT denx DOT de
"IBM uses what I like to call the 'hole-in-the-ground  technique'  to
destroy  the  competition.....  IBM digs a big HOLE in the ground and
covers it with leaves. It then puts a big POT OF GOLD nearby. Then it
gives the call, 'Hey, look at all this gold, get over here fast.'  As
soon  as  the competitor approaches the pot, he falls into the pit"
                                                     - John C. Dvorak

------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users