Versions Compared

Key

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

...

  1. Spin up machine
  2. Deploy Sufia
  3. Ensure apache is off
  4. Activate maintenance mode on old server
  5. Move over minter
  6. Migrate Fedora
    1. Run audit script
    2. generate json export files
    3. change URIs therein
      1. Further analysis of these URIs is warranted
    4. move json files to new server
    5. run the import job
    - see below
  7. migrate postgres
  8. run (currently nonexistent) verification job
  9. migrate dump.rdb
  10. Reindex solr

Fedora export / import

In sufia 6 instance:

  • Run audit script
RAILS_ENV=production bundle exec sufia_survey -v
  • Run json export
$ RAILS_ENV=production bundle exec sufia_export --models GenericFile=Chf::Export::GenericFileConverter,Collection=Chf::Export::CollectionConverter
  • Open up fedora port to the other server so it can grab the binaries
  • Change all the 127.0.0.1 URIs to reflect actual host, e.g.
$ find tmp/chf-importexport -type f -name "*.json" -print0 | xargs -0 sed -i "s/127\.0\.0\.1/dev6staging.hydra.chemheritage.org/g"
  • Move the resulting directory full of exported data from tmp/export to the new server's tmp/import (or wherever desired; this can be provided to the import script)
$ tar -czf json_export_201611141510.tgz tmp/export
$ scp json_export_201611141510.tgz new_box_ip:/opt/sufia-project/.

On sufia 7 instance:

  • unpack the exported json files
cd opt/sufia-project/
mkdir current/tmp/import

tar -xzf json_export_201611141510.tgz

mv tmp/export/* current/tmp/import/

rm -rf tmp
  • configure sufia6_user and sufia6_password in fedora.yml

...

  • config/application
  • run the import
$ RAILS_ENV=production bundle exec sufia_import -d tmp/chf-import --json_mapping Chf::Import::GenericFileTranslator=generic_file_

...