This documentation is a work in progress. |
config/authentication.yml has a new structure with a different section for each rails environment. Edit your authentication particulars to incorporate this new structure. An example is found in config/authentication.yml.example.
??? |
mysqldump -u avalonweb -p avalonweb -no-create-info --complete-insert --tables annotations api_tokens bookmarks courses identities ingest_batches playlist_items playlists role_maps users > /tmp/avalon.r5.dump.sql |
Sqllite3 doesn't like mysql dump files so a transformation script needs to be run on it. Download https://raw.githubusercontent.com/dumblob/mysql2sqlite/master/mysql2sqlite, make it executable, and run it on the dump file. |
SSH into your r6 box, wipeout the database, and load the sqlite dump into your dbconsole.
#convert mysql dump to mysqlite if you need to import into mysqlite (dev testing) chmod +x mysql2sqlite ./mysql2sqlite avalon.r5.dump.sql > avalon.r5.dump.sqlite # ensure that Fedora, Solr, and the DB are clean # it will ask you to verify the targets are correct bundle exec rake avalon:wipeout #go into the database console and import sqlite data bundle exec rails dbconsole sqlite> .read /tmp/avalon.r5.dump.sqlite |
".read" returns "memory", which is good.
Add yourself back in as administrator. --might not need this anymore
g = Admin::Group.find('administrator') g.users += ["archivist1@example.com"] g.save! |
SSH tunnel or open up your fedora3 server to your new Avalon app:
#port 9999 stands for your local mirror of your fedora3.host:8983 import source #if 9999 doesn't work, try another port nearby ssh -L 9999:localhost:8983 user@fedora3.host |
keep the ssh mirror running in another tab as you do the next steps.
The fedora3.yml should work without change, but if you do have trouble, here's an example fedora3.yml for the avalon demo server.
development: user: fedoraAdmin password: <password> url: http://localhost:9999/fedora test: user: fedoraAdmin password: <password> url: http://pawpaw.dlib.indiana.edu:8983/fedora solruser: solrAdmin solrpassword: <password> solrurl: http://pawpaw.dlib.indiana.edu:8983/solr production: user: fedoraAdmin password: <password> url: http://pawpaw.dlib.indiana.edu:8983/fedora |
Run the migration! You can watch it run on your target avalon by going to <you avalon url>/admin/migration_report
bundle exec rake avalon:migrate:repo |
After this command is finished, look through the report and see with items have failed and troubleshoot using the errors listed.
# Run script to map fedora 3 pids in database to newly minted fedora 4 noids bundle exec rake avalon:migrate:db |
development:
user: fedoraAdmin
password: mAlaTenSif
url: http://localhost:9998/fedora
test:
user: fedoraAdmin
password: mAlaTenSif
url: http://pawpaw.dlib.indiana.edu:8983/fedora
solruser: solrAdmin
solrpassword: solrAdmin
solrurl: http://pawpaw.dlib.indiana.edu:8983/solr
production:
user: fedoraAdmin
password: mAlaTenSif
url: http://pawpaw.dlib.indiana.edu:8983/fedora