Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id A32672E0042; Thu, 22 Nov 2007 10:15:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 97577-03; Thu, 22 Nov 2007 10:15:16 -0400 (AST) Received: from mailhost.ics.forth.gr (mailhost.ics.forth.gr [139.91.157.55]) by postgresql.org (Postfix) with ESMTP id 0278E2E003A; Thu, 22 Nov 2007 10:15:15 -0400 (AST) Received: from mailhost.ics.forth.gr (mailhost.ics.forth.gr [139.91.157.55] (may be forged)) by mailhost.ics.forth.gr (8.13.8/ICS-FORTH/V10-Server-2.0.0) with ESMTP id lAMEFEXI007972; Thu, 22 Nov 2007 16:15:14 +0200 X-DKIM: Sendmail DKIM Filter v2.3.2 mailhost.ics.forth.gr lAMEFEXI007972 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ics.forth.gr; s=mailhost; t=1195740914; bh=1zyWDe/JeAhwp/gOTPfoncxrWAdvRUUfcrnoPB kEcUc=; h=X-AuditID:From:To:Cc:Subject:Date:MIME-Version: Content-Type:Content-Transfer-Encoding:X-Mailer:In-Reply-To: X-MimeOLE:Thread-Index:Message-Id:X-Brightmail-Tracker; b=bjGTVh1t 9KsFS32BYBu6PBBUMRe/TLg/fH6cpgij5y7vpbmJ+CaTUw+gSEvuL7Pf3xfMaT8plzW PPBDdPnuccfUhTvOkmJtjZjIqHOyOYNwCdjdCWsBUPhsG+h8RRwlIRez7PE51JUh1sq 9pkVHeqWjwGwkAcO6f7xrDT6uVpmk= Received: from sappho.ics.forth.gr (unknown [127.0.0.1]) by mailhost.ics.forth.gr (Symantec Mail Security) with ESMTP id 21CB416C061; Thu, 22 Nov 2007 16:15:14 +0200 (EET) X-AuditID: 7f000001-a86c9bb000001a55-9e-47458ef1875c Received: from SHADOWFAX (unknown [139.91.183.33]) by mailhost.ics.forth.gr (Symantec Mail Security) with ESMTP id B6F2E8E40FC; Thu, 22 Nov 2007 16:15:13 +0200 (EET) From: "Sorin N. Ciolofan" To: "'Frank Wittig'" Cc: , Subject: Re: [GENERAL] backup of postgres scheduled with cron Date: Thu, 22 Nov 2007 16:15:10 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: <47458B84.7000503@weisshuhn.de> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Thread-Index: AcgtEUZ3fhQ32ED2TGef9h3gU7c1ugAACJ7g Message-Id: <20071122141513.B6F2E8E40FC@mailhost.ics.forth.gr> X-Brightmail-Tracker: AAAAAA== X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/199 X-Sequence-Number: 27442 Thank you all, Yes, I used the absolute path in my script and now works ok :-) Thank you again Sorin -----Original Message----- From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Frank Wittig Sent: Thursday, November 22, 2007 4:01 PM To: Sorin N. Ciolofan Cc: pgsql-admin@postgresql.org; pgsql-general@postgresql.org Subject: Re: [GENERAL] backup of postgres scheduled with cron Hello Sorin! Sorin N. Ciolofan wrote: > #!/bin/bash > time=`date '+%d'-'%m'-'%y'` > cd /home/swkm/services/test > pg_dump mydb > mydb_dump_$time.out You should output STDERR to some error logfile or set MAILTO in your crontab. I guess you then would have seen an error message saying that pg_dump was not found because cron doesn't load the users environment and therefore PATH variable isn't set. I suggest you call pg_dump in your script by absolute path. Greetings, Frank Wittig