Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
mysqldump -u avalonweb -p avalonweb -no-create-info --tables annotations api_tokens bookmarks courses identities ingest_batches playlist_items playlists role_maps --skip-create-options  users > /tmp/avalon.r5.dump.sql
Note

There are some mysql specific statements in the dump file that need to be removed to load it into sqlite.


Load to r6 database (sqlite locally)Load to r6 database (sqlite locally)

Note

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: chmod +x mysql2sqlite

Run it on the dump file: ./mysql2sqlite avalon.r5.dump.sql > avalon.r5.dump.sqlite

Code Block
bundle exec rake avalon:wipeout  # ensure that Fedora, Solr, and the DB are clean
bundle exec rails dbconsole 
sqlite> DELETE FROM role_maps;
sqlite> .read /tmp/avalon.r5.dump.sql

...

sqlite

Migrate Fedora Objects

Code Block
# SSH tunnel or open up your fedora3 server to your new Avalon app
# Setup config/fedora3.yml in your Avalon 6 app
bundle exec rake avalon:migrate
#Review output and fix/rerun it


Migrate Database Tables

Code Block
# Run script to map fedora 3 pids in database to newly minted fedora 4 noids
bundle exec rake avalon:migrate:database

 

Migrate Config Files

Code Block
???