Re: Online backups are failing

From: "Bhella Paramjeet-PFCW67" <PBhella(at)Motorola(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Cc: "Subbiah Stalin-XCGF84" <SSubbiah(at)Motorola(dot)com>
Subject: Re: Online backups are failing
Date: 2009-01-20 19:43:34
Message-ID: C84662912D280D4AB5C50100A100F0C503F4BBA1@ct11exm61.ds.mot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Forgot to mention one thing. Even though in the online backup script $?
did not return zero and I got the error "data dir copy failed" but the
PGDATA directory did get copied fine. The size of the PGDATA directory
and the copied PGDATA dir were same.

Here is the snippet of our online backup script

## put the database in backup mode
$PGSQL_HOME/bin/psql -d template1 -U postgres -e -f
$BACKUP_SQL/begin_backup.sql
>> $BACKUP_LOGS_DIR/$backup_log_filename

echo "Copying data dirs now..." >> $BACKUP_LOGS_DIR/$backup_log_filename
echo " " >> $BACKUP_LOGS_DIR/$backup_log_filename

## copy data directory into backup location including postgres.conf and
any soft
links used for tablespaces.
cp -r -P $PGDATA $BACKUP_HOME/a01_data.${TIMESTAMP}

if [ $? -eq 0 ]
then
echo "data dir copy of a01 is successful." >>
$BACKUP_LOGS_DIR/$backup_log_fi
lename
echo " " >> $BACKUP_LOGS_DIR/$backup_log_filename
else
echo "data dir copy of a01 failed." >>
$BACKUP_LOGS_DIR/$backup_log_filename
echo " " >> $BACKUP_LOGS_DIR/$backup_log_filename
fi

## get the database out of backup mode
$PGSQL_HOME/bin/psql -d template1 -U postgres -e -f
$BACKUP_SQL/end_backup.sql >
> $BACKUP_LOGS_DIR/$backup_log_filename

Thanks
Paramjeet kaur

-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Bhella
Paramjeet-PFCW67
Sent: Tuesday, January 20, 2009 11:22 AM
To: pgsql-admin(at)postgresql(dot)org
Cc: Subbiah Stalin-XCGF84
Subject: [ADMIN] Online backups are failing

Hi,

We are running into a problem where our online backups are failing
randomly. We are using postgres 8.2.7 and we are seeing this problem in
both Solaris and Linux platforms. Our online backup script copies the
PGDATA dir with the command "cp -r -P".

First we saw this problem on our postgres 8.2.7 database where we had
the "stats_block_level" parameter turned on in postgresql.conf file.
After I turned off stats_block_level parameter, our backups did not
fail.

Now we are seeing the problem of our online backups failing on our other
databases which are on postgres 8.2.7 and 8.1.13 and on these DB's the
stats_block_level parameter is turned off.

Has anyone else run into this problem? Any suggestions on how to resolve
this problem will be highly appreciated.

Thanks
Paramjeet Bhella

--
Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org) To make
changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Joshua D. Drake 2009-01-20 19:45:28 Re: Online backups are failing
Previous Message Bhella Paramjeet-PFCW67 2009-01-20 19:21:45 Online backups are failing