This is simple, but it's what I use to do my daily dumps (run from
crontab) -- I took out some stuff specific to my application..Replace
database with the name of the database..
#!/bin/sh
pgpath=/usr/local/pgsql/bin
homepath=/home/postgres
backup=/usr/local/pgsql/backup
today=`date "+%Y%m%d-%H%M%S"`
$pgpath/pg_dump database > $backup/database${today}dump
/bin/gzip $backup/database${today}dump
----- Original Message -----
From: "Matt Friedman" <matt@daart.ca>
To: <pgsql-general@postgresql.org>
Sent: Friday, February 02, 2001 7:53 PM
Subject: pg_dump shell or php?
Any one written a shell or php script that runs pg_dump on a db say everyday
or something?
Any suggestions?
thanks,
Matt Friedman