DSpace to Hyrax Migration - nycrecords/gpp-hyrax GitHub Wiki
Export DSpace data
Steps:
- SSH into GPP Production app server
- Create a directory to store the data.
mkdir export_test
- Run
/appdata/dspace/bin/dspace export --type=COLLECTION --id=1611816b-90c3-4b9e-9894-e38922f1c68e --dest=export_test --number=1
- Zip the directory containing the exported data.
zip -r export_test.zip export_test
- SCP the zip file to the Hyrax Production app server.
Import into Hyrax
Steps:
- Unzip the zip file into desired directory.
- Start Hyrax application.
- Make sure that
bundle exec rake db:seed
has previously been run so that therequired_reports
andagencies
tables have been populated. - Set
LIBRARY_USER_EMAIL
in your.env
file with the email of the user that you want to be the owner of all imported or late notice submissions. Make sure this user is in thelibrary_reviewers
role. - Set
DSPACE_EXPORT_PATH
in your.env
file with the path to the directory containing your exported DSpace data. - Set
DSPACE_IMPORT_STARTING_INDEX
in your.env
file to0
. - Start the import with
bundle exec rake dspace_import
.
Notes
If the import stops before processing all the submission you can start the import from where you left off by doing the following:
- In the output of the script and look for the last instance of
Finished processing submission at: <DSPACE_EXPORT_PATH>/<LAST_PROCESSED_SUBMISSION>
. - Set
DSPACE_IMPORT_STARTING_INDEX
in your.env
file to<LAST_PROCESSED_SUBMISSION>
from the step above. - For example, If you see
Finished processing submission at: /Users/jyu/export_test/10
. SetDSPACE_IMPORT_STARTING_INDEX
= 10. - Start the import again with
bundle exec rake dspace_import
.
Each submission imported will trigger a Submission Approval email sent to the email at LIBRARY_USER_EMAIL
. To avoid spam you can set a rule in Outlook to filter all emails with the subject "Government Publications Portal: Submission Approval" to a different folder.