RE: The right direction for backups? - Mailing list pgsql-general

From James Hall
Subject RE: The right direction for backups?
Date
Msg-id DD6FD0C9668DD311AA040008C7566E8A0313E537@ntmailc.tandy.com
Whole thread Raw
In response to The right direction for backups?  (jeam@themail.com)
Responses sql question
List 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@themail.com [mailto:jeam@themail.com]
> Sent: Wednesday, July 12, 2000 4:05 PM
> To: pgsql-general@postgresql.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
>
>
>

pgsql-general by date:

Previous
From: jeam@themail.com
Date:
Subject: The right direction for backups?
Next
From: HomerWelch
Date:
Subject: Re: How to list and remove a user in postgres ?