This PR changes the Fedora database configuration to be backed by postgres instead of just a simple file configuration. It also adds a new rake task to migrate/restore data in Fedora that will be lost when switching to using postgres. New functionality and overwritten functionality are included for the task to work as intended.
Summary of notable changes:
New initialize_fedora_db container to create the "fcrepo" postgres database
Updated ENV variables to properly configure fedora to use postgres
New lib/tasks/migrate_fedora.rake rake task
Expected Behavior Before Changes
The Fedora database uses a simple file configuration, leading to data corruption when running in a production environment.
Expected Behavior After Changes
The Fedora database uses a postgres-backed configuration. When switching out the Fedora database, Fedora data will initially disappear (SQL, Solr, etc. data should be untouched). Fedora data will be restored when running the lib/tasks/migrate_fedora.rake rake task:
The Default Admin Set will be restored with its original IDs and permission customizations
Collection Types will be restored
Collections will be restored with their original IDs and permission customizations1
Works will be restored with new system-generated Fedora IDs (the slugs will be the same as before)1
File Sets will be restored with their original IDs. They will connect to the original file binaries and derivatives; no file processing will occur1
1FEDORA RECORDS NOT ASSOCIATED WITH A BULKRAX ENTRY WILL NOT BE RESTORED
Notes
Equivalent changes made to .env.development need to be made to .env on the production server
Story
Refs:
186
This PR changes the Fedora database configuration to be backed by postgres instead of just a simple file configuration. It also adds a new rake task to migrate/restore data in Fedora that will be lost when switching to using postgres. New functionality and overwritten functionality are included for the task to work as intended.
Summary of notable changes:
initialize_fedora_db
container to create the "fcrepo" postgres databaselib/tasks/migrate_fedora.rake
rake taskExpected Behavior Before Changes
The Fedora database uses a simple file configuration, leading to data corruption when running in a production environment.
Expected Behavior After Changes
The Fedora database uses a postgres-backed configuration. When switching out the Fedora database, Fedora data will initially disappear (SQL, Solr, etc. data should be untouched). Fedora data will be restored when running the
lib/tasks/migrate_fedora.rake
rake task:1 FEDORA RECORDS NOT ASSOCIATED WITH A BULKRAX ENTRY WILL NOT BE RESTORED
Notes
Equivalent changes made to
.env.development
need to be made to.env
on the production serverCo-authored-by: Braydon Justice sephirothkod@users.noreply.github.com