[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: RHDB restore procedure



On Friday 01 April 2005 08:28, Mike Kercher wrote:
> I recently inherited the task of restoring a database from rhdb2.1
> (postgres 7.2.3).  The backup was performed by running:

> pg_dump -U user database_name -f output_dump_file

> Now, I have a 1.9GB txt dump file, but am having a hard time restoring it
> back to postgres.

Yuck.  Not a pg_dumpall?

You'll have to recreate the database by hand, and recreate the user with all 
permissions by hand.  You'll then need to pipe the text through psql as if it 
were being typed as SQL DML.  Be sure to connect psql to the database you 
recreated.  Make sure the server RPM is installed.

In commands, that would be something like:
#service postgresql start (or service rhdb start)
#su postgres
$createuser user (answer the questions, allow the user to create databases)
$exit
# useradd user (if required)
#su user
$createdb database
$psql -d database -U user -f output_dump_file

Barring all else, ask your question on the pgsql-admin list at postgresql.org.  
Nice folks.

I are one (read the PostgreSQL RPM changelog).
-- 
Lamar Owen
Director of Information Technology
Pisgah Astronomical Research Institute
1 PARI Drive
Rosman, NC  28772
(828)862-5554
www.pari.edu


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]