From: Scott Marlowe <smarlowe@g2switchworks.com>
To: Pallav Kalva <pkalva@deg.cc>
Cc: pgsql-admin@postgresql.org
Subject: Re: Postgres 8.0 Backups
Date: Mon, 24 Jan 2005 11:09:25 -0600
Message-ID: <1106586565.16640.90.camel@state.g2switchworks.com> (raw)
In-Reply-To: <41F52694.1090309@deg.cc>
References: <41F52694.1090309@deg.cc>
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.
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: smarlowe@g2switchworks.com, pkalva@deg.cc
Subject: Re: Postgres 8.0 Backups
In-Reply-To: <1106586565.16640.90.camel@state.g2switchworks.com>
References: <41F52694.1090309@deg.cc> <1106586565.16640.90.camel@state.g2switchworks.com>
* 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