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

Re: Database restore fails - not a PostgreSQL bug



On further research this is not a PostgreSQL bug. I upgraded to PostgreSQL 8.2.5 using Marc Liyanage's package (http:// www.entropy.ch) and used AM.pm rev 1866 to make sure I was using latest versions on Mac OS X 10.4.11 (PPC).

Executing pg_dump -Fc on the database from the command line produces a file which restores OK using pg_restore both with and without the - a flag so PostgreSQL is functioning. However clicking System > Backup > Save to File from the same database produces a downloaded .sqlc file which fails to restore with the following error:
pg_restore: [archiver] unexpected end of file

The file is different in size (125,111 vs 118,614 bytes in this case) compared to the one generated from the command line and diff confirms they are different binary files. I tried with a variety of web browsers and got the same results so it's likely not a browser download error. Has anyone else seen this, especially possibly anyone using other flavors of BSD Unix?

Note there was in fact a bug in the PostgreSQL-8.2.4 pg_restore I used in that it choked (malloc) on the backup file that lsmb generates while 8.2.5 handles it more gracefully, but the basic problem is that "System > Backup > Save to File" generates an un- restorable file.

Any ideas on how to troubleshoot this farther? Should I file a bug on this or is AM.pm planned for revision in 1.3? The work-around is just to use the command line to back up.

Thanks for all the help and suggestions so far.

Paul