pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
database copy and move
3+ messages / 3 participants
[nested] [flat]

* database copy and move
@ 2000-05-03 16:32  Todd Turner <tjturner@chpc.utah.edu>
  0 siblings, 1 reply; 3+ messages in thread

From: Todd Turner @ 2000-05-03 16:32 UTC (permalink / raw)
  To: pgsql-admin

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

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

* Re: database copy and move
@ 2000-05-03 17:23  bangh <banghe@baileylink.net>
  parent: Todd Turner <tjturner@chpc.utah.edu>
  0 siblings, 1 reply; 3+ messages in thread

From: bangh @ 2000-05-03 17:23 UTC (permalink / raw)
  To: Todd Turner <tjturner@chpc.utah.edu>; +Cc: pgsql-admin

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

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

* Re: database copy and move
@ 2000-05-03 17:26  Todd J. Turner <tjturner@db.chpc.utah.edu>
  parent: bangh <banghe@baileylink.net>
  0 siblings, 0 replies; 3+ messages in thread

From: Todd J. Turner @ 2000-05-03 17:26 UTC (permalink / raw)
  To: bangh <banghe@baileylink.net>; +Cc: pgsql-admin

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




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


end of thread, other threads:[~2000-05-03 17:26 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-05-03 16:32 database copy and move Todd Turner <tjturner@chpc.utah.edu>
2000-05-03 17:23 ` bangh <banghe@baileylink.net>
2000-05-03 17:26   ` Todd J. Turner <tjturner@db.chpc.utah.edu>

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