Drupal 7 Importer

This importer depends on the following third-party gems:

  • mysql2
  • pg
  • safe_yaml
  • sequel
You may either install the gem(s) individually by running a command with syntax gem install GEM_NAME or install the required gems in a batch by running the following snippet:
gem install mysql2 pg safe_yaml sequel

Invocation

Sample snippet to invoke the importer:

jekyll import drupal7 --dbname DB --user USER --engine [mysql|postgresql] --password PW --host HOST --port PORT --prefix PREFIX --types TYPE1[,TYPE2[,TYPE3...]]

Option <PARAM>Description
--dbname DB

Database name

--user USER

Database user name

--engine [mysql|postgresql]

Database engine

Default: "mysql"
--password PW

Database user’s password

Default: ""
--host HOST

Database host name

Default: "localhost"
--port PORT

Database port name

Default: "3306"
--prefix PREFIX

Table prefix name

Default: ""
--types TYPE1[,TYPE2[,TYPE3...]]

The Drupal content types to be imported

Default: blog,story,article
Highlighted row(s) in table above indicate required options.

By default, the importer will pull in nodes of type blog, story, and article. To specify custom types, you may use the types option while invoking the importer.

The default Drupal 7 expects database to be MySQL. If you want to import posts from Drupal 7 installation with PostgreSQL define, pass postgresql to the --engine option.