Re: running pg_dump via pgAgent

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: <menge00(at)myway(dot)com>, <pgadmin-support(at)postgresql(dot)org>
Subject: Re: running pg_dump via pgAgent
Date: 2006-01-30 09:07:22
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E40103DC42@ratbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support


From: pgadmin-support-owner(at)postgresql(dot)org
[mailto:pgadmin-support-owner(at)postgresql(dot)org] On Behalf Of Che
Sent: 28 January 2006 17:52
To: pgadmin-support(at)postgresql(dot)org#
Subject: [pgadmin-support] running pg_dump via pgAgent


> Hi,

Hi,

> I am trying to use pgAgent to automatically backup my database
> once a day. Wouldn't this be the most common use of pgAgent?

It's not one I considered when I finished writing it, but it does seem
perfectly reasonable.

> I have successfully installed pgAgent, and it runs jobs ok.
> However, I'm running into problems when I set up a job to run
> a "batch" step with the following definition:
>
> pg_dump -f c:\temp\dump.dat -U postgres test
>
> It starts the job, and the statistics for the step shows it is running
(I can also see in my
> task manager that pg_dump is running) ... but it never stops!

Hm, I've just tried it here and it worked perfectly. The only real
difference that I can see was that I used the full path to pg_dump:

"C:\Program Files\PostgreSQL\8.1\bin\pg_dump" -f c:\temp\dump.dat -U
postgres test

Please check that libpq.dll and whatever dependencies the Pervasive
build of it may have are in the same directory as pg_dump, and please
try specifying the full path to pg_dump. Also, please make sure that the
Windows postgres user has write permissions on the c:\temp directory.

Another thought that just crossed my mind - perhaps pg_dump is prompting
for a password (which pgAgent will never enter of course). Please check
that your postgres account has a pgpass.conf file configured to allow
access to the test database, or that pg_hba.conf has an appropriate
trust entry.

Regards, Dave.

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2006-01-30 09:27:04 Re: pgadmin3-1.4.1.tar does not contain files required for building in Windows
Previous Message Andrus Moor 2006-01-29 22:01:44 Data loss on insert error