Difference between revisions of "SUNScholar/Upgrading/Repository Software"

From Libopedia
Jump to navigation Jump to search
Line 15: Line 15:
 
==[[SUNScholar/Upgrading/DSpace/General Notes|General Notes]]==
 
==[[SUNScholar/Upgrading/DSpace/General Notes|General Notes]]==
 
Click on the heading above.
 
Click on the heading above.
 
==My Upgrade Procedure ([[User:Hgibson|Hilton Gibson]])==
 
[http://www.ubuntu.sun.ac.za/wiki/index.php/Main_Page Using an Ubuntu desktop], the program "[http://meldmerge.org 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.
 
 
'''[[SUNScholar/Change_Management|We let users know well in advance that the production server will be offline for this period]].'''
 
 
<u><font color="red">'''Please note:'''</font></u>
 
#Radical changes between versions of DSpace make upgrades a very time consuming and risky process.
 
#Prepare yourself well in advance on a development server.
 
 
==Step 1 - Backup Databases==
 
<u><font color="red">'''This must done before attempting any upgrade actions.'''</font></u>
 
 
After logging in as the "dspace" user, type the following to backup the databases.
 
 
Create a backup folder.
 
mkdir /home/dspace/backup
 
 
chmod 0777 /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 dspace > /home/dspace/backup/pg-db-dspace.sql
 
Return to "dspace" user.
 
exit
 
 
exit
 
 
===SOLR===
 
;<font color="red">Before backing up or upgrading DSpace, make sure to run any maintenance scripts on the SOLR database.</font>
 
 
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
 
 
==Step 2 - Backup folders with customisations==
 
#Backup the '''config''' folder.
 
#Backup the '''module''' overlay folders.
 
 
==Step 3 - Database upgrades==
 
<u><font color="red">'''This should be the 1st step of the upgrade process after the backups above.'''</font></u>
 
 
First check: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Install_DSpace/S03#Step_3.2
 
 
Then return and perform the following;
 
 
Each version of DSpace has changes to the database. To do database upgrades use the '''psql''' command.
 
 
;DSpace version 1.1.x to DSpace version 1.2.x
 
psql -U dspace -f /home/dspace/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/etc/postgres/database_schema_11-12.sql dspace
 
;DSpace version 1.2.x to DSpace version 1.3.x
 
psql -U dspace -f /home/dspace/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/etc/postgres/database_schema_12-13.sql dspace
 
;DSpace version 1.3.x to DSpace version 1.4.x
 
psql -U dspace -f /home/dspace/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/etc/postgres/database_schema_13-14.sql dspace
 
;DSpace version 1.4.x to DSpace version 1.5.x
 
psql -U dspace -f /home/dspace/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/etc/postgres/database_schema_14-15.sql dspace
 
;DSpace version 1.5.x to DSpace version 1.6.x
 
psql -U dspace -f /home/dspace/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/etc/postgres/database_schema_15-16.sql dspace
 
;DSpace version 1.6.x to DSpace version 1.7.x
 
psql -U dspace -f /home/dspace/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/etc/postgres/database_schema_16-17.sql dspace
 
;DSpace version 1.7.x to DSpace version 1.8.x
 
psql -U dspace -f /home/dspace/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/etc/postgres/database_schema_17-18.sql dspace
 
;DSpace version 1.8.x to DSpace version 3.x
 
psql -U dspace -f /home/dspace/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/etc/postgres/database_schema_18-3.sql dspace
 
;DSpace version 3.x to DSpace version 4.x
 
psql -U dspace -f /home/dspace/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/etc/postgres/database_schema_3-4.sql dspace
 
 
==Upgrade checklist==
 
===Features===
 
Merge any configs from the following folder and sub-folders.
 
[dspace-source]/dspace/config
 
Good programs for doing config file and folder comparisons are listed below.
 
*http://meldmerge.org - For Ubuntu linux computers
 
*http://winmerge.org - For Microsoft Windows computers
 
 
===XMLUI Theme===
 
Merge any "modules" configurations from the following folder and sub-folders.
 
[dspace-source]/dspace/modules/xmlui/src/main/webapp/
 
 
<font color="red">'''For example: If the new DSpace version has an updated Mirage theme, then check those updates with your previously customised version of the Mirage theme.'''</font>
 
 
For more info about theming, see: [[SUNScholar/Theme|Theme modification]]
 
 
===XMLUI Language===
 
Check for differences between the old "messages.xml" file and the new one.
 
 
For more info about language, see: [[SUNScholar/Language|Language modification]]
 
  
 
==References==
 
==References==

Revision as of 14:40, 31 January 2014