Unix Technical Forum

restore challenge

This is a discussion on restore challenge within the pgsql Admins forums, part of the PostgreSQL category; --> hi, I have the backup of the usr/local/pgsql/data folder can i use this to manually export all the databases ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 06:29 AM
Yogvinder Singh
 
Posts: n/a
Default restore challenge

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 06:30 AM
codeWarrior
 
Posts: n/a
Default Re: restore challenge

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.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 06:30 AM
Chris Browne
 
Posts: n/a
Default Re: restore challenge

"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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 06:30 AM
Andrew Sullivan
 
Posts: n/a
Default Re: restore challenge

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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-10-2008, 06:30 AM
Christopher Browne
 
Posts: n/a
Default Re: restore challenge

> 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:08 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com