Skip to content

Instantly share code, notes, and snippets.

@alanorth
Last active November 2, 2016 09:42
Show Gist options
  • Save alanorth/61013895c6efe7095d7f81000953d1cf to your computer and use it in GitHub Desktop.
Save alanorth/61013895c6efe7095d7f81000953d1cf to your computer and use it in GitHub Desktop.
Testing the process for the DSpace 5.5 migration on DSpace Test

DSpace 5.5 Migration on DSpace Test

  • DSpace 5.5 migration process on DSpace Test
  • sync assetstore from CGSpace:
# rsync -av --partial --progress --delete cgspace.cgiar.org:/home/cgspace.cgiar.org/assetstore/ /home/dspacetest.cgiar.org/assetstore
  • Start maven build
  • Stop Tomcat
  • Sync Solr authority core from CGSpace:
# rsync -av --partial --progress --delete cgspace.cgiar.org:/home/backup/solr/authority/ /home/dspacetest.cgiar.org/solr/authority
  • Fix permissions (just in case):
# chown -R tomcat7:tomcat7 /home/dspacetest.cgiar.org
  • Remove spring directory from deployed directory:
# rm -rf /home/dspacetest.cgiar.org/config/spring
  • Import latest postgres database from CGSpace
# scp cgspace.cgiar.org:/home/backup/postgres/cgspace_2016-11-02.backup /tmp
# su - postgres
$ dropdb dspacetest
$ createdb -O dspacetest --encoding=UNICODE dspacetest
$ psql dspacetest -c 'alter user dspacetest createuser;'
$ pg_restore -O -U dspacetest -d dspacetest -W -h localhost /tmp/cgspace_2016-11-02.backup
$ psql dspacetest -c 'alter user dspacetest nocreateuser;'
$ psql -U dspacetest -f ~tomcat7/src/git/DSpace/dspace/etc/postgres/update-sequences.sql dspacetest -h localhost
$ exit
  • ant update
  • run database schema deletes for Atmire modules
# su - postgres
$ psql dspacetest
dspacetest=# \i /tmp/atmire-55-prep.sql
dspacetest=# \q
$ exit
  • Run all system updates and reboot the server
  • After server is back up and working, re-index Discovery:
$ sudo su - tomcat7
$ JAVA_OPTS="-Xms768m -Xmx768m -Dfile.encoding=UTF-8" /home/dspacetest.cgiar.org/bin/dspace index-discovery -b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment