CPBN has some websites based on Drupal CMS. They needed to migrate their main website from Drupal 5 to Drupal 7 and to merge the data from a satellite website into the main website.
Along with the migration they decided to redesign the structure of the website : different content types and different fields.
This work involved several challenges : merging the data from different websites, migrating the data to a different structure and continuous updating from the satellite website also aftter the migration.
I developed a custom module the implements the migration of data from the two websites into the new one. This module uses Drupal “batch operations” features because there are around 50.000 records to migrate and the operation must be split in chuncks to avoid resources exaustation.
The data migration and import can be run to make a full import but it works also in background through cron hook to keep the satellite website in sync with the main website.
For each object to import : file, node, taxonomy term, the import procedure keeps track of the last object imported and continues from where it stopped.
One of the biggest challenge was the changing of the records’ id : you cannot keep the same records’ id if you merge the records from two different systems. It has been necessary to keep track of the old and new id for each record to be able to reconstruct the relationships between the records correctly.
Plus, it is necessary to import the referenced records before the main record. To do so I developed a procedure that checks if the referenced record is already migrated or not, and in case migrates it and then migrates the main record.
The import system takes care also of records update in the source systems, searching for the updates and keeping the changes in sync with the new destination platform.
{ 0 comments }
