Page History
...
DSpace 6.0 features some significant changes which you may wish to be aware of before beginning your upgrade:
- The legacy search engine (based on Apache Lucene) and legacy Browse system (based on database tables) have been removed from DSpace 6.0 or above. Instead, DSpace now only uses Discovery (based on Apache Solr) for all Search/Browse capabilities.
The DSpace Lightweight Networking Interface (LNI), supporting WebDAV / SOAP / RPC API, has been removed from DSpace 6.0 or above. We recommend using REST or SWORD (v1 or v2) as a replacement. However, if you still require it, the old (unmaintained) LNI codebase is still available at https://github.com/DSpace/dspace-lni
- The
build.properties
configuration file has been replaced by an enhancedlocal.cfg
configuration file. The newlocal.cfg
allows you to easily override any configuration (fromdspace.cfg
ormodules/*.cfg
files) by simply copying it into yourlocal.cfg
and specifying a new value. It also provides enhanced configuration options as detailed in the Configuration Reference documentation. The oldbuild.properties
file is no longer used nor supported.- WARNING: As part of adding this new configuration scheme, many of the configuration settings in DSpace (primarily those in
modules/*.cfg
files) had to be renamed or prepended with the name of the module. This means that 5.x (or below) configurations are no longer guaranteed to be compatible with 6.x. If possible, we recommend starting with fresh configs (see below), and moving all your locally customized settings into the newlocal.cfg
file.
- WARNING: As part of adding this new configuration scheme, many of the configuration settings in DSpace (primarily those in
Backup your DSpace
Before you start your upgrade, it is strongly recommended that you create a backup of your DSpace instance. Backups are easy to recover from; a botched install/upgrade is very difficult if not impossible to recover from. The DSpace specific things to backup are: configs, source code modifications, database, and assetstore. On your server that runs DSpace, you might additionally consider checking on your cron/scheduled tasks, servlet container, and database.
Make a complete backup of your system, including:
-
build.properties
configuration file has been replaced by an enhancedlocal.cfg
configuration file. The newlocal.cfg
allows you to easily override any configuration (fromdspace.cfg
ormodules/*.cfg
files) by simply copying it into yourlocal.cfg
and specifying a new value. It also provides enhanced configuration options as detailed in the Configuration Reference documentation. The oldbuild.properties
file is no longer used nor supported.- WARNING: As part of adding this new configuration scheme, many of the configuration settings in DSpace (primarily those in
modules/*.cfg
files) had to be renamed or prepended with the name of the module. This means that 5.x (or below) configurations are no longer guaranteed to be compatible with 6.x. If possible, we recommend starting with fresh configs (see below), and moving all your locally customized settings into the newlocal.cfg
file.
- WARNING: As part of adding this new configuration scheme, many of the configuration settings in DSpace (primarily those in
- The PDF Citation Cover Page configuration file has been renamed (from
disseminate-citation.cfg
tocitation-page.cfg
). See this features documentation for more details. - The legacy search engine (based on Apache Lucene) and legacy Browse system (based on database tables) have been removed from DSpace 6.0 or above. Instead, DSpace now only uses Discovery (based on Apache Solr) for all Search/Browse capabilities.
The DSpace Lightweight Networking Interface (LNI), supporting WebDAV / SOAP / RPC API, has been removed from DSpace 6.0 or above. We recommend using REST or SWORD (v1 or v2) as a replacement. However, if you still require it, the old (unmaintained) LNI codebase is still available at https://github.com/DSpace/dspace-lni
- Support for SRB (Storage Resource Broker) file storage has been removed from DSpace 6.0 or above. As it was unmaintained (and seemingly unused) for many years, this feature was removed along with its configurations. As a replacement, a new file storage plugin system was added, featuring a traditional local file storage option (default) and an Amazon S3 file storage option (see Storage Layer documentation, especially Configuring the Bitstream Store). For more information on the removal of SRB support, also see DS-3055.
Backup your DSpace
Before you start your upgrade, it is strongly recommended that you create a backup of your DSpace instance. Backups are easy to recover from; a botched install/upgrade is very difficult if not impossible to recover from. The DSpace specific things to backup are: configs, source code modifications, database, and assetstore. On your server that runs DSpace, you might additionally consider checking on your cron/scheduled tasks, servlet container, and database.
Make a complete backup of your system, including:
Database: Make a snapshot/dump of the database. For the PostgreSQL database use Postgres' pg_dump command. For example:
Code Block pg
Database: Make a snapshot/dump of the database. For the PostgreSQL database use Postgres' pg_dump command. For example:
Code Block pg_dump -U [database-user] -f [backup-file-location] [database-name]
- Assetstore: Backup the directory (
[dspace]/assetstore
by default, and any other assetstores configured in the[dspace]/config/dspace.cfg
"assetstore.dir" and "assetstore.dir.#" settings) - Configuration: Backup the entire directory content of
[dspace]/config
. - Customizations: If you have custom code, such as themes, modifications, or custom scripts, you will want to back them up to a safe location.
- Statistics data: what to back up depends on what you were using before: the options are the default SOLR statistics, optional Elastic Search statistics, or the legacy statistics. Legacy stats utilizes the dspace.log files, Elastic Search stats stores data in
[dspace]/elasticsearch
, SOLR Statistics stores data in[dspace]/solr/statistics
. A simple copy of the data directory should give you a point of recovery, should something go wrong in the update process. We can't stress this enough, your users depend on these statistics more than you realize. You need a backup.
...
- Ensure your database is compatible: Starting with DSpace 6.x, there are new database requirements for DSpace (refer to the Prerequisite Software section of "Installing DSpace" for full details).
- PostgreSQL databases: PostgreSQL 9.4 or above is required and the "pgcrypto" extension must be installed.
- Notes on installing pgcrypto
- On most Linux operating systems (Ubuntu, Debian, RedHat), this extension is provided in the "postgresql-contrib" package in your package manager. So, ensure you've installed "postgresql-contrib".
- On Windows, this extension should be provided automatically by the installer (check your "[PostgreSQL]/share/extension" folder for files starting with "pgcrypto")
Enabling pgcrypto on your DSpace database. (Additional options/notes in the Installation Documentation)
Code Block # Login to your "dspace" database as a superuser psql --username=postgres dspace # Enable the pgcrypto extension on this database CREATE EXTENSION pgcrypto;
- Notes on installing pgcrypto
- Oracle databases: Oracle database have no additional requirements at this time.
- PostgreSQL databases: PostgreSQL 9.4 or above is required and the "pgcrypto" extension must be installed.
- Download DSpace 6.x: Either download DSpace 6.x from DSpace.org or check it out directly from the Github repository.
- NOTE: If you downloaded DSpace do not unpack it on top of your existing installation. Refer to Installation Instructions, Step 3 for unpacking directives.
- Merge any User Interface customizations or other customizations (if needed or desired). If you have made any local customizations to your DSpace installation they may need to be migrated over to the new DSpace.
- NOTE: If you are upgrading across many versions of DSpace at once (e.g. from 1.x.x to 6.x), you may find it easier to first upgrade DSpace, and then attempt to migrate over your various customizations. Because each major version of DSpace tends to add new configurations and features to the User Interface, older customizations may require more work to "migrate" to the latest version of DSpace. In some situations, it may even be easier to "start fresh", and just re-customize the brand new User Interface with your local color scheme, header/footer, etc.
- Customizations are typically 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/webapp/
- Config modifications:
[dspace]/config
- JSPUI modifications:
Edit the Replace your old build.properties file (if needed) (with a local.cfg (REQUIRED) As of DSpace 6.0, the
build.properties
configuration file has been replaced by an enhancedlocal.cfg
configuration file. Therefore, any oldbuild.properties
file (or similar[dspace-source]/build*.properties
files) . Any settings changed in thisbuild.properties
file are automatically copied over to the finaldspace.cfg
file during the "Build DSpace" process (in the next step). For more information on the build.properties file, see "The build.properties Configuration Properties File" section of the Configuration Reference documentation.Build DSpace. Run the following commands to compile DSpace :
Code Block cd [dspace-source]/dspace/ mvn -U clean package
The above command will re-compile the DSpace source code and build its "installer". You will find the result in
[dspace-source]/dspace/target/dspace-installer
Info title Defaults to PostgreSQL settings Without any extra arguments, the DSpace installation package is initialized for PostgreSQL. If you use Oracle instead, you should build the DSpace installation package as follows:
mvn -Ddb.name=oracle -U clean package
Info title Enabling and building the DSpace 5 Mirage 2 theme Mirage 2 is a responsive theme for the XML User Interface, added as a new feature in DSpace 5. It has not yet replaced the Mirage 1 theme as the XMLUI default theme.
To enable Mirage 2, add the following to the
<themes>
section ofsrc/dspace/config/xmlui.xconf
, replacing the currently active theme:<theme name="Mirage 2" regex=".*" path="Mirage2/" />
It is important to do this before executing the maven build.
Mirage 2 is not yet activated in the default "mvn package" build. To include it as part of the build, run:
mvn -U clean package -Dmirage2.on=true
The speed of this specific step of the build can be increased by installing local copies of the specific dependencies required for building Mirage 2. The Mirage 2 developer documentation provides detailed instructions for these installations. After the installation of these dependencies, you can choose to run:
mvn -U clean package -Dmirage2.on=true -Dmirage2.deps.included=false
Warning: The Mirage 2 build process should NOT be run as "root". It must be run as a non-root user. For more information see: Mirage 2 Common Build Issues
- Stop Tomcat (or servlet container). Take down your servlet container.
- For Tomcat, use the
$CATALINA_HOME/shutdown.sh
script. (Many Unix-based installations will have a startup/shutdown script in the/etc/init.d
or/etc/rc.d
directories.)
- For Tomcat, use the
Update DSpace Installation. Update the DSpace installation directory with the new code and libraries. Issue the following commands:
Code Block cd [dspace-source]/dspace/target/dspace-installer ant update
The above command will also automatically upgrade all your existing Solr indexes (e.g. for Discovery, Statistics, OAI-PMH) to the latest version. For large instances, this may take some time. But, it is important to ensure that your indexes are usable by the latest version of DSpace.
- If the Solr index upgrade fails, you may need to Manually Upgrade your Solr Indexes. See the "Troubleshooting Upgrade Issues" section below.
- Update your DSpace Configurations. You should review your configuration for new and changed configurations in DSpace 6.x.
- In the specific case of
dspace.cfg
it is recommended to start with a fresh copy of the file from the new version and copy your site-specific settings from the old file. Read the new file carefully to see if you need (or want) other alterations. - Please notice that, as of DSpace 6, only Discovery (Apache Solr) is supported for search/browse. Support for Legacy Search (using Apache Lucene) and Legacy Browse (using database tables) has been removed.
- It is recommended to review all configuration changes that exist in the config directory, and its subdirectories. It is helpful to compare your current configs against a clean checkout of your current version to see what you have customized. You might then also want to compare your current configs with the configs of the version you are upgrading to. A tool that compares files in directories such as Meld or DiffMerge is useful for this purpose.
- Upgrading from 4.x to 5.x, notice that file config/crosswalks/google-metadata.properties uses google.citation_author instead of google.citation_authors
- In the specific case of
Decide which DSpace Web Applications you want to install. DSpace comes with a variety of web applications (in
[dspace]/webapps
), each of which provides a different "interface" to your DSpace. Which ones you install is up to you, but there are a few that we highly recommend (see below):"xmlui" = This is the XML-based User Interface, based on Apache Cocoon. It comes with a variety of out-of-the-box themes, including Mirage 1 (the default) and Mirage 2 (based on Bootstrap).Between the "xmlui" and "jspui", you likely only need to choose one.
"jspui" = This is the JSPUI-based User Interface, which is based on Bootstrap. Between the "xmlui" and "jspui", you likely only need to choose one.
"solr" (required) = This is Apache Solr web application, which is used by the "xmlui" and "jspui" (for search & browse functionality), as well as the OAI-PMH interface. It must be installed in support of either UI.
- "oai" = This is the DSpace OAI interface. It allows for metadata and bitstream (content-file) harvesting, supporting OAI-PMH (Protocol for Metadata Harvest) and OAI-ORE (Object Reuse and Exchange) protocols
- "rest" = This is the DSpace REST API
- "sword" = This is the DSpace SWORDv1 interface. More info on SWORD protocol and its usage.
- "swordv2" = This is the DSpace SWORDv2 interface. More info on SWORD protocol and its usage.
- "rdf" = This is the DSpace RDF interface supporting Linked (Open) Data.
Deploy DSpace Web Applications. If necessary, copy the web applications from your
[dspace]/webapps
directory to the subdirectory of your servlet container (e.g. Tomcat):Code Block cp -R [dspace]/webapps/* [tomcat]/webapps/
See the installation guide for full details.
WILL BE IGNORED. Instead, you should create a new
local.cfg
file, based on the provided[dspace-source]/local.cfg.EXAMPLE
and use it to specify all of your locally customized DSpace configurations. This newlocal.cfg
can be used to override ANY setting in any other configuration file (dspace.cfg
ormodules/*.cfg
). To override a default setting, simply copy the configuration into yourlocal.cfg
and change its value(s). For much more information on the features of local.cfg, see the Configuration Reference documentation and the local.cfg Configuration File section on that page.Code Block cd [dspace-source] cp local.cfg.EXAMPLE local.cfg # Then edit the local.cfg, specifying (at a minimum) your basic DSpace configuration settings. # Optionally, you may copy any settings from other *.cfg configuration files into your local.cfg to override them. # After building DSpace, this local.cfg will be copied to [dspace]/config/local.cfg, where it will also be used at runtime.
Build DSpace. Run the following commands to compile DSpace :
Code Block cd [dspace-source]/dspace/ mvn -U clean package
The above command will re-compile the DSpace source code and build its "installer". You will find the result in
[dspace-source]/dspace/target/dspace-installer
Info title Defaults to PostgreSQL settings Without any extra arguments, the DSpace installation package is initialized for PostgreSQL. If you use Oracle instead, you should build the DSpace installation package as follows:
mvn -Ddb.name=oracle -U clean package
Info title Enabling and building the DSpace 5 Mirage 2 theme Mirage 2 is a responsive theme for the XML User Interface, added as a new feature in DSpace 5. It has not yet replaced the Mirage 1 theme as the XMLUI default theme.
To enable Mirage 2, add the following to the
<themes>
section ofsrc/dspace/config/xmlui.xconf
, replacing the currently active theme:<theme name="Mirage 2" regex=".*" path="Mirage2/" />
It is important to do this before executing the maven build.
Mirage 2 is not yet activated in the default "mvn package" build. To include it as part of the build, run:
mvn -U clean package -Dmirage2.on=true
The speed of this specific step of the build can be increased by installing local copies of the specific dependencies required for building Mirage 2. The Mirage 2 developer documentation provides detailed instructions for these installations. After the installation of these dependencies, you can choose to run:
mvn -U clean package -Dmirage2.on=true -Dmirage2.deps.included=false
Warning: The Mirage 2 build process should NOT be run as "root". It must be run as a non-root user. For more information see: Mirage 2 Common Build Issues
- Stop Tomcat (or servlet container). Take down your servlet container.
- For Tomcat, use the
$CATALINA_HOME/shutdown.sh
script. (Many Unix-based installations will have a startup/shutdown script in the/etc/init.d
or/etc/rc.d
directories.)
- For Tomcat, use the
Update DSpace Installation. Update the DSpace installation directory with the new code and libraries. Issue the following commands:
Code Block cd [dspace-source]/dspace/target/dspace-installer ant update
The above command will also automatically upgrade all your existing Solr indexes (e.g. for Discovery, Statistics, OAI-PMH) to the latest version. For large instances, this may take some time. But, it is important to ensure that your indexes are usable by the latest version of DSpace.
- If the Solr index upgrade fails, you may need to Manually Upgrade your Solr Indexes. See the "Troubleshooting Upgrade Issues" section below.
- Update your DSpace Configurations and/or move them to local.cfg. You should review your configuration for new and changed configurations in DSpace 6.x.
- As mentioned above, DSpace 6.0 now includes a new local.cfg Configuration File. So, rather than editing the
dspace.cfg
(or any of themodules/*.cfg
), it's recommended to simply override the default values in your ownlocal.cfg
. That way, yourlocal.cfg
can serve as the record of which configurations you have actually tweaked in your DSpace, which may help to simplify future upgrades.- WARNING: in order to create this powerful ability to override configurations in your local.cfg, all
modules/*.cfg
files had their configurations renamed to be pre-pended with the module name. As a basic example, all the configuration settings within themodules/oai.cfg
configuration now start with"oai.
". Unfortunately, these means that DSpace 5.x configuration files are NOT guaranteed to be compatible with DSpace 6. For more information on configurations in DSpace 6 see our updated Configuration Reference.
- WARNING: in order to create this powerful ability to override configurations in your local.cfg, all
- Please notice that, as of DSpace 6, only Discovery (Apache Solr) is supported for search/browse. Support for Legacy Search (using Apache Lucene) and Legacy Browse (using database tables) has been removed, along with all their configurations.
- It is recommended to review all configuration changes that exist in the
config
directory, and its subdirectories. It is helpful to compare your current configs against a clean checkout of your current version to see what you have customized. You might then also want to compare your current configs with the configs of the version you are upgrading to. A tool that compares files in directories such as Meld or DiffMerge is useful for this purpose.- After reviewing which configurations you've changed, we recommend moving all your customized configurations into your
local.cfg
file, as described above. Examples of how this might be accomplished are provided in the Configuration Reference.
- After reviewing which configurations you've changed, we recommend moving all your customized configurations into your
- As mentioned above, DSpace 6.0 now includes a new local.cfg Configuration File. So, rather than editing the
Decide which DSpace Web Applications you want to install. DSpace comes with a variety of web applications (in
[dspace]/webapps
), each of which provides a different "interface" to your DSpace. Which ones you install is up to you, but there are a few that we highly recommend (see below):"xmlui" = This is the XML-based User Interface, based on Apache Cocoon. It comes with a variety of out-of-the-box themes, including Mirage 1 (the default) and Mirage 2 (based on Bootstrap).Between the "xmlui" and "jspui", you likely only need to choose one.
"jspui" = This is the JSPUI-based User Interface, which is based on Bootstrap. Between the "xmlui" and "jspui", you likely only need to choose one.
"solr" (required) = This is Apache Solr web application, which is used by the "xmlui" and "jspui" (for search & browse functionality), as well as the OAI-PMH interface. It must be installed in support of either UI.
- "oai" = This is the DSpace OAI interface. It allows for metadata and bitstream (content-file) harvesting, supporting OAI-PMH (Protocol for Metadata Harvest) and OAI-ORE (Object Reuse and Exchange) protocols
- "rest" = This is the DSpace REST API
- "sword" = This is the DSpace SWORDv1 interface. More info on SWORD protocol and its usage.
- "swordv2" = This is the DSpace SWORDv2 interface. More info on SWORD protocol and its usage.
- "rdf" = This is the DSpace RDF interface supporting Linked (Open) Data.
Deploy DSpace Web Applications. If necessary, copy the web applications from your
[dspace]/webapps
directory to the subdirectory of your servlet container (e.g. Tomcat):Code Block cp -R [dspace]/webapps/* [tomcat]/webapps/
See the installation guide for full details
Upgrade your database (optional, but recommended for major upgrades). As of DSpace 5, the DSpace code will automatically upgrade your database (from any prior version of DSpace). By default, this database upgrade occurs automatically when you restart Tomcat (or your servlet container). However, if you have a large repository or are upgrading across multiple versions of DSpace at once, you may wish to manually perform the upgrade (as it could take some time, anywhere from 5-15 minutes for large sites).First, you can optionally verify whether DSpace correctly detects the version of your DSpace database. It is very important that the DSpace version is detected correctly before you attempt the migration:
Code Block [dspace]/bin/dspace database info # Look for a line at the bottom that says something like: # "Your database looks to be compatible with DSpace version ___"
In some scenarios, if your database's "sequences" are outdated, inconsistent or incorrect, a database migration error may occur (in your DSpace logs). In order to AVOID this scenario, you may wish to manually run the "update-sequences.sql" script PRIOR to upgrade. This "update-sequences.sql" script will auto-correct any possible database sequence issues. In the future, we plan to automate this step to avoid any sequence problems (see DS-2480 ticket):
Code Block # Example for a PostgreSQL database named "dspace" psql -U dspace -f [dspace]/etc/postgres/update-sequences.sql
Then, you can upgrade your DSpace database to the latest version of DSpace. (NOTE: check the DSpace log,
[dspace]/log/dspace.log.[date]
, for any output from this command)Code Block [dspace]/bin/dspace database migrate
More information on this new "database" command can be found in Database Utilities documentation- TODO: Remove deprecated Database Browse Tables (optional, but recommended) (TODO: WE MUST REMOVE THESE TABLES AUTOMATICALLY!)
- DSpace now uses Discovery (backed by Solr) for its Search and Browse engine. Discovery offers additional features like filtered (or faceted) searching, and "access aware" searching which was not offered by the Legacy Search and Browse system.
As long as you plan to use the default settings in DSpace (with Discovery enabled), you can safely remove any old Legacy browse tables (named "bi_*", where "bi" = browse index). To do so, simply run:
Code Block [dspace]/bin/dspace index-db-browse -f -d
The contents of one more leftover Legacy browse table needs to be removed, the "communities2item" table. From an SQL client, execute the following SQL (and commit the changes/purge the recyclebin if you're using Oracle):
Code Block DELETE FROM COMMUNITIES2ITEM;
- Restart Tomcat (servlet container). Now restart your servlet container (Tomcat/Jetty/Resin) and test out the upgrade.
- Upgrade of database: If you didn't manually upgrade your database in the previous step, then your database will be automatically upgraded to the latest version. This may take some time (seconds to minutes), depending on the size of your repository, etc. Check the DSpace log (
[dspace]/log/dspace.log.[date]
) for information on its status. Reindexing of all content for search/browse: If your database was just upgraded (either manually or automatically), all the content in your DSpace will be automatically re-indexed for searching/browsing. As the process can take some time (minutes to hours, depending on the size of your repository), it is performed in the background; meanwhile, DSpace can be used as the index is gradually filled. But, keep in mind that not all content will be visible until the indexing process is completed. Again, check the DSpace log (
[dspace]/log/dspace.log.[date]
) for information on its status.
- Upgrade of database: If you didn't manually upgrade your database in the previous step, then your database will be automatically upgraded to the latest version. This may take some time (seconds to minutes), depending on the size of your repository, etc. Check the DSpace log (
- Reindex SOLR Stats. If you were previously using SOLR stats, the schema changed with DSpace 5; if you are upgrading from any version earlier than 5x, you will need to reindex your stats in order to ensure all of your stats data conforms to the new schema specification. NOTE: it is safe to run a reindex on a live site, the script will store incoming usage data in a temporary core.
Check your cron / Task Scheduler jobs. In recent versions of DSpace, some of the scripts names have changed.
Check the Scheduled Tasks via Cron documentation for details. Especially pay attention to the Solr Index optimization commands, which ideally should be run regularly (as noted in the previous step).
.
...