From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-admin@postgresql.org
Subject: Re: create schedule job
Date: Tue, 30 Aug 2011 16:38:46 +0300
Message-ID: <201108301638.46538.achill@matrix.gatewaynet.com> (raw)
In-Reply-To: <CAC-Lqbrty-6zsvcUoF69mVa_FucRVRBNxGQYOw23bUi+QLg+Kw@mail.gmail.com>
References: <CAC-Lqbrty-6zsvcUoF69mVa_FucRVRBNxGQYOw23bUi+QLg+Kw@mail.gmail.com>
1st run the script by hand (maybe with -v) to see what is going wrong.
2nd use cron
Στις Tuesday 30 August 2011 16:29:32 ο/η Karuna Karpe έγραψε:
> Hello,
>
> 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 :
>
> #!/bin/bash
> #backup directory can be file server share that the PgAgent daemon account
> has access to
> BACKUPDIR="/opt/dailybackup"
> PGHOST="localhost"
> PGUSER="enterprisedb"
> PGBIN="/opt/PostgresPlus/9.0AS/bin"
> 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 >
> $BACKUPDIR/fullbackup-$themonth.sql.gz
>
> #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[@]}
> do
> $PGBIN/pg_dump -i -h $PGHOST -U $PGUSER -F c -b -v -f
> $BACKUPDIR/$db-$thedate.compressed $db
> done
>
> But this is not create backup file.
>
> So please give a solution for that.
>
> Regards,
> karuna karpe.
>
--
Achilleas Mantzios
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: achill@matrix.gatewaynet.com
Subject: Re: create schedule job
In-Reply-To: <201108301638.46538.achill@matrix.gatewaynet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox