Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Clarify Solr is only accessible to backend


  1. Download the latest DSpace release from the DSpace GitHub Repository. You can choose to either download the zip or tar.gz file provided by GitHub, or you can use "git" to checkout the appropriate tag (e.g. dspace-7.2) or branch.
    1. Unpack it using "unzip" or "gunzip".  If you have an older version of DSpace installed on this same server, you may wish to unpack it to a different location than that release.  This will ensure no files are accidentally overwritten during the unpacking process, and allow you to compare configs side by side.
    2. For ease of reference, we will refer to the location of this unzipped version of the DSpace release as [dspace-source] in the remainder of these instructions.
  2. If upgrading from 6.x or below, a few extra steps are required before you install DSpace 7.x.  If you are upgrading from a previous version of 7.x, skip this and move along.
    1. Ensure that your database is compatible: Starting with DSpace 6.x, there are new database requirements for DSpace (refer to the Backend Requirements section of "Installing DSpace"  for full details).
      1. PostgreSQL databases: PostgreSQL 9.4 or above is required and the "pgcrypto" extension must be installed.
        1. Notes on installing pgcrypto
          1. 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".
          2. On Windows, this extension should be provided automatically by the installer (check your "[PostgreSQL]/share/extension" folder for files starting with "pgcrypto")
        2. 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;

      2. Oracle databases: Oracle support has been deprecated in DSpace.  It will no longer be supported as of June/July 2023.  See for more details.
    2. Anchor
      From your old version of DSpace, dump your authority and statistics Solr cores.  (Only necessary if 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-exportThis 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.


      Unfortunately, the "solr-export-statistics" script was not created until DSpace 5.x.  Therefore, you will not be able to upgrade statistics from 4.x or below unless you first upgrade to either 5.x or 6.x.  This upgrade could be done in a test environment, just to allow you to export your statistics (so they can be reimported into 7.x below).  But, there's unfortunately no direct way to migrate 4.x (or 3.x or 1.x.x) Solr Statistics into 7.x.

    3. Move your old Solr cores to a safe location in case of trouble with the upgrade procedure.  If you leave them in place, you will get a mixture of old and new files that the new Solr will refuse to load.
    4. (If upgrading from 5.x or below) Replace your old file with a local.cfg: As of DSpace 6.0, the configuration file has been replaced by an enhanced local.cfg configuration file. Therefore, any old 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.

  3. 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

    titleDefaults 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 -U clean package

  4. Stop Tomcat (or servlet container). Take down your servlet container. 

    1. For Tomcat, use the $CATALINA_HOME/ script. (Many Unix-based installations will have a startup/shutdown script in the /etc/init.d or /etc/rc.d directories.)
  5. Update your DSpace Configurations. Depending on the version of DSpace you are upgrading from, not all steps are required.  
    1. If you are upgrading from a prior version of DSpace 7.x, you will need to perform the following steps.
      1. As of DSpace 7.3, the "db.dialect" configuration has changed from "" to "org.hibernate.dialect.PostgreSQL94Dialect".  Therefore, MAKE SURE that your dspace.cfg or local.cfg has this setting:

        Code Block
        db.dialect = org.hibernate.dialect.PostgreSQL94Dialect 

      2. You may wish to review the Release Notes for details about new features. There may be new configurations you may wish to tweak to enable/disable those features.
      3. Make sure your existing 7.x local.cfg is in the source directory (e.g. [dspace-source]/dspace/config/local.cfg).  That way your existing 7.x configuration gets reinstalled alongside the new version of DSpace.
    2. If you are upgrading from DSpace 6.x or below, you will need to perform these steps.
      1. Review your customized configurations (recommended to be in local.cfg): As mentioned above, we recommend any local configuration changes be placed in a local.cfg Configuration File.  With any major upgrade some configurations may have changed. Therefore, it is recommended to review all configuration changes that exist in the config directory, and its subdirectories, concentrating on configurations your previously customized in your local.cfg.  See also the Configuration Reference.
      2. Remove obsolete configurations.  With the removal of the JSPUI and XMLUI, a large number of server-side (backend) configurations were made obsolete and were therefore removed between the 6.x and 7.0 release. A full list can be found in the Release Notes.
      3. Remove BTE Spring configuration: If it exists, remove the [dspace]/config/spring/api/bte.xml Spring Configuration.  This file is no longer needed as the BTE framework was removed in favor of Live Import from external sources.
      4. Migrate or recreate your Submission configuration.  As of DSpace 7, the submission configuration has changed.  The format of the "item-submission.xml" file has been updated, and the older "input-forms.xml" has been replaced by a new "submission-forms.xml".   You can choose to either start fresh with the new v7 configuration files, or you can use the steps below to migrate your old configurations into the new format.  See the Submission User Interface for more information
        1.  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

        2. Copy your old (v5 or v6) "item-submission.xml" and "input-forms.xml" into that temporary folder
        3. 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

        4. The result will be two files. These are valid v7 configurations based on your original submission configuration files.
          1. [dspace]/config/item-submission.xml.migrated 
          2. [dspace]/config/submission-forms.xml.migrated 
        5. These "*.migrated" files have no inline comments, so you may want to edit them further before installing them (by removing the ".migrated" suffix).  Alternatively, you may choose to copy sections of the *.migrated files into the default configurations in the [dspace]/config/ folder, therefore retaining the inline comments in those default files.
      5. City IP Database file for Solr Statistics has been renamed. The old [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. 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).
      6. tm-extractors media filtering (WordFilter) no longer exists:  the PoiWordFilter plugin now fulfills this function.  If you still have WordFilter configured, remove from dspace.cfg and/or local.cfg all lines referencing and uncomment all lines referencing
      7. Re-configure Solr URLs:  change the value of solr.server to point at your new Solr external service.  It will probably become something like solr.server = https://${dspace.hostname}localhost:8983/solr.  Solr only needs to be accessible to the DSpace backend, and should not be publicly available on the webIt can either be run on localhost or via a hostname (if run on a separate server from the backend). Also review the values of
        2. oai.solr.url
        3. solr.authority.server
        4. solr-statistics.server
      8. Sitemaps are now automatically generated/updated: A new 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
        1. Because of this change, if you had a system cron job which ran "./dspace generate-sitemaps", this system cron job can be removed in favor of the new sitemap.cron setting.
    3. If you are upgrading from DSpace 5.x or below, there are a few additional configuration changes to be aware of.
      1. Search/Browse requires Discovery: 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.
      2. XPDF media filtering no longer exists: XPDF media filtering, deprecated in DSpace 5, has been removed.  If you used this, you will need to reconfigure using the remaining alternatives (e.g. PDF Text Extractor and/or ImageMagick PDF Thumbnail Generator).
  6. 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

  7. Upgrade your database (required for all upgrades). 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).
    1. (Optional) If desired, you can optionally verify which migrations have not yet been run on your database.  You can use this to double check that DSpace is recognizing your database version appropriately

      Code Block
      [dspace]/bin/dspace database info
      # If you are upgrading from 5.x or later, then this will list all migrations 
      #    which were previously run, along with any which are "PENDING" or "IGNORED" 
      #    that need to be run to upgrade your database.
      # If you are upgrading from 4.x or earlier, this will attempt to detect which
      #    version of DSpace you are upgrading from. Look for a line at the bottom 
      #    that says something like: 
      #    "Your database looks to be compatible with DSpace version ___"

    2. (Optional) 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
      [dspace]/bin/dspace database update-sequences
      # NOTE: In DSpace 6 or below, this script had to be run via psql from [dspace]/etc/postgres/update-sequences.sql
      # For example: psql -U [database-user] -f [dspace]/etc/postgres/update-sequences.sql [database-name]
      # If you still have this script under [dspace]/etc/, you can remove that entire [dspace]/etc/ folder, as it's no longer needed in DSpace 7 or above.

    3. (REQUIRED) 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
      # If upgrading from DSpace 6.x or below
      [dspace]/bin/dspace database migrate ignored
      # If upgrading from an earlier version of DSpace 7.x
      [dspace]/bin/dspace database migrate

      If you are upgrading from DSpace 6.x or below be sure you include the "ignored" parameter! There are database changes which were previously optional but now are mandatory (specifically Configurable Workflow database changes).

    4. If the database upgrade process fails or throws errors, then look at the "Troubleshooting Upgrade Issues" section below for possible tips/hints.
    5. More information on the "database" command can be found in Database Utilities documentation.
    titleBy default, your site will be automatically reindexed after a database upgrade

    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, set discovery.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 [dspace]/bin/dspace index-discovery -b (This must be run after restarting Tomcat)

    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.

    titleSites 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

    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

    Then proceed with the "migrate" command as described above.

  8. 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

    1. Optionally, you may also install the deprecated DSpace 6.x REST API web application ("rest" webapp).  If you previously used the DSpace 6.x REST API, for backwards compatibility the old, deprecated "rest" webapp is still available to install (in  [dspace]/webapps/rest). It is NOT used by the DSpace UI/frontend.  So, most users should skip this step.
  9. If upgrading from a previous version of 7.x, a few extra steps may be required before starting Tomcat.
    1. Update your Solr schema definition(s)
      1. If you are upgrading from 7.0 to a later version of 7.x, you will need to update your 'search' Solr schema definition with the new version (in 7.1 a new "search.entitytype" field was added to this schema). 

        1. Copy the updated schema.xml to your Solr 'search' core, e.g. 

          Code Block
          # The destination directory may differ per OS.
          # Just replace the existing 'search' core "schema.xml" with the new one.
          cp [dspace]/solr/search/conf/schema.xml /var/solr/data/search/conf/

        2. Restart Solr

          Code Block
          [solr]/bin/solr restart

        3. Reindex your site 

          Code Block
          [dspace]/bin/dspace index-discovery -b

  10. If upgrading from 6.x or below, a few extra steps are required to before starting Tomcat.If you are upgrading from a previous version of 7.x, skip this and move along.
    1. Anchor
      Install new Solr cores and rebuild your indexes.
      (Required when upgrading from 6.x or below. This may be done after starting Tomcat, but is required for DSpace 7.x to function properly.)
      1. 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

      2. Start Solr, or restart it if it is running, so that these new cores are loaded.

        Code Block
        [solr]/bin/solr restart

      3. You can check the status of Solr and your new DSpace cores by using its administrative web interface.  Browse to ${solr.server} (e.g. http://localhost:8983/solr/) to see if Solr is running well, then look at the cores by selecting (on the left) Core Admin or using the Core Selector drop list.

        1. For example, to test that your "search" core is setup properly, try accessing the URL ${solr.server}/search/select. It should run an empty query against the "search" core, returning an empty JSON result. If it returns an error, then that means your "search" core is missing or not installed properly.
      4. Anchor
        Load 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.

      5. 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

      6. 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.

    2. Update Handle Server Configuration. (Required when upgrading from 6.x or below) Because we've updated to Handle Server v9, 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"

      1. Alternatively, you could re-run the ./dspace make-handle-config script, which is in charge of updating this config.dct file.
    3. Anchor
      (Optional) Set up IP to City database for location-based statistics.
        If you wish to (continue to) record the geographic origin of client activity, you will need to install (and regularly update) one of the following:
      1. Either, a copy of  MaxMind's GeoLite City database (in MMDB format)
        • NOTE: Installing MaxMind GeoLite2 is free.  However, you must sign up for a (free) MaxMind account in order to obtain a license key to use the GeoLite2 database.
        • You may download GeoLite2 directly from MaxMind, or many Linux distributions provide the geoipupdate tool directly via their package manager.  You will still need to configure your license key prior to usage.
        • Once the "GeoLite2-City.mmdb" database file is installed on your system,  you will need to configure its location as the value of  usage-statistics.dbfile  in your local.cfg configuration file
        • You can discard any old GeoLiteCity.dat database(s) found in the config/ directory (if they exist).
        • See the "Managing the City Database File" section of  SOLR Statistics  for more information about using a City Database with DSpace.
      2. Or, you can alternatively use/install DB-IP's City Lite database (in MMDB format)
        • This database is also free to use, but does not require an account to download.
        • Once the "dbip-city-lite.mmdb" database file is installed on your system,  you will need to configure its location as the value of  usage-statistics.dbfile  in your local.cfg configuration file
        • See the "Managing the City Database File" section of  SOLR Statistics  for more information about using a City Database with DSpace.
    4. Check your cron / Task Scheduler jobs.  In recent versions of DSpace, some of the scripts names have changed. 

      1. Check the Scheduled Tasks via Cron documentation for details.  If you have been using the dspace stats-util --optimize tool, it is no longer recommended and you should stop.

      2. WINDOWS NOTE: If you are running the Handle Server on a Windows machine, a new [dspace]/bin/start-handle-server.bat script is available to more easily startup your Handle Server.
  11. Restart Tomcat (servlet container). Now restart your servlet container (Tomcat/Jetty/Resin) and test out the upgrade.

    1. 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.
  12. 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.

    1. If you wish to skip automatic reindexing, please see the Note above under the "Upgrade your Database" step.
    2. When upgrading from 7.0/7.1/7.2 to 7.3, it is REQUIRED to reindex your content. If reindexing does not occur automatically, or you disabled it, then run "./dspace index-discovery -b" to reindex your site. 

      Code Block
      # Manually reindex all content
      ./dspace index-discovery -b

  13. Install or Upgrade the new User Interface (see below)