islandora-rdm / migrate_7x_claw
工具,用于协助将 Islandora Classic 7.x 迁移到 Islandora 2。
Requires
- drupal/migrate_conditions: 1.x@beta
- drupal/migrate_plus: ^5
- jonathangreen/tuque: dev-master
Requires (Dev)
- drupal/coder: *
- phpunit/phpunit: ^6
- sebastian/phpcpd: *
- squizlabs/php_codesniffer: 2.7.1
This package is auto-updated.
Last update: 2024-08-29 05:37:05 UTC
README
此模块包含插件,可以将 Fedora 3 Islandora 实例中的数据导入到 Islandora 2 (之前称为 Islandora 8) 实例中。它还包含一个作为子模块的特性,其中包含一些示例迁移。示例迁移基于纯 Islandora 7.x 解决方案包中的表单,并且旨在与 islandora_defaults
中定义的字段一起使用。如果您自定义了您的 MODS 表单,那么您还需要自定义示例迁移和 islandora_defaults
。
目前,以下内容模型可以迁移并具有完整功能
- 集合
- 基本图像
- 大图像
- 音频
- 视频
- 二进制文件
如果您想查看一些由标准表单生成的带有元数据的样本基本图像对象,请查看以下zip 文件,您可以使用 islandora_zip_batch_importer
使用它。所有图像均来自 Pexels,并且可以免费用于个人或商业用途,并在 MODS 中注明原始摄影师。
安装
使用 composer 下载此模块、其功能及其依赖项
composer require islandora/migrate_7x_claw
使用 Drush 同时安装模块和示例迁移
drush en islandora_migrate_7x_claw_feature
配置
默认情况下,迁移配置为与在同一主机上运行的 islandora_vagrant
实例以及 Islandora playbook
实例一起使用,这对于开发和测试来说很方便。但对于您的 Islandora 7.x 实例,以下配置需要在每个迁移(除 "7.x 标签迁移从 CSV" 迁移外)的源插件中以相同方式设置
管理页面
/admin/config/islandora/migrate_7x_claw
请阅读 命令行配置 部分,了解输入值描述和目的。保存后,您可以通过运行迁移组任务(admin/structure/migrate/manage/islandora_7x/migrations)来执行迁移。
可选
要验证保存的更改,请转到 admin/config/development/configuration/single/export
- 配置类型:迁移组
- 配置名称:以下各项应反映所提供的值。
- migrate_plus.migration.islandora_audit_file
- migrate_plus.migration.islandora_audit_media
- migrate_plus.migration.islandora_corporate
- migrate_plus.migration.islandora_files
- migrate_plus.migration.islandora_geographic
- migrate_plus.migration.islandora_media
- migrate_plus.migration.islandora_objects
- migrate_plus.migration.islandora_person
- migrate_plus.migration.islandora_subject
命令行配置
solr_base_url
应指向您的 Islandora 7.x Solr 实例(例如http://example.org:8080/solr
)fedora_base_url
应指向您的 Fedora 3 实例(例如http://example.org:8080/fedora
)- 在块中,为您的 Fedora 3 实例指定
username
和password
plugin: basic username: fedoraAdmin password: fedoraAdmin
q
用于定义一个 Solr 查询,该查询选择要迁移的对象。从全新克隆,迁移配置为使用以下查询查找islandora:sp_basic_image_collection
及其所有子项:RELS_EXT_isMemberOfCollection_uri_ms:"info:fedora/islandora:sp_basic_image_collection" OR PID:"islandora:sp_basic_image_collection"
您可以通过更改上述查询中的 PID 轻松导入自己的集合,或者您可以为迁移对象提供自己的查询(例如按内容模型、按创建日期排序等)。如果您可以为其编写 Solr 选择查询,则可以将其迁移到 Islandora 2。省略配置中的 q
将默认为 Solr 查询的 *:*
。
更新配置后,您需要重新导入功能以加载您的更改。您可以使用 drush
来做这件事。
drush -y fim islandora_migrate_7x_claw_feature
您还可以通过UI导入功能,只需前往 admin/config/development/features
并点击“Migrate 7x Claw Feature”旁边的Changed
链接即可。这需要Migrate Tools模块,但自从drush 10.x中添加了迁移命令后,它不再默认安装。
从那里,您可以选择所有更改并点击“导入更改”
运行迁移
您可以使用drush
快速运行所有迁移
drush -y mim --group islandora_7x
如果您想通过UI进行操作,可以访问admin/structure/migrate
以查看迁移组列表。此模块提供的迁移的机器名为islandora_7x
。
您将看到8个迁移。 “7.x Tags Migration from CSV”需要首先运行。
点击“7.x Tags Migration from CSV”迁移中的执行按钮会显示类似页面
您可以对迁移执行的运算有
- 导入 - 导入未迁移的对象(勾选“更新”复选框可重新运行之前迁移的对象)
- 回滚 - 删除之前导入的所有对象(如果有的话)
- 停止 - 停止长时间运行的导入。
- 重置 - 重置可能失败的导入。
如果您选择“导入”,然后点击“执行”,它将运行迁移。它应该处理5个项目。
然后您可以运行“Islandora Media”迁移,它依赖于剩余的迁移。运行它实际上运行了除“7.x Tags Migration from CSV”迁移之外的所有迁移组。完成所有这些后,您应该能够导航到您的Islandora 8实例的主页并看到从Islandora 7.x迁移过来的内容!
如果您点击任何节点,应该会看到所有其元数据,这些数据已从其MODS和Solr文档中提取。这是Islandora 7.x中的原始对象
这是Islandora 2中的它
点击“媒体”标签将显示从7.x迁移过来的所有数据流,您现在可以通过Islandora 8来管理它们。这是Islandora 7.x中的原始数据流
这是Islandora 2中的媒体数据流
您还可以检查集合本身,其“成员”块应该已填充
迁移的工作方式
您提供一个查询,作为源插件配置中的q
,定义哪些对象被迁移。对于查询中的每个结果,您可以选择使用对象的Solr文档、对象的FOXML文件或设置url_type
配置的对象的特定数据流。主题、地理和代理的迁移都针对对象的MODS文件。数据流的迁移使用FOXML,而对象的迁移使用Solr文档。
所有数据流都按原样迁移,无论迁移提取了哪些数据并将其作为字段应用。
只要所有集合都在q
查询结果中,就会保留集合层次结构。
MODS中的主题、地理和人/公司代理都被转换成分类术语,内容用这些术语标记。
高级Drush命令
用于处理迁移过程的有用drush命令。
导入命令
此命令从命令行以指定的用户名和操作开始导入过程。
$ drush --uri=https://:8000 --userid=1 -y migrate:import --group islandora_7x --update └─────────────────────────┘:└────────┘└─┘ └────────────┘ └──────────────────┘ └──────┘ URL of Islandora 2 ───┘ │ │ │ │ │ User Numeric ID ──────────────────────┘ │ │ │ │ send yes to confirmation(optional) ────────────┘ │ │ │ Module and action ──────────────────────────────────────┘ │ │ Group name ──────────────────────────────────────────────────────────────┘ │ Update existing objects(optional) ────────────────────────────────────────────────────────┘
控制迁移
$ drush migrate:rollback --update --limit="1000 items" --feedback="20 items" islandora_audit_media └─────┘:└──────┘ └──────┘└───────────────────┘ └───────────────────┘ └───────────────────┘ Module Name ┘ │ │ │ │ │ Action ────────────┘ │ │ │ │ confirmation(optional) ──────┘ │ │ │ Number of unprocessed items to run ──────┘ │ │ Number of items to display after completed ─────────────────────┘ │ Migration Step ────────────────────────────────────────────────────────────────────────┘
操作
- 导入
- 回滚
- 停止
- 重置
迁移步骤
- islandora_7x_tags
- islandora_audit_file
- islandora_audit_media
- islandora_corporate
- islandora_files
- islandora_geographic
- islandora_media
- islandora_objects
- islandora_person
- islandora_subject