agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
From: Robert Patrick <Robert_Patrick@TIKA.NDIM.EDRC.CMU.EDU>
To: Peter Osterberg <ohb@dataphone.se>
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: Moving a database
Date: Tue, 07 Nov 1995 20:07:52 -0500
Message-ID: <199511080108.RAA00369@nobozo.CS.Berkeley.EDU> (raw)

> I had previoulsy my postgres-deamon running on a Linux-box. I did set up 
> the postgres deamon on a SS20 today and everything seems to work as it 
> should. I can create new DB's and so on. The problem comes when I try to 
> move my existing database to the SS20. I get PQExec errors when try to visit 
> the _moved_ database with 'monitor'. I moved the database by simply 
> copying all the old database files with ftp and cp. I understand that I 
> can't do like that. I also tryied to create an empty database with 
> createdb and the same name, and then ftp and cp the database-files. And 
> that didn't work either.
> I have the same version on both my machines, version 4.2.
> Is there anyway in which I can move the database between my computers.

The only way to do it is to use the "copy" command to copy each table
out of the old database to a file and that file back into the new database.
Postgres store the tables in a binary format and since Intel uses a
"little endian" representation and Sparcs use "big endian", you're
outta luck as far as a straight file transfer.  (You can actually move
database files back and forth between a sparc and an hp since they
have the same binary representation).

Robert

--
+------------------------------------------------------------------------+
| Robert Patrick (rp2y+@edrc.cmu.edu) Engineering Design Research Center |
| n-dim Group                                 Carnegie Mellon University |
| World Wide Web: http://tika.ndim.edrc.cmu.edu/~rp2y/Home.html          |
+------------------------------------------------------------------------+

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU".
   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================
              URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/



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 using the --to and --cc options:
  reply via email

  To: postgres@postgres.berkeley.edu
  Cc: Robert_Patrick@TIKA.NDIM.EDRC.CMU.EDU, ohb@dataphone.se
  Subject: Re: Moving a database
  In-Reply-To: <199511080108.RAA00369@nobozo.CS.Berkeley.EDU>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox