Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor cleanup/clarifications

...

  1. First, you should STOP tomcat on the new server.  These steps require the site to be down.
  2. The database data - Make sure to export the database data from your old DSpace site using a tool like "pg_dump" (for PostgresSQL)

    : https://www.postgresql.org/docs/current/backup-dump

    .

    html

      If you use "pg_dump", you'll end up with a large SQL file which contains all the data from your old database. 

    (e.g. "

    Code Block
    # Example of using pg_dump to export a database to an output file
    pg_dump -U [db_username] [db_name] > [output_file.sql]
    ")


  3. The "assetstore" folder - This folder is in your DSpace installation directory and it contains all the files stored in your DSpace.  You will need all the contents of this folder (including all subdirectories), so you could choose to zip it up or you could copy it over directly.
  4. The Solr data (optional) - Both DSpace authority and statistics are stored in Solr. If you want to keep these, you will want to export them from the old Solr and move them over.  Use the "solr-export-statistics" tool provided with DSpace:  see "Export SOLR Statistics" in the Solr Statistics Maintenance guide.   (Requires Solr to be running)

...

Copy the data you've prepared in step Step 2 over to the new server.

Now, you'll import this data into your new installation of DSpace (created in step Step 1).

Perform these steps on the new server. 

  1. First, you must STOP Tomcat on the new server.
  2. The database data - Before you can import the data, you must delete the new, empty database.
    1. Delete/Clean the new, empty database (created in step 1) as you will have empty tables created during the installation. The easiest way to achieve this is to run the "./dspace database clean" command. Keep in mind it requires temporarily enabling it via "db.cleanDisabled=false" in your local.cfg. (After the "clean" command succeeds, make sure to remove this configuration.)

      Code Block
      # Delete everything in your database
      # Requires temporarily setting "db.cleanDisabled=false" in your local.cfg
      ./dspace database clean


      1. Alternatively, PostgreSQL users could delete the entire database (using dropdb command, e.g. "dropdb -U [db_username] [db_name]") and recreate it based on the "Database Setup" instructions in Installing DSpace.
    2. Import the database dump you created in

      step

      Step 2 (above), which will recreate this database with all your old data in it.  For Postgres, you can use the "psql" command

      : https://www.postgresql.org/docs/current/app-psql.html  For example: "psql -U

      .

      Code Block
      # Example of using psql to import data from a SQL file into a database
      psql -U [db_username] [db_name] < [output_file.sql]
      ")   

      (NOTICE the direction of the angle character... in this command you are telling Postgres to execute all the commands contained in your "output_file.sql", which will cause it to recreate all the database data in your new database.)

  3. The "assetstore" folder - Delete the empty  assetstore folder on the new server.  Copy the entire assestore folder (and all subdirectories) from the old server to the new one.   In the end, you should have a several subdirectory hierarchies (containing your files) under the [dspace]/assetstore/ folder on the new server.
  4. The Solr data (optional) - If you exported the statistics or authority data in step Step 2, then you can import this data from the statistics from that exported file files using the "solr-import-statistics" tool provided with DSpace, see "Import SOLR Statistics" in the Solr Statistics Maintenance guide. (Requires Solr to be running)

...

Perform these steps on the new server. 

  1. Migrate/Upgrade the database to the latest version - Now that your old data is migrated, you MUST ensure it's using the latest database updates based on the new DSpace you've installed.  Review the database steps in Upgrading DSpace and follow the instructions there.  

    At a basic level, you will need to run "./dspace database migrate ignored" to ensure all database migrations run. 

    Code Block
    # Migrate your old data to the latest DSpace version
    # WARNING: You must review the Upgrading DSpace docs to see if there are any additional database steps listed there!
    ./dspace database migrate ignored


    NOTE: You should check the logs (dspace.log) for errors.  Additional steps may be documented in the Upgrade Upgrading DSpace guide.
  2. Start Tomcat.  This will bring your new DSpace back up, with the migrated data in place.  Check the backend logs (dspace.log and Tomcat log) to ensure no errors occur on startup.
  3. Reindex all content - This will ensure all search/browse functionality works in the DSpace site. 

    Run "

    Optionally, if you use OAI-PMH, you will want to reindex content into there as well.

    Code Block
    # Reindex all your content in DSpace
    ./dspace index-discovery -b
    ".   Until
    
    
    # (Optionally) also reindex everything into OAI-PMH endpoint
    ./dspace oai import

    NOTE: Until this command completes (it may take a while for large sites), you will not be able to fully browse/search the content from the User Interface.  To check the progress of the reindex, check your dspace.log file.

Step 5: Review the Upgrade Instructions and final cleanup

...

FINALLY, test the new site and verify that all the content, user accounts, etc. have moved over successfully.  If you encounter any issues, see our Troubleshoot an error guide for hints/tips on finding the underlying error message & reporting it to Support lists/channels.  Also make sure to check our list of Common Installation Issues in the Installing DSpace guide.