Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. First, you should STOP tomcat on the old server.  These steps require the site to be down.
  2. Update sequences (optional) - When migrating content, sometimes sites will find that database sequences will be outdated or incorrect.  This can result in "duplicate key" errors during the database migration to the latest version.  To avoid this, before  you export your data, run this older copy of the "update-sequences" command on your database.  This should ensure your database sequences are updated before you dump your data.  

    Code Block
    # If upgrading from DSpace 6.4, run this on the old server
    ./dspace database update-sequences
    
    # If upgrading from any other prior releaseor below, run this on your old database
    psql -U [database-user] -f [dspace]/etc/postgres/update-sequences.sql [database-name]
    # e.g. psql -U dspace -f [dspace]/etc/postgres/update-sequences.sql dspace
    1. NOTE: It is important to run the "update-sequences" script which came with the OLDER version of DSpace (the version you are migrating from)!  If you've misplaced this older version of the script, you can download it from our codebase & run it via the "psql" command above.
      1. DSpace 6.x version of "update-sequences.sql": https://github.com/DSpace/DSpace/blob/dspace-6_x/dspace/etc/postgres/update-sequences.sql
      2. DSpace 5.x version of "update-sequences.sql": https://github.com/DSpace/DSpace/blob/dspace-5_x/dspace/etc/postgres/update-sequences.sql
  3. The database data - Make sure to export the database data from your old DSpace site using a tool like "pg_dump" (for PostgresSQL).  If you use "pg_dump", you'll end up with a large SQL file which contains all the data from your old database. 

    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]


  4. 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.
  5. 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. Keep in mind, this may require you to start Tomcat back up if Solr is running in Tomcat.)

...