From: Werner Modenbach <modenbach@alc.de>
To: pgsql-admin@postgresql.org
Subject: pg_dumpall in crontab doesn't work
Date: Tue, 02 Jul 2002 08:47:34 +0200
Message-ID: <afriab$921$1@news.hub.org> (raw)
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 -
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: modenbach@alc.de
Subject: Re: pg_dumpall in crontab doesn't work
In-Reply-To: <afriab$921$1@news.hub.org>
References: <afriab$921$1@news.hub.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox