You are here

function drush_gdpr_sql_dump in General Data Protection Regulation 7

Same name and namespace in other branches
  1. 8 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 59
This file contains the GDPR database dump command.

Code

function drush_gdpr_sql_dump() {
  $service = gdpr_dump_service();
  try {
    return $service
      ->dump();
  } catch (\Exception $e) {
    return drush_set_error('DRUSH_DUMP_ERROR', $e
      ->getMessage());
  }
}