0.2.2 • Published 2 years ago
@helfa/drupal-mongodb-migrate v0.2.2
drupal-mongodb-migrate
Migration script, querying Drupal JSON:API and storing responses in our own MongoDB schema.
Install
yarn add -g @helfa/drupal-mongodb-migrate
Run
WARNING: Most of the data handled by this script is sensitive. We are talking people's passwords, emails, names, even addresses at times. Do not ever check-in any files inside the ./out/
folder!
- Get the
.env.example
and set your values in it
curl -o .env.migrate https://gitlab.com/helfa-web/drupal-mongodb-migrate/-/raw/next/.env.example
- Source the values in
.env.migrate
into your current shell with
source .env.migrate
- Run the script
drupal-mongodb-migrate
Env
All variables except MONGO_HOST and MONGO_PORT (which default to the sample values) are required.
name | description | example |
---|---|---|
DRUPAL_COOKIE | The entire Set-Cookie string from an authenticated request to your Drupal instance. Also, make sure that the user this session cookie belongs to has the necessary rights to read all fields (probably some admin account) | SSESS99...=lakds22ih2%ashd... |
DRUPAL_API_BASE | URL to your Drupal isntance's JSON:API | https://mydrupal.com/en/api |
MONGO_HOST | Host of your MongoDB | localhost |
MONGO_PORT | Port of your MongoDB | 27017 |
MONGO_USER | User to authenticated with at your MongoDB | memyselfaneye |
MONGO_PASS | Password to authenticated with at your MongoDB | IhopeIwillRememberThis! |
MONGO_DB | Name of your database | zappapp |