Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: update database restore instructions

...

  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.   For Postgres, use the "dropdb" command: https://www.postgresql.org/docs/current/app-dropdb.html  For example: "dropdb 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.)
      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 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 [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 in step 2, then you can import the statistics from that exported file using the "solr-import-statistics" tool provided with DSpace, see "Import SOLR Statistics" in the Solr Statistics Maintenance guide. (Requires Solr to be running)

...