On Thu, 19 Jan 2006, Doug McNaught wrote:
> Furthermore, whenever you use pg_dump or pg_dumpall, you need to redirect
> it to a file:
>
> $ pg_dumpall > /var/tmp/backup.sql
I was just about to try this; it seemed the way to go.
> I highly suggest you read:
> http://www.postgresql.org/docs/8.1/static/backup.html
Will do. Also, just downloaded the 8.1 pdf manual(s).
> Since it looks like you have both old and new data directories, you might
> be able to get the old server running again, dump out the data and load it
> into the new server. Depends on whether your old binaries got blown away by
> the upgrade.
Yes, they are gone. I can uninstall the 8.1.2 and restore everything from
the backup tape. Perhaps I'll hear from the Slackware packager about this.
> PG is a bit tricky to upgrade and I haven't yet seen a distro upgrade
> script that works really well.
It is the "bit tricky" part that has put me off before now. I've also
absolutely no objection to building from source, either, but a pre-built
package for my distribution seemed quicker and easier. Guess where I blew it
was not redirecting the original pg_dumpall to the file.
Using the 8.1.2 pg_dumpall from the 2004 data directory produces a 819K
file. But, when I then cd to the new data directory and run:
postgres@salmo:/var/lib/pgsql/data$ pg_restore /var/tmp/backup.sql
pg_restore: [archiver] input file does not appear to be a valid archive
However, the file is readable and looks to have all the databases and tables
in it. Perhaps I'm closer now?
Rich
--
Richard B. Shepard, Ph.D. | Author of "Quantifying Environmental
Applied Ecosystem Services, Inc. (TM) | Impact Assessments Using Fuzzy Logic"
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863