PDA

View Full Version : Error Restoring Database



Ahem
08-16-2008, 12:28 PM
I recently got a new hard drive. I uninstalled postgresql after making a backup of the HEM database. I then installed new version 8.3 to the new hard drive and attempted to restore the backed up database.

Everything seems to be going along fine then after quite a while I get the following error message at the end of the Restore Database window after many lines of what looks like successful processing.

pg_restore: [custom archiver] could not uncompress data: incorrect data check
pg_restore: *** aborted because of error

Process returned exit code 1.


If I click OK I get: "Are you sure you wish to run a restore from this file again?"

If I choose YES here, it runs the whole thing over with the same result.

Any ideas?

Thanks.

fabio
08-16-2008, 02:17 PM
You backupped a 8.2 db and tried to restore it in 8.3?

Ahem
08-16-2008, 02:43 PM
You backupped a 8.2 db and tried to restore it in 8.3?

Yep. Can't imagine that the new version wouldn't handle the old format. Could this be the problem?

fabio
08-16-2008, 02:59 PM
Not sure but its possible.

Ahem
08-16-2008, 03:05 PM
Not sure but its possible.

Prior to the abort error saying it could not uncompress there are hundreds of lines that look like perfectly successful restore messages. That obviously doesn't mean much but it does look like 8.3 took a bunch of the info before failing to "uncompress".

Here are a few of the lines immediately before the message in the original post in case it helps anyone:

pg_restore: restoring data for table "bonuses"
pg_restore: restoring data for table "compiledplayerresults"
pg_restore: restoring data for table "compiledplayerresults_month"
pg_restore: restoring data for table "compiledplayerresultspositionaction"
pg_restore: restoring data for table "compiledplayerresultspositionaction_month"
pg_restore: restoring data for table "compiledresults"
pg_restore: restoring data for table "compiledresults_month"
pg_restore: restoring data for table "gametypes"
pg_restore: restoring data for table "handhistories"

fabio
08-16-2008, 03:57 PM
I suggest installing 8.2 and restoring the database. If you still want to switch to 8.3 then export all your hands and reimport them later.

Ahem
08-16-2008, 06:31 PM
I suggest installing 8.2 and restoring the database. If you still want to switch to 8.3 then export all your hands and reimport them later.

I gave it a try. Unfortunately, I get the exact same abort/error message before it finishes restoring into 8.2.

Does anyone have any idea about the whole compress/uncompress thing? When making the backup the PgAdmin defaults to compress so that's what I used. Now the software seems unable to "uncompress" via the simple restore function.

Maybe there's a more detailed way to run a restore that includes addressing this issue?

Any ideas or help is appreciated.

Rvg72
08-18-2008, 05:59 PM
I gave it a try. Unfortunately, I get the exact same abort/error message before it finishes restoring into 8.2.

Does anyone have any idea about the whole compress/uncompress thing? When making the backup the PgAdmin defaults to compress so that's what I used. Now the software seems unable to "uncompress" via the simple restore function.

Maybe there's a more detailed way to run a restore that includes addressing this issue?

Any ideas or help is appreciated.

Please try this:

get to the command prompt and go to the c:\program files\postgresql\8.x\bin folder and run pg_dumpall -U postgres > c:\dbbackup.sql

This may take a while. Then on the new postgres folder get to the same folder in cmd and type

psql -U postgres -f c:\dbbackup.sql postgres

This should safely backup and restore between versions

Roy