Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sanitised database dump tool to drupal websites. #573

Open
thomaslobjoie opened this issue Mar 5, 2021 · 0 comments · May be fixed by #577
Open

Add sanitised database dump tool to drupal websites. #573

thomaslobjoie opened this issue Mar 5, 2021 · 0 comments · May be fixed by #577
Labels
enhancement New feature or request harness-drupal8 Drupal 8.x harness, obsolete as of 1.5.x security
Milestone

Comments

@thomaslobjoie
Copy link

thomaslobjoie commented Mar 5, 2021

To enable websites to perform sanitised database dump, we need to install a tool such as mtk_dump. It provides a Go binary file that can perform dumps following a ruleset stored in a Yaml file. We will need that tool on every drupal websites, so it makes sense to make it available by default in the binary folder.

A default ruleset Yaml file and a default bash script could also be added to the project skeleton.

Binary download page: https://github.com/skpr/mtk/releases

I installed it manually, for test purpose, to the binary folder and ran the following:

./bin/mtk-dump \
--config=/tools/dump/mtk-dump.yml \
--host=$DB_HOST \
--user=$DB_USER \
--password=$DB_PASS \
$DB_NAME > /app/tools/assets/dump.sql

This test provides exactly the excepted result.

Example of a ruleset:

---
rewrite:
  users_field_data:
    mail: concat(uid, "@localhost")
    pass: '"password"'

nodata:
  - cache*
  - captcha_sessions
  - history
  - flood
  - batch
  - queue
  - sessions
  - semaphore
  - search_api_task
  - search_dataset
  - search_index
  - search_total

ignore:
  - __ACQUIA_MONITORING__
@thomaslobjoie thomaslobjoie self-assigned this Mar 5, 2021
@thomaslobjoie thomaslobjoie added harness-drupal8 Drupal 8.x harness, obsolete as of 1.5.x enhancement New feature or request security labels Mar 5, 2021
@thomaslobjoie thomaslobjoie removed their assignment Mar 5, 2021
@kierenevans kierenevans changed the title Add sanisited database dump tool to drupal websites. Add sanitised database dump tool to drupal websites. Apr 1, 2021
@kierenevans kierenevans linked a pull request Apr 1, 2021 that will close this issue
@kierenevans kierenevans added this to the 1.2.0 milestone Apr 1, 2021
@kierenevans kierenevans modified the milestones: 1.2.0, 1.3.0 Dec 10, 2021
@andytson-inviqa andytson-inviqa modified the milestones: 1.3.0, 1.4.0 Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request harness-drupal8 Drupal 8.x harness, obsolete as of 1.5.x security
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants