portupgrade: reverting to a previous version

Mike Meyer mwm-dated-1050507656.dbb250 at mired.org
Fri Apr 11 08:40:59 PDT 2003


In <20030410204346.60b66625.knowtree at aloha.com>, Gary Dunn <knowtree at aloha.com> typed:
> Recently I upgraded postgresql using portupgrade. The upgrade involved a
> change in data file formats. I should have dumped my database first, so
> that I could import the data into the new version. Since portupgrade did
> the make; make install "automatically" I never had the opportunity to
> discover this fact until it was too late. The new version of postgresql
> will not open my database :-(

Right. One of the drawbacks of portupgrade over portversion is that
you aren't forced to edit the portupgrade script. You should always do
that anyway, so you can check for things like this. I also use that as
a chance to remove ports that I'm no longer using.

> I understand that portupgrade saves the old version of a port. True? Can
> somebody explain how I can recover that version? My plan is to go back to
> the old version, dump the data, then go forward again to the new version.
> Is there a better way?

I think your plan is the best you can do. As far as I know, portuprade
removes the backup copy as part of the cleanup after a successful
install. They are normally put in /var/tmp, unless you twiddle
environment variables. See the portupgrade man page for details on
this.

When I ran into a similar problem - I had removed postgresql only to
find that the port wouldn't build - I used cvs to fetch an old copy of
the postgresql port.  See <URL: http://tinyurl.com/9b9v > for
information on setting up anonymous cvs access. <URL:
http://www.freebsd.org/cgi/cvsweb.cgi/ports/databases/postgresql/ >
should have the information you need to figure out what date to go
back to, but is unaccountably empty. See the cvs man page -
specifically checkout and the -D option - for information on getting
cvs to check out older versions of files.

If you've subscribe to one of the distributions - recommended - you
may well find a postgresql package you can use on one of them.

	<mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.


More information about the freebsd-questions mailing list