Drupal 6到7迁移

时间:2011-10-17 13:17:52

标签: drupal-6 drupal-7

我们有一个用drupal 6编写的drupal站点。我们知道我们必须为drupal 7重写它(主要是)

但最重要的是迁移数据。 CCK迁移只能迁移大约90%的字段。

我正在寻找一种将drupal 6数据迁移到drupal 7的简洁方法。

我们使用content_multigroup作为一个基本上像字段集合的模块......如何迁移?

我正在寻找一些通用策略......我正在考虑引导drupal 7并且只针对drupal 6数据库编写查询并保存节点。

3 个答案:

答案 0 :(得分:3)

自问这个问题以来,Migrate模块已经发展了很多。此外,Migrate D2D module是Drupal 6到Drupal 7迁移的一个很好的起点。

检查documentation,你应该知道如何去做。

不可否认,迁移模块似乎有一个陡峭的学习曲线,但使用迁移D2D示例,您应该快速加速。

答案 1 :(得分:3)

将Drupal6升级到Drupal7

对所有文件,目录和数据库进行完整备份

*注:         在将网站的测试副本应用到您的实际网站之前,尝试对其进行更新或升级是明智之举。即使是微小的更新也可能导致您网站的行为发生变化。

第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)

第2步:

Disable all non-core module. 

Drush:      drush pm-disable `drush pm-list --no-core --type=module –pipe`

第3步:

Change the default theme as “Garland”.

Drush:      drush vset theme_default garland, drush vset admin_theme garland

第4步:

Update the drupal6.

Drush:      drush up drupal

第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

第6步:

Download the latest Drupal7.

Drush:      drush dl drupal --select`option to select the version`

第7步:

Copy “files” folder from old instance(Drupal6) to new instance(Drupal7) and change the folder permissions.

第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

第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.

第10步:

Download all the contributed modules : include `views and views related modules`.  

第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”.

第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”.

*请参阅:https://drupal.org/update/themes/6/7

答案 2 :(得分:1)

您是否看过http://drupal.org/project/feeds(由于它的名称,它经常因为它作为数据迁移工具的良好用途而飞速发展)?

你在处理什么样的领域?

如果失败,并且由于您正在寻找一般策略,我会说以下内容:我建议您尽可能使用API​​,而不是直接查询。

根据我自己的经验,在两种选择之间进行选择:

a)在D6下运行脚本并通过SQL推送到D7 DB 要么 b)让脚本在D7下运行并通过SQL拉到D6 DB

我会选择b)确保node_save最终完成所有工作。