SUNScholar/Upgrading/Server Software
Back to Upgrading
WE CANNOT ACCEPT RESPONSIBILITY FOR ANY DATA LOSS OR CORRUPTION
BEFORE PROCEEDING, DO EXTENSIVE TESTING ON SPARE INFRASTRUCTURE
*** YOU PROCEED AT YOUR OWN RISK ***
Contents
Introduction
Since we choose to use the Ubuntu server as our server operating system, we follow the LTS release upgrade path.
The major server software that is upgraded is as follows:
- Tomcat Java webapp server
- Java runtime software
- PostgreSQL Database
General Upgrade Procedure
A test system is built using the same software versions as the present production system.
On the test system a server operating system upgrade is done.
A check is done to see what changed and what needs special upgrade attention.
When everything is working well on the test system then the upgrade is done on the production system with the changes that the test system identified.
Requirements
Step 1. Enable the Postfix mail server
The postfix email server must be installed and setup, see: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Prepare_Ubuntu/S07
Step 2. Backup the database
Before upgrading any Ubuntu server, backup the database first. You have been warned!!!.
The official Ubuntu/Debian upgrade methods listed below are risky and not well tested. It is better to backup the DB before the upgrade and restore the DB after the upgrade.
Type the following to backup the database:
sudo -i
mkdir /root/backup
su - postgres
pg_dumpall > /tmp/dspace-db.sql
exit
cp /tmp/dspace-db.sql /root/backup/
Another good utility for this is "pgadmin", see link below.
http://www.pgadmin.org
Or alternatively, read the following link:
http://www.thegeekstuff.com/2009/01/how-to-backup-and-restore-postgres-database-using-pg_dump-and-psql
And finally, try the following:
http://www.pgbarman.org
Check list
- https://help.ubuntu.com/community/PostgreSQL
- From the folder /usr/share/doc/postgresql-common, the "README.Debian.gz" file and slightly modified.
- Also check for PostgreSQL credentials file.