Updating Data from Existing Instance

You may have an instance of Dryad already installed that you would like to be able to copy the data from. There are two sources of data that you'll need to copy: the DSpace assetstore and the DSpace PostgreSQL database.

pg_dump -U dryad_app --schema=public dryad_repo >dryadDBexport.sql tomcat-stop.sh /etc/rc.d/init.d/postgresql restart sudo dropdb -U postgres dryad_repo sudo -u dryad createdb -U postgres -E UNICODE dryad_repo at now at> psql -U postgres dryad_repo import.log at> (press Ctrl-D)
 * To copy the PostgreSQL database, do a standard Backup and Restore (it helps if your db and db user are the same in the both instances). Dumping as SQL text is generally the most reliable, especially if the local PostreSQL installation is a different version from the source of the dump. More detailed instructions:
 * 1) (on source machine) dump the postgres database to a file
 * 2) the --inserts flag makes the restore process much slower, but may be necessary if the
 * 3) import command doesn't work with the data exported without it
 * 1) (on target machine) stop tomcat so nothing interferes with the reload
 * 1) (target machine) remove old database from target server (if it exists) and rebuild
 * 2) may need to restart postgres to disable any connections to it
 * 1) (on target machine) load the database into target server
 * 2) this step may take an hour or more; do it as a batch process to keep it running
 * 3) even if you lose your connection
 * 4) you can check on progress by starting psql and seeing which tables have content

rsync -azv /opt/dryad/assetstore/ dryad@dryaddev2.lib.ncsu.edu:/opt/dryad-demo/assetstore rsync -azv --delete --rsh=ssh --rsync-path=/usr/local/bin/rsync dryad@dryad.lib.ncsu.edu:/opt/dryad/solr/statistics/* statistics tomcat-start.sh /opt/dryad/bin/dspace update-discovery-index
 * To copy the assetstore, do an rsync from /opt/dryad/assetstore on one machine to the same location on the other.
 * 1) (source machine, assuming dryaddev2.lib.ncsu.edu is the target machine)
 * 1) may need to include switches --delete --rsh=ssh --rsync-path=/usr/local/bin/rsync
 * The statistics need to be synced from the source machine
 * 1) (running on target machine, in /opt/dryad/solr)
 * After installing or updating a database, the solr index will need to be (re)built.
 * 1) ensure Tomcat is running
 * 1) rebuild the solr index