1

I found data_export_import module very useful, however. It does not import/export url aliases and block content. Why I could live without the block content, I really would like to have nice way to import/export url aliases. Which module or which approach would you recommend to handle import/export url aliases? the same for blocks.

Thank You.

1

The solution i did is created gradle script that import/exports url as following:

         task exportUrl(type:Exec){
            doFirst{println "exporting Urls..."}
                executable "sh"
                args "-c", "mysqldump -u ${user} -p${pass} ${db} url_alias>sites/default/files/data_export_import_${view}/url_${db}_import.sql"
         }


 task importUrl(type:Exec){
     doFirst{println "exporting Urls..."}
         executable "sh"
         args "-c", "mysql -u ${user} -p${pass} -h localhost ${db}<sites/default/files/data_export_import_${view}/url_${db}_import.sql"
  }

it works well because i can also use drush to do the node import/export in the gradle script as well.

            task exportNodes(type:Exec){
                   doFirst{println "exporting Nodes..."}
                       executable "sh"
                       args "-c", "drush dei-ex nodes --content-types=address,article,blog[other content types]"
                }

task importNodes() << {
       def dir = new File("sites/default/files/data_export_import/nodes").list().toList()
       for (fileName in dir ) {
              println "ipmorting file ${fileName}..."
                    exec {
                        executable "sh"
                        args "-c", "drush dei-im nodes --file=${fileName}"
                    }
       }
}

I hope its useful for anyone

1

This article is a good one: http://margotskapacs.com/2014/04/solving-menu-import-issue-when-featuring-sample-data-in-drupal

However I would like to point out that Part-I and Part-II can be accomplished by the module menu_import (https://drupal.org/project/menu_import). It can be done with drush (from terminal) like this:

drush menu-export $(pwd)/main-menu.txt main-menu
drush menu-import $(pwd)/main-menu.txt main-menu –clean-import

The module that you have created for custom aliases (https://github.com/kapasoft-config-scripts/designssquare_alias_path) is a good one too. However I think that it should go as a patch to the module node_export: https://drupal.org/project/node_export

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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