If you want to install latest version of PostgreSQL then first you have to take backup of your database and then try to install or update database.
To take backup it is must to have access of root user, you can follow below steps:
Important: Here db.out is database backup file.
Here directory_file_name represents your directory name.
To take backup it is must to have access of root user, you can follow below steps:
- Login via SSH
- You can run below command to take backup of your database:
Code:
pg_dumpall -U postgres > db.out
- For the previous version ofdatabase you have to move your PostgreSQL directory. You can run below command:
Code:
service postgresql stop
mv /var/lib/pgsql /var/lib/directory_file_name