RE: The right direction for backups?

From: James Hall <James(dot)Hall(at)RadioShack(dot)com>
To: "'jeam(at)themail(dot)com'" <jeam(at)themail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: RE: The right direction for backups?
Date: 2000-07-12 21:19:27
Message-ID: DD6FD0C9668DD311AA040008C7566E8A0313E537@ntmailc.tandy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I use the following Perl script: (it utilizes pg_dump instead of
pg_dumpall)- you may need to change the directory info based on your
install.

Hope it helps...
James Hall

======================================
--------start code---------------
#!/bin/sh

PSQL=/usr/bin/psql
DUMP=/usr/bin/pg_dump
PREFIX=`date +%j`
BACKUP_DIR=/data/pgsql/data

Databases=`$PSQL -tq -d template1 -c "select datname from pg_database"`
renice 20 $$

echo Backup started ...
for db in `echo $Databases`
do

echo "time: `date +%H%M%S` - Backup of $db in progress ..."
$DUMP -D $db > $BACKUP_DIR/$PREFIX.$db
echo "time: `date +%H%M%S` - Backup of $db finished ..."
done
echo Backup finished ...
-------end code-------------------

> -----Original Message-----
> From: jeam(at)themail(dot)com [mailto:jeam(at)themail(dot)com]
> Sent: Wednesday, July 12, 2000 4:05 PM
> To: pgsql-general(at)postgresql(dot)org
> Subject: [GENERAL] The right direction for backups?
>
>
>
> Hi there,
>
> I need to implement a routine backup procedure for PostgreSQL
> 6.5 under RedHat 6. I would like to save and restore a
> database complete with all its elements (tables, indexes,
> etc), all user privileges and group information.
>
> Can someone please point me in the right direction?
> Any help is much appreciated.
>
> Thanks in advance,
>
> J. Alvarez.
> __________________________________________________________________
> Make A Buck Or Two @ TheMail.com - Free Internet Email
> Sign-up today at http://www.themail.com/ref.htm?ref=908313
>
>
>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message KMiller 2000-07-12 21:38:59 Having a problem compiling plperl.
Previous Message Travis Bauer 2000-07-12 21:05:23 Re: binary data ...