PDA

View Full Version : restore a db on a new machine



runhot
03-15-2010, 12:43 PM
im following the instructions in the faq to restore a previously backed up db.

the faq states that the restore may end with an error, but that it will be fine.

this is not the case for me.

after an extended period of hanging during the restore, windows7 says it wants to find a solution to the non responsive program. im given the option to 'cancel' which terminates pgadmin.

the database has not been restored.

i've also tried letting it hang, and hoping that windows doesnt close it down, but end up getting a pgadmin error.

in this instance, the database was not restored either.

runhot
03-15-2010, 06:39 PM
the error says:



pg_dump/pg_restore/pg_dumpall - backup and restore PostgreSQL databases has stopped working

A problem casued the program to stop working correctly. Windows will close the program and notify you if a solution is available.


There is a button that says "close program"

but when I click it, pgadmin doesnt close.

it goes back to the pgadmin popout titled "Restore Database 'database name'"
it shows the messages tab, which has the following text in it:



D:\PostgreSQL\bin\pg_restore.exe -h localhost -p 5432 -U postgres -d "LifetimeDB" -v "C:\Users\Matt\Desktop\lifetimedb3-14-10.backup"
pg_restore: connecting to database for restore
pg_restore: creating SCHEMA public
pg_restore: creating COMMENT SCHEMA public
pg_restore: creating PROCEDURAL LANGUAGE plpgsql
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 421; 2612 16386 PROCEDURAL LANGUAGE plpgsql postgres
pg_restore: [archiver (db)] could not execute query: ERROR: language "plpgsql" already exists
Command was:
CREATE PROCEDURAL LANGUAGE plpgsql;
pg_restore: creating TYPE responetype3_month_response
pg_restore: creating TYPE responetype3_response
pg_restore: creating FUNCTION getmatchingcompiledplayerresults(integer, integer, timestamp without time zone, timestamp without time zone, integer[])
pg_restore: creating FUNCTION getmatchingcompiledplayerresults_month(integer, integer, integer, integer, integer[])
pg_restore: creating FUNCTION getwinningplayerjoincashver2(integer)
pg_restore: creating FUNCTION getwinningplayerjointourneyver2(integer)
pg_restore: creating TABLE actiontypes
pg_restore: creating TABLE aliases
pg_restore: creating TABLE allinsituations
pg_restore: creating TABLE allinsituations_hero
pg_restore: creating TABLE bonuses
pg_restore: creating SEQUENCE bonuses_bonus_id_seq
pg_restore: creating SEQUENCE OWNED BY bonuses_bonus_id_seq
pg_restore: executing SEQUENCE SET bonuses_bonus_id_seq
pg_restore: creating TABLE compiledplayerresults
pg_restore: creating TABLE compiledplayerresults_month
pg_restore: creating TABLE compiledplayerresultspositionaction
pg_restore: creating TABLE compiledplayerresultspositionaction_month
pg_restore: creating TABLE compiledresults
pg_restore: creating SEQUENCE compiledresults_compiledplayerresults_id_seq
pg_restore: creating SEQUENCE OWNED BY compiledresults_compiledplayerresults_id_seq
pg_restore: executing SEQUENCE SET compiledresults_compiledplayerresults_id_seq
pg_restore: creating TABLE compiledresults_month
pg_restore: creating SEQUENCE compiledresults_month_compiledplayerresults_id_seq
pg_restore: creating SEQUENCE OWNED BY compiledresults_month_compiledplayerresults_id_seq
pg_restore: executing SEQUENCE SET compiledresults_month_compiledplayerresults_id_seq
pg_restore: creating TABLE currency
pg_restore: creating TABLE gametypes
pg_restore: creating SEQUENCE gametypes_gametype_id_seq
pg_restore: creating SEQUENCE OWNED BY gametypes_gametype_id_seq
pg_restore: executing SEQUENCE SET gametypes_gametype_id_seq
pg_restore: creating TABLE handhistories
pg_restore: creating TABLE hemplayernotes
pg_restore: creating SEQUENCE hemplayernotes_note_id_seq
pg_restore: creating SEQUENCE OWNED BY hemplayernotes_note_id_seq
pg_restore: executing SEQUENCE SET hemplayernotes_note_id_seq
pg_restore: creating TABLE holecards
pg_restore: creating TABLE importedfiles
pg_restore: creating SEQUENCE importedfiles_importedfile_id_seq
pg_restore: creating SEQUENCE OWNED BY importedfiles_importedfile_id_seq
pg_restore: executing SEQUENCE SET importedfiles_importedfile_id_seq
pg_restore: creating TABLE manuallyenteredsession
pg_restore: creating SEQUENCE manuallyenteredsession_manuallyenteredsession_id_s eq
pg_restore: creating SEQUENCE OWNED BY manuallyenteredsession_manuallyenteredsession_id_s eq
pg_restore: executing SEQUENCE SET manuallyenteredsession_manuallyenteredsession_id_s eq
pg_restore: creating TABLE optimizedplayers
pg_restore: creating TABLE playerhandscashkeycolumns
pg_restore: creating TABLE playerhandscashkeycolumns_hero
pg_restore: creating TABLE playerhandscashmisc
pg_restore: creating TABLE playerhandscashmisc_hero
pg_restore: creating TABLE playerhandsflop
pg_restore: creating TABLE playerhandsflop_hero
pg_restore: creating TABLE playerhandsriver
pg_restore: creating TABLE playerhandsriver_hero
pg_restore: creating TABLE playerhandstourneykeycolumns
pg_restore: creating TABLE playerhandstourneykeycolumns_hero
pg_restore: creating TABLE playerhandstourneymisc
pg_restore: creating TABLE playerhandstourneymisc_hero
pg_restore: creating TABLE playerhandsturn
pg_restore: creating TABLE playerhandsturn_hero
pg_restore: creating TABLE players
pg_restore:
Process returned exit code 255.


I click cancel, as to not attempt the same restore. and pdadmin seems to be working fine. i close it down, load up HEM, and am able to connect to the restored database.

However, none of my hands are there. the database is there, but its seemingly empty, with no players in it at all.

this is after letting the restore process was running for approx. 1 hour.

fozzy71
03-15-2010, 08:16 PM
It did not restore properly. Are you using the exact same version of PostgreSQL? Was your old PC W7 also?

Chances are you will end up having to create a new DB and import your original/archived hands.