All Versions
- DSpace 7.x (Current Release)
- DSpace 8.x (Unreleased)
- DSpace 6.x (EOL)
- DSpace 5.x (EOL)
- More Versions...
...
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.
htmlIf 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] |
...
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.
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 |
Import the database dump you created in
stepStep 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.)
[dspace]/assetstore/
folder on the new server....
Perform these steps on the new server.
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 |
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 |
# (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.
...
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.