Thread: Loading a dumped databse from cd

Loading a dumped databse from cd

From
Paul Mc Gee
Date:
hi everybody
i have postgresql installed on my red hat linux
machine and i want to load up a dumped postgresql
database which i have on cdrom. does anyone know how i
could do this?
thanks
paul

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

Re: Loading a dumped databse from cd

From
Richard Huxton
Date:
On Wednesday 07 January 2004 04:38, Paul Mc Gee wrote:
> hi everybody
> i have postgresql installed on my red hat linux
> machine and i want to load up a dumped postgresql
> database which i have on cdrom. does anyone know how i
> could do this?

You probably want to read up on "pg_restore" (and perhaps "pg_dump") - you can
find information in the postgresql docs on your installation, at
http://www.postgresql.org/docs/ or with "man pg_restore".

It's difficult to say much more without knowing your situation. Some things
you might want to consider:
Does the database and its structure (tables etc) already exist, do you just
want to restore the data?
Does the user for this database already exist?
Does the database (empty) already exist?

These will help you decide what options to select for pg_restore. If you don't
know exactly what you've got then "pg_restore --list <myfile>" is probably a
good place to start.
--
  Richard Huxton
  Archonet Ltd