We have a drupal site written in drupal 6. We know we will have to rewrite it for drupal 7 (mostly)
But the big part is migrating the data. CCK migrate was only able to migrate about 90% of the fields.
I am looking for a clean way to migrate the drupal 6 data to drupal 7.
We used content_multigroup as a module which is basically like a field collection...How would that be migrated?
I am looking for some general strategies...I am thinking of bootstrapping drupal 7 and just write queries against the drupal 6 database and save nodes.
The Migrate module has evolved a lot since this question was asked. Also the Migrate D2D module is a great starting point for a Drupal 6 to Drupal 7 migration.
Check the documentation and you should get a pretty good idea of how to go about it.
Admittedly, the Migrate module seems to have a steep learning curve but using the Migrate D2D Examples you should get up to speed quickly enough.
Upgrade Drupal6 to Drupal7
Make a full backup of all files, directories, and your database(s)
*Notes:
It is wise to try an update or upgrade on a test copy of your site before applying it to your live site. Even minor updates can cause your site's behavior to change.
Step 1:
Make note of non-core drupal modules(no need drupal core modules) and search if that all modules are available in drupal 7. If the modules are not available, then search “is there any alternate module for drupal 7”. Make sure of it. (*step 1 is important)
Step 2:
Disable all non-core module.
Drush: drush pm-disable `drush pm-list --no-core --type=module –pipe`
Step 3:
Change the default theme as “Garland”.
Drush: drush vset theme_default garland, drush vset admin_theme garland
Step 4:
Update the drupal6.
Drush: drush up drupal
Step 5:
Dump the DataBase.
Drush: drush sql-dump > /path-to-dump/my-sql-dump-file-name.sql
Terminal: mysqldump -u [username] -p [database name] > [database name].sql
Step 6:
Download the latest Drupal7.
Drush: drush dl drupal --select`option to select the version`
Step 7:
Copy “files” folder from old instance(Drupal6) to new instance(Drupal7) and change the folder permissions.
Step 8:
Import the dumped DB to new instance.
Drush: (drush sql-drop, drush sql-cli < /path-of-dump/my-sql-dump-file-name.sql)
Terminal: mysql -u [username] -p newdatabase < [database name].sql
Step 9:
Go to Drupal Root > sites > default > settings.php and change into $update_free_access to TRUE in the settings file and then run update.php.
Step 10:
Download all the contributed modules : include `views and views related modules`.
Step 11:
Must download Content Construction Kit (CCK) module. Enable the CCK, Content Migrate modules.
Drush: drush dl cck, drush en cck
Go to “Admin-Structure > Migrate fields”.
Step 12:
In that Migrate fields,
After enable click “Migrate fields” in “Available fields” the fields are come under the “Converted Fields”. Once again run “update.php”.
*Refer this: https://drupal.org/update/themes/6/7
Have you looked at http://drupal.org/project/feeds (which, because of its name, often flies under the radar for its very good use as a data migration tool) ?
What kind of fields are you dealing with?
If that fails, and since you are looking for general strategies, I'll say the following: I would encourage you to use the API, rather than direct queries, as much as possible.
From my own experience, in choosing between the two options:
a) having a script run under D6 and push via SQL to the D7 DB
or
b) having a script run under D7 and pull via SQL to the D6 DB
I would choose b) to make sure that node_save ultimately gets to do all it's work.