This project contains Drush command(s) to export a Drupal 7 or Drupal 8 website structure to CSV files. Those CSV files can then be used to build mappings for a website migration.
The dmt-se:export
command can be used to generate a single export.
The dmt-se:export-all
command will run all exports and generate CSV files:
entity_bundles.csv
: All entity types and bundles (+ several settings)entity_properties.csv
: All entity properties for each entity type and bundlefields.csv
: All field basesmodules.csv
: The list of modulestaxonomy_terms.csv
: All taxonomy terms (with language_none/und or EN)
- PHP 5.6 or higher
- Drush 8.1.18 or higher is required:
- this tool uses Consolidation\AnnotatedCommand and Consolidation\OutputFormatters
The recommended way is to use Composer.
You can install this Drush tool:
The dmt_structure_export folder should go in DRUPAL_ROOT/drush/Commands
or DRUPAL_ROOT/../drush/Commands
or DRUPAL_ROOT/sites/all/drush/Commands
.
Using composer/installers: composer require composer/installers
Make sure you have the following in your composer.json's "extra" section:
"installer-paths": {
...
"drush/Commands/{$name}": ["type:drupal-drush"]
}
Finally: composer require vever001/dmt_structure_export:8.x-1.x-dev
You can install it in your ~/.drush
folder.
-
Create a
drush-extensions/Commands
folder in~/.drush
-
Copy the example.drushrc.php file to
~/.drush
and rename it todrushrc.php
-
Add and adapt the following:
$options['include'] = array('/path/to/drush-extensions');
-
From
drush-extensions/Commands
rungit clone --branch 7.x-1.x https://github.com/vever001/dmt_structure_export.git cd dmt_structure_export composer install --no-dev