Re: Re(2): Crontab and PostgreSQL Backup

From: Ragnar Kjørstad <postgres(at)ragnark(dot)vestdata(dot)no>
To: pgsql-admin <pgsql-admin(at)fc(dot)emc(dot)com(dot)ph>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Re(2): Crontab and PostgreSQL Backup
Date: 2000-10-06 12:07:28
Message-ID: 20001006140728.A23936@vestdata.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message pgsql-admin 2000-10-06 13:01:11 Re(2): backup large Pg databases with large objects
Previous Message pgsql-admin 2000-10-06 11:48:03 Re(2): Crontab and PostgreSQL Backup