Page History
...
Warning | ||
---|---|---|
| ||
It is always recommended that when performing an upgrade that the user should use a Development or Test instance or server in order to minimize downtime. You should note any problems you have encountered (and also how to resolve them) before attempting to upgrade your production instance or server. It also gives you a chance to "practice" at the upgrade. (And practice makes perfect.) |
Table of Contents |
---|
Upgrading from 1.6.x to 1.7
Wiki Markup |
---|
In the notes below _\[dspace\]_ refers to the install directory for your existing DSpace installation, and _\[dspace-source\]_ to the source directory for DSpace 1.7.0. Whenever you see these path references, be sure to replace them with the actual path names on your local system. |
- Backup Your DSpace. First, and foremost, make a complete backup of your system, including:
- A snapshot of the database. _To have a "snapshot" of the PostgreSQL database, you need to shut it down during the backup. You should also have your regular PostgreSQL Backup output (using pg_dump commands). _
Wiki Markup The asset store (_\[dspace\]/assetstore_ by default)
- Your configuration files and customizations to DSpace (including any customized scripts).
- Download DSpace 1.7.0 Retrieve the new DSpace 1.7.0 source code either as a download from SourceForge or check it out directly from the SVN code repository. If you downloaded DSpace do not unpack it on top of your existing installation.Refer to Chapter 3.3.3 Installation, Step 3 for unpacking directives.
- Stop Tomcat. Take down your servlet container. For Tomcat, use the $CATALINA/shutdown.sh script. (Many installations will have a startup/shutdown script in the /etc/init.d or /etc/rc.d directories.
Wiki Markup *Apply any customizations.* If you have made any local customizations to your DSpace installation they will need to be migrated over to the new DSpace. These are housed in one of the following places:JSPUI modifications: _\[dspace-source\]/dspace/modules/jspui/src/main/webapp/_XMLUI modifications: \_\[dspace-source\]/dspace/modules/xmlui/src/main/webbapp_
- Update Configuration Files. TODO – NEEDS FILLING OUT
- Build DSpace. Run the following commands to compile DSpace.:
Code Block cd /[dspace-source]/dspace/ mvn -U clean package
Wiki Markup You will find the result in _\[dspace-source\]/dspace/target/dspace-\[version\]-build.dir_ . Inside this directory is the compiled binary distribution of DSpace.Before rebuilding DSpace, the above command will clean out any previously compiled code ('clean') and ensure that your local DSpace JAR files are updated from the remote maven repository.
- Update DSpace. Update the DSpace installed directory with the new code and libraries. Issue the following commands:
Code Block cd [dspace-source]/dspace/target/dspace-[version]-build.dir ant -Dconfig=[dspace]/config/dspace.cfg update
- Update the Database. You will need to run the 1.6.x to 1.7.x database upgrade script.
- For PostgreSQL:
(Your database name is by default 'dspace'). Example:Code Block psql -U [dspace-user] -f [dspace-source]/dspace/etc/postgres/database_schema_16_17.sql [database name]
Code Block psql -U dspace -f [dspace-source]/dspace/etc/postgres/database_schema_16_17.sql dspace
- For Oracle: Execute the upgrade script, e.g. with sqlplus, recording the output:
Wiki Markup Start SQL*Plus with {{sqlplus \[connect args\]}}
- Record the output:
SQL> spool 'upgrade.lst'
Wiki Markup Run the upgrade script {{SQL> @\[dspace-source\]/dspace/etc/oracle/database_schema_16_17.sql}}
- Turn off recording of output:
SQL> spool off
- For PostgreSQL:
- Generate Browse and Search Indexes. It's always good policy to rebuild your search and browse indexes when upgrading to a new release. To do this, run the following command from your DSpace install directory (as the dspace user):
Code Block [dspace]/bin/dspace index-init
Wiki Markup *Deploy Web Applications*. Copy the web applications files from your {{\[dspace\]/webapps}} directory to the subdirectory of your servlet container (e.g. tomcat):
Code Block cp -R [dspace]/webapps/* [tomcat]/webapps/
- Restart servlet. Now restart your Tomcat/Jetty/Resin server program and test out the upgrade.
Upgrading from 1.6 to 1.6.x
Wiki Markup |
---|
In the notes below _\[dspace\]_ refers to the install directory for your existing DSpace installation, and _\[dspace-source\]_ to the source directory for DSpace 1.6.1. Whenever you see these path references, be sure to replace them with the actual path names on your local system. |
- Backup Your DSpace. First, and foremost, make a complete backup of your system, including:
- A snapshot of the database. _To have a "snapshot" of the PostgreSQL database, you need to shut it down during the backup. You should also have your regular PostgreSQL Backup output (using pg_dump commands). _
Wiki Markup The asset store (_\[dspace\]/assetstore_ by default)
- Your configuration files and customizations to DSpace (including any customized scripts). 
- Download DSpace 1.6.1 Retrieve the new DSpace 1.6.1 source code either as a download from SourceForge or check it out directly from the SVN code repository. If you downloaded DSpace do not unpack it on top of your existing installation.Refer to Chapter 3.3.3 Installation, Step 3 for unpacking directives. 
- Stop Tomcat. Take down your servlet container. For Tomcat, use the $CATALINA/shutdown.sh script. (Many installations will have a startup/shutdown script in the /etc/init.d or /etc/rc.d directories.
Wiki Markup *Apply any customizations.* If you have made any local customizations to your DSpace installation they will need to be migrated over to the new DSpace. These are housed in one of the following places:JSPUI modifications: _\[dspace-source\]/dspace/modules/jspui/src/main/webapp/_XMLUI modifications: \_\[dspace-source\]/dspace/modules/xmlui/src/main/webbapp_
- Update Configuration Files. There are no additions to this release. So you do not have to update the configuration files.
- Build DSpace. Run the following commands to compile DSpace.:
Code Block cd /[dspace-source]/dspace/ mvn -U clean package
Wiki Markup You will find the result in _\[dspace-source\]/dspace/target/dspace-\[version\]-build.dir_ . Inside this directory is the compiled binary distribution of DSpace.Before rebuilding DSpace, the above command will clean out any previously compiled code ('clean') and ensure that your local DSpace JAR files are updated from the remote maven repository.
- Update DSpace. Update the DSpace installed directory with the new code and libraries. Issue the following commands:
Code Block cd [dspace-source]/dspace/target/dspace-[version]-build.dir ant -Dconfig=[dspace]/config/dspace.cfg update
Wiki Markup *Run Registry Format Update for CC License.* Creative Commons licenses have been assigned the wrong mime-type in past versions of DSpace. Even if you are not currently using CC Licenses, you should update your Bitstream Format Registry to include a new entry with the proper mime-type. To update your registry, run the following command: _dspace\]/bin/dspace registry-loader \-bitstream \[dspace\]/etc/upgrades/15-16/new-bitstream-formats.xml_
- Update the Database. If you are using Creative Commons Licenses in your DSpace submission process, you will need to run the 1.5.x to 1.6.x database upgrade script again. In 1.6.0 the improper mime-type was being assigned to all CC Licenses. This has now been resolved, and rerunning the upgrade script will now assign the proper mime-type to all existing CC Licenses in your DSpace installation. NOTE: You will receive messages that most of the script additions already exist. This is normal, and nothing to be worried about.
Wiki Markup For PostgreSQL: _psql \-U \[dspace-user\] \-f \[dspace-source\]/dspace/etc/postgres/database_schema_15_16.sql \[database name\]_ (Your database name is by default 'dspace'). Example: 
(The line break above is cosmetic. Please place your command in one line.Code Block psql -U dspace -f /dspace-1.6-1-src-release/dspace/etc/postgres/database_schema_15_16.sql dspace
- For Oracle: Execute the upgrade script, e.g. with sqlplus, recording the output:
Wiki Markup Start SQL*Plus with "_sqlplus \[connect args\]_"
- Record the output: SQL> spool 'upgrade.lst'
Wiki Markup Run the upgrade script _SQL> @\[dspace-source\]/dspace/etc/oracle/database_schema_15_16.sql{_}{_}SQL> spool off_
- Please note: The final few statements WILL FAIL. That is because you have run some queries and use the results to construct the statements to remove the constraints, manually—Oracle doesn't have any easy way to automate this (unless you know PL/SQL). So, look for the comment line beginning:
Code Block "--You need to remove the already in place constraints" and follow the instructions in the actual SQL file. Refer to the contents of the spool file "upgrade.lst" for the output of the queries you'll need.
Wiki Markup *Generate Browse and Search Indexes*. Though there are not any database changes in the 1.6 to 1.6.1 release, it makes good policy to rebuild your search and browse indexes when upgrading to a new release. To do this, run the following command from your DSpace install directory (as the dspace user):_\[dspace\]/bin/dspace index-init_
Wiki Markup *Deploy Web Applications*. Copy the web applications files from your _\[dspace\]/webapps_ directory to the subdirectory of your servlet container (e.g. tomcat):_cp \-R \[dspace\]/webapps/\* \[tomcat\]/webapps/_
- Restart servlet. Now restart your Tomcat/Jetty/Resin server program and test out the upgrade.
...
Overview
Content Tools