From tjturner@chpc.utah.edu Wed May 3 16:38:02 2000 Received: from mrelay.inscc.utah.edu (mrelay.inscc.utah.edu [155.101.3.60]) by hub.org (8.9.3/8.9.3) with ESMTP id MAA37221 for ; Wed, 3 May 2000 12:38:02 -0400 (EDT) (envelope-from tjturner@chpc.utah.edu) Received: from mail.inscc.utah.edu (mail.inscc.utah.edu [155.101.3.59]) by mrelay.inscc.utah.edu (8.9.2/8.9.2) with ESMTP id KAA12552 for ; Wed, 3 May 2000 10:38:00 -0600 (MDT) Received: from chpc.utah.edu (venus.chpc.utah.edu [155.101.16.113]) by mail.inscc.utah.edu with ESMTP id KAA24552 for ; Wed, 3 May 2000 10:38:00 -0600 (MDT) Message-ID: <391054B9.3DF7A929@chpc.utah.edu> Date: Wed, 03 May 2000 10:32:57 -0600 From: Todd Turner X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: database copy and move Content-Type: multipart/alternative; boundary="------------EECF13D71068A791CB8583A9" X-Archive-Number: 200005/18 --------------EECF13D71068A791CB8583A9 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello; http://www.postgresql.org/doxlist.html noticed there isn't any info in copy the postgres data - database directory and files and setting up the same database on another machine. I've tried using createdb then pgaccess to import tables. Using psql the tables are found but the data isn't. When importing a table I'm getting the error Error executing query. Copy subreservation From "subreservation1' PostgresSQL error message: Error: CopyFrom: Fail to add null value in not null attribute username PostgresSQL status:PGRES_FATAL_ERR OR Also ERROR: Bad int8 external representation for another copy and somtimes I'm getting you can not copy a duplicate value into a duplicate key message. I'd appreciate if someone could turn me on to why I'm getting these messages and possibly how you can move a database to another machine. tjt: -- =========================================== Todd Turner - tjturner@chpc.utah.edu (801 - 585-1266) Center for High Performance Computing University of Utah =========================================== --------------EECF13D71068A791CB8583A9 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Hello;

http://www.postgresql.org/doxlist.html noticed there isn't any info in copy the postgres data - database directory and files and setting up the same database on another machine.  I've tried using createdb then pgaccess to import tables.  Using psql the tables are found but the data isn't.

When importing a table I'm getting the error Error executing query.

Copy subreservation From "subreservation1'

PostgresSQL error message:
Error: CopyFrom: Fail to add null value in not null attribute username

PostgresSQL
status:PGRES_FATAL_ERR
OR

Also ERROR: Bad int8 external representation for another copy and somtimes I'm getting you can not copy a duplicate value into a duplicate key message.

I'd appreciate if someone could turn me on to why I'm getting these messages and possibly how you can move a database to another machine.

tjt:

-- 
===========================================
Todd Turner - tjturner@chpc.utah.edu
(801 - 585-1266)
Center for High Performance Computing
University of Utah
===========================================
  --------------EECF13D71068A791CB8583A9-- From banghe@baileylink.net Wed May 3 17:16:18 2000 Received: from mocha2.baileylink.net (IDENT:qmailr@mocha2.baileylink.net [63.71.213.28]) by hub.org (8.9.3/8.9.3) with SMTP id NAA16681 for ; Wed, 3 May 2000 13:16:18 -0400 (EDT) (envelope-from banghe@baileylink.net) Received: (qmail 30802 invoked from network); 3 May 2000 17:16:17 -0000 Received: from xindu.baileylink.net (HELO baileylink.net) (63.71.216.27) by mocha2.baileylink.net with SMTP; 3 May 2000 17:16:17 -0000 Message-ID: <3910609B.E7ED94A6@baileylink.net> Date: Wed, 03 May 2000 12:23:40 -0500 From: bangh X-Mailer: Mozilla 4.7 [en] (WinNT; U) X-Accept-Language: en,zh,zh-CN,zh-TW MIME-Version: 1.0 To: Todd Turner CC: pgsql-admin@postgresql.org Subject: Re: database copy and move References: <391054B9.3DF7A929@chpc.utah.edu> Content-Type: multipart/alternative; boundary="------------E37DD99D6BD2DEFC33424CFC" X-Archive-Number: 200005/19 --------------E37DD99D6BD2DEFC33424CFC Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 7bit You need to use pg_dump. pg_dump old_db_name > old.dump Then send old.dump to the machine you want, and use commands on that machine: createDB new_db_name cat old.dump | psql new_db_name Note: new_db_name can be the same as old_db_name here. -- Banghe Todd Turner wrote: > Hello; > > http://www.postgresql.org/doxlist.html noticed there isn't any info in > copy the postgres data - database directory and files and setting up > the same database on another machine. I've tried using createdb then > pgaccess to import tables. Using psql the tables are found but the > data isn't. > > When importing a table I'm getting the error Error executing query. > > Copy subreservation From "subreservation1' > > PostgresSQL error message: > Error: CopyFrom: Fail to add null value in not null attribute username > > PostgresSQL > status:PGRES_FATAL_ERR > OR > > Also ERROR: Bad int8 external representation for another copy and > somtimes I'm getting you can not copy a duplicate value into a > duplicate key message. > > I'd appreciate if someone could turn me on to why I'm getting these > messages and possibly how you can move a database to another machine. > > tjt: > > -- > =========================================== > Todd Turner - tjturner@chpc.utah.edu > (801 - 585-1266) > Center for High Performance Computing > University of Utah > =========================================== > > --------------E37DD99D6BD2DEFC33424CFC Content-Type: text/html; charset=gb2312 Content-Transfer-Encoding: 7bit You need to use pg_dump.

