Upgrade postgresql from 9.3 to 9.5 in Ubuntu 16.04 LTS
To see if your database is still on your server check this folder :
ls /var/lib/postgresql/9.3/main/base/
If you have files there, this mean your database is still here !!If nothing in this folder, this mean your life data have been deleted.
Did you made a regular backup of your database ?
If so, you need to install back your previous version of PostgreSQL and make a restore of it.
apt-get install postgresql-9.3psql -h localhostcreate database dbname;psql -h localhost dbname < backup_file
After the normal process to upgrade on Debian or Ubuntu is this one :service postgresql stop
On vire le cluster de la nouvelle version (normalement vide si on vient juste de l’installer : faire gaffe à ne pas laisser passer de temps entre l’installation de la nouvelle version et la migration des données, pour que personne n’utilise le nouveau cluster)
Stop the new updated version of PostreSQL :
service postgresql stop
Drop the new updated version cluster to be sure nothing is inside :
pg_dropcluster --stop 9.5 main
Then data migration :
pg_upgradecluster -m upgrade 9.3 main
Then stop previous version of PotsgreSQL :
pg_dropcluster 9.3 main --stop
Remove the old version :
apt-get autoremove --purge postgresql-9.3
Then just restart PostgreSQL, the new version with database migrated :
service postgresql start
Hope this help.
But if you didn't do any backup, unfortunatly you should have loose everything.