SUNScholar/Upgrading/Repository Software

From Libopedia
Revision as of 14:07, 21 November 2012 by Hgibson (talk | contribs) (→‎PostgreSQL)
Jump to navigation Jump to search

Introduction

This wiki help page assumes that you have used the three system setup procedures to install an Ubuntu server with DSpace software.

As a rule at Stellenbosch University library we only upgrade to DSpace during the Dec/Jan long holiday. We also run one version behind the latest version because we do not have expert Java and Web 2.0 skills in-house. So we stay just behind the bleeding edge.

Our next upgrade will be from DSpace version 1.7.2 to 1.8.2 in Dec 2012.

Procedure

Using an Ubuntu desktop, the program "meld" is installed. "meld" allows you to compare two folders for differences.

To do a comparison, the working version is copied to my desktop and the new version is extracted to my desktop as well.

Using meld I investigate all the differences and update the new version with new settings as appropriate.

When I am satisfied that the new version has most of my customisation from the old version, then I test on my development server.

I do more debugging on the development server as needed and then finally activate it on the production server and test.

On the production server we test for a couple of days. We let users know in advance that the production server will be offline for this period.

Please note: Radical changes between versions of DSpace make upgrades a very time consuming and risky process. Prepare yourself well in advance on a development server.

Backup Databases

After logging in as the "dspace" user, type the following to backup the databases. This must done before attempting any upgrades.

Create a backup folder.

mkdir /home/dspace/backup

PostgreSQL

Become the postgres user. Supply the "dspace" user password after hitting "Enter".

sudo -i

Become the "postgres" user.

su - postgres

Dump the PostgreSQL database

pg_dump > /home/dspace/backup/pg-db.sql

Return to "dspace" user.

exit
exit

SOLR

Stop Tomcat

sudo /etc/init.d/tomcat6 stop

Backup the database

cp -R /home/dspace/solr /home/dspace/backup

Start Tomcat

sudo /etc/init.d/tomcat6 start

Database upgrades

This should be the 1st step of the upgrade process.

Each version of DSpace has changes to the database. To do database upgrades use the psql command. An example follows:

psql -U dspace -f /home/dspace/dspace-1.8.2-src-release/dspace/etc/postgres/database_schema_17-18.sql dspace

Before doing database updates, check that you have made a backup of the database. pgadmin is a good program to use for this.

References

Back to Upgrading