Re: restore challenge

From: Chris Browne <cbbrowne(at)acm(dot)org>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: restore challenge
Date: 2005-11-17 19:04:42
Message-ID: 60fypvgkol.fsf@dba2.int.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"codeWarrior" <gpatnude(at)hotmail(dot)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(at)~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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Magnus Hagander 2005-11-17 19:05:34 Re: [HACKERS] ERROR: could not read block
Previous Message Magnus Hagander 2005-11-17 18:56:21 Re: [HACKERS] ERROR: could not read block