Skip site navigation (1) Skip section navigation (2)

Re: Postgres 8.0 Backups

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Pallav Kalva <pkalva(at)deg(dot)cc>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Postgres 8.0 Backups
Date: 2005-01-24 17:09:25
Message-ID: 1106586565.16640.90.camel@state.g2switchworks.com (view raw or flat)
Thread:
Lists: pgsql-admin
On Mon, 2005-01-24 at 10:47, Pallav Kalva wrote:
> Hi Everybody,
> 
>     I am working on a backup script for Postgres 8.0 online backups and 
> since i have to copy the whole pgdata directory , i am wondering after i 
> copy the pgdata directory can I run gzip or tar on the data directory ? 
> is it safe to do gzip or tar and I can safely restore the backups later ?

Yes, however, you may have some issues to deal with.

Generally speaking, file system level backups are not the best way to
backup postgresql, since they require either shutting down the server or
using a snapshot file system to get a coherent backup.  File system
backups taken by normal copy / tar during database operation may result
in backups that don't work when you need them to.

pg_dump is generally the better way to back things up, and with the
right switches will create a Z compressed tar file automagically for
you.

In response to

Responses

pgsql-admin by date

Next:From: Scott MarloweDate: 2005-01-24 17:12:22
Subject: Re: benchmarks with pgbench
Previous:From: Kavan, Dan (IMS)Date: 2005-01-24 16:48:27
Subject: benchmarks with pgbench

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group