Skip site navigation (1) Skip section navigation (2)

create schedule job

From: Karuna Karpe <karuna(dot)karpe(at)os3infotech(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: create schedule job
Date: 2011-08-30 13:29:32
Message-ID: (view raw or whole thread)
Lists: pgsql-admin

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, then
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 :

#backup directory can be file server share that the PgAgent daemon account
has access to
thedate=$(date +%Y-%m-%d-%H)
themonth=$(date +%Y-%m)

#Create a full backup of the server database
$PGBIN/pg_dumpall -h $PGHOST -U $PGUSER | gzip >

#put the names of the database you want to create an individual backup below
dbs=(edb bench_replication bench_parallel pgpool)

#iterate thru dbs in dbs array and backup each one
for db  in ${dbs[(at)]}
        $PGBIN/pg_dump -i -h $PGHOST -U $PGUSER -F c -b -v -f
$BACKUPDIR/$db-$thedate.compressed $db

But this is not create backup file.

So please give a solution for that.

karuna karpe.


pgsql-admin by date

Next:From: Achilleas MantziosDate: 2011-08-30 13:38:46
Subject: Re: create schedule job
Previous:From: Rural HunterDate: 2011-08-30 02:37:43
Subject: Re: plsql gets "out of memory"

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group