OAI-PMH showing incorrect Repository Information and contains wrong links

99 views
Skip to first unread message

ZiGi

unread,
Jan 20, 2023, 6:28:41 AM1/20/23
to DSpace Technical Support
Hello everyone,
Yesterday I decided to change dspace url for example: from  bb.ds.edu.com to aa.ds.edu.com. For now I changed url in local.cfg, apache dspace.conf and config.prod.yml, after that I run mvn package, ant update and yarn build:prod. Everything works fine except OAI-PMH, I changed repository name in local.cfg but it's not updated  also repository identifier is wrong (shows old link) and every link in this page redirect to to old url, except that everything works if I manualy change link for example:  from bb.ds.edu.com :8080/server/oai/openaire?verb=ListSets to  aa.ds.edu.com :8080/server/oai/openaire?verb=ListSets
Does anyone know how to fix it?
Best regards,
Dominik

Mohammad S. AlMutairi

unread,
Jan 20, 2023, 8:36:49 AM1/20/23
to DSpace Technical Support
Hello Dominik,

Try this it should take care of the issue you have.

a) su - postgres
b) Dump the databse in text format ( pg_dump -c dspace > dspace-migrated.sql )
c) cp dspace-migrated.sql dspace-orig.sql <--- Always keep a backup of the original version of the database to revert to if you have to.
c) Edit dspace-migrated.sql and search for bb.ds.edu.com and replace it with aa.ds.edu.com using ( sed, awk, perl, vi or any text editor you feel comfortable with "notepad++ for instance in Windows" ).
d) Restore it ( cat  dspace-migrated.sql   | psql -d dspace  )


Hope it help you.

ZiGi

unread,
Jan 20, 2023, 9:01:10 AM1/20/23
to DSpace Technical Support
Thanks for advise, but I found (in my opinion) easier solution, just run this 3 commands:
/dspace/bin/dspace generate-sitemaps
/dspace/bin/dspace oai clean-cache
/dspace/bin/dspace oai import
After that just restart tomcat and everything should works. I hope this solution will help someone with familiar problem.

Mohammad S. AlMutairi

unread,
Jan 20, 2023, 10:25:29 AM1/20/23
to DSpace Technical Support
Glad you had your issue sorted out. It's hard to convince an old fashion guy not to go the manual way to avoid rebuilding the backend.
Reply all
Reply to author
Forward
0 new messages