pg_dumpall in crontab doesn't work

From: Werner Modenbach <modenbach(at)alc(dot)de>
To: pgsql-admin(at)postgresql(dot)org
Subject: pg_dumpall in crontab doesn't work
Date: 2002-07-02 06:47:34
Message-ID: afriab$921$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I'm doing some backup action for my database using crontab. Unfortunately
the following entry doesn't work and I can't figure out the problem:
----------------------------- /etc/crontab ---------------------------
05 22 * * 1-5 postgres /usr/bin/pg_dumpall -D >
/disks/postgres/db.pg_dumpall
----------------------------------------------------------------------

The message I get is:

---------------------------- stderr ----------------------------------
connected to template1...
/usr/bin/pg_dumpall: 0: Bad file descriptor
----------------------------------------------------------------------

The outputfile looks like:

----------------------- the output file ------------------------------
--
-- pg_dumpall (7.2) -D
--
\connect template1
DELETE FROM pg_shadow WHERE usesysid <> (SELECT datdba FROM pg_database
WHERE datname = 'template0');

CREATE USER "werner" WITH SYSID 100 CREATEDB CREATEUSER;
CREATE USER "martin" WITH SYSID 101 NOCREATEDB NOCREATEUSER;
CREATE USER "juergen" WITH SYSID 102 CREATEDB NOCREATEUSER;
CREATE USER "www" WITH SYSID 103 NOCREATEDB NOCREATEUSER;
CREATE USER "procad" WITH SYSID 99 NOCREATEDB NOCREATEUSER;

DELETE FROM pg_group;
----------------------------------------------------------------------

That's all. No databases dumped. Calling pg_dumpall manually works fine.
Whe is the problem? Any hints?

- Werner -

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Simeone, Mario 2002-07-02 07:03:23
Previous Message Alfred Anzlovar 2002-07-02 03:50:14 Re: Authentication in batch processing