The official way to migrate a PostgreSQL database to a new major release is to dump and reimport:
As a general rule, the internal data
storage format is subject to change
between major releases of PostgreSQL
(where the number after the first dot
changes). [...]When you update between
compatible versions, you can simply
replace the executables and reuse the
data directory on disk. Otherwise you
need to back up your data and restore it on the new server.
So you will need a running installation of 8.2.7. One option is to manually install 8.2.7 on your system (by either building it yourself, or downloading some binary package, e.g. from Debian, and unpacking and installing it manually). Another would be to just install a distro that comes with 8.2.7 (on spare hardware, on an alternate partition, or in a VM).
Then copy your files there, start the database and do a
pg_dumpall. You may have to tweak the PostgreSQL install so it accepts your data files.
P.S. I hope I do not have to stress that you should first test whether the backup of your database files (which you certainly have) can be restored without problems, just in case...