14

I want to export content with comments and user data with content relation from one Drupal site to same version of another site. In another site there is no content and users data it has only some new module installed and it's configuration.

For this which is best way migrate/ node_export/ Backup and Migrate

3 Answers 3

10

The Migrate module can migrate anything you want from the most databases.

Depending on how your content is put together this might be relevant for you.

Links:

Also be sure to look into the Migrate module folder. It contains a Beer.inc file, which is an example of how you can do simple mappings. For more complicated migrations you can look into Wine.inc.

13

If you're exporting into an empty site, the Backup and Migrate module is the one you want. It will let you clone all contents on a Drupal site, including comments. (Or only certain tables such as thos associated with nodes and comments, if that is what you want).

The Node Export module will only let you import/export nodes. Comments, for instance, is not nodes.

The Migrate module is a more general framework for migration (including migration data not originating from Drupal into a Drupal site). It gives you a lot more control over the process, but I think it is overkill if all you want to do is to export and then inport into an empty site with the same version of Drupal. Incidently, if you still want to use Migrate, check out Drupal-to-Drupal data migration. It is based upon Migrate, but designed to specifically migrate (and refactor) data from one Drupal site into another.

3
  • Do you know whether the "backup and migrate" module allows to migrate from a Drupal 7 site to a Drupal 9 site?
    – Max
    Commented Jul 12, 2022 at 17:06
  • No, Backup and Migrate will not help you across versions. It requires the destination to have a schema identical tothe source. Commented Jul 13, 2022 at 8:10
  • Importing all into an empty drupal site can be done by a simple sql command. It is only when a partial import/export is needed, these modules come into play. Commented Dec 5, 2023 at 19:54
1

I would recommend you to use Features module and UUID Features. Using these tools you can export not only content but also other components, like: views, content types, etc.

If you want to export site variables you can use Strongarm module.

Hope this helps.

2
  • 1
    Not all modules that support content creation package its content as features exportables. If you rely on features for migration, you may lose content in the process. Commented Apr 2, 2014 at 8:54
  • Does UUID Features support exporting thousands of nodes? Commented May 6, 2015 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.