Databases lost after Postgres upgrade from 11 to 12
I followed the comment from @Colin 't Hart and this solved the problem. With pg_upgradecluster -v 12 11 main /srv/postgres/data/12 the upgrade was done. I changed the port to 5432 and restarted it. Now my applications are using the version 12 database.