Re: database backup

From: tony <tony(at)animaproductions(dot)com>
To: Josh Jore <josh(at)greentechnologist(dot)org>
Cc: postgres list <pgsql-general(at)postgresql(dot)org>
Subject: Re: database backup
Date: 2002-07-08 07:58:26
Message-ID: 1026115106.2297.12.camel@vaio
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, 2002-07-07 at 12:39, Josh Jore wrote:
> Oh heck yeah. So here's a script for you (I wrote it mostly in the mail
> client so you have to do your own testing). Now schedule that in cron via
> a line like:
Thanks Josh.

Inspiring myself from that I split the task into three cron jobs and am
using mutt rather than perl.

#!/bin/sh

SENDTO=tony(at)animaproductions(dot)com
SUBJECT="Base de données - sauvegarde"
ATTFILE=f3c.out.bz2
TXTFILE="daily backup of your database"

# bzip it and mail it
cd /my/directory/path
bzip2 -9 f3c.out
mutt -a $ATTFILE -s "$SUBJECT" $SENDTO < $TXTFILE

I dump the database to f3c.out every day just after the end of the
working day, I mail it later and then I delete the dump the next day
before dumping again. This way I can get the dump file myself if I need
to by scp (I really don't need a copy myself).

The versioning of the database backup and getting it on a CD from time
to time is left to the client.

http://www3.primushost.com/~kylet/unix-att.html

Has all sorts of scripts for attaching stuff to e-mail

Thanks again

Cheers

Tony
--
RedHat Linux on Sony Vaio C1XD/S
http://www.animaproductions.com/linux2.html
Macromedia UltraDev with PostgreSQL
http://www.animaproductions.com/ultra.html

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Michel POURE 2002-07-08 08:50:16 Re: Performance of ODBC-Driver /w IIS5.0/ColdFusion
Previous Message Adrian 'Dagurashibanipal' von Bidder 2002-07-08 07:34:19 Re: PostgreSQL vs Postgres