pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
restore challenge
5+ messages / 5 participants
[nested] [flat]

* restore challenge
@ 2005-11-16 10:45 Yogvinder Singh <yogvinder@newgen.co.in>
  2005-11-17 15:36 ` Re: restore challenge codeWarrior <gpatnude@hotmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Yogvinder Singh @ 2005-11-16 10:45 UTC (permalink / raw)
  To: pgsql-admin

hi,
    I have the backup of the usr/local/pgsql/data folder
    can i use this to manually export all the databases to some other same version installation of postgres?
    if possible, how come...
    if not possible why ?
thnks in advance
yogi

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: restore challenge
  2005-11-16 10:45 restore challenge Yogvinder Singh <yogvinder@newgen.co.in>
@ 2005-11-17 15:36 ` codeWarrior <gpatnude@hotmail.com>
  2005-11-17 19:04   ` Re: restore challenge Chris Browne <cbbrowne@acm.org>
  0 siblings, 1 reply; 5+ messages in thread

From: codeWarrior @ 2005-11-17 15:36 UTC (permalink / raw)
  To: pgsql-admin

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...

""Yogvinder Singh"" <yogvinder@newgen.co.in> wrote in message 
news:012701c5ea9a$dbab31a0$5605a8c0@ng3054...
hi,
    I have the backup of the usr/local/pgsql/data folder
    can i use this to manually export all the databases to some other same 
version installation of postgres?
    if possible, how come...
    if not possible why ?
thnks in advance
yogi

Disclaimer :- This e-mail message including any attachment may contain 
confidential, proprietary or legally privileged information. It should not 
be used by who is not the original intended recipient. If you have 
erroneously received this message, you are notified that you are strictly 
prohibited from using, coping, altering or disclosing the content of this 
message. Please delete it immediately and notify the sender. Newgen Software 
Technologies Ltd and / or its subsidiary Companies accept no responsibility 
for loss or damage arising from the use of the information transmitted by 
this email including damage from virus and further acknowledges that any 
views expressed in this message are those of the individual sender and no 
binding nature of the message shall be implied or assumed unlessthe sender 
does so expressly with due authority of Newgen Software TechnologiesLtd and 
/ or its subsidiary Companies, as applicable. 





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: restore challenge
  2005-11-16 10:45 restore challenge Yogvinder Singh <yogvinder@newgen.co.in>
  2005-11-17 15:36 ` Re: restore challenge codeWarrior <gpatnude@hotmail.com>
@ 2005-11-17 19:04   ` Chris Browne <cbbrowne@acm.org>
  2005-11-17 21:24     ` Re: restore challenge Andrew Sullivan <ajs@crankycanuck.ca>
  0 siblings, 1 reply; 5+ messages in thread

From: Chris Browne @ 2005-11-17 19:04 UTC (permalink / raw)
  To: pgsql-admin

"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



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: restore challenge
  2005-11-16 10:45 restore challenge Yogvinder Singh <yogvinder@newgen.co.in>
  2005-11-17 15:36 ` Re: restore challenge codeWarrior <gpatnude@hotmail.com>
  2005-11-17 19:04   ` Re: restore challenge Chris Browne <cbbrowne@acm.org>
@ 2005-11-17 21:24     ` Andrew Sullivan <ajs@crankycanuck.ca>
  2005-11-18 02:58       ` Re: restore challenge Christopher Browne <cbbrowne@acm.org>
  0 siblings, 1 reply; 5+ messages in thread

From: Andrew Sullivan @ 2005-11-17 21:24 UTC (permalink / raw)
  To: pgsql-admin

On Thu, Nov 17, 2005 at 02:04:42PM -0500, Chris Browne wrote:
> 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.

It's also worth noting that you _really really_ want to test that
snapshotting capability.  I've heard some people grumble about "it
didn't work for me" or some such.  There are others who've reported
it works (and it ought to, if the snapshots work as advertised --
just be sure you know what the snapshots actually are).

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
In the future this spectacle of the middle classes shocking the avant-
garde will probably become the textbook definition of Postmodernism. 
                --Brad Holland



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: restore challenge
  2005-11-16 10:45 restore challenge Yogvinder Singh <yogvinder@newgen.co.in>
  2005-11-17 15:36 ` Re: restore challenge codeWarrior <gpatnude@hotmail.com>
  2005-11-17 19:04   ` Re: restore challenge Chris Browne <cbbrowne@acm.org>
  2005-11-17 21:24     ` Re: restore challenge Andrew Sullivan <ajs@crankycanuck.ca>
@ 2005-11-18 02:58       ` Christopher Browne <cbbrowne@acm.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Christopher Browne @ 2005-11-18 02:58 UTC (permalink / raw)
  To: pgsql-admin

> On Thu, Nov 17, 2005 at 02:04:42PM -0500, Chris Browne wrote:
>> 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.
>
> It's also worth noting that you _really really_ want to test that
> snapshotting capability.  I've heard some people grumble about "it
> didn't work for me" or some such.  There are others who've reported
> it works (and it ought to, if the snapshots work as advertised --
> just be sure you know what the snapshots actually are).

To add a grumble, of sorts...

People get all excited about separating WAL onto separate disk, to
improve performance.

Unfortunately, if you do that, that separates the database into two
portions, "splitting the atom," as it were.  You'll no longer be able
to get that atomic snapshot.  Oops.
-- 
output = reverse("moc.liamg" "@" "enworbbc")
http://linuxdatabases.info/info/spreadsheets.html
"I've seen  a look in dogs'  eyes, a quickly vanishing  look of amazed
contempt,  and I  am convinced  that basically  dogs think  humans are
nuts."  -- John Steinbeck



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2005-11-18 02:58 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-11-16 10:45 restore challenge Yogvinder Singh <yogvinder@newgen.co.in>
2005-11-17 15:36 ` codeWarrior <gpatnude@hotmail.com>
2005-11-17 19:04   ` Chris Browne <cbbrowne@acm.org>
2005-11-17 21:24     ` Andrew Sullivan <ajs@crankycanuck.ca>
2005-11-18 02:58       ` Christopher Browne <cbbrowne@acm.org>

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