You are here

function drush_gdpr_sql_dump in General Data Protection Regulation 8

Same name and namespace in other branches
  1. 7 modules/gdpr_dump/gdpr_dump.drush.inc \drush_gdpr_sql_dump()

Command callback for gdpr-sql-dump.

Outputs the entire Drupal database in SQL format using mysqldump or equivalent.

1 string reference to 'drush_gdpr_sql_dump'
gdpr_dump_drush_command in modules/gdpr_dump/gdpr_dump.drush.inc
Implements hook_drush_command().

File

modules/gdpr_dump/gdpr_dump.drush.inc, line 72
This file contains the GDPR database dump command.

Code

function drush_gdpr_sql_dump() {

  /** @var \Drupal\gdpr_dump\Service\GdprSqlDump $service */
  $service = \Drupal::service('gdpr_dump.sql_dump');
  try {
    return $service
      ->dump();
  } catch (\Exception $e) {
    return drush_set_error('DRUSH_DUMP_ERROR', $e
      ->getMessage());
  }
}