Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id E85762E0045; Thu, 22 Nov 2007 09:19:15 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 52416-06; Thu, 22 Nov 2007 09:19:04 -0400 (AST) Received: from mailhost.ics.forth.gr (mailhost.ics.forth.gr [139.91.157.55]) by postgresql.org (Postfix) with ESMTP id A9CF12E003C; Thu, 22 Nov 2007 09:19:11 -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 lAMDJ9aj018798; Thu, 22 Nov 2007 15:19:09 +0200 X-DKIM: Sendmail DKIM Filter v2.3.2 mailhost.ics.forth.gr lAMDJ9aj018798 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ics.forth.gr; s=mailhost; t=1195737549; bh=n+i1dL2XVmHF1wnaokNNRW9ZjEkE/ZPemEdisX 3qWw4=; 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=HEjHRPG0 tGpF+R5WmiT/rN0BEj+xLtdBhxoPMqYCtCkqibkPOTauWtPMGKA8eTrbt3DOKmYWPyl QXaQM84OxI+7gKFCgtvExEXPnn3q4teOrUPDAdKFiVxq4h/R8LRF5gXt82KcmE1H5kE L3yr+2z0RCWyRImyHzIpqKgs6KcMA= Received: from sappho.ics.forth.gr (unknown [127.0.0.1]) by mailhost.ics.forth.gr (Symantec Mail Security) with ESMTP id 5DBBF16C061; Thu, 22 Nov 2007 15:19:09 +0200 (EET) X-AuditID: 7f000001-a68c6bb000001a55-31-474581cd4aa3 Received: from SHADOWFAX (unknown [139.91.183.33]) by mailhost.ics.forth.gr (Symantec Mail Security) with ESMTP id F1D0F8E40FC; Thu, 22 Nov 2007 15:19:08 +0200 (EET) From: "Sorin N. Ciolofan" To: Cc: Subject: backup of postgres scheduled with cron Date: Thu, 22 Nov 2007 15:19:06 +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: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Thread-Index: Acgs9txSIu73kaGGQlqE/lL58W7OQgAEYfmg Message-Id: <20071122131908.F1D0F8E40FC@mailhost.ics.forth.gr> X-Brightmail-Tracker: AAAAAA== X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/191 X-Sequence-Number: 27434 Hello all! I've a small bash script backup.sh for creating dumps on my Postgre db: #!/bin/bash time=`date '+%d'-'%m'-'%y'` cd /home/swkm/services/test pg_dump mydb > mydb_dump_$time.out I've edited crontab and added a line: 00 4 * * * swkm /home/swkm/services/test/backup.sh to execute the backup.sh as user swkm daily at 4 am. The user swkm is the user I use to create backups manually. The script itself is executed fine if run manually but run on cron scheduler I got an mydb_dump_$time.out file empty (of 0 kb) Do you have any idea about what's wrong? Thanks Sorin