Thread: 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
thnks in advance
yogi
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.
"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
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
> 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