Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 6DE98B5DBFE for ; Tue, 30 Aug 2011 10:38:55 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 80488-03 for ; Tue, 30 Aug 2011 13:38:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by mail.postgresql.org (Postfix) with ESMTP id 9B602B5DBFB for ; Tue, 30 Aug 2011 10:38:47 -0300 (ADT) Received: from smadev.internal.net (localhost.internal.net [127.0.0.1]) by smadev.internal.net (8.14.2/8.14.2) with ESMTP id p7UDckGD079740 for ; Tue, 30 Aug 2011 16:38:46 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.14.2/8.14.2/Submit) id p7UDckGn079739 for pgsql-admin@postgresql.org; Tue, 30 Aug 2011 16:38:46 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: pgsql-admin@postgresql.org Subject: Re: create schedule job Date: Tue, 30 Aug 2011 16:38:46 +0300 User-Agent: KMail/1.9.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <201108301638.46538.achill@matrix.gatewaynet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.279 tagged_above=-10 required=5 tests=BAYES_00=-1.9, KHOP_DYNAMIC=0.73, RCVD_IN_BRBL_LASTEXT=1.449 X-Spam-Level: X-Archive-Number: 201108/235 X-Sequence-Number: 38222 1st run the script by hand (maybe with -v) to see what is going wrong. 2nd use cron =CE=A3=CF=84=CE=B9=CF=82 Tuesday 30 August 2011 16:29:32 =CE=BF/=CE=B7 Karu= na Karpe =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > Hello, >=20 > I am create one job using pgAgent in postgres studio. In that job i want= to > backup whole database every day. But when i check the backup location, t= hen > there is no any backup file created. I create on script and I give this > script location in the definition tab of step window. My script is > following : >=20 > #!/bin/bash > #backup directory can be file server share that the PgAgent daemon account > has access to > BACKUPDIR=3D"/opt/dailybackup" > PGHOST=3D"localhost" > PGUSER=3D"enterprisedb" > PGBIN=3D"/opt/PostgresPlus/9.0AS/bin" > thedate=3D$(date +%Y-%m-%d-%H) > themonth=3D$(date +%Y-%m) >=20 > #Create a full backup of the server database > $PGBIN/pg_dumpall -h $PGHOST -U $PGUSER | gzip > > $BACKUPDIR/fullbackup-$themonth.sql.gz >=20 > #put the names of the database you want to create an individual backup be= low > dbs=3D(edb bench_replication bench_parallel pgpool) >=20 > #iterate thru dbs in dbs array and backup each one > for db in ${dbs[@]} > do > $PGBIN/pg_dump -i -h $PGHOST -U $PGUSER -F c -b -v -f > $BACKUPDIR/$db-$thedate.compressed $db > done >=20 > But this is not create backup file. >=20 > So please give a solution for that. >=20 > Regards, > karuna karpe. >=20 =2D-=20 Achilleas Mantzios