Difference between revisions of "SUNScholar/Upgrading/Repository Software"
| Line 76: | Line 76: | ||
==Step 3 - Database upgrades== | ==Step 3 - Database upgrades== | ||
| − | <u><font color="red">'''This should be the 1st step of the upgrade process.'''</font></u> | + | <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 | First check: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Install_DSpace/S03#Step_3.2 | ||
Revision as of 15:49, 20 December 2013
Contents
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.
My Upgrade Procedure (Hilton Gibson)
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 well 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.
Step 1 - Backup Databases
This must done before attempting any upgrade actions.
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
- Before backing up or upgrading DSpace, make sure to run any maintenance scripts on the SOLR database, such as "index-init -o".
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
*** TAKE EXTRA CARE ***
The following are mentions of problems with upgrades on the DSpace mailing lists.
1.7 to 1.8
We recommend adding an extra set of instructions to the end of the wiki page: https://wiki.duraspace.org/display/DSDOC18/Upgrading+From+1.7.x+to+1.8.x telling folks to copy the new schema.xml files from source into their existing SOLR data directories: cp [dspace-build]/dspace/solr/statistics/conf/schema.xml [dspace-install]/solr/statistics/conf/schema.xml and cp [dspace-build]/dspace/solr/search/conf/schema.xml [dspace-install]/solr/search/conf/schema.xml
After a proper rebuild, then run the following:
[dspace]/bin/dspace stats-util -b
Step 2 - Backup folders with customisations
- Backup the config folder.
- Backup the module overlay folders.
Step 3 - Database upgrades
This should be the 1st step of the upgrade process after the backups above.
First check: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Install_DSpace/S03#Step_3.2
The perform the following;
Each version of DSpace has changes to the database. To do database upgrades use the psql command.
- DSpace version 1.7.x to DSpace version 1.8.x
psql -U dspace -f /home/dspace/source/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/source/dspace/etc/postgres/database_schema_18-3.sql dspace
- DSpace version 3.x to DSpace version 4.x
psql -U dspace -f /home/dspace/source/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/
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.
For more info about theming, see: Theme modification
XMLUI Language
Check for differences between the old "messages.xml" file and the new one.
For more info about language, see: Language modification
From 1.8.2 to 3.2
Download and extract 3.2 source code in the /home/dspace folder, then perform the following:
- Compare the /home/dspace/[dspace-version]/dspace/config folders and apply changes between the two versions using "meld".
- Optimise the SOLR statistics: /home/dspace/bin dspace stats-util -o BEFORE doing the upgrade.
- Update database:
psql -U dspace -f /home/dspace/dspace-3.2-src-release/dspace/etc/postgres/database_schema_18-3.sql dspace - Update "source" symlink:
ln -s /home/dspace/dspace-3.2-src-release source - Update build script: Change /home/dspace/source/dspace/target/dspace-1.8.2-build to
/home/dspace/source/dspace/target/dspace-3.2-build
References
- https://wiki.duraspace.org/display/DSDOC3x/Upgrading+a+DSpace+Installation
- https://wiki.duraspace.org/display/DSDOC3x/Upgrading+From+1.8.x+to+3.x
- https://wiki.duraspace.org/display/DSDOC18/Upgrading+From+1.7.x+to+1.8.x
- https://wiki.duraspace.org/display/DSDOC18/Upgrading+From+1.6.x+to+1.7.x
- https://wiki.duraspace.org/display/DSDOC18/Upgrading+From+1.5.x+to+1.6.x
- http://dspace.2283337.n4.nabble.com/DSpace-3-0-Upgrade-Server-Migration-td4661611.html
Back to Upgrading