pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ragnar Kjørstad <postgres@ragnark.vestdata.no>
To: pgsql-admin <pgsql-admin@fc.emc.com.ph>
Cc: pgsql-admin@postgresql.org
Subject: Re: Re(2): Crontab and PostgreSQL Backup
Date: Fri, 6 Oct 2000 14:07:28 +0200
Message-ID: <20001006140728.A23936@vestdata.no> (raw)
In-Reply-To: <fc.000f5672007249bd000f5672007249bd.7249f3@fc.emc.com.ph>
References: <fc.000f5672007249bd000f5672007249bd.7249f3@fc.emc.com.ph>

On Fri, Oct 06, 2000 at 07:48:03PM +0800, pgsql-admin wrote:
> you can also try this:

or:

#!/bin/bash
PREFIX=/directory
DATABASE=db
rm -f $PREFIX.last
pg_dump -d $DATABASE -f $PREFIX.last
ln -f $PREFIX.last $PREFIX.hour.`date +%H`
ln -f $PREFIX.last $PREFIX.day.`date +%d`
ln -f $PREFIX.last $PREFIX.month.`date +%Y%m`

Run this every hour, and $PREFIX will contain backups for every hour for
the last day, every day for the last month and one backup for every
month.


-- 
Ragnar Kjørstad
Modus Media



view thread (3+ messages)  latest in thread

Message-ID: <20001006140728.A23936@vestdata.no>
Permalink:  ../20001006140728.A23936@vestdata.no/
Also on:    postgresql.org/message-id/20001006140728.A23936@vestdata.no

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: postgres@ragnark.vestdata.no, pgsql-admin@fc.emc.com.ph
  Subject: Re: Crontab and PostgreSQL Backup
  In-Reply-To: <20001006140728.A23936@vestdata.no>
  References: <fc.000f5672007249bd000f5672007249bd.7249f3@fc.emc.com.ph> <20001006140728.A23936@vestdata.no>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox