Received: from stine.vestdata.no (IDENT:0@stine.vestdata.no [195.204.68.10]) by hub.org (8.10.1/8.10.1) with ESMTP id e96C7kJ68854 for ; Fri, 6 Oct 2000 08:07:46 -0400 (EDT) Received: (from ragnark@localhost) by stine.vestdata.no (8.9.3/8.9.3) id OAA24321; Fri, 6 Oct 2000 14:07:29 +0200 Date: Fri, 6 Oct 2000 14:07:28 +0200 From: =?iso-8859-1?Q?Ragnar_Kj=F8rstad?= To: pgsql-admin Cc: pgsql-admin@postgresql.org Subject: Re: Re(2): Crontab and PostgreSQL Backup Message-ID: <20001006140728.A23936@vestdata.no> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 0.95.5i In-Reply-To: ; from pgsql-admin on Fri, Oct 06, 2000 at 07:48:03PM +0800 X-Archive-Number: 200010/31 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