pg_dump old_db_name > old.dump

Then send old.dump to the machine you want, and use commands on that machine:
createDB new_db_name
cat old.dump | psql new_db_name

Note: new_db_name can be the same as old_db_name here.

--
Banghe

Todd Turner wrote:

Hello;

http://www.postgresql.org/doxlist.html noticed there isn't any info in copy the postgres data - database directory and files and setting up the same database on another machine.  I've tried using createdb then pgaccess to import tables.  Using psql the tables are found but the data isn't.

When importing a table I'm getting the error Error executing query.

Copy subreservation From "subreservation1'

PostgresSQL error message:
Error: CopyFrom: Fail to add null value in not null attribute username

PostgresSQL
status:PGRES_FATAL_ERR
OR

Also ERROR: Bad int8 external representation for another copy and somtimes I'm getting you can not copy a duplicate value into a duplicate key message.

I'd appreciate if someone could turn me on to why I'm getting these messages and possibly how you can move a database to another machine.

tjt:

-- 
===========================================
Todd Turner - tjturner@chpc.utah.edu
(801 - 585-1266)
Center for High Performance Computing
University of Utah
===========================================
 
--------------E37DD99D6BD2DEFC33424CFC-- From tjturner@db.chpc.utah.edu Wed May 3 17:26:59 2000 Received: from db.chpc.utah.edu (db.chpc.utah.edu [155.101.16.23]) by hub.org (8.9.3/8.9.3) with ESMTP id NAA30442 for ; Wed, 3 May 2000 13:26:59 -0400 (EDT) (envelope-from tjturner@db.chpc.utah.edu) Received: by db.chpc.utah.edu (Mailer, from userid 2015029) id 1FF1120E6; Wed, 3 May 2000 11:26:59 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by db.chpc.utah.edu (Mailer) with SMTP id 0BAC4207F; Wed, 3 May 2000 11:26:59 -0600 (MDT) Date: Wed, 3 May 2000 11:26:58 -0600 (MDT) From: "Todd J. Turner" To: bangh Cc: pgsql-admin@postgresql.org Subject: Re: database copy and move In-Reply-To: <3910609B.E7ED94A6@baileylink.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200005/20 Thanks much for the quick info that's what I needed. tjt: ==================================================== Todd Turner tjturner@chpc.utah.edu 801-585-1266 Center for High Performance Computing University of Utah ==================================================== On Wed, 3 May 2000, bangh wrote: > You need to use pg_dump. > > pg_dump old_db_name > old.dump > > Then send old.dump to the machine you want, and use commands on that > machine: > createDB new_db_name > cat old.dump | psql new_db_name > > Note: new_db_name can be the same as old_db_name here. > > -- > Banghe > > Todd Turner wrote: > > > Hello; > > > > http://www.postgresql.org/doxlist.html noticed there isn't any info in > > copy the postgres data - database directory and files and setting up > > the same database on another machine. I've tried using createdb then > > pgaccess to import tables. Using psql the tables are found but the > > data isn't. > > > > When importing a table I'm getting the error Error executing query. > > > > Copy subreservation From "subreservation1' > > > > PostgresSQL error message: > > Error: CopyFrom: Fail to add null value in not null attribute username > > > > PostgresSQL > > status:PGRES_FATAL_ERR > > OR > > > > Also ERROR: Bad int8 external representation for another copy and > > somtimes I'm getting you can not copy a duplicate value into a > > duplicate key message. > > > > I'd appreciate if someone could turn me on to why I'm getting these > > messages and possibly how you can move a database to another machine. > > > > tjt: > > > > -- > > =========================================== > > Todd Turner - tjturner@chpc.utah.edu > > (801 - 585-1266) > > Center for High Performance Computing > > University of Utah > > =========================================== > > > > >