All Versions
- DSpace 7.x (Current Release)
- DSpace 8.x (Unreleased)
- DSpace 6.x (EOL)
- DSpace 5.x (EOL)
- More Versions...
...
Note | ||
---|---|---|
| ||
The underlying DSpace database structure changes and data migrations are now AUTOMATED (using FlywayDB). This means that you no longer need to manually run SQL scripts. Instead, the first time you run DSpace, it will auto-update your database structure (as needed) and migrate all your data to be compatible with the installed version of DSpace. This allows you to concentrate your upgrade efforts on customizing your site without having to worry about migrating your data! For example, if you were running DSpace 1.4, and you wish to upgrade to DSpace 5, you can follow the simplified instructions below. As soon as you point your DSpace 5 installation against the older DSpace 1.4-compatible database, your database tables (and data) will automatically be migrated to be compatible with DSpace 5. See below for a specific note on troubleshooting "ignored" migrations (a rare circumstance, but known to happen if you upgrade from DSpace 5 to a later version of DSpace). |
Note | ||
---|---|---|
| ||
If your database structure/data is upgraded, the migration process will now trigger a reindex of all your content after deployment to Tomcat. Some repository content will be not be discoverable until this reindex process is complete. For large repository instances, this process could take some time to complete. Optionally, you may choose to skip this automatic reindex and run a manual reindex at a later time. For more information on doing so, see the note under the optional "Upgrade your Database" step below. |
Note | ||
---|---|---|
| ||
With the addition of our automated database upgrades, we highly recommend AGAINST customizing the DSpace database tables/structure or backporting any features that change the DSpace tables/structure. Doing so will often cause the automated database upgrade process to fail (and therefore will complicate your next upgrade). If you must add features requiring new database tables/structure, we recommend creating new tables (instead of modifying existing ones), as that is usually much less disruptive to our automated database upgrade. |
...
title | Solr is now a prerequisite, and indexes must be rebuilt |
---|
...
| |
With the addition of our automated database upgrades, we highly recommend AGAINST customizing the DSpace database tables/structure or backporting any features that change the DSpace tables/structure. Doing so will often cause the automated database upgrade process to fail (and therefore will complicate your next upgrade). If you must add features requiring new database tables/structure, we recommend creating new tables (instead of modifying existing ones), as that is usually much less disruptive to our automated database upgrade. |
Warning | ||
---|---|---|
| ||
In order to minimize downtime, it is always recommended to first perform a DSpace upgrade using a Development or Test server. You should note any problems you may have encountered (and also how to resolve them) before attempting to upgrade your Production server. It also gives you a chance to "practice" at the upgrade. Practice makes perfect, and minimizes problems and downtime. Additionally, if you are using a version control system, such as subversion or git, to manage your locally developed features or modifications, then you can do all of your upgrades in your local version control system on your Development server and commit the changes. That way your Production server can just checkout your well tested and upgraded code. |
Note |
---|
In the notes below |
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
DSpace 7.0 features some significant changes which you may wish to be aware of before beginning your upgrade:
Note | ||
---|---|---|
| ||
The JSPUI and XMLUI user interfaces have been replaced with a new UI based on Angular. If you have customized the code for your user interface, you will need to re-implement your customizations. |
...
title | GeoIP location database is now separately installed |
---|
GeoIP location database must be installed separately due to changes in Maxmind's terms and conditions. MaxMind has changed the terms and procedure
...
for obtaining and using its GeoLite2 location database. Consequently, DSpace no longer automatically downloads the database during installation or update, and the DSpace-specific database update tool has been removed. If you wish to (continue to) record client location data in
...
SOLR Statistics, you will need to make new arrangements.
...
See below.
Warning | ||
---|---|---|
| ||
In order to minimize downtime, it is always recommended to first perform a DSpace upgrade using a Development or Test server. You should note any problems you may have encountered (and also how to resolve them) before attempting to upgrade your Production server. It also gives you a chance to "practice" at the upgrade. Practice makes perfect, and minimizes problems and downtime. Additionally, if you are using a version control system, such as subversion or git, to manage your locally developed features or modifications, then you can do all of your upgrades in your local version control system on your Development server and commit the changes. That way your Production server can just checkout your well tested and upgraded code. |
Note |
---|
In the notes below |
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
DSpace 7.0 features some significant changes which you may wish to be aware of before beginning your upgrade:
[dspace]/config/config-definition.xml
(DSpace's Apache Commons Configuration settings), you will need to ensure those modifications are compatible with Apache Commons Configuration version 2. See the Apache Commons Configuration's configuration definition file reference for more details.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_dump -U [database-user] -f [backup-file-location] [database-name] |
...
[dspace]/config/config-definition.xml
(DSpace's Apache Commons Configuration settings), you will need to ensure those modifications are compatible with Apache Commons Configuration version 2. See the Apache Commons Configuration's configuration definition file reference for more details.Before you start your upgrade, it is strongly recommended that you create a backup of your DSpace content. 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_dump -U [database-user] -f [backup-file-location] [database-name] |
[dspace]/assetstore
by default, and any other assetstores configured in the [dspace]/config/dspace.cfg
"assetstore.dir" and "assetstore.dir.#" settings)[dspace]/config
. [dspace]/solr/statistics
. A simple copy of the logs or the Solr core directory tree 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.[dspace]/solr/authority
. As with the statistics data, make a copy of the directory tree should enable recovery from errors.DSpace 7.x requires the following versions of prerequisite software:
Refer to the Backend Requirements section of "Installing DSpace" for more details around configuring and installing these prerequisites.
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; |
From your old version of DSpace, dump your Anchor dump_solr dump_solr authority
and statistics
Solr cores. (Only necessary when upgrading from DSpace 6 or older & you want to keep both your authority records and/or SOLR Statistics)
Code Block | ||
---|---|---|
| ||
[dspace]/bin/dspace solr-export-statistics -i authority
[dspace]/bin/dspace solr-export-statistics -i statistics |
The dumps will be written to the directory [dspace]/solr-export
. This may take a long time and require quite a lot of storage. In particular, the statistics core is likely to be huge, perhaps double the size of the content of solr/statistics/data
. You should ensure that you have sufficient free storage.
This is not the same as the disaster-recovery backup that was done above. These dumps will be reloaded into new, reconfigured cores later.
If you are sharding your statistics data, you will need to dump each shard separately. The index names for prior years will be statistics-YYYY
(for example: statistics-2017 statistics-2018
etc.) The current year's statistics shard is named statistics
and you should dump that one too.
dspace-7.0
) or branch.Replace your old build.properties file with a local.cfg (ONLY REQUIRED if upgrading from DSpace 5 or previous): As of DSpace 6.0, the build.properties
configuration file has been replaced by an enhanced local.cfg
configuration file. Therefore, any old build.properties
file (or similar [dspace-source]/*.properties
files) WILL BE IGNORED. Instead, you should create a new local.cfg
file, based on the provided [dspace-source]/dspace/config/local.cfg.EXAMPLE
and use it to specify all of your locally customized DSpace configurations. This new local.cfg
can be used to override ANY setting in any other configuration file (dspace.cfg
or modules/*.cfg
). To override a default setting, simply copy the configuration into your local.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 dspace/config/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 Backend. Run the following commands to compile DSpace :
Code Block |
---|
cd [dspace-source]
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 | ||
---|---|---|
| ||
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: |
Stop Tomcat (or servlet container). Take down your servlet container.
$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.)Update DSpace Installation. Update the DSpace installation directory with the new code and libraries. Issue the following commands:
DSpace 7.x requires the following versions of prerequisite software:
Refer to the Prerequisite Software section of "Installing DSpace" for more details around configuring and installing these prerequisites.
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; |
authority
and statistics
Solr cores. (Only necessary when upgrading from DSpace 6 or older & you want to keep both your authority records and/or SOLR Statistics)Code Block | ||
---|---|---|
| ||
[dspace]/bin/dspace solr-export-statistics -i authority
[dspace]/bin/dspace solr-export-statistics -i statistics |
[dspace]/solr-export
. This may take a long time and require quite a lot of storage. In particular, the statistics core is likely to be huge, perhaps double the size of the content of solr/statistics/data
. You should ensure that you have sufficient free storage.statistics-YYYY
(for example: statistics-2017 statistics-2018
etc.) The current year's statistics shard is named statistics
and you should dump that one too.Replace your old build.properties file with a local.cfg (ONLY REQUIRED if upgrading from DSpace 5 or previous): As of DSpace 6.0, the build.properties
configuration file has been replaced by an enhanced local.cfg
configuration file. Therefore, any old build.properties
file (or similar [dspace-source]/*.properties
files) WILL BE IGNORED. Instead, you should create a new local.cfg
file, based on the provided [dspace-source]/dspace/config/local.cfg.EXAMPLE
and use it to specify all of your locally customized DSpace configurations. This new local.cfg
can be used to override ANY setting in any other configuration file (dspace.cfg
or modules/*.cfg
). To override a default setting, simply copy the configuration into your local.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 /dspace/config/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 Backend. 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 | ||
---|---|---|
| ||
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: |
Stop Tomcat (or servlet container). Take down your servlet container.
$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.)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 |
config
directory, and its subdirectories, concentrating on configurations your previously customized in your local.cfg. See also the Configuration Reference.First, create a temporary folder to copy your old v6 configurations into
Code Block |
---|
# Example of creating a [dspace]/config/temp folder for this migration
# You must replace [dspace] with the full path of your DSpace 7 installation.
cd [dspace]/config
mkdir temp |
Run the command-line migration script to migrate them to v7 configuration files
Code Block |
---|
# This example uses [dspace] as a placeholder for all paths.
# Replace it with either the absolute or relative path of these files
[dspace]/bin/dspace submission-forms-migrate -s [dspace]/config/temp/item-submission.xml -f [dspace]/config/temp/input-forms.xml |
[dspace]/config/item-submission.xml.migrated
[dspace]/config/submission-forms.xml.migrated
[dspace]/config/
folder, therefore retaining the inline comments in those default files.[dspace]/config/GeoLiteCity.dat
file is no longer maintained by its provider. You can delete it. The new file is named GeoLite2-City.mmdb
by default. The upgrade process will automatically download a copy of the new database if you don't already have it. If you have configured a different name and/or location for this file, you should check the setting of usage-statistics.dbfile
in [dspace]/config/modules/usage-statistics.cfg
(and perhaps move your custom setting to local.cfg
).dspace.cfg
and/or local.cfg
all lines referencing org.dspace.app.mediafilter.WordFilter
and uncomment all lines referencing org.dspace.app.mediafilter.PoiWordFilter
.solr.server
to point at your new Solr v7 service. It will probably become something like solr.server = https://${dspace.hostname}:8983/solr
. Also review the values ofdiscovery.search.server
oai.solr.url
solr.authority.server
solr.statistics.server
sitemap.cron
setting exists in the dspace.cfg which controls when Sitemaps are generated. By default they are enabled to update once per day, for optimal SEO. See Search Engine Optimization docs for more detail./dspace generate-sitemaps
", this system cron job can be removed in favor of the new sitemap.cron
setting.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):
"server" = (Required) This contains all of the standard back-end services: REST, SWORD, SWORDv2, RDF, OAI. It must be installed for the DSpace UI to work.
Enable 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. Also move or delete superseded webapps (oai, sword, swordv2, rdf) that you may have here.
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 rare scenarios, if your database's "sequences" are outdated, inconsistent or incorrect, a database migration error may occur (in your DSpace logs). While this is seemingly a rare occurrence, you may choose to run the "update-sequences" command PRIOR to upgrading your database. If your database sequences are inconsistent or incorrect, this "update-sequences" command will auto-correct them (otherwise, it will do nothing).
Code Block |
---|
# General PostgreSQL example
psql -U [database-user] -f [dspace]/etc/postgres/update-sequences.sql [database-name]
# Example for a PostgreSQL database named "dspace", and a user account named "dspace"
# psql -U dspace -f [dspace]/etc/postgres/update-sequences.sql dspace |
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 |
If you are upgrading from DSpace 6 or earlier, there are database changes which were previously optional but now are mandatory (specifically Configurable Workflow database changes). Instead of (or after) the above command:
Code Block |
---|
[dspace]/bin/dspace database migrate ignored |
to apply these changes.
The database migration should also automatically trigger your metadata/file registries to be updated (based on the config files in [dspace]/config/registries/). However, if this update was NOT triggered, you can also manually run these registry updates (they will not harm existing registry contents) as follows:
Code Block |
---|
[dspace]/bin/dspace registry-loader -metadata [dspace]/config/registries/dcterms-types.xml
[dspace]/bin/dspace registry-loader -metadata [dspace]/config/registries/dublin-core-types.xml
[dspace]/bin/dspace registry-loader -metadata [dspace]/config/registries/eperson-types.xml
[dspace]/bin/dspace registry-loader -metadata [dspace]/config/registries/local-types.xml
[dspace]/bin/dspace registry-loader -metadata [dspace]/config/registries/sword-metadata.xml
[dspace]/bin/dspace registry-loader -metadata [dspace]/config/registries/workflow-types.xml
|
[dspace-src]/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/
)./dspace database migrate
)Note | ||
---|---|---|
| ||
If any database migrations are run (even during minor release upgrades), then by default DSpace will automatically reindex all content in your site. This process is run automatically in order to ensure that any database-level changes are also immediately updated within the search/browse interfaces. See the notes below under "Restart Tomcat (servlet container)" for more information. However, you may choose to skip automatic reindexing. Some sites choose to run the reindex process manually in order to better control when/how it runs. To disable automatic reindexing, setdiscovery.autoReindex = false in config/local.cfg or config/modules/discovery.cfg .As you have disabled automatic reindexing, make sure to manually reindex your site by running WARNING: It is not recommended to skip automatic reindexing, unless you will manually reindex at a later time, or have verified that a reindex is not necessary. Forgetting to reindex your site after an upgrade may result in unexpected errors or instabilties. |
Sites with Oracle database backends (and Configurable Workflow enabled) may need to run a "repair" on your database.
In version 6.3, we fixed an Oracle migration issue related to Configurable (XML) Workflow. See DS-3788.
If you are upgrading an Oracle-based site to 6.3 from 6.0, 6.1 or 6.2 AND had Configurable Workflow already enabled, then you will need to manually "repair" your database to align it with the latest schema. This does not affect PostgreSQL-based backends or any sites that are upgrading from 5.x or below.
Simply run the following to repair your Oracle database: [dspace]/bin/dspace database repair
Copy the new, empty Solr cores to your new Solr instance.
Code Block | ||
---|---|---|
| ||
cp -r [dspace]/solr/* [solr]/server/solr
chown -R solr:solr [solr]/server/solr/authority [solr]/server/solr/oai [solr]/server/solr/search [solr]/server/solr/statistics |
authority
and statistics
from the dumps that you made earlier (not the disaster-recovery backup).Code Block | ||
---|---|---|
| ||
[dspace]/bin/dspace solr-import-statistics -i authority
[dspace]/bin/dspace solr-import-statistics -i statistics |
... statistics-2017 statistics-2018 statistics
.For Statistics shards only, upgrade legacy DSpace Object Identifiers (pre-6.4 statistics) to UUID Identifiers.
Code Block |
---|
[dspace]/bin/dspace solr-upgrade-statistics-6x -i statistics |
Again If you had sharded your statistics, you will need to run this for each shard separately. See also SOLR Statistics Maintenance#UpgradeLegacyDSpaceObjectIdentifiers(pre-6xstatistics)toDSpace6xUUIDIdentifiers
Rebuild the oai
and search
cores.
Code Block | ||
---|---|---|
| ||
[dspace]/bin/dspace oai import
[dspace]/bin/dspace index-discovery |
If you have a great deal of content, this could take a long time.
Update Handle Server Configuration. If you are using the built-in Handle server, you'll need to add the follow to the server_config section of your config.dct file:
Code Block |
---|
"enable_txn_queue" = "no" |
geoipupdate
tool directly via their package manager. You will still need to configure your license key prior to usage.usage-statistics.dbfile
in your local.cfg
configuration file. config/
directory (if they exist).usage-statistics.dbfile
in your local.cfg
configuration file. Restart Tomcat (servlet container). Now restart your servlet container (Tomcat/Jetty/Resin) and test out the upgrade.
[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.
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).
[dspace]/bin/start-handle-server.bat
script is available to more easily startup your Handle Server.In very rare instances, a Flyway database migration will be "ignored." One known instance of this is documented in DS-3407. If you are upgrading from DSpace 5.x to a later version of DSpace, the migration put in place to address DS-2818 will be "ignored" because it is not necessary. There is a special command you can run which will un-flag this migration as "ignored."
Code Block |
---|
dspace database migrate ignored |
target/dspace-installer
ant update |
config
directory, and its subdirectories, concentrating on configurations your previously customized in your local.cfg. See also the Configuration Reference.First, create a temporary folder to copy your old v6 configurations into
Code Block |
---|
# Example of creating a [dspace]/config/temp folder for this migration
# You must replace [dspace] with the full path of your DSpace 7 installation.
cd [dspace]/config
mkdir temp |
Run the command-line migration script to migrate them to v7 configuration files
Code Block |
---|
# This example uses [dspace] as a placeholder for all paths.
# Replace it with either the absolute or relative path of these files
[dspace]/bin/dspace submission-forms-migrate -s [dspace]/config/temp/item-submission.xml -f [dspace]/config/temp/input-forms.xml |
[dspace]/config/item-submission.xml.migrated
[dspace]/config/submission-forms.xml.migrated
[dspace]/config/
folder, therefore retaining the inline comments in those default files.[dspace]/config/GeoLiteCity.dat
file is no longer maintained by its provider. You can delete it. The new file is named GeoLite2-City.mmdb
by default. The upgrade process will automatically download a copy of the new database if you don't already have it. If you have configured a different name and/or location for this file, you should check the setting of usage-statistics.dbfile
in [dspace]/config/modules/usage-statistics.cfg
(and perhaps move your custom setting to local.cfg
).dspace.cfg
and/or local.cfg
all lines referencing org.dspace.app.mediafilter.WordFilter
and uncomment all lines referencing org.dspace.app.mediafilter.PoiWordFilter
.solr.server
to point at your new Solr external service. It will probably become something like solr.server = https://${dspace.hostname}:8983/solr
. Also review the values ofdiscovery.search.server
oai.solr.url
solr.authority.server
solr.statistics.server
sitemap.cron
setting exists in the dspace.cfg which controls when Sitemaps are generated. By default they are enabled to update once per day, for optimal SEO. See Search Engine Optimization docs for more detail./dspace generate-sitemaps
", this system cron job can be removed in favor of the new sitemap.cron
setting.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 rare scenarios, if your database's "sequences" are outdated, inconsistent or incorrect, a database migration error may occur (in your DSpace logs). While this is seemingly a rare occurrence, you may choose to run the "update-sequences" command PRIOR to upgrading your database. If your database sequences are inconsistent or incorrect, this "update-sequences" command will auto-correct them (otherwise, it will do nothing).
Code Block |
---|
# General PostgreSQL example
psql -U [database-user] -f [dspace]/etc/postgres/update-sequences.sql [database-name]
# Example for a PostgreSQL database named "dspace", and a user account named "dspace"
# psql -U dspace -f [dspace]/etc/postgres/update-sequences.sql dspace |
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 |
If you are upgrading from DSpace 6 or earlier, there are database changes which were previously optional but now are mandatory (specifically Configurable Workflow database changes). Instead of (or after) the above command:
Code Block |
---|
[dspace]/bin/dspace database migrate ignored |
to apply these changes.
[dspace-src]/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/
)./dspace database migrate
)Note | ||
---|---|---|
| ||
If any database migrations are run (even during minor release upgrades), then by default DSpace will automatically reindex all content in your site. This process is run automatically in order to ensure that any database-level changes are also immediately updated within the search/browse interfaces. See the notes below under "Restart Tomcat (servlet container)" for more information. However, you may choose to skip automatic reindexing. Some sites choose to run the reindex process manually in order to better control when/how it runs. To disable automatic reindexing, setdiscovery.autoReindex = false in config/local.cfg or config/modules/discovery.cfg .As you have disabled automatic reindexing, make sure to manually reindex your site by running WARNING: It is not recommended to skip automatic reindexing, unless you will manually reindex at a later time, or have verified that a reindex is not necessary. Forgetting to reindex your site after an upgrade may result in unexpected errors or instabilties. |
Note | ||
---|---|---|
| ||
In version 6.3, we fixed an Oracle migration issue related to Configurable (XML) Workflow. See DS-3788. If you are upgrading an Oracle-based site to 6.3 from 6.0, 6.1 or 6.2 AND had Configurable Workflow already enabled, then you will need to manually "repair" your database to align it with the latest schema. This does not affect PostgreSQL-based backends or any sites that are upgrading from 5.x or below. Simply run the following to repair your Oracle database: |
Deploy Server web application: The DSpace backend consists of a single "server" webapp (in [dspace]/webapps/server
). You need to deploy this webapp into your Servlet Container (e.g. Tomcat). Generally, there are two options (or techniques) which you could use...either configure Tomcat to find the DSpace "server" webapp, or copy the "server" webapp into Tomcat's own webapps folder. For more information & example commands, see the Installation Guide
[dspace]/webapps/rest
). It is NOT used by the DSpace UI/frontend. So, most users should skip this step.Copy the new, empty Solr cores to your new Solr instance.
Code Block |
---|
cp -R [dspace]/solr/* [solr]/server/solr/configsets
chown -R solr:solr [solr]/server/solr/configsets |
Start Solr, or restart it if it is running, so that these new cores are loaded.
Code Block |
---|
[solr]/bin/solr restart |
Anchor | ||||
---|---|---|---|---|
|
authority
and statistics
from the dumps that you made earlier (not the disaster-recovery backup).Code Block | ||
---|---|---|
| ||
[dspace]/bin/dspace solr-import-statistics -i authority
[dspace]/bin/dspace solr-import-statistics -i statistics |
This could take quite some time.
If you had sharded your statistics, you will need to load the dump of each shard separately. As when dumping, the index names will be ... statistics-2017 statistics-2018 statistics
.
For Statistics shards only, upgrade legacy DSpace Object Identifiers (pre-6.4 statistics) to UUID Identifiers.
Code Block |
---|
[dspace]/bin/dspace solr-upgrade-statistics-6x -i statistics |
Again If you had sharded your statistics, you will need to run this for each shard separately. See also SOLR Statistics Maintenance#UpgradeLegacyDSpaceObjectIdentifiers(pre-6xstatistics)toDSpace6xUUIDIdentifiers
Rebuild the oai
and search
cores.
Code Block | ||
---|---|---|
| ||
[dspace]/bin/dspace oai import
[dspace]/bin/dspace index-discovery -b |
If you have a great deal of content, this could take a long time.
Update Handle Server Configuration. (Only necessary if upgrading from 6.x or below) If you are using the built-in Handle server (most installations do), you'll need to add the follow to the end of the server_config section of your [dspace]/handle-server/config.dct
file (the only new line is the "enable_txn_queue" line)
Code Block |
---|
"case_sensitive" = "no"
"storage_type" = "CUSTOM"
"storage_class" = "org.dspace.handle.HandlePlugin"
"enable_txn_queue" = "no" |
./dspace make-handle-config
script, which is in charge of updating this config.dct
file.geoipupdate
tool directly via their package manager. You will still need to configure your license key prior to usage.usage-statistics.dbfile
in your local.cfg
configuration file. config/
directory (if they exist).usage-statistics.dbfile
in your local.cfg
configuration file. Restart Tomcat (servlet container). Now restart your servlet container (Tomcat/Jetty/Resin) and test out the upgrade.
[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.
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.
[dspace]/bin/start-handle-server.bat
script is available to more easily startup your Handle Server.In very rare instances, a Flyway database migration will be "ignored." One known instance of this is documented in DS-3407. If you are upgrading from DSpace 5.x to a later version of DSpace, the migration put in place to address DS-2818 will be "ignored" because it is not necessary. There is a special command you can run which will un-flag this migration as "ignored."
Code Block |
---|
dspace database migrate ignored |
Info | ||
---|---|---|
| ||
The The presence of |
The database migration (./dspace database migratte) should automatically trigger your metadata/file registries to be updated (based on the config files in [dspace]/config/registries/
). However, if this update was NOT triggered, you can also manually run these registry updates (they will not harm existing registry contents) as follows:
Code Block | ||
---|---|---|
[dspace]/bin/dspace registry-loader -metadata [dspace]/config/registries/dcterms-types.xml
[dspace]/bin/dspace registry-loader -metadata [dspace]/config/registries/dublin-core-types.xml
[dspace]/bin/dspace registry-loader -metadata [dspace]/config/registries/eperson-types.xml
[dspace]/bin/dspace registry-loader -metadata [dspace]/config/registries/local-types.xml
[dspace]/bin/dspace registry-loader -metadata [dspace]/config/registries/sword-metadata.xml
[dspace]/bin/dspace registry-loader -metadata [dspace]/config/registries/workflow-types.xml
| ||
Info | ||
| ||
The ignored migrations can indicate a problem in the database. It's best not to use this command unless instructed to. |