Overview
Developed two custom PHP and MySQL scripts to resolve data integrity and field-mapping issues during the migration of library collections from Archon to ArchivesSpace.
The scripts addressed problems both before and after the migration process, helping ensure that collection data transferred accurately between the two systems.
The Challenge
The existing Archon-to-ArchivesSpace migration tool encountered errors when processing multiple large collections simultaneously. These issues prevented some data from transferring correctly and introduced additional inconsistencies in the destination database.
With individual collection migrations taking approximately 12 hours to complete, troubleshooting was time-intensive. Identifying and resolving the problems required several months of investigation, testing, and refinement.
The migration also exposed problems with field mappings and backend configuration settings that needed to be addressed to preserve the integrity of the library’s collection data.
The Solution
Developed a two-stage approach using custom PHP and MySQL scripts to correct data issues on both sides of the migration.
Pre-Migration Script
Prepared the Archon database before running the migration tool. The script corrected minor data inconsistencies and simplified the transfer process, while necessary field-mapping and configuration adjustments helped ensure that data could be transferred into the appropriate ArchivesSpace fields.
Post-Migration Script
Corrected data issues introduced during the migration process within the ArchivesSpace database. These included unexpected text added to existing fields and incorrectly mapped data that required adjustment after the transfer.
Together, the scripts provided a repeatable process for addressing migration-related problems that the original tool did not handle correctly.
Technical Implementation
The migration workflow involved five primary stages:
- Issue identification: Investigated migration failures and data inconsistencies encountered when transferring large collections.
- Source database preparation: Used PHP and MySQL to correct data issues in Archon before migration.
- Configuration adjustments: Addressed backend settings and field-mapping requirements to support accurate data transfer.
- Post-migration corrections: Used PHP and MySQL to repair data inconsistencies and mapping errors introduced into ArchivesSpace.
- Validation and troubleshooting: Repeated migration testing and corrections to resolve outstanding issues and verify the transferred collection data.
Outcome
Successfully resolved the migration errors and completed the transfer of the library’s collection data from Archon to ArchivesSpace.
The project required several months of systematic troubleshooting, strategic planning, and custom scripting to overcome limitations in the original migration tool.
