My OpenProject management software is installed with default postgresql 10. Currently the postgresql DB is 12, It is having lot of new features.
I want to upgrade my Pos
psql --version sudo -u postgres psql pg_dumpall > alldbs.sql
(this command will backup all databases from the postgresql db)Then exit from postgres user, and:
Inside a terminal run these commands:
sudo systemctl stop postgres
sudo apt-get install -y postgresql-12 postgresql-server-dev-12 postgresql-contrib-12 libpq-dev postgresql-12-hypopg
sudo pg_dropcluster 12 main --stop
sudo pg_upgradecluster 10 main
sudo pg_dropcluster 10 main --stop
restart the postgresql service:
sudo systemctl restart postgresql
login to the postgres:
su - postgres
to check the version:
psql --version
I have done using the above steps and I could update the DBand restore all data.