For upgrades from Avalon 5 to 6.1, perform the actions in Upgrading Avalon 6.0 to Avalon 6.1 after completing the migration detailed on this page.
See What's New in Avalon 6 for more details.
The option to upgrade in place is not available to go from Release 5 of Avalon to Release 6. Instead, follow these steps.
# ensure that Fedora, Solr, and the DB are clean # it will ask you to verify the targets are correct bundle exec rake avalon:wipeout
Data from your R5 database will be loaded directly into your R6 database then migrated for R6 in a later step. Role_map data will be needed in R6 for the Fedora migrate step, so it needs to be imported first.
# This example is for mysql. Adjust as necessary for your R5 database. mysqldump -h <hostname> -u <username> -p <databasename> --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
SSH into your R6 box and load the R5 database dump. Remember to make sure your R6 is clean by doing the wipeout command.
# this example assumes R6 database is mysql. Adjust as necessary for your R6 database. bundle exec rails dbconsole mysql> source /tmp/avalon.r5.dump.sql
If you are a developer wanting to test your migration on sqlite locally...
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.
".read" returns "memory", which is good.
Choose an available local port to use as a mirror of your fedora3.host:8983 import source # In this example 9999 is used. It must match the port used in fedora3.yml in the next step
ssh -L 9999:localhost:8983 email@example.com
keep the ssh mirror running in another tab as you do the next steps. Or run it in the background
ssh -fN -L 9999:localhost:8983 firstname.lastname@example.org
Setup config/fedora3.yml in your Avalon 6 app
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://localhost:9999/fedora production: user: fedoraAdmin password: <password> url: http://localhost:9999/fedora
Avalon 6 has adopted Noids for object ids instead of the default Fedora 4 UUIDs. All objects migrated from Avalon 5.x to Avalon 6 will be assigned a new id. The old Avalon 5.x Fedora 3 PID will be preserved using the prov:wasDerivedFrom predicate. Avalon uses active_fedora-noid's default template, but this can be overwritten in config/initializers/active_fedora-noid.rb using the gem's instructions.
The repository migration tool has many options but it can be run with default options as shown.
bundle exec rake avalon:migrate:repo
You can watch it run on your target avalon by going to <your avalon url>/admin/migration_report . Go here to find more information on how to read the report and command output. After this command is finished, look through the report and see which 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
#This will delete any bookmarks that point to failed items bundle exec rake avalon:migrate:bookmark_cleanup