drupal7 export a node or bulk export from one site and import into another site
Backup the database (mysqldump too?) Download the "node export" module and it's dependency "uuid" module and extract them to the sites/all/modules http://drupal.org/project/node_export http://drupal.org/project/uuid
OR admin/modules (aka Home > Administration > Modules) and click on +Install new module
Ensure that the site is upgraded to drupal 7 Home > Administration > Modules and enable UUID (Save Configuration) Home > Administration > Configuration > System ... Synchronization "create missing UUID's" Go to Home > Administration > Modules and enable Node Export + Node export Files, Relation, CSV, and XML (Save Configuration)
Go to the Destination Drupal Site and ensure that the prerequisites are met
Home > Administration > Content ... Update options (dropdown) set to Node Export, check the Title checkbox selecting all (1 page's worth) by default it creates all of the content in php array format and gives the instructions: "Copy this code and then on the site you want to import to, go to the Node export: import link under Add content, and paste it in there."
Best Practice is to save as File (saving the intermediate work in case of rollback or troubleshooting)
Go to the Destination Drupal Site and ensure that the prerequisites are met admin/modules Home > Administration > Content ... +Add Content ... Node export: import Choose to either import by file or pasting into a large text area... "...Imported node 25: How-To-use-Drupal-Blocks 9 of 9 nodes were imported. Some values may have been reset depending on Node export's configuration."
- The timestamps are off, the taxonomy terms are probably off (along with a lot of other metadata fields)
The content is all missing ... darn.
-Error encountered during import. Node types unknown on this site: blog. No nodes imported.
admin/modules (aka Home > Administration > Modules) ... checkbox to enable Blog (core) ... Save Configuration
-Error encountered during import. Node types unknown on this site: image. No nodes imported.
Home > Administration > Structure > Content types ... add content type (named Image , title field lable = Image)
Create a field of type "image" (this makes it an "imagefield")
image ... image ... FIELD (dropdown) Image WIDGET (dropdown) Image -> Save -> Save Field Settings -> Save Settings
-Warning: Invalid argument supplied for foreach() in node_export_relation_taxonomy_restore_term_reference() (line 38 of /var/www/drupal-7.10/sites/all/modules/node_export/modules/node_export_relation/node_export_relation.taxonomy.inc).
This is most likely errors relating to missing taxonomy terms
Instead I'll have to create each Story manually...
MY HACK SOLUTION
- Because each Export (50 items per file?) can be modified I find and replaced all 'type' => 'blog', and 'type' => 'image', with 'type' => 'story',
- admin/config/content/node_export CONFIGURED to not reset Created or Changed timestamps
- admin/people/permissions CONFIGURED "content manager" role to have Export Nodes, Export own Nodes, and Use PHP...
- Login with the same User Name as on the node author from the old Site (as the Importing User is the "author")
- Home > Administration > Content ... +Add Content ... Node export: import
- Choose to import by file (the properly "fixed" ones)... Success! (Note taxonomy tags are still missing)