pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Browne <cbbrowne@acm.org>
To: pgsql-admin@postgresql.org
Subject: Re: restore challenge
Date: Thu, 17 Nov 2005 14:04:42 -0500
Message-ID: <60fypvgkol.fsf@dba2.int.libertyrms.com> (raw)
References: <012701c5ea9a$dbab31a0$5605a8c0@ng3054>
	<dli7ta$18ho$1@news.hub.org>

"codeWarrior" <gpatnude@hotmail.com> writes:
> it doesnt work that way.... this is postgreSQL -- a relational database..... 
> you can't just copy the data directory like you can with mySQL or DBase, or 
> BTrieve or any of the "old-school" databases... if you need to backup and 
> restore data you need to look at pg_dump and pg_dumpall and the import 
> statements in psql...

Actually, that's wrong.

You certainly *can* copy the set of data directories; there is no
particular magic here.

The data is stored as a set of files in a set of directories; for
there to be some other "magical something else" would seem very
strange.

What you generally can't do safely is to take a copy while the
postmaster is up and running, as you risk parts of the data not being
consistent with one another.

If your OS or disk hardware supports some sort of "snapshotting"
technology, so that you can grab a copy of the whole thing as an
instant atomic operation, that provides a way to grab a copy while
postmaster is running.  If not, then you have to take a copy while the
postmaster is shut down.

The resulting filesystem copy will only be compatible with the same
major version of PostgreSQL, and with versions running on the same
architecture, but that can still let it be useful.
-- 
(format nil "~S@~S" "cbbrowne" "ntlug.org")
http://cbbrowne.com/info/oses.html
">in your opinion which is the best programming tools ?
The human brain and a keyboard." -- Nathan Wagner



view thread (5+ messages)  latest in thread

Message-ID: <60fypvgkol.fsf@dba2.int.libertyrms.com>
Permalink:  ../60fypvgkol.fsf@dba2.int.libertyrms.com/
Also on:    postgresql.org/message-id/60fypvgkol.fsf@dba2.int.libertyrms.com

 · 

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: cbbrowne@acm.org
  Subject: Re: restore challenge
  In-Reply-To: <60fypvgkol.fsf@dba2.int.libertyrms.com>
  References: <012701c5ea9a$dbab31a0$5605a8c0@ng3054> <dli7ta$18ho$1@news.hub.org> <60fypvgkol.fsf@dba2.int.libertyrms.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