[SOLVED] Migrate Postgresql DB from 11 to 13

I noticed a few days ago my FreedomBox was inaccessible. This morning I power reset it and did updates through aptitude and once complete purged all obsolete packages. Apparently postgresql-11 was among the packages purged. Fortunately, I think the database remains in /var/lib/postgresql/11/main/base.

One clue was that tt-rss complained that it could not connect to the server on port 5432 and netstat -tunlp showed postgres on 5433. I corrected that and restarted the postgres server and now I get an error that password authentication failed for user “ttrss”.

Unless I manually find and install the postgresql-11 packages, I need to figure out how to migrate the database to the new server. Is there a simple tool that will do this? If so, a HOWTO will be greatly appreciated.


Hi Nate.

I am running FB v21.11 on Debian Bullseye (current stable), and there is a package postgresql-11 available:

postgresql-11/now 11.12-0+deb10u1 armhf

I did the upgrade to bullseye a few weeks ago and I can see that my FB is currently running both versions of Postgres, 11 and 13 with the latter binding to port 5433 (same as you mentioned).

You could try reverting your postgresql-13 installation to use 5433 again and the co-install postgresql-11. I would assume that it will bind to port 5432 and find your datafiles. If this does not work and you need to migrate everything to postgresql-13 you will need to do both: set up the tt-rss users and ex/import the data. I do not know details about the earlier, but maybe these docs help with the latter:

This definitely looks like the harder path, so try the first option first.

Cheers & HTH,

Thanks, Axel.

I downloaded and installed the postgresql-11 package and its dependencies, reset postgresql-13 back to port 4533 and now when I try to log in I get an error of “Incorrect username or password”.


I suppose as far as postgresql is concerned, this is solved and the problem will need to be resolved since the upgrade I did on the 22nd upgraded tt-rss.