Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 1707B475970 for ; Tue, 2 Jul 2002 02:49:26 -0400 (EDT) Mailbox-Line: From modenbach@alc.de Tue Jul 2 02:49:26 2002 Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 25F4F47596E for ; Tue, 2 Jul 2002 02:48:23 -0400 (EDT) Received: by news.hub.org (Postfix, from userid 8) id C3FEE38191C; Tue, 2 Jul 2002 02:47:39 -0400 (EDT) From: Werner Modenbach X-Newsgroups: comp.databases.postgresql.admin Subject: pg_dumpall in crontab doesn't work Date: Tue, 02 Jul 2002 08:47:34 +0200 Organization: ALC Computertechnik GmbH Lines: 39 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: news@hub.org User-Agent: KNode/0.7.1 To: pgsql-admin@postgresql.org X-Spam-Status: No, hits=3.0 required=5.0 tests=DOUBLE_CAPSWORD,UPPERCASE_25_50 version=2.30 X-Spam-Level: *** X-Archive-Number: 200207/9 X-Sequence-Number: 4696 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 -